我正在嘗試使用perf version 3.0.8
來剖析我的嵌入式系統Linux kernel version 3.0.8
。Perf工具Linux - 無調用圖
我使用zlib和elfutils交叉編譯工具/ perf。
爲了熟悉這個工具,我使用了一個使用-g
選項編譯的簡單快速排序示例。
我運行perf record -F 99 -g -- ./qsort
(從示例中複製),然後perf report --stdio
查看我的配置文件結果。
這是perf report -g --stdio
輸出的快照:
No kallsyms or vmlinux with build-id f41dfb5606beda1d75171db69f1e9466cb4868ba was found
[hi3518_dsu] with build id f41dfb5606beda1d75171db69f1e9466cb4868ba not found, continuing without symbols
No kallsyms or vmlinux with build-id a0f9a05faf6bcfb72282a03e048b47e8a8c0f2ec was found
[hi3518_tde] with build id a0f9a05faf6bcfb72282a03e048b47e8a8c0f2ec not found, continuing without symbols
# Events: 256 cpu-clock
#
# Overhead Command Shared Object Symbol
# ........ ....... ................. ......................
#
96.88% qsort qsort [.] partition
0.78% qsort [kernel.kallsyms] [k] __do_softirq
0.39% qsort [kernel.kallsyms] [k] __wake_up_sync_key
0.39% qsort [kernel.kallsyms] [k] get_page_from_freelist
0.39% qsort [kernel.kallsyms] [k] __memzero
0.39% qsort [kernel.kallsyms] [k] div_s64_rem
0.39% qsort [hi3518_tde] [k] 0x58
0.39% qsort [hi3518_dsu] [k] 0x8154
正如你可以看到有沒有呼叫跟蹤的。我真的很有興趣深入研究我的系統,如果沒有調用跟蹤,這些結果是無用的。
已經完成。它不起作用。所以,我嘗試了另一塊主板(不同的SoC和更新的內核版本),並且神奇地運行良好。顯然,問題在於我的表現。可能我的內核版本非常舊... 但是,即使沒有'-g'選項,我也能夠讀取和使用性能分析的結果。 –