Linux: debug: systemtap: 如何probe私有模块的函数

目前还没找到方法。因为在内核的debuginfo的符号表里根本就没有私有模块的函数信息。
编译时,报的错误是:

[root@vmtca-2101 systemtap]# stap -s 32 -m dump_buff.ko -p4 dump_buff.stp
Truncating module name to ‘dump_buff’
semantic error: while resolving probe point: identifier ‘module’ at dump_buff.stp:20:7
source: probe module(“abc”).function(“def”) {
^
semantic error: no match
Pass 2: analysis failed. [man error::pass2]

从systemtap的说明里看,这个“while resolving probe point”错误的意思是:A probe point was named that neither directly understood by systemtap, nor defined as an alias by a tapset script. The divergence from the ``tree’’ of probe point namespace is at position {\em N} (starting with zero at left).
意思是说,systemtap不能理解需要探测的点的名称,也不是tapset脚本里的别名。

semantic error: no match for probe point, while resolving probe point
A probe point cannot be resolved for any of a variety of reasons. It may be a debuginfo-based probe point such as \verb+kernel.function(“foobar”)+ where no \verb+foobar+ function was found. This can occur if the script specifies a wildcard on function names, or an invalid file name or source line number.

猜你喜欢

转载自blog.csdn.net/qq_36428903/article/details/132243009