Request for reviews (S): 7050280: assert(u->as_Unlock()->is_eliminated()) failed: sanity
vladimir.kozlov at oracle.com
Thu Jun 2 19:25:25 PDT 2011
Fixed 7050280: assert(u->as_Unlock()->is_eliminated()) failed: sanity
Marking locks for elimination is done in IGVN. Unfortunately the order of IGVN
worklist processing may affect this marking. Also during EA obj may point to
several objects but after few ideal graph transformations (CCP) it may point to
only one non escaping object (but still using phi), corresponding locks and
unlocks will be marked for elimination. Later obj could be replaced with a new
node (new phi) and will be no escape information about it. And later after some
graph reshape other locks and unlocks (which were not marked for elimination
before) are connected to this new obj but they still will not be marked for
elimination since new obj has no escape information.
Do first round of locks marking during EA after ConnectionGraph is constructed
when all nodes have escape information. During Macro nodes expansion move
creation of new eliminated BoxLock into new separate method which is called
before locks elimination. Use this method to mark all associated (same box and
obj) lock and unlock nodes which were not marked before (instead of the assert).
Tested with failing case and full CTW.
More information about the hotspot-compiler-dev