繁体   English   中英

sprof MAN 页面中的示例不起作用

[英]Example in the sprof MAN page is not working

我尝试使用 Sprof 分析进行测试。 我尝试使用 MAN 页面示例: https://github.com/makelinux/examples/tree/master/sprof ,但我看不到页面中提到的输出,出现错误

Inconsistency detected by ld.so: dl-open.c: 707: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!


$ sprof -V
sprof (Ubuntu GLIBC 2.23-0ubuntu9) 2.23
 tried with Glibc-2.18 and 2.19 too

这已在此处报告为 glibc 错误:

最好在那里继续进行任何进一步的讨论。

该错误仅在 sprof 的特殊加载时发生,因此当使用 sprof 标志 __RTLD_SPROF 加载对象时,只需禁用断言允许我使用 sprof,同时避免可能干扰正常共享对象加载机制的更改。 将 glibc/elf/dl-open.c:707 编辑为:

  if (!(__glibc_unlikely (mode & __RTLD_SPROF))) {
   assert (_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT);
  }

这适用于 glibc-2.20 并已发布到https://sourceware.org/bugzilla/show_bug.cgi?id=22380

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM