您的位置:首页 > 运维架构

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

2011-03-14 15:22 716 查看
场景:

内核版本是 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,安装完毕,解决问题。

参考:

在Ubuntu10.10上升级内核到2.6.36使用systemtap http://mqzhuang.javaeye.com/blog/840223
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐