Skip to content

Commit

Permalink
Aperf: Use JSON for Perf Stat events
Browse files Browse the repository at this point in the history
Move to using JSON to hold the event details for Perf Stat. This makes
it easier to modify the files without the need for interacting with the
Rust compiler.

This is also in preparation for allowing the user to specify a custom
PMU config file.
  • Loading branch information
janaknat committed Dec 23, 2024
1 parent c88030f commit 00705a5
Show file tree
Hide file tree
Showing 16 changed files with 997 additions and 731 deletions.
12 changes: 0 additions & 12 deletions src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ pub mod constants;
pub mod cpu_utilization;
pub mod diskstats;
pub mod flamegraphs;
cfg_if::cfg_if! {
if #[cfg(target_arch = "aarch64")] {
pub mod grv_perf_events;
} else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
pub mod intel_perf_events;
pub mod intel_icelake_perf_events;
pub mod intel_sapphire_rapids_perf_events;
pub mod amd_perf_events;
pub mod amd_genoa_perf_events;
pub mod amd_milan_perf_events;
}
}
pub mod interrupts;
pub mod java_profile;
pub mod kernel_config;
Expand Down
20 changes: 20 additions & 0 deletions src/data/amd_genoa_ctrs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"name": "stall_backend_pkc",
"nrs": [
{
"perf_type": "RAW",
"name": "Backend-Stalls",
"config": 4294975136
}
],
"drs": [
{
"perf_type": "RAW",
"name": "Cycles",
"config": 118
}
],
"scale": 167
}
]
24 changes: 0 additions & 24 deletions src/data/amd_genoa_perf_events.rs

This file was deleted.

25 changes: 25 additions & 0 deletions src/data/amd_milan_ctrs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
{
"name": "stall_backend_pkc",
"nrs": [
{
"perf_type": "RAW",
"name": "Backend-Stalls-1",
"config": 63406
},
{
"perf_type": "RAW",
"name": "Backend-Stalls-2",
"config": 10159
}
],
"drs": [
{
"perf_type": "RAW",
"name": "Cycles",
"config": 118
}
],
"scale": 1000
}
]
27 changes: 0 additions & 27 deletions src/data/amd_milan_perf_events.rs

This file was deleted.

136 changes: 0 additions & 136 deletions src/data/amd_perf_events.rs

This file was deleted.

Loading

0 comments on commit 00705a5

Please sign in to comment.