Skip to content
Commit 26fabd6d authored by Nikita Shubin's avatar Nikita Shubin Committed by Will Deacon
Browse files

drivers/perf: riscv_pmu_sbi: perf format



Update driver to export formatting and event information to sysfs so it
can be used by the perf user space tools with the syntaxes:

perf stat -e cpu/event=0x05
perf stat -e cpu/event=0x05,firmware=0x1/

63-bit is used to distinguish hardware events from firmware. Firmware
events are defined by "RISC-V Supervisor Binary Interface
Specification".

perf stat -e cpu/event=0x05,firmware=0x1/

is equivalent to

perf stat -e r8000000000000005

Suggested-by: default avatarJoão Mário Domingos <joao.mario@tecnico.ulisboa.pt>
Signed-off-by: default avatarNikita Shubin <n.shubin@yadro.com>
Link: https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/riscv-sbi.adoc
Link: https://lore.kernel.org/r/20220628114625.166665-2-nikita.shubin@maquefel.me


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 0e35850b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment