.function() 和 .function().call 在 systemtap 中的区别

Difference between .function() and .function().call in systemtap

我正在学习系统 tap 实用程序来调试 Linux 内核。

示例代码如下:

probe module("e1000").function("e1000_get*") {
printf("%s\n", ppfunc())
}

probe module("e1000").function("e1000_get*").return {
printf("%s \n", ppfunc())
}

有什么区别

probe module("e1000").function("e1000_get*") 并探测 module("e1000").function("e1000_get*").call

我知道call是函数入口,就是上面的入口和出口都一样

来自 docs

The .function variant places a probe near the beginning of the named function, so that parameters are available as context variables.

The .return variant places a probe at the moment of return from the named function, so the return value is available as the $return context variable. The entry parameters are also available, though the function may have changed their values.

...

The .inline modifier for .function filters the results to include only instances of inlined functions. The .call modifier selects the opposite subset.

因此 .call 修饰符仅从结果中获得 "calls"(如此)。