-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add AMD PMC/U support #222
Changes from 1 commit
411112c
b823522
5cc4e58
82c2f8f
d1ee8e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
use crate::data::perf_stat::{NamedCtr, NamedTypeCtr, PerfType}; | ||
|
||
static STALL_BACKEND_PKC1: NamedTypeCtr = NamedTypeCtr { | ||
static STALL_BACKEND_1: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Backend-Stalls-1", | ||
config: 0xf7ae, | ||
}; | ||
static STALL_BACKEND_PKC2: NamedTypeCtr = NamedTypeCtr { | ||
static STALL_BACKEND_2: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Backend-Stalls-2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there any better specifiers for these besides just -1 and -2? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure, each one counts several backend stall types. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's not documented what exactly each one counts, perhaps the better thing to do is add them together. That assumes there's not overlap in what each one counts. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Talked with Geoff, the sum of the two is the total backend stalls. Pushed changes |
||
config: 0x27af, | ||
|
@@ -20,13 +20,13 @@ lazy_static! { | |
pub static ref MILAN_CTRS: Vec<NamedCtr<'static>> = [ | ||
NamedCtr { | ||
name: "stall_backend_pkc1", | ||
nrs: vec![STALL_BACKEND_PKC1], | ||
nrs: vec![STALL_BACKEND_1], | ||
drs: vec![CYCLES], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "stall_backend_pkc2", | ||
nrs: vec![STALL_BACKEND_PKC2], | ||
nrs: vec![STALL_BACKEND_2], | ||
drs: vec![CYCLES], | ||
scale: 1000 | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,54 +11,55 @@ static CYCLES: NamedTypeCtr = NamedTypeCtr { | |
name: "Cycles", | ||
config: 0x0076, | ||
}; | ||
static BRANCHES: NamedTypeCtr = NamedTypeCtr { | ||
static BRANCH_MISPRED: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Branches", | ||
name: "Branch-Mispredictions", | ||
config: 0x00c3, | ||
}; | ||
static L1_DATA: NamedTypeCtr = NamedTypeCtr { | ||
static L1_DATA_FILL: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "L1-Data", | ||
name: "L1-Data-Fills", | ||
config: 0xff44, | ||
}; | ||
static L1_INSTRUCTIONS: NamedTypeCtr = NamedTypeCtr { | ||
static L1_INSTRUCTION_MISS: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "L1-Instructions", | ||
name: "L1-Instruction-Misses", | ||
config: 0x1060, | ||
}; | ||
static L2: NamedTypeCtr = NamedTypeCtr { | ||
static L2_DEMAND_MISS: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "L2", | ||
name: "L2-Demand-Misses", | ||
config: 0x0964, | ||
}; | ||
static L3: NamedTypeCtr = NamedTypeCtr { | ||
static L1_ANY_FILLS_DRAM: NamedTypeCtr = NamedTypeCtr { | ||
// Approximately L3 Misses | ||
perf_type: PerfType::RAW, | ||
name: "L3", | ||
config: 0x0843, | ||
name: "L1-Any-Fills-DRAM", | ||
config: 0x0844, | ||
}; | ||
static STALL_FRONTEND_PKC: NamedTypeCtr = NamedTypeCtr { | ||
static STALL_FRONTEND: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Frontend-Stalls", | ||
config: 0x00a9, | ||
}; | ||
static INSTRUCTION_TLB: NamedTypeCtr = NamedTypeCtr { | ||
static INSTRUCTION_TLB_MISS: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Instruction-TLB", | ||
name: "Instruction-TLB-Misses", | ||
config: 0x0084, | ||
}; | ||
static INSTRUCTION_TLB_TW: NamedTypeCtr = NamedTypeCtr { | ||
static INSTRUCTION_TLB_TW_MISS: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Instruction-TLB-TW", | ||
name: "Instruction-TLB-TW-Misses", | ||
config: 0x0f85, | ||
}; | ||
static DATA_TLB: NamedTypeCtr = NamedTypeCtr { | ||
static DATA_TLB_MISS: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Data-TLB", | ||
name: "Data-TLB-Misses", | ||
config: 0xff45, | ||
}; | ||
static DATA_TLB_TW: NamedTypeCtr = NamedTypeCtr { | ||
static DATA_TLB_TW_MISS: NamedTypeCtr = NamedTypeCtr { | ||
perf_type: PerfType::RAW, | ||
name: "Data-TLB-TW", | ||
name: "Data-TLB-TW-Misses", | ||
config: 0xf045, | ||
}; | ||
|
||
|
@@ -72,61 +73,61 @@ lazy_static! { | |
}, | ||
NamedCtr { | ||
name: "branch-mpki", | ||
nrs: vec![BRANCHES], | ||
nrs: vec![BRANCH_MISPRED], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "data-l1-mpki", | ||
nrs: vec![L1_DATA], | ||
nrs: vec![L1_DATA_FILL], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "inst-l1-mpki", | ||
nrs: vec![L1_INSTRUCTIONS], | ||
nrs: vec![L1_INSTRUCTION_MISS], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "l2-mpki", | ||
nrs: vec![L2], | ||
nrs: vec![L2_DEMAND_MISS], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "l3-mpki", | ||
nrs: vec![L3], | ||
nrs: vec![L1_ANY_FILLS_DRAM], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Name says L3, nrs says L1. Are you sure this is right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The counter is approximating L3 misses. "This is sorta l3 mpki, but ellides Prefetch misses from L2" - from our docs. |
||
}, | ||
NamedCtr { | ||
name: "stall_frontend_pkc", | ||
nrs: vec![STALL_FRONTEND_PKC], | ||
nrs: vec![STALL_FRONTEND], | ||
drs: vec![CYCLES], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "inst-tlb-mpki", | ||
nrs: vec![INSTRUCTION_TLB], | ||
nrs: vec![INSTRUCTION_TLB_MISS], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "inst-tlb-tw-mpki", | ||
nrs: vec![INSTRUCTION_TLB_TW], | ||
nrs: vec![INSTRUCTION_TLB_TW_MISS], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "data-tlb-mpki", | ||
nrs: vec![DATA_TLB], | ||
nrs: vec![DATA_TLB_MISS], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
NamedCtr { | ||
name: "data-tlb-tw-pki", | ||
nrs: vec![DATA_TLB_TW], | ||
nrs: vec![DATA_TLB_TW_MISS], | ||
drs: vec![INSTRUCTIONS], | ||
scale: 1000 | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is really weird, why this value instead of just 1000? The ones below for milan are just 1000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, I think its from each cycle being able to dispatch 6 instructions? This scale was from our documentation and AMD documentation.