firesim / FireMarshal

Software workload management tool for RISC-V based SoC research. This is the default workload management tool for Chipyard and FireSim.
https://docs.fires.im/en/latest/Advanced-Usage/Workloads/index.html
Other
76 stars 51 forks source link

Error: cycles: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' #292

Open JL102 opened 12 months ago

JL102 commented 12 months ago

I've got a Rocket Chip system running on an AMD Xilinx U250 (if I recall correctly) and I'm attempting to benchmark the system's performance on different programs. I'm using a fork of Firesim 1.16.0, because the system set up with the FPGA hasn't yet been updated to the more recent version. However, the version of FireMarshal (i.e., submodule inside firesim/target-design/chipyard/software/firemarshal) has been manually updated to the HEAD revision. I have it running Fedora, with perf and gcc both installed, so that I can tweak and re-compile programs while the simulation is running.

Running perf stat ./my_program works, for example:

 Performance counter stats for './pthread_msg':

              8.00 msec task-clock                #    0.979 CPUs utilized
                12      context-switches          #    1.500 K/sec
                 3      cpu-migrations            #  375.047 /sec
                73      page-faults               #    9.126 K/sec
         3,779,781      cycles                    #    0.473 GHz                      (34.11%)
         2,839,935      instructions              #    0.75  insn per cycle           (99.22%)
     <not counted>      branches                                                      (0.00%)
     <not counted>      branch-misses                                                 (0.00%)

       0.008171031 seconds time elapsed

       0.000000000 seconds user
       0.010516000 seconds sys

but when I attempt to run perf record ./my_program, I get this error:

Error:
cycles: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'

I don't really know anything about PMU, and I'm not an expert at FPGA simulations, so I don't know whether this is a Rocket Chip problem, a Firesim problem, a FireMarshal problem, or an issue with the FPGA board itself. I asked Chat GPT and it said to check the documentation of the FPGA board to understand its capabilities, including whether it has a Performance Monitoring Unit (PMU) and what features it supports; but the documentation for the U250 doesn't include anything about performance monitoring or a PMU, so I can't tell if this was just a hallucination.

What steps can I take to troubleshoot this? And is FireMarshal the right repo for this question?

Thanks!