RFR: 8329797: Shenandoah: Default case invoked for: "MaxL" (bad AD file) [v3]

Aleksey Shipilev shade at openjdk.org
Fri Apr 19 16:47:08 UTC 2024


On Fri, 19 Apr 2024 16:30:48 GMT, Joshua Cao <duke at openjdk.org> wrote:

>> src/hotspot/share/opto/compile.hpp line 321:
>> 
>>> 319: 
>>> 320:   bool                  _post_loop_opts_phase;  // Loop opts are finished.
>>> 321:   bool                  _began_macro_expansion; // Macro expansion is started.
>> 
>> I think this sounds better as inverse, `bool _allow_macro_nodes; // Allow creating macro nodes`.  Then we can also assert `_allow_macro_nodes` in `add_macro_node`?
>
> Can't add the assert for free. Apparently macro nodes are added later in the compiler pipeline, Matcher in this case. 
> 
> 
> Stack: [0x00007fb2c6d50000,0x00007fb2c6e51000],  sp=0x00007fb2c6e4caa0,  free space=1010k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V  [libjvm.so+0x63bd9d]  Compile::add_macro_node(Node*)+0x49  (compile.hpp:742)
> V  [libjvm.so+0x124ccc5]  Node::clone() const+0x15f  (node.cpp:501)
> V  [libjvm.so+0x119a93a]  Matcher::xform(Node*, int)+0x3a2  (matcher.cpp:1150)
> V  [libjvm.so+0x1195413]  Matcher::match()+0xe8b  (matcher.cpp:359)
> V  [libjvm.so+0x9a9723]  Compile::Code_Gen()+0x95  (compile.cpp:2947)
> V  [libjvm.so+0x99fd8d]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1827  (compile.cpp:895)

Eh? We do `Compile::add_macro_node` from `Code_Gen`, which means we add to `_macro_nodes` unnecessarily? Same for expensive nodes. That's unfortunate...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18824#discussion_r1572648377


More information about the hotspot-compiler-dev mailing list