Integrated: 8305995: Footprint regression from JDK-8224957

Kirill A. Korinsky duke at openjdk.org
Mon Apr 17 12:25:56 UTC 2023


On Thu, 13 Apr 2023 01:02:08 GMT, Kirill A. Korinsky <duke at openjdk.org> wrote:

> This is a fix for the regression introduced by da43cb5e463069cf4dafb262664f0d3d7c2e0eac in fix 8224957.
> 
> This regression was found while attempting to migrate an application from JDK 1.8 to JDK 17, by running internal benchmarks, and while investigating abnormal memory usage for about 4 times more from one of them.
> 
> The regression appears in the JMH benchmark, which builds a huge tree which contains boxed integers from 0 to a few thousand. A tree has very complex structure and the same objects are reused a lot.
> 
> When an `integer` is found it's collected as `Integer` and unboxed inside the collector callback.
> 
> This benchmark was run with `ParallelGC` on different JVMs: `JDK 1.8.0_362`, `JDK 11.0.18`, `JDK 13.0.13`, `JDK 15.0.9`, `JDK 17.0.6`, `JDK 19.0.2` and `JDK 20`. This allows to see that something has changed between 13 and 15, and that the memory footprint for this code has increased from `3152` to `11828` bytes per operation.
> 
> After that I've done a `git bisect` which allows me to locate the introducer.
> 
> So the current fix reduces the memory footprint on the local root 425ef0685c584abec80454fbcccdcc6db6558f93 to `2960` bytes per operation.

This pull request has now been integrated.

Changeset: 75515298
Author:    Kirill A. Korinsky <kirill at korins.ky>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/7551529854b325488b58481e11103b08a211aff4
Stats:     1237 lines in 2 files changed: 1236 ins; 0 del; 1 mod

8305995: Footprint regression from JDK-8224957

Reviewed-by: kvn, thartmann

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

PR: https://git.openjdk.org/jdk/pull/13453


More information about the hotspot-compiler-dev mailing list