RFR(XS): 8227384: C2 compilation fails with "graph should be schedulable" when running with -XX:-EliminateLocks
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Sep 26 16:38:12 UTC 2019
On 9/26/19 8:37 AM, Roland Westrelin wrote:
>
> Hi Vladimir,
>
>> 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.
>
> LoadNode::is_new_object_mark_load() checks the memory edge of the load:
Douh! Sorry, I missed this obvious check. You are right. Fix is good.
Thanks,
Vladimir
>
> 1565 if (alloc != NULL && mem->is_Proj() &&
> 1566 mem->in(0) != NULL &&
> 1567 mem->in(0) == alloc->initialization() &&
>
> So it can't bypass a store unless the store was captured but stores to
> headers are not captured (see below).
>
> Roland.
>
> int InitializeNode::captured_store_insertion_point(intptr_t start,
> int size_in_bytes,
> PhaseTransform* phase) {
> const int FAIL = 0, MAX_STORE = BytesPerLong;
>
> if (is_complete())
> return FAIL; // arraycopy got here first; punt
>
> assert(allocation() != NULL, "must be present");
>
> // no negatives, no header fields:
> if (start < (intptr_t) allocation()->minimum_header_size()) return FAIL;
>
More information about the hotspot-compiler-dev
mailing list