Is there a free and open source tool like Threadscope (and newer than NPTL Trace tool) to analyze CPU utilization/threading errors?
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):
Performance can be very poor. Slowdowns on the order of 100:1 are not unusual. There is limited scope for performance improvements.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With