RFR: 8352696: JFR: assert(false): EA: missing memory path [v2]
Aleksey Shipilev
shade at openjdk.org
Mon Mar 24 12:34:54 UTC 2025
On Mon, 24 Mar 2025 12:22:10 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> Greetings,
>>
>> In debug builds, we can sometimes assert because C2's Escape Analysis does not recognize a pattern where one input of memory Phi node is a MergeMem node, and another is a RAW store.
>>
>> This pattern is created by the jdk.jfr.internal.JVM.commit() intrinsic, which is inlined because of inlining JFR events, for example jdk.VirtualThreadStart.
>>
>> As a result, EA complains about a strange memory graph.
>>
>> Testing: jdk_jfr
>>
>> Thanks
>> Markus
>
> Markus Grönlund has updated the pull request incrementally with two additional commits since the last revision:
>
> - merged requires
> - indentation
src/hotspot/share/opto/library_call.cpp line 3179:
> 3177: store_to_memory(control(), java_buffer_pos_offset, next_pos_X, T_LONG, MemNode::release);
> 3178: #else
> 3179: store_to_memory(control(), java_buffer_pos_offset, next_pos_X, T_INT, MemNode::release);
BTW, you can write this is less duplication, like:
store_to_memory(control(), java_buffer_pos_offset, next_pos_X, LP64_ONLY(T_LONG) NOT_LP64(T_INT), MemNode::release);
(I wish there was a `X`-style macro like `MakeConX`, but I don't think there is one for `BasicType`)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24192#discussion_r2010087366
More information about the hotspot-compiler-dev
mailing list