This shows you the differences between two versions of the page.
perf [2018-05-02 12:37:41] |
perf [2018-05-02 12:37:41] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== perf on low-end hardware ====== | ||
+ | If perf binary is not available: | ||
+ | * copy the tools/ directory of the current running kernel tree | ||
+ | * apt-get install flex bison libc-dev libc-dev libelf-dev libslang2-dev libunwind-dev binutils-dev libiberty-dev | ||
+ | * make -C tools/perf/ | ||
+ | |||
+ | If hardware performance counters are not available: | ||
+ | <code> | ||
+ | # ./linux/tools/perf/perf record -a factor 2365873330313 | ||
+ | Error: | ||
+ | PMU Hardware doesn't support sampling/overflow-interrupts. | ||
+ | /o\ | ||
+ | </code> | ||
+ | |||
+ | Then use software cpu-clock event instead: | ||
+ | <code> | ||
+ | # /root/linux/tools/perf/perf record -e cpu-clock -a factor 2365873330313 | ||
+ | 2365873330313: 4567 518036639 | ||
+ | [ perf record: Woken up 1 times to write data ] | ||
+ | [ perf record: Captured and wrote 0.119 MB perf.data (152 samples) ] | ||
+ | \o/ | ||
+ | </code> |