在注释中,
perf
仅向我显示汇编代码。但是,它确实正确列出了所有符号,并且二进制文件是用 -g
编译的。此外,file
将二进制文件列为 with debug_info, not stripped
。
我用
编译 clang -std=c89 -pedantic -g \
-Wno-attributes \
-foptimize-sibling-calls \
-fno-strict-aliasing \
-DNDEBUG \
*.c
然后用
perf record -g --call-graph dwarf ./a.out [file arg to a.out]
进行录制。但是,当运行 perf annotate
或从 perf report -g
进入注释模式时,仅显示汇编代码。我尝试过通过 --source
和 -l
,但似乎都没有改变任何东西。
我在 Artix 上,使用
perf version 6.1.g830b3c68c1fb
(存储库中的 perf-6.1-1
)。