The SiFive private L2 cache PMU is supports per-task profiling
and event counting. Users can use the perf tool to profile by
event name and event id.
Example: $ perf stat -e /sifive_u74_l2_pmu/inner_acquire_block_btot/
-e /sifive_u74_l2_pmu/inner_acquire_block_ntob/
-e /sifive_u74_l2_pmu/inner_acquire_block_ntot/ ls
Performance counter stats for 'CPU(s) 0':
300 sifive_u74_l2_pmu/inner_acquire_block_btot/
17801 sifive_u74_l2_pmu/inner_acquire_block_ntob/
5253 sifive_u74_l2_pmu/inner_acquire_block_ntot/
0.088917326 seconds time elapsed
$ perf stat -e /sifive_u74_l2_pmu/event=0x10001/
-e /sifive_u74_l2_pmu/event=0x4001/
-e /sifive_u74_l2_pmu/event=0x8001/ ls
Performance counter stats for 'CPU(s) 0':
251 sifive_u74_l2_pmu/event=0x10001/
2620 sifive_u74_l2_pmu/event=0x4001/
644 sifive_u74_l2_pmu/event=0x8001/
0.092827110 seconds time elapsed
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>