【SystemTap】 2.6.36 内核下运行SystemTap出现 error:‘param_ops_int64_t’ undeclared here (not in a function) 错误

场景:

     内核版本是 2.6.36.4,执行SystemTap脚本时出现如下错误:
   ‘param_ops_int64_t’ 未声明 (不在函数内),

     即

    error:‘param_ops_int64_t’ undeclared here (not in a function)

 

例如:

[root@gd90 DataCollector]# iowrap/io_old.sh
Pass 1: parsed user script and 65 library script(s) using 43980virt/19288res/1736shr kb, in 180usr/10sys/201real ms.
WARNING: eliding unused variable 'name1': identifier 'name1' at <input>:3:22
 source: global reads, writes,name1,name2
                              ^
WARNING: eliding unused variable 'name2': identifier 'name2' at :3:28
 source: global reads, writes,name1,name2
                                    ^
WARNING: side-effect-free probe 'probe_1919': keyword at :68:1
 source: probe end
         ^
WARNING: eliding unused function '_dwarf_tvar_get_pid_12': identifier '$pid' at :55:13
 source:   tmpregion=$pid
                     ^
WARNING: eliding unused variable 'tmpregion': identifier 'tmpregion' at :55:3
 source:   tmpregion=$pid
           ^
Pass 2: analyzed script: 7 probe(s), 7 function(s), 17 embed(s), 8 global(s) using 147620virt/97060res/59516shr kb, in 480usr/30sys/504real ms.
Pass 3: translated to C into "/tmp/stap3IU5T6/stap_3514.c" using 147620virt/97852res/60296shr kb, in 420usr/20sys/431real ms.
/tmp/stap3IU5T6/stap_3514.c:2956: 错误:‘param_ops_int64_t’ 未声明 (不在函数内)
make[1]: *** [/tmp/stap3IU5T6/stap_3514.o] 错误 1
make: *** [_module_/tmp/stap3IU5T6] 错误 2
Pass 4: compiled C into "stap_3514.ko" in 3410usr/670sys/4162real ms.
Pass 4: compilation failed.  Try again with another '--vp 0001' option.
Keeping temporary directory "/tmp/stap3IU5T6"


解决办法:

     Systemtap 对 2.6.36 内核支持不好,有这个 bug , Systemtap 官方网站说这个 bug 已经修复,使用最新的 Systemtap 就好了。于是下面的网站下载最新的 Systemtap 的源代码,编译安装。
http://sources.redhat.com/systemtap/ftp/snapshots/

   我下载的是 systemtap-1.4、elfutils-0.147,安装完毕,解决问题。

 

参考:

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值