[lworld] RFR: 8326595: [lworld] Bootstrap VM transition to JEP 401 model [v2]

Frederic Parain fparain at openjdk.org
Mon Feb 26 15:42:50 UTC 2024


On Mon, 26 Feb 2024 11:45:18 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   More C2 fixes and cleanup
>
> src/hotspot/share/opto/graphKit.cpp line 3664:
> 
>> 3662: Node* GraphKit::is_val_mirror(Node* mirror) {
>> 3663:   // JDK-8325660: notion of secondary mirror / val_mirror is gone one JEP 401
>> 3664:   Node* p = basic_plus_adr(mirror, (int)0 /* java_lang_Class::secondary_mirror_offset() */);
> 
> This will break Escape Analysis because such an access with zero offset is unexpected:
> 
> 
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error (/oracle/valhalla/open/src/hotspot/share/opto/escape.cpp:896), pid=600228, tid=600242
> #  assert(_igvn->type(adr)->isa_rawptr()) failed: sanity
> #
> # JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-lworld4ea-2024-02-06-1232159.tobias...)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-lworld4ea-2024-02-06-1232159.tobias..., compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
> # Problematic frame:
> # V  [libjvm.so+0xbe2ec4]  ConnectionGraph::add_objload_to_connection_graph(Node*, Unique_Node_List*)+0x284
> 
> 
> Please add this to disable the check properly:
> 
> 
> diff --git a/src/hotspot/share/opto/library_call.cpp b/src/hotspot/share/opto/library_call.cpp
> index 92425fecf11..bd3ed61744b 100644
> --- a/src/hotspot/share/opto/library_call.cpp
> +++ b/src/hotspot/share/opto/library_call.cpp
> @@ -4310,7 +4310,8 @@ bool LibraryCallKit::inline_native_subtype_check() {
>      region->set_req(_both_ref_path, gen_subtype_check(subk, superk));
>      // If superc is an inline mirror, we also need to check if superc == subc because LMyValue
>      // is not a subtype of QMyValue but due to subk == superk the subtype check will pass.
> -    generate_fair_guard(is_val_mirror(args[0]), prim_region);
> +    // TODO JDK-8325660
> +    // generate_fair_guard(is_val_mirror(args[0]), prim_region);
>      // now we have a successful reference subtype check
>      region->set_req(_ref_subtype_path, control());
>    }

Thank you for the quick fix.

> src/hotspot/share/opto/parse2.cpp line 3510:
> 
>> 3508:     break;
>> 3509:   case Bytecodes::_withfield:
>> 3510:     do_withfield();
> 
> Could you add a `// TODO JDK-8325660` to both methods so we don't forget removing them (or simply remove them right away)?

do_withfield() and do_aconst_init() methods have been removed from C2 parse* code.

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/1017#discussion_r1502818469
PR Review Comment: https://git.openjdk.org/valhalla/pull/1017#discussion_r1502819315



More information about the valhalla-dev mailing list