Profiling thread sync lock contention

一笑奈何 提交于 2019-12-19 08:06:12

问题


In the past I've used performance profiling tools such as nprof, Equatec profiler and Yourkit profiler to identify and remove/reduce performance bottlenecks in code mostly running in one thread (serialized execution). Nowadays I write a lot of multi-threaded code which can be slowed down by lock contention; what tools and tricks can be used to identify where lock contention is occuring and by how much?


回答1:


This is available soon, currently shipping in Visual Studio 2010 beta 2. Here's a video of the tool.




回答2:


Try ThreadChecker from Intel. It works on both Windows and Linux. If you're working on Windows, then try Parallel Studio. It provides a easy-to-use locks-and-waits profiler. It shows overall concurrency during the runtime, which gives hints on lock contentions and poor concurrency. The tools are doing right now what you want.




回答3:


For developing on Windows, Software Verification have some (http://www.softwareverify.com/thread.html).

For C, C++, Delphi try Thread Validator.

For Java, there is also Java Thread Validator.

There are also experimental versions for Python and Ruby.



来源:https://stackoverflow.com/questions/2169143/profiling-thread-sync-lock-contention

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!