RFR: 8331736: C2: Live Node limit exceeded limit after JDK-8316991

Tobias Hartmann thartmann at openjdk.org
Wed Jun 5 09:14:56 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.

test/hotspot/jtreg/compiler/c2/TestScalarReplacementMaxLiveNodes.java line 29:

> 27:  * @summary Check that C2 does not exceed max live node limit when splitting unique types of large allocation merge.
> 28:  * @library /test/lib /
> 29:  * @requires vm.debug & vm.flagless & vm.compiler2.enabled & vm.opt.final.EliminateAllocations

Suggestion:

 * @requires vm.debug & vm.compiler2.enabled


It think it's best to not overly restrict the test to get some more coverage from different flag combinations in the CI.

test/hotspot/jtreg/compiler/c2/TestScalarReplacementMaxLiveNodes.java line 31:

> 29:  * @requires vm.debug & vm.flagless & vm.compiler2.enabled & vm.opt.final.EliminateAllocations
> 30:  * @compile -XDstringConcat=inline TestScalarReplacementMaxLiveNodes.java
> 31:  * @run main/othervm -Xbatch -server -XX:-OptimizeStringConcat -XX:-TieredCompilation

Suggestion:

 * @run main/othervm -Xbatch -XX:-OptimizeStringConcat -XX:-TieredCompilation

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19545#discussion_r1627326981
PR Review Comment: https://git.openjdk.org/jdk/pull/19545#discussion_r1627324105


More information about the hotspot-compiler-dev mailing list