请教下,火焰图出现大量的_init,是否正常?

185 views
Skip to first unread message

tgy...@gmail.com

unread,
Apr 14, 2015, 3:24:19 AM4/14/15
to open...@googlegroups.com
systemtap运行时出现的警告:

WARNING: no or bad debug frame hdr
WARNING: No binary search table for eh frame, doing slow linear search for stap_6b2ef5c1e5602d6bc0d0baf781ad5db_12420
WARNING: DWARF expression stack underflow in CFI
WARNING: Too many CFI instuctions
WARNING: Number of errors: 0, skipped probes: 28

火焰图:


nginx是编译安装的,已加上--with-debug选项。
上面的一切说明是否正常?

Yichun Zhang (agentzh)

unread,
Apr 14, 2015, 11:11:44 AM4/14/15
to openresty
Hello!

On Tue, Apr 14, 2015 at 12:24 AM, tgyday wrote:
> 火焰图:

从火焰图上看,你的进程缺少调试符号,或者调试符号有问题。

可以同时配合 gdb 等其他调试工具加以验证。

>
> nginx是编译安装的,已加上--with-debug选项。

官方的 nginx 和 OpenResty 都*不需要* --with-debug
选项来启用调试符号,因为默认调试符号就是启用的。--with-debug 有性能损耗,不建议在生产中使用。

> 上面的一切说明是否正常?
>

很不正常。

Regards,
-agentzh
Message has been deleted

tgy...@gmail.com

unread,
Apr 15, 2015, 11:42:05 AM4/15/15
to open...@googlegroups.com

章老师,可以再帮我看一下我这个图算不算正常了?好像是有很多_init。


在 2015年4月14日星期二 UTC+8下午11:11:44,agentzh写道:

Yichun Zhang (agentzh)

unread,
May 8, 2015, 1:51:59 AM5/8/15
to openresty
Hello!

2015-04-15 23:42 GMT+08:00 <tgy...@gmail.com>:
>
> 章老师,可以再帮我看一下我这个图算不算正常了?好像是有很多_init。
>

用户态代码还是明显缺少调试符号。

正常的火焰图是类似这个样子的:

http://agentzh.org/misc/nginx/user-flamegraph.svg

另外,你最后提供原始的 svg 格式的火焰图,png 丢失了很多细节信息。

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