perf vendor events riscv: Add SiFive Bullet version 0x07 events

SiFive Bullet microarchitecture cores with mimpid values starting with
0x07 or greater add new PMU events to support debug, trace, and counter
sampling and filtering (Sscofpmf).

All other PMU events are unchanged from earlier Bullet cores.

Signed-off-by: Eric Lin <eric.lin@sifive.com>
Co-developed-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Tested-by: Ian Rogers <irogers@google.com>
Tested-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20250213220341.3215660-5-samuel.holland@sifive.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
Eric Lin
2025-02-12 17:21:37 -08:00
committed by Namhyung Kim
parent 4f762cb409
commit acaefd6049
7 changed files with 120 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#
#MVENDORID-MARCHID-MIMPID,Version,Filename,EventType
0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,core
0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core
0x5b7-0x0-0x0,v1,thead/c900-legacy,core
0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core
0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core
1 # Format:
15 #
16 #MVENDORID-MARCHID-MIMPID,Version,Filename,EventType
17 0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,core
18 0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core
19 0x5b7-0x0-0x0,v1,thead/c900-legacy,core
20 0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core
21 0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core

View File

@@ -0,0 +1,12 @@
[
{
"EventName": "CORE_CLOCK_CYCLES",
"EventCode": "0x165",
"BriefDescription": "Counts core clock cycles"
},
{
"EventName": "INSTRUCTIONS_RETIRED",
"EventCode": "0x265",
"BriefDescription": "Counts instructions retired"
}
]

View File

@@ -0,0 +1 @@
../bullet/firmware.json

View File

@@ -0,0 +1 @@
../bullet/instruction.json

View File

@@ -0,0 +1 @@
../bullet/memory.json

View File

@@ -0,0 +1,62 @@
[
{
"EventName": "ADDRESSGEN_INTERLOCK",
"EventCode": "0x101",
"BriefDescription": "Counts cycles with an address-generation interlock"
},
{
"EventName": "LONGLATENCY_INTERLOCK",
"EventCode": "0x201",
"BriefDescription": "Counts cycles with a long-latency interlock"
},
{
"EventName": "CSR_INTERLOCK",
"EventCode": "0x401",
"BriefDescription": "Counts cycles with a CSR interlock"
},
{
"EventName": "ICACHE_BLOCKED",
"EventCode": "0x801",
"BriefDescription": "Counts cycles in which the instruction cache was not able to provide an instruction"
},
{
"EventName": "DCACHE_BLOCKED",
"EventCode": "0x1001",
"BriefDescription": "Counts cycles in which the data cache blocked an instruction"
},
{
"EventName": "BRANCH_DIRECTION_MISPREDICTION",
"EventCode": "0x2001",
"BriefDescription": "Counts mispredictions of conditional branch direction (taken/not taken)"
},
{
"EventName": "BRANCH_TARGET_MISPREDICTION",
"EventCode": "0x4001",
"BriefDescription": "Counts mispredictions of the target PC of control-flow instructions"
},
{
"EventName": "PIPELINE_FLUSH",
"EventCode": "0x8001",
"BriefDescription": "Counts flushes of the core pipeline. Common causes include fence.i and CSR accesses"
},
{
"EventName": "REPLAY",
"EventCode": "0x10001",
"BriefDescription": "Counts instruction replays"
},
{
"EventName": "INTEGER_MUL_DIV_INTERLOCK",
"EventCode": "0x20001",
"BriefDescription": "Counts cycles with a multiply or divide interlock"
},
{
"EventName": "FP_INTERLOCK",
"EventCode": "0x40001",
"BriefDescription": "Counts cycles with a floating-point interlock"
},
{
"EventName": "TRACE_STALL",
"EventCode": "0x80001",
"BriefDescription": "Counts cycles in which the core pipeline is stalled due to backpressure from the Trace Encoder"
}
]

View File

@@ -0,0 +1,42 @@
[
{
"EventName": "WATCHPOINT_0",
"EventCode": "0x164",
"BriefDescription": "Counts occurrences of watchpoint 0 with action=8"
},
{
"EventName": "WATCHPOINT_1",
"EventCode": "0x264",
"BriefDescription": "Counts occurrences of watchpoint 1 with action=8"
},
{
"EventName": "WATCHPOINT_2",
"EventCode": "0x464",
"BriefDescription": "Counts occurrences of watchpoint 2 with action=8"
},
{
"EventName": "WATCHPOINT_3",
"EventCode": "0x864",
"BriefDescription": "Counts occurrences of watchpoint 3 with action=8"
},
{
"EventName": "WATCHPOINT_4",
"EventCode": "0x1064",
"BriefDescription": "Counts occurrences of watchpoint 4 with action=8"
},
{
"EventName": "WATCHPOINT_5",
"EventCode": "0x2064",
"BriefDescription": "Counts occurrences of watchpoint 5 with action=8"
},
{
"EventName": "WATCHPOINT_6",
"EventCode": "0x4064",
"BriefDescription": "Counts occurrences of watchpoint 6 with action=8"
},
{
"EventName": "WATCHPOINT_7",
"EventCode": "0x8064",
"BriefDescription": "Counts occurrences of watchpoint 7 with action=8"
}
]