RFR: 8331736: C2: Live Node limit exceeded limit after JDK-8316991
Tobias Hartmann
thartmann at openjdk.org
Wed Jun 5 09:11:00 UTC 2024
On Tue, 4 Jun 2024 16:32:15 GMT, Cesar Soares Lucas <cslucas at openjdk.org> wrote:
> Please, consider this patch to interrupt execution of `split_unique_types` (SUT) when number of live nodes reaches 3/4 of `max_live_nodes`.
>
> The included test case reproduces the problem. The number of live nodes before running phase 3 of SUT is ~20k, after processing about 750 mergemem nodes the number of live nodes is over 70k. This problem was first encountered when running an old `.jar` file that was created before `invokedynamic` optimizations - that's why I disable string optimizations in the test case. The test case is strongly based on [the method that was originally triggering the problem](https://github.com/Unidata/netcdf-java/blob/c782ef80ab54a09befd6d5065c6baeed54949222/cdm/radial/src/main/java/ucar/nc2/iosp/nids/Nidsheader.java#L2174).
>
> Tested on Linux, Win, Mac x86_64 tier1-3 and GHA.
Looks good to me. We have similar logic for split-if (see `must_throttle_split_if`).
src/hotspot/share/opto/escape.cpp line 4807:
> 4805: _compile->record_failure(C2Compiler::retry_no_escape_analysis());
> 4806: }
> 4807: return ;
Suggestion:
return;
test/hotspot/jtreg/compiler/c2/TestScalarReplacementMaxLiveNodes.java line 41:
> 39: * -XX:DesiredMethodLimit=100000
> 40: * compiler.c2.TestScalarReplacementMaxLiveNodes
> 41: */
Please add a run without any arguments (`@run main/othervm ...`) so that we get some additional coverage with other VM args through this test.
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19545#pullrequestreview-2098456843
PR Review Comment: https://git.openjdk.org/jdk/pull/19545#discussion_r1627291547
PR Review Comment: https://git.openjdk.org/jdk/pull/19545#discussion_r1627296582
More information about the hotspot-compiler-dev
mailing list