]> git.ipfire.org Git - thirdparty/linux.git/commit
RISC-V: perf/kvm: Add reporting of interrupt events
authorQuan Zhou <zhouquan@iscas.ac.cn>
Fri, 13 Jun 2025 07:53:38 +0000 (15:53 +0800)
committerAnup Patel <anup@brainfault.org>
Mon, 28 Jul 2025 16:58:25 +0000 (22:28 +0530)
commit3b7270c76622893098532a94e787f8c127d5ed28
treed724a4bea3cd9c19d1d31a9312b339b91dcd1aec
parentf55ffaf89636877c269ca28399b30d48898c62f3
RISC-V: perf/kvm: Add reporting of interrupt events

For `perf kvm stat` on the RISC-V, in order to avoid the
occurrence of `UNKNOWN` event names, interrupts should be
reported in addition to exceptions.

testing without patch:

Event name                    Samples  Sample%       Time(ns)
---------------------------  --------  --------  ------------
STORE_GUEST_PAGE_FAULT        1496461   53.00%    889612544
UNKNOWN                        887514   31.00%    272857968
LOAD_GUEST_PAGE_FAULT          305164   10.00%    189186331
VIRTUAL_INST_FAULT              70625    2.00%    134114260
SUPERVISOR_SYSCALL              32014    1.00%     58577110
INST_GUEST_PAGE_FAULT               1    0.00%         2545

testing with patch:

Event name                    Samples  Sample%       Time(ns)
---------------------------  --------  --------  ------------
IRQ_S_TIMER                   211271    58.00%  738298680600
EXC_STORE_GUEST_PAGE_FAULT    111279    30.00%  130725914800
EXC_LOAD_GUEST_PAGE_FAULT      22039     6.00%   25441480600
EXC_VIRTUAL_INST_FAULT          8913     2.00%   21015381600
IRQ_VS_EXT                      4748     1.00%   10155464300
IRQ_S_EXT                       2802     0.00%   13288775800
IRQ_S_SOFT                      1998     0.00%    4254129300

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/9693132df4d0f857b8be3a75750c36b40213fcc0.1726211632.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
tools/perf/arch/riscv/util/kvm-stat.c
tools/perf/arch/riscv/util/riscv_exception_types.h [deleted file]
tools/perf/arch/riscv/util/riscv_trap_types.h [new file with mode: 0644]