Skip to content

Conversation

@janaknat
Copy link
Contributor

@janaknat janaknat commented Dec 6, 2023

Icelake and Sapphire Rapids have different configurations for the PMU events. Change them based on the Model during run-time.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@janaknat janaknat requested a review from a team as a code owner December 6, 2023 19:23
static BACKEND_STALLS: NamedTypeCtr = NamedTypeCtr {
perf_type: PerfType::RAW,
name: "Backend-Stalls",
config: 0x10a2,
Copy link
Contributor

Choose a reason for hiding this comment

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

correcting a bug too? I didn't see it mentioned in commit message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it to the commit.

src/data.rs Outdated
pub mod flamegraphs;
#[cfg(target_arch = "aarch64")]
pub mod grv_perf_events;
pub mod intel_icelake_perf_events;
Copy link
Contributor

Choose a reason for hiding this comment

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

this should go after line 8 below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Changing this as it should only be compiled on x86. rustfmt moved these :( .

src/data.rs Outdated
pub mod grv_perf_events;
pub mod intel_icelake_perf_events;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub mod intel_perf_events;
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 add a comment as to which Intel architecture does this file apply to?

@@ -0,0 +1,40 @@
use crate::data::perf_stat::{NamedCtr, NamedTypeCtr, PerfType};

static CYCLES: NamedTypeCtr = NamedTypeCtr {
Copy link
Contributor

Choose a reason for hiding this comment

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

These are same as the default in intel_perf_events.rs. So, does this architecture specific config file provide delta counters or all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We make sure the nr and dr are in the same file. We don't want to refer to other files for a PMU event.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

@RamaMalladiGH RamaMalladiGH left a comment

Choose a reason for hiding this comment

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

General comments, 1 change request.

Also, fix a bug in the default Intel PMU config for Backend Stalls.
@janaknat janaknat merged commit ed4ea07 into aws:main Dec 6, 2023
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.

3 participants