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

Christian Hagedorn chagedorn at openjdk.org
Wed Jun 5 09:35:57 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.

Apart from Tobias' suggestions, it looks good to me, too!

src/hotspot/share/opto/escape.cpp line 4799:

> 4797:     // If we have crossed the 3/4 point of max node limit it's too risky
> 4798:     // to continue with EA/SR because we might hit the max node limit.
> 4799:     if (_compile->live_nodes() >= _compile->max_node_limit()*0.75) {

Suggestion:

    if (_compile->live_nodes() >= _compile->max_node_limit() * 0.75) {

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19545#pullrequestreview-2098553417
PR Review Comment: https://git.openjdk.org/jdk/pull/19545#discussion_r1627363454


More information about the hotspot-compiler-dev mailing list