0

我想跟踪我使用 Intel PT 编写的内核模块,但我无法通过性能识别来自我的内核模块的符号。为了简单起见,我尝试使用perf record -e intel_pt// -a --filter 'filter print_hello' sleep 1. 这会导致以下错误:

Kernel symbol lookup: Symbol 'print_hello' not found.
Note that symbols must be functions.
Failed to parse address filter: 'filter print_hello'
Filter format is: filter|start|stop|tracestop <start symbol or address> [/ <end symbol or size>] [@<file name>]
Where multiple filters are separated by space or comma.

在没有过滤器的情况下使用perf record -a -e intel_pt//k sleep 1然后对perf script输出进行grep 处理print_hello也不会返回任何内容。

然而,perf kallsyms print_hello回报

print_hello: [hello_periodic] /lib/modules/5.4.161/extra/hello-periodic.ko 0xffffffffc07af07c-0xffffffffc07af0b6 (0x7c-0xb6)

所以我认为 perf 毕竟可以找到符号。

为什么会发生这种情况?

4

0 回答 0