qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] target/riscv: Add support for machine specific pmu's events
@ 2024-09-10 17:47 Alexei Filippov
  2024-09-10 17:47 ` [RFC PATCH 1/2] " Alexei Filippov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alexei Filippov @ 2024-09-10 17:47 UTC (permalink / raw)
  To: palmer
  Cc: alexei.filippov, alistair.francis, bmeng.cn, dbarboza, zhiwei_liu,
	liwei1518, qemu-devel, qemu-riscv

Following original patch [1] here's a patch with support of machine
specific pmu events and PoC with initial support for sifive_u's HPM.

== Test scenarios ==

So, I tested this patches on current Linux master with perf.
something like `perf stat -e branch-misses perf bench mem memcpy` works
just fine, also 'perf record -e branch-misses perf bench mem memcpy'
collect samples just fine and `perf report` works.

== ToDos / Limitations ==

Second patch is only inital sifive_u's HPM support, without any
filtering, events combining features or differrent counting
algorithm for different events. There are also no tests, but if you
have any suggestions about where I need to look to implement them, please
point me to.

== Changes since original patch ==

- Rebased to current master

[1] https://lore.kernel.org/all/20240625144643.34733-1-alexei.filippov@syntacore.com/

Alexei Filippov (2):
  target/riscv: Add support for machine specific pmu's events
  hw/riscv/sifive_u.c: Add initial HPM support

 hw/misc/meson.build            |   1 +
 hw/misc/sifive_u_pmu.c         | 384 +++++++++++++++++++++++++++++++++
 hw/riscv/sifive_u.c            |  14 ++
 include/hw/misc/sifive_u_pmu.h |  24 +++
 target/riscv/cpu.c             |  20 +-
 target/riscv/cpu.h             |   9 +
 target/riscv/csr.c             |  93 +++++---
 target/riscv/pmu.c             | 138 ++++++------
 target/riscv/pmu.h             |  19 +-
 9 files changed, 599 insertions(+), 103 deletions(-)
 create mode 100644 hw/misc/sifive_u_pmu.c
 create mode 100644 include/hw/misc/sifive_u_pmu.h

-- 
2.34.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-10-10 13:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-10 17:47 [RFC PATCH 0/2] target/riscv: Add support for machine specific pmu's events Alexei Filippov
2024-09-10 17:47 ` [RFC PATCH 1/2] " Alexei Filippov
2024-09-10 17:47 ` [RFC PATCH 2/2] hw/riscv/sifive_u.c: Add initial HPM support Alexei Filippov
2024-10-08  2:55   ` Alistair Francis
2024-10-08  2:52 ` [RFC PATCH 0/2] target/riscv: Add support for machine specific pmu's events Alistair Francis
2024-10-09  3:51   ` Atish Kumar Patra
2024-10-10 11:49     ` Alexei Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).