[concurrency-interest] tools for parallel performance debugging

Nathan Reynolds nathan.reynolds at oracle.com
Thu Aug 25 12:01:32 EDT 2011


For identifying threading correctness issues, I recommend using Java 
Path Finder (http://babelfish.arc.nasa.gov/trac/jpf).  It executes every 
possible thread scheduling combination.  It does so by trying one thread 
scheduling combination and then back tracking (i.e. revert the state of 
the program) to simulate other combinations.  If there is a data race or 
deadlock, it will find it and report it.  It doesn't just tell you that 
a data race or deadlock exists but the steps that got to that state.  
Because of the number of combinations, it is best to run it on a small 
piece of the overall program.

As for synchronization contention, there are several tools available.  
Looking through a dump of call stacks and seeing where the most threads 
are blocked works for cases where the lock is dropping the throughput by 
10% or more.  The call stacks are easy to obtain but can be time 
consuming to sift through.  JRockit's Mission Control can tell you 
exactly which locks are most contended and give you the call stacks of 
where that lock is used.  I am pretty sure most of the profilers can 
tell you which locks are most contended, but since JRockit's Mission 
Control is free for me I haven't looked at the profilers for a while.  I 
thought that JConsole or some tool in the JDK could tell you the most 
contended lock... but I am really not sure of that.

As for false sharing, this is something that only the processor can tell 
you.  For Intel, I *think* VTune can tell you about false sharing.  I 
know that VTune can deal with Java optimized code.

Nathan Reynolds 
<http://psr.us.oracle.com/wiki/index.php/User:Nathan_Reynolds> | 
Consulting Member of Technical Staff | 602.333.9091
Oracle PSR Engineering <http://psr.us.oracle.com/> | Server Technology

On 8/24/2011 8:07 PM, Danny Dig wrote:
> This community has been providing some great library features for
> taming parallelism in Java.
>
> When it comes to tools for parallel performance debugging, it looks to
> me that Java is trailing behind C++/Intel's ParallelStudio, or
> C#/Microsoft's Visual Studio. When working with Java programs, what
> are the tools that you recommend for:
> - identifying threading correctness issues (e.g., data-races, deadlocks),
> - identifying performance issues (load imbalance, synchronization
> contention, false sharing)
>
> best,
> Danny
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20110825/480bf264/attachment.html>


More information about the Concurrency-interest mailing list