我在内核5.4.80上运行perf并显式地使用fp调用图:
perf record -g --call-graph fp ...在运行perf script时,可以对堆栈跟踪进行分析,而不会出现任何问题。这是在没有启用框架指针的情况下编译内核时,而是使用ORC:
CONFIG_UNWINDER_ORC=y
# CONFIG_UNWINDER_FRAME_POINTER is not set结果是内核符号在/proc/kallsyms中可用。
另一方面,似乎perf-script只知道fp、dwarf和lbr:来源。
我想知道perf脚本如何能够解除堆栈并生成报告,尽管在启用了fp堆栈展开的内核上使用ORC调用图选项进行记录?
发布于 2022-04-15 02:44:09
据perf-记录(1)称,
--call-graph
Setup and enable call-graph (stack chain/backtrace)
recording, implies -g. Default is "fp" (for user space).
The unwinding method used for kernel space is dependent on the
unwinder used by the active kernel configuration, i.e
CONFIG_UNWINDER_FRAME_POINTER (fp) or CONFIG_UNWINDER_ORC (orc)
Any option specified here controls the method used for user space.因此,--call-graph只控制调用图是如何在用户空间中展开的。在内核空间中,使用主动启用的展开器。
https://stackoverflow.com/questions/71865803
复制相似问题