]> www.infradead.org Git - nvme.git/commit
perf kvm: Add kvm-stat for loongarch64
authorBibo Mao <maobibo@loongson.cn>
Wed, 10 Jul 2024 08:50:27 +0000 (16:50 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 10 Jul 2024 08:50:27 +0000 (16:50 +0800)
commit492ac37fa38faf520b5beae44c930063265ee183
treef08f252fc7c185d1c521db2be1026e04f1dd155d
parent03779999ac3053122c33173a652100c8fa6c61c5
perf kvm: Add kvm-stat for loongarch64

Add support for 'perf kvm stat' on loongarch64 platform, now only kvm
exit event is supported.

Here is example output about "perf kvm --host stat report" command

   Event name   Samples   Sample%     Time (ns)   Time%   Mean Time (ns)
    Mem Store     83969    51.00%     625697070   8.00%             7451
     Mem Read     37641    22.00%     112485730   1.00%             2988
    Interrupt     15542     9.00%      20620190   0.00%             1326
        IOCSR     15207     9.00%      94296190   1.00%             6200
    Hypercall      4873     2.00%      12265280   0.00%             2516
         Idle      3713     2.00%    6322055860  87.00%          1702681
          FPU      1819     1.00%       2750300   0.00%             1511
   Inst Fetch       502     0.00%       1341740   0.00%             2672
   Mem Modify       324     0.00%        602240   0.00%             1858
       CPUCFG        55     0.00%         77610   0.00%             1411
          CSR        12     0.00%         19690   0.00%             1640
         LASX         3     0.00%          4870   0.00%             1623
          LSX         2     0.00%          2100   0.00%             1050

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
tools/perf/arch/loongarch/Makefile
tools/perf/arch/loongarch/util/Build
tools/perf/arch/loongarch/util/header.c [new file with mode: 0644]
tools/perf/arch/loongarch/util/kvm-stat.c [new file with mode: 0644]