Артемий Шушкин
unread,Jun 18, 2024, 5:21:39 AM6/18/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to RISC-V SW Dev, atis...@gmail.com, tommy_...@hotmail.com, Артемий Шушкин
I use my perf utility, which makes a call to perf event open according to the example in the documentation
https://man7.org/linux/man-pages/man2/perf_event_open.2.html. Next, the PMU driver is contacted. The riscv_pmu_add function is called, in which we access the riscv_pmu_start function, where we set the period and get the init val (it is 2^63), after which opensbi is called, which writes this init val in the mcycle. Then the utility itself works correctly and outputs more or less correct values, but after it works, the mcycle becomes approximately 2^63, I use GDB, in which I am running Linux version (6.4.0). GDB shows normal register values before using the utility, and then broken ones. I also noticed that when loading Linux, it writes “Perf sampling/filtering is not supported as sscof extension is not available.” Could the absence of this extension somehow affect this problem?
I cannot understand why it is necessary to write 2^63 during initialization, and then, as far as I understand, not return the previous value.