RFR(XS): 8227384: C2 compilation fails with "graph should be schedulable" when running with -XX:-EliminateLocks

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Sep 25 19:07:35 UTC 2019


Hi Roland

On 8/20/19 4:47 AM, Roland Westrelin wrote:
> 
> Hi Vladimir,
> 
> Thanks for looking at this.

> http://cr.openjdk.java.net/~roland/8227384/webrev.01/

> 
>> Expanding Locks before Allocations is good idea. We do eliminate Locks before eliminating
>> Allocations. Will a load after IGVN optimization folds with load generated in
>> PhaseMacroExpand::initialize_object() ?
> 
> Can you clarify your concern? Are you talking about a load of the mark
> word? Or is it the load of the prototype header in
> PhaseMacroExpand::initialize_object()?

My concern is that your loading from Klass::prototype_header_offset (or make constant) instead of 
loading from object's mark word in LoadNod Ideal() and Value() methods bypassing Store into mark 
word or possible access to object from other thread before this load. It is okay if 
object/allocation is not escaping but not in general case I think.

> 
>> I don't see offset check in is_new_object_mark_load(). How it known it is load from *mark word*?
> 
> It checks that the address input of the load is an allocation. If it is
> not at offset 0, there is an AddP between the load and the allocation
> and is_new_object_mark_load() returns false on this graph shape.

Okay.

Thanks,
Vladimir

> 
> Roland.
> 


More information about the hotspot-compiler-dev mailing list