Request for reviews (S): 6775880: EA +DeoptimizeALot: assert(mon_info->owner()->is_locked(),"object must be locked now")
Vladimir.Kozlov at Sun.COM
Wed Dec 3 07:05:17 PST 2008
Fixed 6775880: EA +DeoptimizeALot: assert(mon_info->owner()->is_locked(),"object must be locked now")
Locks elimination for non-escaping objects incorrectly
assumes that different objects have different BoxLock nodes.
It is not true, BoxLock could be shared for locking
different objects. As result "eliminated" status of
BoxLock node is incorrect when locks for one object
were eliminated and for an other they were not.
This affects debug info and leads to the assert during
- ConnectionGraph::escape_state(n, phase) should return
the state of JavaObject.
- Use EA information during all optimizations since
optimizations can not change the escape state to worse
but they can change the lock's obj_node input to non-escaping
one which will allow to eliminate the lock (for example, after
parser the obj_node is a phi which points to an incoming
parameter and non-escaping allocation, and during optimizations
the parameter path became dead).
- Create new "eliminated" BoxLock node and use it in
monitor debug info when corresponding locks are eliminated.
- Add the check "eliminated" status to BoxLock node's
hash() and cmp() methods to distinguish such nodes.
- Also delete FastLock node when the lock code is removed
Added the regression test.
Fix verified (y/n): y
JPRT, CTW (with -XX:+DeoptimizeALot -XX:+DoEscapeAnalysis)
More information about the hotspot-compiler-dev