I try to use the perf topdown tool to analyze the CPU utilization of my program and find out the bottleneck.Here is the command:
perf stat -a --topdown ./benchmark
But perf shows that:
System does not support topdown
My perf tool version is:
perf version 5.4.224
And this is my kernel version and CPU arch:
Linux version 5.4.0-139-generic (buildd@lcy02-amd64-036) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #156~18.04.1-Ubuntu SMP Wed Jan 25 15:56:22 UTC 2023
My CPU is:
16 12th Gen Intel(R) Core(TM) i5-12500H
Should I update my linux kernel version or open some compile options?
Thanks for comment : I have done cmd as root:
echo 0 > /proc/sys/kernel/nmi_watchdog
And I tried to do this cmd as root:
DRL-DZ000894# perf stat -a --topdown ls
But this did not work, and the error noice is same.