Lock coarsening LogCompilation output? (original) (raw)

Chris Newland cnewland at chrisnewland.com
Wed Jul 22 14:04:03 UTC 2015


Hi,

I'm building support into JITWatch for highlighting eliminated heap allocations and locks (either via elision or coarsening) and I'm confused by the LogCompilation output in this case:

Given the source code here: https://github.com/AdoptOpenJDK/jitwatch/blob/master/src/main/resources/examples/LockCoarsen.java

Which consists of two synchronized(this) regions separated by a single statement modifying a local primitive.

I get the following LogCompilation output: https://gist.github.com/chriswhocodes/124984ce8078290485e7

Which has the following elimination info in the optimizer phase:

BCI 61 refers to the 2nd synchronized block's monitor enter which I believe will be eliminated due to coarsening but I don't understand what the

tag means, and why it doesn't contain a jvms tag?

Does it mean the first synchronized block has also been eliminated (via elision) ? I don't see any "lock cmpxchg" related to the first synchronized block in the PrintAssembly?

Thanks,

Chris



More information about the hotspot-compiler-dev mailing list