内核符号__tracepoint_module_load在哪里定义的?

Where is the kernel symbol __tracepoint_module_load defined?

内核符号__tracepoint_module_load在哪里定义的?
我在/proc/kallsyms看过一次,现在找不到了

bootlin.com/linux/也找不到。

Where is the kernel symbol __tracepoint_module_load defined ?

TRACE_EVENT macro, which eventually uses __DECLARE_TRACE,在这里可以看到:

extern struct tracepoint __tracepoint_##name;

所以我们可以在include/trace/events/module.h中为module_load找到合适的TRACE_EVENT"call":

TRACE_EVENT(module_load,
...

/proc/kallsyms输出D表示符号在初始化数据段:

ffffffff91af5240 D __tracepoint_module_load

P.S。在预处理器魔法的情况下 elixir.bootlin.com 不是很有用。要进行真正的调查,只需克隆 Linux kernel or download the appropriate sources from pub.