使用sample-bt分析性能问题

206 views
Skip to first unread message

fuyou001

unread,
Nov 6, 2014, 8:36:18 AM11/6/14
to open...@googlegroups.com
大家好
    我的系统信息如下:
os version is :
Red Hat Enterprise Linux Server release 5.7 (Tikanga)

Kernel is 
2.6.32 
name -m
x86_64
gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52)


按照官网安装文档,使用smaple-bt提示版本太低。错误信息如下
ERROR: at least systemtap 2.1 is required but found 1.6

这个2.6.32 上面能否安装systamp 2.1 或以上版本?
有没有安装文档,谢谢!

fuyou001

unread,
Nov 6, 2014, 9:02:44 AM11/6/14
to open...@googlegroups.com
找下春哥的文档http://openresty.org/#BuildSystemtap
按照文档操作,在make时报下面的错误 

cc1: warnings being treated as errors
../../../elfutils-0.159/libdwfl/linux-core-attach.c: In function ‘core_next_thread’:
../../../elfutils-0.159/libdwfl/linux-core-attach.c:155: warning: implicit declaration of function ‘be32toh’
../../../elfutils-0.159/libdwfl/linux-core-attach.c:155: warning: implicit declaration of function ‘le32toh’
../../../elfutils-0.159/libdwfl/linux-core-attach.c: In function ‘core_set_initial_registers’:
../../../elfutils-0.159/libdwfl/linux-core-attach.c:230: warning: implicit declaration of function ‘be64toh’
../../../elfutils-0.159/libdwfl/linux-core-attach.c:230: warning: implicit declaration of function ‘le64toh’
make[3]: *** [linux-core-attach.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/yubao.fyb/tools/systemtap-2.4/build-elfutils/libdwfl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/yubao.fyb/tools/systemtap-2.4/build-elfutils'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/yubao.fyb/tools/systemtap-2.4/build-elfutils'
make: *** [stamp-elfutils] Error 2

Yichun Zhang (agentzh)

unread,
Nov 6, 2014, 4:39:56 PM11/6/14
to openresty
Hello!

On Thu, Nov 6, 2014 at 6:02 AM, fuyou001 wrote:
> 找下春哥的文档http://openresty.org/#BuildSystemtap
> 按照文档操作,在make时报下面的错误
>
> cc1: warnings being treated as errors
> ../../../elfutils-0.159/libdwfl/linux-core-attach.c: In function
> ‘core_next_thread’:
> ../../../elfutils-0.159/libdwfl/linux-core-attach.c:155: warning: implicit
> declaration of function ‘be32toh’

我知道在比较古老的系统上确实会有这种错误。由于我手头没有这么老的系统,所以无法帮助你调试。建议在 systemtap 官方的英文邮件列表里问询:

https://sourceware.org/systemtap/getinvolved.html

另外,值得尝试一下最新的 elfutils 0.160:

https://fedorahosted.org/releases/e/l/elfutils/0.160/

不知道是否有针对此问题的修复。

欢迎在这里反馈你更多的发现和进展 :)

Regards,
-agentzh

fuyou001

unread,
Nov 7, 2014, 7:39:34 AM11/7/14
to open...@googlegroups.com
在那服务器还是不行
不过在Ubuntu 14.04 上是轻松安装成功了,根据文档!
顺便问问学习Systemtap ,除了https://sourceware.org/systemtap/documentation.html 这官网,还有什么其它好的资源吗?
谢谢!

fuyou001

unread,
Nov 9, 2014, 1:14:26 AM11/9/14
to open...@googlegroups.com
@agentzh 
   我在Ubutnu12.04 安装成功了。
但图出来函数名是地址.dd命令产生的FlameGraph见图.

是不是还少些东西,才导这样。

另外问下,如果是用来分析Java程序,是否能够识别Java的类及方法名?需要做什么?
谢谢!

Kawaru

unread,
Dec 3, 2014, 6:18:35 AM12/3/14
to open...@googlegroups.com
java的火焰图我用过这个,当时搭minecraft server查看卡顿原因时用的, 效果还不错:
http://tacy.github.io/blog/2014/07/16/FlameGraph/
不知道适不适合你的使用场景

在 2014年11月9日星期日UTC+8下午2时14分26秒,fuyou001写道:

fuyou001

unread,
Dec 3, 2014, 8:46:17 PM12/3/14
to open...@googlegroups.com
我试试,谢谢!

fuyou001

unread,
Dec 5, 2014, 6:35:00 AM12/5/14
to open...@googlegroups.com
@章老师

我现在由redhat5 升级内核到 3.10.0-123.4.2.el5.x86_64 #1 SMP Thu Jul 24 05:19:36 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
是应该安装这个kernel-dbug 是什么版本,是   kernel-devel-x86_64 里的kernel-debug-devel-3.10.0-123.4.2.el7.x86_64.rpm 这个的吗
但好像不是el5的?
谢谢!

Yichun Zhang (agentzh)

unread,
Dec 5, 2014, 2:44:51 PM12/5/14
to openresty
Hello!

2014-12-05 3:35 GMT-08:00 fuyou001:
> 我现在由redhat5 升级内核到 3.10.0-123.4.2.el5.x86_64 #1 SMP Thu Jul 24 05:19:36 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
> 是应该安装这个kernel-dbug 是什么版本,是 kernel-devel-x86_64 里的kernel-debug-devel-3.10.0-123.4.2.el7.x86_64.rpm 这个的吗

内核的调试符号包必须和二进制内核本身源自同一次内核编译过程(当然了,是打包者的编译过程)。差一点都不行。

Regards,
-agentzh

fuyou001

unread,
Dec 6, 2014, 4:33:13 AM12/6/14
to open...@googlegroups.com
谢谢!
那应该是不行了,但我应该上哪去内核对应版本的内核的调试符号包呢?
特别是系统是redhat5 ,但内核是3.1.0。

Yichun Zhang (agentzh)

unread,
Dec 6, 2014, 5:38:54 PM12/6/14
to openresty
Hello!

2014-12-06 1:33 GMT-08:00 fuyou001:
> 那应该是不行了,但我应该上哪去内核对应版本的内核的调试符号包呢?
> 特别是系统是redhat5 ,但内核是3.1.0。
>

建议去询问你使用的内核安装包的创建者或维护者 :)

Regards,
-agentzh
Reply all
Reply to author
Forward
0 new messages