Files
kernel-starfive-jh7110/drivers/perf
Minda Chen 57cfc280b5 perf: riscv: Add SiFive Private L2 cache and PMU driver
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>
2024-03-05 15:18:32 +08:00
..