是有C / C一个很好的线索追踪++像Haskell的Threadscope? [英] is there a good thread tracer for C/C++ like Haskell's Threadscope?

查看:114
本文介绍了是有C / C一个很好的线索追踪++像Haskell的Threadscope?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有像一个自由和开放源码工具 Threadscope (比的NPTL跟踪工具)来分析CPU利用率/线程错误?

Is there a free and open source tool like Threadscope (and newer than NPTL Trace tool) to analyze CPU utilization/threading errors?

推荐答案

CPU利用率分析和线程错误检查器可以在同一个工具不。要查找的线程错误,存取所需的内存巨大的分析。我可以命名valngrind的helgrind http://valgrind.org/docs/manual/hg-manual。 HTML 和谷歌threadSanitizer,赞(基于helgrind)的 HTTP://$c$c.google.com/p/data-race-test/wiki/ThreadSanitizer 。这两个工具的valgrind通过的libVEX动态code修改框架做code的运行时检测仪器。这将导致巨大的经济放缓,例如,对于Helgrind(从HG-手动):

The CPU utilization analysis and threading error checker can be not in the same tool. To find threading errors, huge analysis of memory accesses is needed. I can name valngrind's helgrind http://valgrind.org/docs/manual/hg-manual.html and google threadSanitizer, tsan (based on helgrind) http://code.google.com/p/data-race-test/wiki/ThreadSanitizer. Both tools do a run-time instrumentation of code via valgrind's libVEX dynamic code modification framework. This leads to huge slowdown, e.g. for Helgrind (from hg-manual):

业绩可能会非常差。 的顺序变慢的 100:1 是不寻常的。没有为性能的提升范围有限。

Performance can be very poor. Slowdowns on the order of 100:1 are not unusual. There is limited scope for performance improvements.

有关CPU使用率,你应该使用分析器,它不影响应用程序只有一点点(高达5-10%),例如性能 oprofile的或Linux的PERF https://开头perf.wiki.kernel.org/index.php/Main_Page

For CPU utilization, you should use the profiler, which does affect performance of the application only a little (up to 5-10 %), e.g. oprofile or linux's perf https://perf.wiki.kernel.org/index.php/Main_Page

如果您的应用程序的线程被使用OpenMP补充说,也有解决方案来分析OMP线程平衡,例如英特尔的OpenMP实现可以录制这里所示 .gvs(GuideView OpenMP的统计数据)文件格式的一些信息

If threads in your application are added by using OpenMP, there are solutions to analyze OMP thread balancing, e.g. Intel's openMP implementation can record some information like shown here .gvs (GuideView openmp statistics) file format

这篇关于是有C / C一个很好的线索追踪++像Haskell的Threadscope?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆