ConstantDynamic in unvisited catch causes 74X slowdown

Eirik Bjørsnøs eirbjo at gmail.com
Tue Jan 25 20:04:55 UTC 2022


>
> What is going on here?
>

-XX:+PrintCompilation revealed the following:

    867  563 % !   4
com.eirbjo.cpc.ConstantDynamicCliff$TheCliff::climb @ 31 (66 bytes)
    868  563 % !   4
com.eirbjo.cpc.ConstantDynamicCliff$TheCliff::climb @ 31 (66 bytes)
COMPILE SKIPPED: cannot parse method (retry at different tier)
    869  564 % !   1
com.eirbjo.cpc.ConstantDynamicCliff$TheCliff::climb @ 31 (66 bytes)
compilation bailout: could not resolve a constant
    870  564 % !   1
com.eirbjo.cpc.ConstantDynamicCliff$TheCliff::climb @ 31 (66 bytes)
COMPILE SKIPPED: could not resolve a constant (retry at different tier)

Which leads me to
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/c1/c1_GraphBuilder.cpp#L919

  if (con.basic_type() == T_ILLEGAL) {
    // FIXME: an unresolved Dynamic constant can get here,
    // and that should not terminate the whole compilation.
    BAILOUT("could not resolve a constant");
  }

Eirik.


More information about the hotspot-compiler-dev mailing list