Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push 2021 12 16 #356

Merged
merged 23 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2de1a80
add silent info option -s to pcm-memory, some additional fixes
rdobrowo Dec 2, 2021
c716f09
add client metrics to csv
rdobrowo Dec 2, 2021
5f6fe57
Merge pull request #98 from intel-innersource/rdobrowo/add_silent_option
rdementi Dec 2, 2021
b28f1df
Merge pull request #100 from intel-innersource/rdobrowo/add_client_me…
rdementi Dec 2, 2021
b014486
Merge remote-tracking branch 'opcm-github/master' into main
rdementi Dec 2, 2021
2293529
add -i option to pcm-iio.cpp
rdobrowo Dec 3, 2021
aba8b10
don't use perf API for uncore if uncore perf iMC interface is not ava…
rdementi Dec 3, 2021
1f39830
Merge pull request #102 from intel-innersource/rdementi/uncore-perf-A…
rdementi Dec 3, 2021
65f5d79
Merge pull request #103 from intel-innersource/rdobrowo/add_interatio…
rdementi Dec 3, 2021
8e4f027
Fix header in tab separated prints
rdobrowo Dec 8, 2021
807145a
Add update option
rdobrowo Dec 3, 2021
027fdf2
Merge pull request #105 from intel-innersource/rdobrowo/fix_tab_prints
rdementi Dec 8, 2021
16d8209
Merge pull request #104 from intel-innersource/rdobrowo/add_update_op…
rdementi Dec 8, 2021
6eae15e
free winring0 using DeinitOpenLibSys
rdementi Dec 10, 2021
fe9655c
pcm-raw: overhead reduction for single group collection
rdementi Dec 10, 2021
85cc23d
pcm-iio: add a test
rdementi Dec 10, 2021
f9dc60b
Merge pull request #109 from intel-innersource/various_2021_12_10
rdementi Dec 10, 2021
404cf77
robustness enhancements
rdementi Dec 15, 2021
3e8f623
Merge pull request #112 from intel-innersource/rdementi-robustness
rdementi Dec 15, 2021
e2f78f4
Add tsv event file support
rdobrowo Dec 10, 2021
800c19c
robustness enhancements
rdementi Dec 16, 2021
7aa76af
Merge pull request #117 from intel-innersource/rdementi-robustness-plus
rdementi Dec 16, 2021
1c7b5e2
Merge pull request #111 from intel-innersource/rdobrowo/add_tsv_support
rdementi Dec 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions pcm-memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ void print_help(const string prog_name)
cerr << " -all | /all => Display all channels (even with no traffic)\n";
cerr << " -i[=number] | /i[=number] => allow to determine number of iterations\n";
cerr << " -s => silence information output and print only measurements\n";
cerr << " -u => update measurements instead of printing new ones\n";
#ifdef _MSC_VER
cerr << " --uninstallDriver | --installDriver=> (un)install driver\n";
#endif
Expand Down Expand Up @@ -364,14 +365,17 @@ void printSocketBWFooter(uint32 no_columns, uint32 skt, const memdata_t *md)
cout << "\n";
}

void display_bandwidth(PCM *m, memdata_t *md, const uint32 no_columns, const bool show_channel_output)
void display_bandwidth(PCM *m, memdata_t *md, const uint32 no_columns, const bool show_channel_output, const bool print_update)
{
float sysReadDRAM = 0.0, sysWriteDRAM = 0.0, sysReadPMM = 0.0, sysWritePMM = 0.0;
uint32 numSockets = m->getNumSockets();
uint32 skt = 0;
cout.setf(ios::fixed);
cout.precision(2);

if (print_update)
clear_screen();

while (skt < numSockets)
{
auto printRow = [&skt,&show_channel_output,&m,&md,&sysReadDRAM,&sysWriteDRAM, &sysReadPMM, &sysWritePMM](const uint32 no_columns)
Expand Down Expand Up @@ -733,7 +737,8 @@ void calculate_bandwidth(PCM *m,
bool & csvheader,
uint32 no_columns,
const ServerUncoreMemoryMetrics & metrics,
const bool show_channel_output)
const bool show_channel_output,
const bool print_update)
{
//const uint32 num_imc_channels = m->getMCChannelsPerSocket();
//const uint32 num_edc_channels = m->getEDCChannelsPerSocket();
Expand Down Expand Up @@ -926,7 +931,7 @@ void calculate_bandwidth(PCM *m,
}
else
{
display_bandwidth(m, &md, no_columns, show_channel_output);
display_bandwidth(m, &md, no_columns, show_channel_output, print_update);
}
}

Expand Down Expand Up @@ -984,7 +989,7 @@ int main(int argc, char * argv[])
cerr << "\n";

double delay = -1.0;
bool csv = false, csvheader=false, show_channel_output=true;
bool csv = false, csvheader = false, show_channel_output = true, print_update = false;
uint32 no_columns = DEFAULT_DISPLAY_COLUMNS; // Default number of columns is 2
char * sysCmd = NULL;
char ** sysArgv = NULL;
Expand Down Expand Up @@ -1110,6 +1115,12 @@ int main(int argc, char * argv[])
//already checked by check_and_set_silent()
continue;
}
else if (strncmp(*argv, "-u", 2) == 0 ||
strncmp(*argv, "/u", 2) == 0)
{
print_update = true;
continue;
}
#ifdef _MSC_VER
else if (strncmp(*argv, "--uninstallDriver", 17) == 0)
{
Expand Down Expand Up @@ -1243,7 +1254,8 @@ int main(int argc, char * argv[])
if(rankA >= 0 || rankB >= 0)
calculate_bandwidth_rank(m,BeforeState,AfterState,AfterTime-BeforeTime,csv,csvheader, no_columns, rankA, rankB);
else
calculate_bandwidth(m,BeforeState,AfterState,AfterTime-BeforeTime,csv,csvheader, no_columns, metrics, show_channel_output);
calculate_bandwidth(m,BeforeState,AfterState,AfterTime-BeforeTime,csv,csvheader, no_columns, metrics,
show_channel_output, print_update);

swap(BeforeTime, AfterTime);
swap(BeforeState, AfterState);
Expand Down
7 changes: 7 additions & 0 deletions utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,13 @@ inline void pcm_cpuid(int leaf, PCM_CPUID_INFO& info)
#endif
}

inline void clear_screen() {
#ifdef _MSC_VER
system("cls");
#else
std::cout << "\033[2J\033[0;0H";
#endif
}

inline uint32 build_bit_ui(uint32 beg, uint32 end)
{
Expand Down