* [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
@ 2025-02-13 1:21 Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 1/7] perf vendor events riscv: Rename U74 to Bullet Samuel Holland
` (8 more replies)
0 siblings, 9 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Samuel Holland
This series updates the PMU event JSON files to add support for newer
SiFive CPUs, including those used in the HiFive Premier P550 board.
Since most changes are incremental, symbolic links are used when a set
of events is unchanged from the previous CPU series.
I originally sent this series about a year ago[1], but received no
feedback. The P550 board is now available (and I have tested this series
on it), so it would be good to get perf support for it upstream.
[1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
Eric Lin (5):
perf vendor events riscv: Update SiFive Bullet events
perf vendor events riscv: Add SiFive Bullet version 0x07 events
perf vendor events riscv: Add SiFive Bullet version 0x0d events
perf vendor events riscv: Add SiFive P550 events
perf vendor events riscv: Add SiFive P650 events
Samuel Holland (2):
perf vendor events riscv: Rename U74 to Bullet
perf vendor events riscv: Remove leading zeroes
tools/perf/pmu-events/arch/riscv/mapfile.csv | 6 +-
.../cycle-and-instruction-count.json | 12 +++
.../arch/riscv/sifive/bullet-07/firmware.json | 1 +
.../riscv/sifive/bullet-07/instruction.json | 1 +
.../arch/riscv/sifive/bullet-07/memory.json | 1 +
.../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++
.../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++
.../cycle-and-instruction-count.json | 1 +
.../arch/riscv/sifive/bullet-0d/firmware.json | 1 +
.../riscv/sifive/bullet-0d/instruction.json | 1 +
.../arch/riscv/sifive/bullet-0d/memory.json | 1 +
.../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++
.../riscv/sifive/bullet-0d/watchpoint.json | 1 +
.../sifive/{u74 => bullet}/firmware.json | 0
.../arch/riscv/sifive/bullet/instruction.json | 92 +++++++++++++++++++
.../arch/riscv/sifive/bullet/memory.json | 32 +++++++
.../arch/riscv/sifive/bullet/microarch.json | 57 ++++++++++++
.../arch/riscv/sifive/p550/firmware.json | 1 +
.../arch/riscv/sifive/p550/instruction.json | 1 +
.../arch/riscv/sifive/p550/memory.json | 47 ++++++++++
.../arch/riscv/sifive/p550/microarch.json | 1 +
.../p650/cycle-and-instruction-count.json | 1 +
.../arch/riscv/sifive/p650/firmware.json | 1 +
.../arch/riscv/sifive/p650/instruction.json | 1 +
.../arch/riscv/sifive/p650/memory.json | 57 ++++++++++++
.../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++
.../arch/riscv/sifive/p650/watchpoint.json | 1 +
.../arch/riscv/sifive/u74/instructions.json | 92 -------------------
.../arch/riscv/sifive/u74/memory.json | 32 -------
.../arch/riscv/sifive/u74/microarch.json | 57 ------------
30 files changed, 555 insertions(+), 182 deletions(-)
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%)
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json
delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json
delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
* [RESEND PATCH 1/7] perf vendor events riscv: Rename U74 to Bullet
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
@ 2025-02-13 1:21 ` Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 2/7] perf vendor events riscv: Remove leading zeroes Samuel Holland
` (7 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Samuel Holland
This set of PMU event descriptions applies not only to the SiFive U74
core configuration, but also to other SiFive cores that implement the
Bullet microarchitecture (such as U64, P270, and X280). Rename the
directory to be more generic.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---
tools/perf/pmu-events/arch/riscv/mapfile.csv | 2 +-
.../pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json | 0
.../sifive/{u74/instructions.json => bullet/instruction.json} | 0
.../pmu-events/arch/riscv/sifive/{u74 => bullet}/memory.json | 0
.../pmu-events/arch/riscv/sifive/{u74 => bullet}/microarch.json | 0
5 files changed, 1 insertion(+), 1 deletion(-)
rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%)
rename tools/perf/pmu-events/arch/riscv/sifive/{u74/instructions.json => bullet/instruction.json} (100%)
rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/memory.json (100%)
rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/microarch.json (100%)
diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv
index 3d3a809a5446..521f416b0006 100644
--- a/tools/perf/pmu-events/arch/riscv/mapfile.csv
+++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv
@@ -14,7 +14,7 @@
#
#
#MVENDORID-MARCHID-MIMPID,Version,Filename,EventType
-0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/u74,core
+0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,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
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/firmware.json
similarity index 100%
rename from tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/firmware.json
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
similarity index 100%
rename from tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json
rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
similarity index 100%
rename from tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json
rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
similarity index 100%
rename from tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json
rename to tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RESEND PATCH 2/7] perf vendor events riscv: Remove leading zeroes
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 1/7] perf vendor events riscv: Rename U74 to Bullet Samuel Holland
@ 2025-02-13 1:21 ` Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 3/7] perf vendor events riscv: Update SiFive Bullet events Samuel Holland
` (6 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Samuel Holland
The EventCode field (as stored in the mhpmeventN CSRs) is actually 56
bits wide, but there is no need to keep leading zeroes in the JSON
files. Remove them to simplify review of the following change, which
regenerates the files in a way that does not include leading zeroes.
This change was performed automatically with `sed -i "s/0x0*/0x/"`.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---
.../arch/riscv/sifive/bullet/instruction.json | 32 +++++++++----------
.../arch/riscv/sifive/bullet/memory.json | 12 +++----
.../arch/riscv/sifive/bullet/microarch.json | 22 ++++++-------
3 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
index 5eab718c9256..d5c370f70819 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
@@ -1,82 +1,82 @@
[
{
"EventName": "EXCEPTION_TAKEN",
- "EventCode": "0x0000100",
+ "EventCode": "0x100",
"BriefDescription": "Exception taken"
},
{
"EventName": "INTEGER_LOAD_RETIRED",
- "EventCode": "0x0000200",
+ "EventCode": "0x200",
"BriefDescription": "Integer load instruction retired"
},
{
"EventName": "INTEGER_STORE_RETIRED",
- "EventCode": "0x0000400",
+ "EventCode": "0x400",
"BriefDescription": "Integer store instruction retired"
},
{
"EventName": "ATOMIC_MEMORY_RETIRED",
- "EventCode": "0x0000800",
+ "EventCode": "0x800",
"BriefDescription": "Atomic memory operation retired"
},
{
"EventName": "SYSTEM_INSTRUCTION_RETIRED",
- "EventCode": "0x0001000",
+ "EventCode": "0x1000",
"BriefDescription": "System instruction retired"
},
{
"EventName": "INTEGER_ARITHMETIC_RETIRED",
- "EventCode": "0x0002000",
+ "EventCode": "0x2000",
"BriefDescription": "Integer arithmetic instruction retired"
},
{
"EventName": "CONDITIONAL_BRANCH_RETIRED",
- "EventCode": "0x0004000",
+ "EventCode": "0x4000",
"BriefDescription": "Conditional branch retired"
},
{
"EventName": "JAL_INSTRUCTION_RETIRED",
- "EventCode": "0x0008000",
+ "EventCode": "0x8000",
"BriefDescription": "JAL instruction retired"
},
{
"EventName": "JALR_INSTRUCTION_RETIRED",
- "EventCode": "0x0010000",
+ "EventCode": "0x10000",
"BriefDescription": "JALR instruction retired"
},
{
"EventName": "INTEGER_MULTIPLICATION_RETIRED",
- "EventCode": "0x0020000",
+ "EventCode": "0x20000",
"BriefDescription": "Integer multiplication instruction retired"
},
{
"EventName": "INTEGER_DIVISION_RETIRED",
- "EventCode": "0x0040000",
+ "EventCode": "0x40000",
"BriefDescription": "Integer division instruction retired"
},
{
"EventName": "FP_LOAD_RETIRED",
- "EventCode": "0x0080000",
+ "EventCode": "0x80000",
"BriefDescription": "Floating-point load instruction retired"
},
{
"EventName": "FP_STORE_RETIRED",
- "EventCode": "0x0100000",
+ "EventCode": "0x100000",
"BriefDescription": "Floating-point store instruction retired"
},
{
"EventName": "FP_ADDITION_RETIRED",
- "EventCode": "0x0200000",
+ "EventCode": "0x200000",
"BriefDescription": "Floating-point addition retired"
},
{
"EventName": "FP_MULTIPLICATION_RETIRED",
- "EventCode": "0x0400000",
+ "EventCode": "0x400000",
"BriefDescription": "Floating-point multiplication retired"
},
{
"EventName": "FP_FUSEDMADD_RETIRED",
- "EventCode": "0x0800000",
+ "EventCode": "0x800000",
"BriefDescription": "Floating-point fused multiply-add retired"
},
{
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
index be1a46312ac3..ba3168f8a4cd 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
@@ -1,32 +1,32 @@
[
{
"EventName": "ICACHE_RETIRED",
- "EventCode": "0x0000102",
+ "EventCode": "0x102",
"BriefDescription": "Instruction cache miss"
},
{
"EventName": "DCACHE_MISS_MMIO_ACCESSES",
- "EventCode": "0x0000202",
+ "EventCode": "0x202",
"BriefDescription": "Data cache miss or memory-mapped I/O access"
},
{
"EventName": "DCACHE_WRITEBACK",
- "EventCode": "0x0000402",
+ "EventCode": "0x402",
"BriefDescription": "Data cache write-back"
},
{
"EventName": "INST_TLB_MISS",
- "EventCode": "0x0000802",
+ "EventCode": "0x802",
"BriefDescription": "Instruction TLB miss"
},
{
"EventName": "DATA_TLB_MISS",
- "EventCode": "0x0001002",
+ "EventCode": "0x1002",
"BriefDescription": "Data TLB miss"
},
{
"EventName": "UTLB_MISS",
- "EventCode": "0x0002002",
+ "EventCode": "0x2002",
"BriefDescription": "UTLB miss"
}
]
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
index 50ffa55418cb..8036e72fb0d4 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
@@ -1,57 +1,57 @@
[
{
"EventName": "ADDRESSGEN_INTERLOCK",
- "EventCode": "0x0000101",
+ "EventCode": "0x101",
"BriefDescription": "Address-generation interlock"
},
{
"EventName": "LONGLAT_INTERLOCK",
- "EventCode": "0x0000201",
+ "EventCode": "0x201",
"BriefDescription": "Long-latency interlock"
},
{
"EventName": "CSR_READ_INTERLOCK",
- "EventCode": "0x0000401",
+ "EventCode": "0x401",
"BriefDescription": "CSR read interlock"
},
{
"EventName": "ICACHE_ITIM_BUSY",
- "EventCode": "0x0000801",
+ "EventCode": "0x801",
"BriefDescription": "Instruction cache/ITIM busy"
},
{
"EventName": "DCACHE_DTIM_BUSY",
- "EventCode": "0x0001001",
+ "EventCode": "0x1001",
"BriefDescription": "Data cache/DTIM busy"
},
{
"EventName": "BRANCH_DIRECTION_MISPREDICTION",
- "EventCode": "0x0002001",
+ "EventCode": "0x2001",
"BriefDescription": "Branch direction misprediction"
},
{
"EventName": "BRANCH_TARGET_MISPREDICTION",
- "EventCode": "0x0004001",
+ "EventCode": "0x4001",
"BriefDescription": "Branch/jump target misprediction"
},
{
"EventName": "PIPE_FLUSH_CSR_WRITE",
- "EventCode": "0x0008001",
+ "EventCode": "0x8001",
"BriefDescription": "Pipeline flush from CSR write"
},
{
"EventName": "PIPE_FLUSH_OTHER_EVENT",
- "EventCode": "0x0010001",
+ "EventCode": "0x10001",
"BriefDescription": "Pipeline flush from other event"
},
{
"EventName": "INTEGER_MULTIPLICATION_INTERLOCK",
- "EventCode": "0x0020001",
+ "EventCode": "0x20001",
"BriefDescription": "Integer multiplication interlock"
},
{
"EventName": "FP_INTERLOCK",
- "EventCode": "0x0040001",
+ "EventCode": "0x40001",
"BriefDescription": "Floating-point interlock"
}
]
\ No newline at end of file
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RESEND PATCH 3/7] perf vendor events riscv: Update SiFive Bullet events
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 1/7] perf vendor events riscv: Rename U74 to Bullet Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 2/7] perf vendor events riscv: Remove leading zeroes Samuel Holland
@ 2025-02-13 1:21 ` Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 4/7] perf vendor events riscv: Add SiFive Bullet version 0x07 events Samuel Holland
` (5 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Eric Lin, Samuel Holland
From: Eric Lin <eric.lin@sifive.com>
Regenerate the event lists from the original hardware description. This
makes them consistent with the event lists for newer versions of the
hardware, allowing most files to be reused across hardware versions.
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>
---
.../arch/riscv/sifive/bullet/instruction.json | 44 +++++++++----------
.../arch/riscv/sifive/bullet/memory.json | 24 +++++-----
.../arch/riscv/sifive/bullet/microarch.json | 38 ++++++++--------
3 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
index d5c370f70819..284e4c1566e0 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
@@ -2,91 +2,91 @@
{
"EventName": "EXCEPTION_TAKEN",
"EventCode": "0x100",
- "BriefDescription": "Exception taken"
+ "BriefDescription": "Counts exceptions taken"
},
{
"EventName": "INTEGER_LOAD_RETIRED",
"EventCode": "0x200",
- "BriefDescription": "Integer load instruction retired"
+ "BriefDescription": "Counts integer load instructions retired"
},
{
"EventName": "INTEGER_STORE_RETIRED",
"EventCode": "0x400",
- "BriefDescription": "Integer store instruction retired"
+ "BriefDescription": "Counts integer store instructions retired"
},
{
"EventName": "ATOMIC_MEMORY_RETIRED",
"EventCode": "0x800",
- "BriefDescription": "Atomic memory operation retired"
+ "BriefDescription": "Counts atomic memory instructions retired"
},
{
"EventName": "SYSTEM_INSTRUCTION_RETIRED",
"EventCode": "0x1000",
- "BriefDescription": "System instruction retired"
+ "BriefDescription": "Counts system instructions retired (CSR, WFI, MRET, etc.)"
},
{
"EventName": "INTEGER_ARITHMETIC_RETIRED",
"EventCode": "0x2000",
- "BriefDescription": "Integer arithmetic instruction retired"
+ "BriefDescription": "Counts integer arithmetic instructions retired"
},
{
"EventName": "CONDITIONAL_BRANCH_RETIRED",
"EventCode": "0x4000",
- "BriefDescription": "Conditional branch retired"
+ "BriefDescription": "Counts conditional branch instructions retired"
},
{
"EventName": "JAL_INSTRUCTION_RETIRED",
"EventCode": "0x8000",
- "BriefDescription": "JAL instruction retired"
+ "BriefDescription": "Counts jump-and-link instructions retired"
},
{
"EventName": "JALR_INSTRUCTION_RETIRED",
"EventCode": "0x10000",
- "BriefDescription": "JALR instruction retired"
+ "BriefDescription": "Counts indirect jump instructions (JALR) retired"
},
{
"EventName": "INTEGER_MULTIPLICATION_RETIRED",
"EventCode": "0x20000",
- "BriefDescription": "Integer multiplication instruction retired"
+ "BriefDescription": "Counts integer multiplication instructions retired"
},
{
"EventName": "INTEGER_DIVISION_RETIRED",
"EventCode": "0x40000",
- "BriefDescription": "Integer division instruction retired"
+ "BriefDescription": "Counts integer division instructions retired"
},
{
"EventName": "FP_LOAD_RETIRED",
"EventCode": "0x80000",
- "BriefDescription": "Floating-point load instruction retired"
+ "BriefDescription": "Counts floating-point load instructions retired"
},
{
"EventName": "FP_STORE_RETIRED",
"EventCode": "0x100000",
- "BriefDescription": "Floating-point store instruction retired"
+ "BriefDescription": "Counts floating-point store instructions retired"
},
{
- "EventName": "FP_ADDITION_RETIRED",
+ "EventName": "FP_ADD_RETIRED",
"EventCode": "0x200000",
- "BriefDescription": "Floating-point addition retired"
+ "BriefDescription": "Counts floating-point add instructions retired"
},
{
- "EventName": "FP_MULTIPLICATION_RETIRED",
+ "EventName": "FP_MUL_RETIRED",
"EventCode": "0x400000",
- "BriefDescription": "Floating-point multiplication retired"
+ "BriefDescription": "Counts floating-point multiply instructions retired"
},
{
- "EventName": "FP_FUSEDMADD_RETIRED",
+ "EventName": "FP_MULADD_RETIRED",
"EventCode": "0x800000",
- "BriefDescription": "Floating-point fused multiply-add retired"
+ "BriefDescription": "Counts floating-point fused multiply-add instructions retired"
},
{
"EventName": "FP_DIV_SQRT_RETIRED",
"EventCode": "0x1000000",
- "BriefDescription": "Floating-point division or square-root retired"
+ "BriefDescription": "Counts floating point divide or square root instructions retired"
},
{
"EventName": "OTHER_FP_RETIRED",
"EventCode": "0x2000000",
- "BriefDescription": "Other floating-point instruction retired"
+ "BriefDescription": "Counts other floating-point instructions retired"
}
-]
\ No newline at end of file
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
index ba3168f8a4cd..70441a55dd66 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
@@ -1,32 +1,32 @@
[
{
- "EventName": "ICACHE_RETIRED",
+ "EventName": "ICACHE_MISS",
"EventCode": "0x102",
- "BriefDescription": "Instruction cache miss"
+ "BriefDescription": "Counts instruction cache misses"
},
{
- "EventName": "DCACHE_MISS_MMIO_ACCESSES",
+ "EventName": "DCACHE_MISS",
"EventCode": "0x202",
- "BriefDescription": "Data cache miss or memory-mapped I/O access"
+ "BriefDescription": "Counts data cache misses"
},
{
- "EventName": "DCACHE_WRITEBACK",
+ "EventName": "DCACHE_RELEASE",
"EventCode": "0x402",
- "BriefDescription": "Data cache write-back"
+ "BriefDescription": "Counts writeback requests from the data cache"
},
{
- "EventName": "INST_TLB_MISS",
+ "EventName": "ITLB_MISS",
"EventCode": "0x802",
- "BriefDescription": "Instruction TLB miss"
+ "BriefDescription": "Counts Instruction TLB misses caused by instruction address translation requests"
},
{
- "EventName": "DATA_TLB_MISS",
+ "EventName": "DTLB_MISS",
"EventCode": "0x1002",
- "BriefDescription": "Data TLB miss"
+ "BriefDescription": "Counts Data TLB misses caused by data address translation requests"
},
{
"EventName": "UTLB_MISS",
"EventCode": "0x2002",
- "BriefDescription": "UTLB miss"
+ "BriefDescription": "Counts Unified TLB misses caused by address translation requests"
}
-]
\ No newline at end of file
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
index 8036e72fb0d4..d9cdb7d747ee 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
@@ -2,56 +2,56 @@
{
"EventName": "ADDRESSGEN_INTERLOCK",
"EventCode": "0x101",
- "BriefDescription": "Address-generation interlock"
+ "BriefDescription": "Counts cycles with an address-generation interlock"
},
{
- "EventName": "LONGLAT_INTERLOCK",
+ "EventName": "LONGLATENCY_INTERLOCK",
"EventCode": "0x201",
- "BriefDescription": "Long-latency interlock"
+ "BriefDescription": "Counts cycles with a long-latency interlock"
},
{
- "EventName": "CSR_READ_INTERLOCK",
+ "EventName": "CSR_INTERLOCK",
"EventCode": "0x401",
- "BriefDescription": "CSR read interlock"
+ "BriefDescription": "Counts cycles with a CSR interlock"
},
{
- "EventName": "ICACHE_ITIM_BUSY",
+ "EventName": "ICACHE_BLOCKED",
"EventCode": "0x801",
- "BriefDescription": "Instruction cache/ITIM busy"
+ "BriefDescription": "Counts cycles in which the instruction cache was not able to provide an instruction"
},
{
- "EventName": "DCACHE_DTIM_BUSY",
+ "EventName": "DCACHE_BLOCKED",
"EventCode": "0x1001",
- "BriefDescription": "Data cache/DTIM busy"
+ "BriefDescription": "Counts cycles in which the data cache blocked an instruction"
},
{
"EventName": "BRANCH_DIRECTION_MISPREDICTION",
"EventCode": "0x2001",
- "BriefDescription": "Branch direction misprediction"
+ "BriefDescription": "Counts mispredictions of conditional branch direction (taken/not taken)"
},
{
"EventName": "BRANCH_TARGET_MISPREDICTION",
"EventCode": "0x4001",
- "BriefDescription": "Branch/jump target misprediction"
+ "BriefDescription": "Counts mispredictions of the target PC of control-flow instructions"
},
{
- "EventName": "PIPE_FLUSH_CSR_WRITE",
+ "EventName": "PIPELINE_FLUSH",
"EventCode": "0x8001",
- "BriefDescription": "Pipeline flush from CSR write"
+ "BriefDescription": "Counts flushes of the core pipeline. Common causes include fence.i and CSR accesses"
},
{
- "EventName": "PIPE_FLUSH_OTHER_EVENT",
+ "EventName": "REPLAY",
"EventCode": "0x10001",
- "BriefDescription": "Pipeline flush from other event"
+ "BriefDescription": "Counts instruction replays"
},
{
- "EventName": "INTEGER_MULTIPLICATION_INTERLOCK",
+ "EventName": "INTEGER_MUL_DIV_INTERLOCK",
"EventCode": "0x20001",
- "BriefDescription": "Integer multiplication interlock"
+ "BriefDescription": "Counts cycles with a multiply or divide interlock"
},
{
"EventName": "FP_INTERLOCK",
"EventCode": "0x40001",
- "BriefDescription": "Floating-point interlock"
+ "BriefDescription": "Counts cycles with a floating-point interlock"
}
-]
\ No newline at end of file
+]
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RESEND PATCH 4/7] perf vendor events riscv: Add SiFive Bullet version 0x07 events
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
` (2 preceding siblings ...)
2025-02-13 1:21 ` [RESEND PATCH 3/7] perf vendor events riscv: Update SiFive Bullet events Samuel Holland
@ 2025-02-13 1:21 ` Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 5/7] perf vendor events riscv: Add SiFive Bullet version 0x0d events Samuel Holland
` (4 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Eric Lin, Samuel Holland
From: Eric Lin <eric.lin@sifive.com>
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>
---
tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 +
.../cycle-and-instruction-count.json | 12 ++++
.../arch/riscv/sifive/bullet-07/firmware.json | 1 +
.../riscv/sifive/bullet-07/instruction.json | 1 +
.../arch/riscv/sifive/bullet-07/memory.json | 1 +
.../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++++++++
.../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++++++
7 files changed, 120 insertions(+)
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv
index 521f416b0006..8706d289215e 100644
--- a/tools/perf/pmu-events/arch/riscv/mapfile.csv
+++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv
@@ -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
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
new file mode 100644
index 000000000000..5c8124cfe926
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
@@ -0,0 +1,12 @@
+[
+ {
+ "EventName": "CORE_CLOCK_CYCLES",
+ "EventCode": "0x165",
+ "BriefDescription": "Counts core clock cycles"
+ },
+ {
+ "EventName": "INSTRUCTIONS_RETIRED",
+ "EventCode": "0x265",
+ "BriefDescription": "Counts instructions retired"
+ }
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
new file mode 120000
index 000000000000..34e5c2870eee
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
@@ -0,0 +1 @@
+../bullet/firmware.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
new file mode 120000
index 000000000000..62eacc2d7497
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
@@ -0,0 +1 @@
+../bullet/instruction.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
new file mode 120000
index 000000000000..df50fc47a5fe
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
@@ -0,0 +1 @@
+../bullet/memory.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
new file mode 100644
index 000000000000..de8efd7b8b34
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
@@ -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"
+ }
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
new file mode 100644
index 000000000000..aa7a12818521
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
@@ -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"
+ }
+]
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RESEND PATCH 5/7] perf vendor events riscv: Add SiFive Bullet version 0x0d events
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
` (3 preceding siblings ...)
2025-02-13 1:21 ` [RESEND PATCH 4/7] perf vendor events riscv: Add SiFive Bullet version 0x07 events Samuel Holland
@ 2025-02-13 1:21 ` Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 6/7] perf vendor events riscv: Add SiFive P550 events Samuel Holland
` (3 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Eric Lin, Samuel Holland
From: Eric Lin <eric.lin@sifive.com>
SiFive Bullet microarchitecture cores with mimpid values starting with
0x0d or greater add new PMU events to count TLB miss stall cycles.
All other PMU events are unchanged from earlier Bullet cores.
Signed-off-by: Eric Lin <eric.lin@sifive.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---
tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 +
.../cycle-and-instruction-count.json | 1 +
.../arch/riscv/sifive/bullet-0d/firmware.json | 1 +
.../riscv/sifive/bullet-0d/instruction.json | 1 +
.../arch/riscv/sifive/bullet-0d/memory.json | 1 +
.../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++++++
.../riscv/sifive/bullet-0d/watchpoint.json | 1 +
7 files changed, 78 insertions(+)
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv
index 8706d289215e..9e9bd7ac0ebe 100644
--- a/tools/perf/pmu-events/arch/riscv/mapfile.csv
+++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv
@@ -16,6 +16,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
+0x489-0x8000000000000[1-9a-e]07-0xd[[:xdigit:]]+,v1,sifive/bullet-0d,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
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
new file mode 120000
index 000000000000..ccd29278f61b
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
@@ -0,0 +1 @@
+../bullet-07/cycle-and-instruction-count.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
new file mode 120000
index 000000000000..34e5c2870eee
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
@@ -0,0 +1 @@
+../bullet/firmware.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
new file mode 120000
index 000000000000..62eacc2d7497
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
@@ -0,0 +1 @@
+../bullet/instruction.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
new file mode 120000
index 000000000000..df50fc47a5fe
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
@@ -0,0 +1 @@
+../bullet/memory.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
new file mode 100644
index 000000000000..6573b24788eb
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
@@ -0,0 +1,72 @@
+[
+ {
+ "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"
+ },
+ {
+ "EventName": "ITLB_MISS_STALL",
+ "EventCode": "0x100001",
+ "BriefDescription": "Counts cycles in which the core pipeline is stalled due to ITLB Miss"
+ },
+ {
+ "EventName": "DTLB_MISS_STALL",
+ "EventCode": "0x200001",
+ "BriefDescription": "Counts cycles in which the core pipeline is stalled due to DTLB Miss"
+ }
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
new file mode 120000
index 000000000000..e88b98bfc5c8
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
@@ -0,0 +1 @@
+../bullet-07/watchpoint.json
\ No newline at end of file
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RESEND PATCH 6/7] perf vendor events riscv: Add SiFive P550 events
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
` (4 preceding siblings ...)
2025-02-13 1:21 ` [RESEND PATCH 5/7] perf vendor events riscv: Add SiFive Bullet version 0x0d events Samuel Holland
@ 2025-02-13 1:21 ` Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 7/7] perf vendor events riscv: Add SiFive P650 events Samuel Holland
` (2 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Eric Lin, Samuel Holland
From: Eric Lin <eric.lin@sifive.com>
The SiFive Performance P550 core features an out-of-order
microarchitecture which exposes the same PMU events as Bullet,
plus events for UTLB hits and PTE cache misses/hits.
Add support for specifying these events using symbolic names.
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>
---
tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 +
.../arch/riscv/sifive/p550/firmware.json | 1 +
.../arch/riscv/sifive/p550/instruction.json | 1 +
.../arch/riscv/sifive/p550/memory.json | 47 +++++++++++++++++++
.../arch/riscv/sifive/p550/microarch.json | 1 +
5 files changed, 51 insertions(+)
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv
index 9e9bd7ac0ebe..a301e9dbfd5a 100644
--- a/tools/perf/pmu-events/arch/riscv/mapfile.csv
+++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv
@@ -17,6 +17,7 @@
0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/bullet,core
0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core
0x489-0x8000000000000[1-9a-e]07-0xd[[:xdigit:]]+,v1,sifive/bullet-0d,core
+0x489-0x8000000000000008-0x[[:xdigit:]]+,v1,sifive/p550,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
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
new file mode 120000
index 000000000000..34e5c2870eee
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
@@ -0,0 +1 @@
+../bullet/firmware.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
new file mode 120000
index 000000000000..62eacc2d7497
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
@@ -0,0 +1 @@
+../bullet/instruction.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
new file mode 100644
index 000000000000..8393f81b2cf0
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
@@ -0,0 +1,47 @@
+[
+ {
+ "EventName": "ICACHE_MISS",
+ "EventCode": "0x102",
+ "BriefDescription": "Counts instruction cache misses"
+ },
+ {
+ "EventName": "DCACHE_MISS",
+ "EventCode": "0x202",
+ "BriefDescription": "Counts data cache misses"
+ },
+ {
+ "EventName": "DCACHE_RELEASE",
+ "EventCode": "0x402",
+ "BriefDescription": "Counts writeback requests from the data cache"
+ },
+ {
+ "EventName": "ITLB_MISS",
+ "EventCode": "0x802",
+ "BriefDescription": "Counts Instruction TLB misses caused by instruction address translation requests"
+ },
+ {
+ "EventName": "DTLB_MISS",
+ "EventCode": "0x1002",
+ "BriefDescription": "Counts Data TLB misses caused by data address translation requests"
+ },
+ {
+ "EventName": "UTLB_MISS",
+ "EventCode": "0x2002",
+ "BriefDescription": "Counts Unified TLB misses caused by address translation requests"
+ },
+ {
+ "EventName": "UTLB_HIT",
+ "EventCode": "0x4002",
+ "BriefDescription": "Counts Unified TLB hits for address translation requests"
+ },
+ {
+ "EventName": "PTE_CACHE_MISS",
+ "EventCode": "0x8002",
+ "BriefDescription": "Counts Page Table Entry cache misses"
+ },
+ {
+ "EventName": "PTE_CACHE_HIT",
+ "EventCode": "0x10002",
+ "BriefDescription": "Counts Page Table Entry cache hits"
+ }
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
new file mode 120000
index 000000000000..ba5dd2960e9f
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
@@ -0,0 +1 @@
+../bullet/microarch.json
\ No newline at end of file
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [RESEND PATCH 7/7] perf vendor events riscv: Add SiFive P650 events
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
` (5 preceding siblings ...)
2025-02-13 1:21 ` [RESEND PATCH 6/7] perf vendor events riscv: Add SiFive P550 events Samuel Holland
@ 2025-02-13 1:21 ` Samuel Holland
2025-02-19 21:20 ` [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Namhyung Kim
2025-03-11 16:11 ` Namhyung Kim
8 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-02-13 1:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
Arnaldo Carvalho de Melo, Eric Lin, Samuel Holland
From: Eric Lin <eric.lin@sifive.com>
The SiFive Performance P650 core (including the vector-enabled P670 and
area-optimized P450/P470 variants) updates the P550 microarchitecture.
It brings in the debug, trace, and counter events from newer Bullet
cores, and adds new events for iTLB and dTLB multi-hits.
All other PMU events are unchanged from the P550 core.
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>
---
tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 +
.../p650/cycle-and-instruction-count.json | 1 +
.../arch/riscv/sifive/p650/firmware.json | 1 +
.../arch/riscv/sifive/p650/instruction.json | 1 +
.../arch/riscv/sifive/p650/memory.json | 57 +++++++++++++++++
.../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++++++++
.../arch/riscv/sifive/p650/watchpoint.json | 1 +
7 files changed, 124 insertions(+)
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
diff --git a/tools/perf/pmu-events/arch/riscv/mapfile.csv b/tools/perf/pmu-events/arch/riscv/mapfile.csv
index a301e9dbfd5a..0a7e7dcc81be 100644
--- a/tools/perf/pmu-events/arch/riscv/mapfile.csv
+++ b/tools/perf/pmu-events/arch/riscv/mapfile.csv
@@ -18,6 +18,7 @@
0x489-0x8000000000000[1-9a-e]07-0x[78ac][[:xdigit:]]+,v1,sifive/bullet-07,core
0x489-0x8000000000000[1-9a-e]07-0xd[[:xdigit:]]+,v1,sifive/bullet-0d,core
0x489-0x8000000000000008-0x[[:xdigit:]]+,v1,sifive/p550,core
+0x489-0x8000000000000[1-6]08-0x[9b][[:xdigit:]]+,v1,sifive/p650,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
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
new file mode 120000
index 000000000000..ccd29278f61b
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
@@ -0,0 +1 @@
+../bullet-07/cycle-and-instruction-count.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
new file mode 120000
index 000000000000..34e5c2870eee
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
@@ -0,0 +1 @@
+../bullet/firmware.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
new file mode 120000
index 000000000000..62eacc2d7497
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
@@ -0,0 +1 @@
+../bullet/instruction.json
\ No newline at end of file
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
new file mode 100644
index 000000000000..f1431b339c7f
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
@@ -0,0 +1,57 @@
+[
+ {
+ "EventName": "ICACHE_MISS",
+ "EventCode": "0x102",
+ "BriefDescription": "Counts instruction cache misses"
+ },
+ {
+ "EventName": "DCACHE_MISS",
+ "EventCode": "0x202",
+ "BriefDescription": "Counts data cache misses"
+ },
+ {
+ "EventName": "DCACHE_RELEASE",
+ "EventCode": "0x402",
+ "BriefDescription": "Counts writeback requests from the data cache"
+ },
+ {
+ "EventName": "ITLB_MISS",
+ "EventCode": "0x802",
+ "BriefDescription": "Counts Instruction TLB misses caused by instruction address translation requests"
+ },
+ {
+ "EventName": "DTLB_MISS",
+ "EventCode": "0x1002",
+ "BriefDescription": "Counts Data TLB misses caused by data address translation requests"
+ },
+ {
+ "EventName": "UTLB_MISS",
+ "EventCode": "0x2002",
+ "BriefDescription": "Counts Unified TLB misses caused by address translation requests"
+ },
+ {
+ "EventName": "UTLB_HIT",
+ "EventCode": "0x4002",
+ "BriefDescription": "Counts Unified TLB hits for address translation requests"
+ },
+ {
+ "EventName": "PTE_CACHE_MISS",
+ "EventCode": "0x8002",
+ "BriefDescription": "Counts Page Table Entry cache misses"
+ },
+ {
+ "EventName": "PTE_CACHE_HIT",
+ "EventCode": "0x10002",
+ "BriefDescription": "Counts Page Table Entry cache hits"
+ },
+ {
+ "EventName": "ITLB_MULTI_HIT",
+ "EventCode": "0x20002",
+ "BriefDescription": "Counts Instruction TLB multi-hits"
+ },
+ {
+ "EventName": "DTLB_MULTI_HIT",
+ "EventCode": "0x40002",
+ "BriefDescription": "Counts Data TLB multi-hits"
+ }
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
new file mode 100644
index 000000000000..de8efd7b8b34
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
@@ -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"
+ }
+]
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json b/tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
new file mode 120000
index 000000000000..e88b98bfc5c8
--- /dev/null
+++ b/tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
@@ -0,0 +1 @@
+../bullet-07/watchpoint.json
\ No newline at end of file
--
2.47.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
` (6 preceding siblings ...)
2025-02-13 1:21 ` [RESEND PATCH 7/7] perf vendor events riscv: Add SiFive P650 events Samuel Holland
@ 2025-02-19 21:20 ` Namhyung Kim
2025-02-20 17:37 ` Ian Rogers
2025-03-01 9:21 ` Atish Patra
2025-03-11 16:11 ` Namhyung Kim
8 siblings, 2 replies; 15+ messages in thread
From: Namhyung Kim @ 2025-02-19 21:20 UTC (permalink / raw)
To: Samuel Holland, linux-riscv
Cc: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, Mark Rutland, Adrian Hunter, Alexander Shishkin,
linux-kernel, Jiri Olsa, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo
Hello,
On Wed, Feb 12, 2025 at 05:21:33PM -0800, Samuel Holland wrote:
> This series updates the PMU event JSON files to add support for newer
> SiFive CPUs, including those used in the HiFive Premier P550 board.
> Since most changes are incremental, symbolic links are used when a set
> of events is unchanged from the previous CPU series.
>
> I originally sent this series about a year ago[1], but received no
> feedback. The P550 board is now available (and I have tested this series
> on it), so it would be good to get perf support for it upstream.
>
> [1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
>
>
> Eric Lin (5):
> perf vendor events riscv: Update SiFive Bullet events
> perf vendor events riscv: Add SiFive Bullet version 0x07 events
> perf vendor events riscv: Add SiFive Bullet version 0x0d events
> perf vendor events riscv: Add SiFive P550 events
> perf vendor events riscv: Add SiFive P650 events
>
> Samuel Holland (2):
> perf vendor events riscv: Rename U74 to Bullet
> perf vendor events riscv: Remove leading zeroes
It'd be nice if anyone in the RISC-V community can review this.
Thanks,
Namhyung
>
> tools/perf/pmu-events/arch/riscv/mapfile.csv | 6 +-
> .../cycle-and-instruction-count.json | 12 +++
> .../arch/riscv/sifive/bullet-07/firmware.json | 1 +
> .../riscv/sifive/bullet-07/instruction.json | 1 +
> .../arch/riscv/sifive/bullet-07/memory.json | 1 +
> .../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++
> .../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++
> .../cycle-and-instruction-count.json | 1 +
> .../arch/riscv/sifive/bullet-0d/firmware.json | 1 +
> .../riscv/sifive/bullet-0d/instruction.json | 1 +
> .../arch/riscv/sifive/bullet-0d/memory.json | 1 +
> .../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++
> .../riscv/sifive/bullet-0d/watchpoint.json | 1 +
> .../sifive/{u74 => bullet}/firmware.json | 0
> .../arch/riscv/sifive/bullet/instruction.json | 92 +++++++++++++++++++
> .../arch/riscv/sifive/bullet/memory.json | 32 +++++++
> .../arch/riscv/sifive/bullet/microarch.json | 57 ++++++++++++
> .../arch/riscv/sifive/p550/firmware.json | 1 +
> .../arch/riscv/sifive/p550/instruction.json | 1 +
> .../arch/riscv/sifive/p550/memory.json | 47 ++++++++++
> .../arch/riscv/sifive/p550/microarch.json | 1 +
> .../p650/cycle-and-instruction-count.json | 1 +
> .../arch/riscv/sifive/p650/firmware.json | 1 +
> .../arch/riscv/sifive/p650/instruction.json | 1 +
> .../arch/riscv/sifive/p650/memory.json | 57 ++++++++++++
> .../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++
> .../arch/riscv/sifive/p650/watchpoint.json | 1 +
> .../arch/riscv/sifive/u74/instructions.json | 92 -------------------
> .../arch/riscv/sifive/u74/memory.json | 32 -------
> .../arch/riscv/sifive/u74/microarch.json | 57 ------------
> 30 files changed, 555 insertions(+), 182 deletions(-)
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
> rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%)
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json
> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json
> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json
>
> --
> 2.47.0
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
2025-02-19 21:20 ` [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Namhyung Kim
@ 2025-02-20 17:37 ` Ian Rogers
2025-03-01 9:21 ` Atish Patra
1 sibling, 0 replies; 15+ messages in thread
From: Ian Rogers @ 2025-02-20 17:37 UTC (permalink / raw)
To: Namhyung Kim, Atish Patra, Beeman Strong
Cc: Samuel Holland, linux-riscv, Arnaldo Carvalho de Melo,
Palmer Dabbelt, linux-perf-users, Mark Rutland, Adrian Hunter,
Alexander Shishkin, linux-kernel, Jiri Olsa, Peter Zijlstra,
Ingo Molnar, Arnaldo Carvalho de Melo
On Wed, Feb 19, 2025 at 1:20 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hello,
>
> On Wed, Feb 12, 2025 at 05:21:33PM -0800, Samuel Holland wrote:
> > This series updates the PMU event JSON files to add support for newer
> > SiFive CPUs, including those used in the HiFive Premier P550 board.
> > Since most changes are incremental, symbolic links are used when a set
> > of events is unchanged from the previous CPU series.
> >
> > I originally sent this series about a year ago[1], but received no
> > feedback. The P550 board is now available (and I have tested this series
> > on it), so it would be good to get perf support for it upstream.
> >
> > [1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
> >
> >
> > Eric Lin (5):
> > perf vendor events riscv: Update SiFive Bullet events
> > perf vendor events riscv: Add SiFive Bullet version 0x07 events
> > perf vendor events riscv: Add SiFive Bullet version 0x0d events
> > perf vendor events riscv: Add SiFive P550 events
> > perf vendor events riscv: Add SiFive P650 events
> >
> > Samuel Holland (2):
> > perf vendor events riscv: Rename U74 to Bullet
> > perf vendor events riscv: Remove leading zeroes
>
> It'd be nice if anyone in the RISC-V community can review this.
I can add a:
Tested-by: Ian Rogers <irogers@google.com>
tag, for testing with a build with JEVENTS_ARCH=all on an x86.
The changes use symlinks but generally we've not done this for Intel.
I'm not sure this matters and didn't see mention in the style guide.
The model naming and events are all coming from SiFive so I trust
they're happy with it, I didn't spot anything glaringly wrong.
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
> Thanks,
> Namhyung
>
> >
> > tools/perf/pmu-events/arch/riscv/mapfile.csv | 6 +-
> > .../cycle-and-instruction-count.json | 12 +++
> > .../arch/riscv/sifive/bullet-07/firmware.json | 1 +
> > .../riscv/sifive/bullet-07/instruction.json | 1 +
> > .../arch/riscv/sifive/bullet-07/memory.json | 1 +
> > .../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++
> > .../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++
> > .../cycle-and-instruction-count.json | 1 +
> > .../arch/riscv/sifive/bullet-0d/firmware.json | 1 +
> > .../riscv/sifive/bullet-0d/instruction.json | 1 +
> > .../arch/riscv/sifive/bullet-0d/memory.json | 1 +
> > .../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++
> > .../riscv/sifive/bullet-0d/watchpoint.json | 1 +
> > .../sifive/{u74 => bullet}/firmware.json | 0
> > .../arch/riscv/sifive/bullet/instruction.json | 92 +++++++++++++++++++
> > .../arch/riscv/sifive/bullet/memory.json | 32 +++++++
> > .../arch/riscv/sifive/bullet/microarch.json | 57 ++++++++++++
> > .../arch/riscv/sifive/p550/firmware.json | 1 +
> > .../arch/riscv/sifive/p550/instruction.json | 1 +
> > .../arch/riscv/sifive/p550/memory.json | 47 ++++++++++
> > .../arch/riscv/sifive/p550/microarch.json | 1 +
> > .../p650/cycle-and-instruction-count.json | 1 +
> > .../arch/riscv/sifive/p650/firmware.json | 1 +
> > .../arch/riscv/sifive/p650/instruction.json | 1 +
> > .../arch/riscv/sifive/p650/memory.json | 57 ++++++++++++
> > .../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++
> > .../arch/riscv/sifive/p650/watchpoint.json | 1 +
> > .../arch/riscv/sifive/u74/instructions.json | 92 -------------------
> > .../arch/riscv/sifive/u74/memory.json | 32 -------
> > .../arch/riscv/sifive/u74/microarch.json | 57 ------------
> > 30 files changed, 555 insertions(+), 182 deletions(-)
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
> > rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%)
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
> > delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json
> > delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json
> > delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json
> >
> > --
> > 2.47.0
> >
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
2025-02-19 21:20 ` [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Namhyung Kim
2025-02-20 17:37 ` Ian Rogers
@ 2025-03-01 9:21 ` Atish Patra
2025-03-07 9:19 ` Samuel Holland
1 sibling, 1 reply; 15+ messages in thread
From: Atish Patra @ 2025-03-01 9:21 UTC (permalink / raw)
To: Namhyung Kim, Samuel Holland
Cc: linux-riscv, Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, Mark Rutland, Adrian Hunter, Alexander Shishkin,
linux-kernel, Jiri Olsa, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo
On Wed, Feb 19, 2025 at 1:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hello,
>
> On Wed, Feb 12, 2025 at 05:21:33PM -0800, Samuel Holland wrote:
> > This series updates the PMU event JSON files to add support for newer
> > SiFive CPUs, including those used in the HiFive Premier P550 board.
> > Since most changes are incremental, symbolic links are used when a set
> > of events is unchanged from the previous CPU series.
> >
> > I originally sent this series about a year ago[1], but received no
> > feedback. The P550 board is now available (and I have tested this series
> > on it), so it would be good to get perf support for it upstream.
> >
> > [1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
> >
Tested the patches that are part of sifive's release tree for p550.
Both perf stat/record seems to work fine
for a bunch of events.
Based on that
Tested-by: Atish Patra <atishp@rivosinc.com>
@Samuel Holland : perf report that the following two events are not
supported on the p550 board.
cycle and instruction count:
core_clock_cycles
[Counts core clock cycles]
instructions_retired
[Counts instructions retired]
I assumed that these are raw events cycle/instruction retired events
that can support
perf sampling as well. Maybe I am missing something ? DT binding ?
> >
> > Eric Lin (5):
> > perf vendor events riscv: Update SiFive Bullet events
> > perf vendor events riscv: Add SiFive Bullet version 0x07 events
> > perf vendor events riscv: Add SiFive Bullet version 0x0d events
> > perf vendor events riscv: Add SiFive P550 events
> > perf vendor events riscv: Add SiFive P650 events
> >
> > Samuel Holland (2):
> > perf vendor events riscv: Rename U74 to Bullet
> > perf vendor events riscv: Remove leading zeroes
>
> It'd be nice if anyone in the RISC-V community can review this.
>
> Thanks,
> Namhyung
>
> >
> > tools/perf/pmu-events/arch/riscv/mapfile.csv | 6 +-
> > .../cycle-and-instruction-count.json | 12 +++
> > .../arch/riscv/sifive/bullet-07/firmware.json | 1 +
> > .../riscv/sifive/bullet-07/instruction.json | 1 +
> > .../arch/riscv/sifive/bullet-07/memory.json | 1 +
> > .../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++
> > .../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++
> > .../cycle-and-instruction-count.json | 1 +
> > .../arch/riscv/sifive/bullet-0d/firmware.json | 1 +
> > .../riscv/sifive/bullet-0d/instruction.json | 1 +
> > .../arch/riscv/sifive/bullet-0d/memory.json | 1 +
> > .../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++
> > .../riscv/sifive/bullet-0d/watchpoint.json | 1 +
> > .../sifive/{u74 => bullet}/firmware.json | 0
> > .../arch/riscv/sifive/bullet/instruction.json | 92 +++++++++++++++++++
> > .../arch/riscv/sifive/bullet/memory.json | 32 +++++++
> > .../arch/riscv/sifive/bullet/microarch.json | 57 ++++++++++++
> > .../arch/riscv/sifive/p550/firmware.json | 1 +
> > .../arch/riscv/sifive/p550/instruction.json | 1 +
> > .../arch/riscv/sifive/p550/memory.json | 47 ++++++++++
> > .../arch/riscv/sifive/p550/microarch.json | 1 +
> > .../p650/cycle-and-instruction-count.json | 1 +
> > .../arch/riscv/sifive/p650/firmware.json | 1 +
> > .../arch/riscv/sifive/p650/instruction.json | 1 +
> > .../arch/riscv/sifive/p650/memory.json | 57 ++++++++++++
> > .../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++
> > .../arch/riscv/sifive/p650/watchpoint.json | 1 +
> > .../arch/riscv/sifive/u74/instructions.json | 92 -------------------
> > .../arch/riscv/sifive/u74/memory.json | 32 -------
> > .../arch/riscv/sifive/u74/microarch.json | 57 ------------
> > 30 files changed, 555 insertions(+), 182 deletions(-)
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
> > rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%)
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
> > create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
> > create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
> > delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json
> > delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json
> > delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json
> >
> > --
> > 2.47.0
> >
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
--
Regards,
Atish
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
2025-03-01 9:21 ` Atish Patra
@ 2025-03-07 9:19 ` Samuel Holland
2025-03-21 18:31 ` Atish Patra
0 siblings, 1 reply; 15+ messages in thread
From: Samuel Holland @ 2025-03-07 9:19 UTC (permalink / raw)
To: Atish Patra
Cc: linux-riscv, Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, Mark Rutland, Adrian Hunter, Alexander Shishkin,
linux-kernel, Jiri Olsa, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim
Hi Atish,
On 2025-03-01 3:21 AM, Atish Patra wrote:
> On Wed, Feb 19, 2025 at 1:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
>>
>> Hello,
>>
>> On Wed, Feb 12, 2025 at 05:21:33PM -0800, Samuel Holland wrote:
>>> This series updates the PMU event JSON files to add support for newer
>>> SiFive CPUs, including those used in the HiFive Premier P550 board.
>>> Since most changes are incremental, symbolic links are used when a set
>>> of events is unchanged from the previous CPU series.
>>>
>>> I originally sent this series about a year ago[1], but received no
>>> feedback. The P550 board is now available (and I have tested this series
>>> on it), so it would be good to get perf support for it upstream.
>>>
>>> [1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
>>>
>
> Tested the patches that are part of sifive's release tree for p550.
> Both perf stat/record seems to work fine
> for a bunch of events.
>
> Based on that
> Tested-by: Atish Patra <atishp@rivosinc.com>
Thanks for testing!
> @Samuel Holland : perf report that the following two events are not
> supported on the p550 board.
>
> cycle and instruction count:
> core_clock_cycles
> [Counts core clock cycles]
> instructions_retired
> [Counts instructions retired]
>
> I assumed that these are raw events cycle/instruction retired events
> that can support
> perf sampling as well. Maybe I am missing something ? DT binding ?
perf is correct. Those two events are not supported on P550, only by the newer
cores (bulled-0d and p650). Yes, those are aliases of cycles and instructions
that were added to support sampling.
Regards,
Samuel
>>>
>>> Eric Lin (5):
>>> perf vendor events riscv: Update SiFive Bullet events
>>> perf vendor events riscv: Add SiFive Bullet version 0x07 events
>>> perf vendor events riscv: Add SiFive Bullet version 0x0d events
>>> perf vendor events riscv: Add SiFive P550 events
>>> perf vendor events riscv: Add SiFive P650 events
>>>
>>> Samuel Holland (2):
>>> perf vendor events riscv: Rename U74 to Bullet
>>> perf vendor events riscv: Remove leading zeroes
>>
>> It'd be nice if anyone in the RISC-V community can review this.
>>
>> Thanks,
>> Namhyung
>>
>>>
>>> tools/perf/pmu-events/arch/riscv/mapfile.csv | 6 +-
>>> .../cycle-and-instruction-count.json | 12 +++
>>> .../arch/riscv/sifive/bullet-07/firmware.json | 1 +
>>> .../riscv/sifive/bullet-07/instruction.json | 1 +
>>> .../arch/riscv/sifive/bullet-07/memory.json | 1 +
>>> .../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++
>>> .../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++
>>> .../cycle-and-instruction-count.json | 1 +
>>> .../arch/riscv/sifive/bullet-0d/firmware.json | 1 +
>>> .../riscv/sifive/bullet-0d/instruction.json | 1 +
>>> .../arch/riscv/sifive/bullet-0d/memory.json | 1 +
>>> .../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++
>>> .../riscv/sifive/bullet-0d/watchpoint.json | 1 +
>>> .../sifive/{u74 => bullet}/firmware.json | 0
>>> .../arch/riscv/sifive/bullet/instruction.json | 92 +++++++++++++++++++
>>> .../arch/riscv/sifive/bullet/memory.json | 32 +++++++
>>> .../arch/riscv/sifive/bullet/microarch.json | 57 ++++++++++++
>>> .../arch/riscv/sifive/p550/firmware.json | 1 +
>>> .../arch/riscv/sifive/p550/instruction.json | 1 +
>>> .../arch/riscv/sifive/p550/memory.json | 47 ++++++++++
>>> .../arch/riscv/sifive/p550/microarch.json | 1 +
>>> .../p650/cycle-and-instruction-count.json | 1 +
>>> .../arch/riscv/sifive/p650/firmware.json | 1 +
>>> .../arch/riscv/sifive/p650/instruction.json | 1 +
>>> .../arch/riscv/sifive/p650/memory.json | 57 ++++++++++++
>>> .../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++
>>> .../arch/riscv/sifive/p650/watchpoint.json | 1 +
>>> .../arch/riscv/sifive/u74/instructions.json | 92 -------------------
>>> .../arch/riscv/sifive/u74/memory.json | 32 -------
>>> .../arch/riscv/sifive/u74/microarch.json | 57 ------------
>>> 30 files changed, 555 insertions(+), 182 deletions(-)
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
>>> rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%)
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
>>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
>>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
>>> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json
>>> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json
>>> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json
>>>
>>> --
>>> 2.47.0
>>>
>>
>> _______________________________________________
>> linux-riscv mailing list
>> linux-riscv@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-riscv
>
>
>
> --
> Regards,
> Atish
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
` (7 preceding siblings ...)
2025-02-19 21:20 ` [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Namhyung Kim
@ 2025-03-11 16:11 ` Namhyung Kim
8 siblings, 0 replies; 15+ messages in thread
From: Namhyung Kim @ 2025-03-11 16:11 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, linux-riscv, Samuel Holland
Cc: Mark Rutland, Adrian Hunter, Alexander Shishkin, linux-kernel,
Jiri Olsa, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo
On Wed, 12 Feb 2025 17:21:33 -0800, Samuel Holland wrote:
> This series updates the PMU event JSON files to add support for newer
> SiFive CPUs, including those used in the HiFive Premier P550 board.
> Since most changes are incremental, symbolic links are used when a set
> of events is unchanged from the previous CPU series.
>
> I originally sent this series about a year ago[1], but received no
> feedback. The P550 board is now available (and I have tested this series
> on it), so it would be good to get perf support for it upstream.
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
2025-03-07 9:19 ` Samuel Holland
@ 2025-03-21 18:31 ` Atish Patra
2025-03-21 20:57 ` Samuel Holland
0 siblings, 1 reply; 15+ messages in thread
From: Atish Patra @ 2025-03-21 18:31 UTC (permalink / raw)
To: Samuel Holland
Cc: linux-riscv, Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, Mark Rutland, Adrian Hunter, Alexander Shishkin,
linux-kernel, Jiri Olsa, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Atish Patra
On Fri, Mar 7, 2025 at 1:19 AM Samuel Holland <samuel.holland@sifive.com> wrote:
>
> Hi Atish,
>
> On 2025-03-01 3:21 AM, Atish Patra wrote:
> > On Wed, Feb 19, 2025 at 1:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >>
> >> Hello,
> >>
> >> On Wed, Feb 12, 2025 at 05:21:33PM -0800, Samuel Holland wrote:
> >>> This series updates the PMU event JSON files to add support for newer
> >>> SiFive CPUs, including those used in the HiFive Premier P550 board.
> >>> Since most changes are incremental, symbolic links are used when a set
> >>> of events is unchanged from the previous CPU series.
> >>>
> >>> I originally sent this series about a year ago[1], but received no
> >>> feedback. The P550 board is now available (and I have tested this series
> >>> on it), so it would be good to get perf support for it upstream.
> >>>
> >>> [1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
> >>>
> >
> > Tested the patches that are part of sifive's release tree for p550.
> > Both perf stat/record seems to work fine
> > for a bunch of events.
> >
> > Based on that
> > Tested-by: Atish Patra <atishp@rivosinc.com>
>
> Thanks for testing!
>
> > @Samuel Holland : perf report that the following two events are not
> > supported on the p550 board.
> >
> > cycle and instruction count:
> > core_clock_cycles
> > [Counts core clock cycles]
> > instructions_retired
> > [Counts instructions retired]
> >
> > I assumed that these are raw events cycle/instruction retired events
> > that can support
> > perf sampling as well. Maybe I am missing something ? DT binding ?
>
> perf is correct. Those two events are not supported on P550, only by the newer
> cores (bulled-0d and p650). Yes, those are aliases of cycles and instructions
> that were added to support sampling.
>
Thanks for the confirmation. Are there other events that can be used to sample
instruction count on P550 ? I did not find anything in the perf list
or the json file.
I am not sure if I missed something.
> Regards,
> Samuel
>
> >>>
> >>> Eric Lin (5):
> >>> perf vendor events riscv: Update SiFive Bullet events
> >>> perf vendor events riscv: Add SiFive Bullet version 0x07 events
> >>> perf vendor events riscv: Add SiFive Bullet version 0x0d events
> >>> perf vendor events riscv: Add SiFive P550 events
> >>> perf vendor events riscv: Add SiFive P650 events
> >>>
> >>> Samuel Holland (2):
> >>> perf vendor events riscv: Rename U74 to Bullet
> >>> perf vendor events riscv: Remove leading zeroes
> >>
> >> It'd be nice if anyone in the RISC-V community can review this.
> >>
> >> Thanks,
> >> Namhyung
> >>
> >>>
> >>> tools/perf/pmu-events/arch/riscv/mapfile.csv | 6 +-
> >>> .../cycle-and-instruction-count.json | 12 +++
> >>> .../arch/riscv/sifive/bullet-07/firmware.json | 1 +
> >>> .../riscv/sifive/bullet-07/instruction.json | 1 +
> >>> .../arch/riscv/sifive/bullet-07/memory.json | 1 +
> >>> .../riscv/sifive/bullet-07/microarch.json | 62 +++++++++++++
> >>> .../riscv/sifive/bullet-07/watchpoint.json | 42 +++++++++
> >>> .../cycle-and-instruction-count.json | 1 +
> >>> .../arch/riscv/sifive/bullet-0d/firmware.json | 1 +
> >>> .../riscv/sifive/bullet-0d/instruction.json | 1 +
> >>> .../arch/riscv/sifive/bullet-0d/memory.json | 1 +
> >>> .../riscv/sifive/bullet-0d/microarch.json | 72 +++++++++++++++
> >>> .../riscv/sifive/bullet-0d/watchpoint.json | 1 +
> >>> .../sifive/{u74 => bullet}/firmware.json | 0
> >>> .../arch/riscv/sifive/bullet/instruction.json | 92 +++++++++++++++++++
> >>> .../arch/riscv/sifive/bullet/memory.json | 32 +++++++
> >>> .../arch/riscv/sifive/bullet/microarch.json | 57 ++++++++++++
> >>> .../arch/riscv/sifive/p550/firmware.json | 1 +
> >>> .../arch/riscv/sifive/p550/instruction.json | 1 +
> >>> .../arch/riscv/sifive/p550/memory.json | 47 ++++++++++
> >>> .../arch/riscv/sifive/p550/microarch.json | 1 +
> >>> .../p650/cycle-and-instruction-count.json | 1 +
> >>> .../arch/riscv/sifive/p650/firmware.json | 1 +
> >>> .../arch/riscv/sifive/p650/instruction.json | 1 +
> >>> .../arch/riscv/sifive/p650/memory.json | 57 ++++++++++++
> >>> .../arch/riscv/sifive/p650/microarch.json | 62 +++++++++++++
> >>> .../arch/riscv/sifive/p650/watchpoint.json | 1 +
> >>> .../arch/riscv/sifive/u74/instructions.json | 92 -------------------
> >>> .../arch/riscv/sifive/u74/memory.json | 32 -------
> >>> .../arch/riscv/sifive/u74/microarch.json | 57 ------------
> >>> 30 files changed, 555 insertions(+), 182 deletions(-)
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/cycle-and-instruction-count.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/firmware.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/instruction.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/memory.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/microarch.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-07/watchpoint.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/cycle-and-instruction-count.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/firmware.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/instruction.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/memory.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/microarch.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/bullet-0d/watchpoint.json
> >>> rename tools/perf/pmu-events/arch/riscv/sifive/{u74 => bullet}/firmware.json (100%)
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/instruction.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/memory.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/bullet/microarch.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/firmware.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/instruction.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p550/memory.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p550/microarch.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/cycle-and-instruction-count.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/firmware.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/instruction.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/memory.json
> >>> create mode 100644 tools/perf/pmu-events/arch/riscv/sifive/p650/microarch.json
> >>> create mode 120000 tools/perf/pmu-events/arch/riscv/sifive/p650/watchpoint.json
> >>> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/instructions.json
> >>> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/memory.json
> >>> delete mode 100644 tools/perf/pmu-events/arch/riscv/sifive/u74/microarch.json
> >>>
> >>> --
> >>> 2.47.0
> >>>
> >>
> >> _______________________________________________
> >> linux-riscv mailing list
> >> linux-riscv@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-riscv
> >
> >
> >
> > --
> > Regards,
> > Atish
>
--
Regards,
Atish
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events
2025-03-21 18:31 ` Atish Patra
@ 2025-03-21 20:57 ` Samuel Holland
0 siblings, 0 replies; 15+ messages in thread
From: Samuel Holland @ 2025-03-21 20:57 UTC (permalink / raw)
To: Atish Patra
Cc: linux-riscv, Arnaldo Carvalho de Melo, Ian Rogers, Palmer Dabbelt,
linux-perf-users, Mark Rutland, Adrian Hunter, Alexander Shishkin,
linux-kernel, Jiri Olsa, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Atish Patra
Hi Atish,
On 2025-03-21 1:31 PM, Atish Patra wrote:
> On Fri, Mar 7, 2025 at 1:19 AM Samuel Holland <samuel.holland@sifive.com> wrote:
>> On 2025-03-01 3:21 AM, Atish Patra wrote:
>>> On Wed, Feb 19, 2025 at 1:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
>>>> On Wed, Feb 12, 2025 at 05:21:33PM -0800, Samuel Holland wrote:
>>>>> This series updates the PMU event JSON files to add support for newer
>>>>> SiFive CPUs, including those used in the HiFive Premier P550 board.
>>>>> Since most changes are incremental, symbolic links are used when a set
>>>>> of events is unchanged from the previous CPU series.
>>>>>
>>>>> I originally sent this series about a year ago[1], but received no
>>>>> feedback. The P550 board is now available (and I have tested this series
>>>>> on it), so it would be good to get perf support for it upstream.
>>>>>
>>>>> [1]: https://lore.kernel.org/linux-perf-users/20240509021531.680920-1-samuel.holland@sifive.com/
>>>>>
>>>
>>> Tested the patches that are part of sifive's release tree for p550.
>>> Both perf stat/record seems to work fine
>>> for a bunch of events.
>>>
>>> Based on that
>>> Tested-by: Atish Patra <atishp@rivosinc.com>
>>
>> Thanks for testing!
>>
>>> @Samuel Holland : perf report that the following two events are not
>>> supported on the p550 board.
>>>
>>> cycle and instruction count:
>>> core_clock_cycles
>>> [Counts core clock cycles]
>>> instructions_retired
>>> [Counts instructions retired]
>>>
>>> I assumed that these are raw events cycle/instruction retired events
>>> that can support
>>> perf sampling as well. Maybe I am missing something ? DT binding ?
>>
>> perf is correct. Those two events are not supported on P550, only by the newer
>> cores (bulled-0d and p650). Yes, those are aliases of cycles and instructions
>> that were added to support sampling.
>>
>
> Thanks for the confirmation. Are there other events that can be used to sample
> instruction count on P550 ? I did not find anything in the perf list
> or the json file.
> I am not sure if I missed something.
Likely the closest approximation is ORing together the instruction class
retirement events from instruction.json: cpu/r0x3fffe00/. The difference between
that and "instructions" looks to be well within 1% for CPU-intensive workloads.
Maybe it makes sense to add an entry for this combination in the JSON? Would it
be appropriate to call it "instructions_retired"? The same thing could be done
for the older SiFive cores.
Regards,
Samuel
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-03-21 20:57 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 1:21 [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 1/7] perf vendor events riscv: Rename U74 to Bullet Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 2/7] perf vendor events riscv: Remove leading zeroes Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 3/7] perf vendor events riscv: Update SiFive Bullet events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 4/7] perf vendor events riscv: Add SiFive Bullet version 0x07 events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 5/7] perf vendor events riscv: Add SiFive Bullet version 0x0d events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 6/7] perf vendor events riscv: Add SiFive P550 events Samuel Holland
2025-02-13 1:21 ` [RESEND PATCH 7/7] perf vendor events riscv: Add SiFive P650 events Samuel Holland
2025-02-19 21:20 ` [RESEND PATCH 0/7] perf vendor events riscv: Update SiFive CPU PMU events Namhyung Kim
2025-02-20 17:37 ` Ian Rogers
2025-03-01 9:21 ` Atish Patra
2025-03-07 9:19 ` Samuel Holland
2025-03-21 18:31 ` Atish Patra
2025-03-21 20:57 ` Samuel Holland
2025-03-11 16:11 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox