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

Code refactor #408

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Code refactor #408

wants to merge 3 commits into from

Conversation

GermanAizek
Copy link

@rdementi,
Check my changes, thanks.
Feedback with me with comments.

Copy link
Contributor

@ogbrugge-work ogbrugge-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look sane to me, please address the prog_name related comments by merging the prog_name related changes from b0662ef into f7de464

@@ -81,7 +81,7 @@ bool anyPmem(const ServerUncoreMemoryMetrics & metrics)

bool skipInactiveChannels = true;

void print_help(const string prog_name)
void print_help(const string & progname)
{
cerr << "\n Usage: \n " << progname
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge this change into the previous change? I would like each change to compile on its own and it is clear that this cannot compile on its own and needs both changes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change of the parameter name is not necessary and requires changing the name in other code lines. Could you please keep the old name?

@@ -79,7 +79,7 @@ double getAverageUncoreFrequencyGhz(const UncoreStateType& before, const UncoreS
return getAverageUncoreFrequency(before, after) / 1e9;
}

void print_help(const string prog_name)
void print_help(const string & progname)
{
cerr << "\n Usage: \n " << progname
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge this change into the previous change? I would like each change to compile on its own and it is clear that this cannot compile on its own and needs both changes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. Please keep the old name.

Copy link
Contributor

@opcm opcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the patch. Please implement the requested changes.

@@ -977,7 +977,6 @@ class PCM_API PCM
auto ctrl = pmu.counterControl[c];
if (ctrl.get() != nullptr)
{
*ctrl = MC_CH_PCI_PMON_CTL_EN;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if you keep " *ctrl = MC_CH_PCI_PMON_CTL_EN;" because IIRC some PMU docs suggested that the PMU control register needs to be written without the event/umask and then in the next write the event/umask needs to be written.

@@ -81,7 +81,7 @@ bool anyPmem(const ServerUncoreMemoryMetrics & metrics)

bool skipInactiveChannels = true;

void print_help(const string prog_name)
void print_help(const string & progname)
{
cerr << "\n Usage: \n " << progname
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change of the parameter name is not necessary and requires changing the name in other code lines. Could you please keep the old name?

@@ -79,7 +79,7 @@ double getAverageUncoreFrequencyGhz(const UncoreStateType& before, const UncoreS
return getAverageUncoreFrequency(before, after) / 1e9;
}

void print_help(const string prog_name)
void print_help(const string & progname)
{
cerr << "\n Usage: \n " << progname
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. Please keep the old name.

}
if (m->localMemoryRequestRatioMetricAvailable()) {
cout << " LOCAL : ratio of local memory requests to memory controller in %\n";
cout << "LLCRDMISSLAT: average latency of last level cache miss for reads and prefetches (in ns)\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the availability of LLCRDMISSLAT metric should be checked with m->LLCReadMissLatencyMetricsAvailable() and not with m->localMemoryRequestRatioMetricAvailable()

@opcm
Copy link
Contributor

opcm commented Jun 21, 2022

@GermanAizek ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants