RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v23]

Andrew Haley aph at openjdk.org
Thu Oct 10 11:25:16 UTC 2024


On Wed, 9 Oct 2024 12:43:36 GMT, Gui Cao <gcao at openjdk.org> wrote:

> Hi, I ran some jmh tests on the arm64 platform and the performance `SecondarySupersLookup.testPositive` seems to have decreased, is this as expected? before this patch:

Yes.

The amazingly fast positive test results you're seeing are something of an illusion. After this patch, the single-entry `_secondary_super_cache` field, shared among all threads, is no longer in use. The use of this field led to catastrophic scaling problems.

What you're seeing in your test reult is a hangover from the "old" way of doing things. Even though C2-compiled code does not update `_secondary_super_cache`, that field just happens to contain the result of a previous lookup, either from C1 or the interpreter.

After this patch, the positive lookup time is still very fast in all reasonable cases, and it's near to the best that can be done while avoiding extreme slowdowns.

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

PR Comment: https://git.openjdk.org/jdk/pull/19989#issuecomment-2404823759


More information about the hotspot-dev mailing list