【问题标题】:Difference between .function() and .function().call in systemtapsystemtap 中 .function() 和 .function().call 之间的区别
【发布时间】:2018-12-21 03:30:08
【问题描述】:

我正在学习系统 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

我知道调用是为了函数入口,上面是入口和出口

【问题讨论】:

    标签: linux debugging linux-kernel systemtap


    【解决方案1】:

    来自docs

    .function 变体在命名的开头附近放置一个探针 函数,以便参数可用作上下文变量。

    .return 变体在从 命名函数,因此返回值可用作 $return 上下文变量。入口参数也是可用的,尽管 函数可能已经改变了它们的值。

    ...

    .function.inline 修饰符过滤结果以仅包含 内联函数的实例。 .call 修饰符选择 对面的子集。

    所以.call 修饰符只是从结果中获取“调用”(本身)。

    【讨论】:

      猜你喜欢
      • 2012-02-13
      • 2011-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-17
      • 2020-06-23
      • 2012-03-12
      • 2018-06-20
      相关资源
      最近更新 更多