[jdk21u-dev] RFR: 8180450: secondary_super_cache does not scale well

Andrew Dinn adinn at openjdk.org
Mon Feb 10 12:28:23 UTC 2025


On Thu, 24 Oct 2024 10:10:45 GMT, Andrew Haley <aph at openjdk.org> wrote:

> See [8180450](https://github.com/openjdk/jdk/pull/18309) for a full description of how this works.
> This is a pretty clean backport, but a few files had to be fiddled manually because things had been added nearby.
> 
> This PR also includes a fix for [[8337958](https://bugs.openjdk.org/browse/JDK-8337958)](https://bugs.openjdk.org/browse/JDK-8337958), which was a minor bug in the original commit.
> 
> For a justification of why this PR should be backported to JDK 21u, see 
> [Franz's email](https://mail.openjdk.org/pipermail/jdk-updates-dev/2024-October/038649.html).

Backport looks ok to me modulo a couple of questions.

n.b. I agree this is sorely needed for jdk21u and earlier releases

src/hotspot/share/cds/filemap.cpp line 293:

> 291:   st->print_cr("- cloned_vtables_offset:          " SIZE_FORMAT_X, _cloned_vtables_offset);
> 292:   st->print_cr("- serialized_data_offset:         " SIZE_FORMAT_X, _serialized_data_offset);
> 293:   st->print_cr("- heap_begin:                     " INTPTR_FORMAT, p2i(_heap_begin));

The upstream patch added the following sanity check at line 2425 (equivalent to line 2411 in the 21u version):

    if (! _use_secondary_supers_table && UseSecondarySupersTable) {
      log_warning(cds)("The shared archive was created without UseSecondarySupersTable.");
      return false;
    }

Is there a reason why it has been omitted from this patch?

test/micro/org/openjdk/bench/vm/lang/SecondarySupersLookup.java line 1:

> 1: /*

Could you comment on why only this one test is being back-ported?

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

PR Review: https://git.openjdk.org/jdk21u-dev/pull/1090#pullrequestreview-2605545538
PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/1090#discussion_r1948928978
PR Review Comment: https://git.openjdk.org/jdk21u-dev/pull/1090#discussion_r1948963613


More information about the jdk-updates-dev mailing list