Integrated: JDK-8267348: Rewrite gc/epsilon/TestClasses.java to use Metaspace with less classes
Aleksey Shipilev
shade at openjdk.java.net
Thu May 20 16:48:36 UTC 2021
On Wed, 19 May 2021 17:09:04 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> See the bug report for discussion. The test verifies that Epsilon reacts on Metaspace resizes properly. It started to timeout since Vtable-based CHA implementation landed. The dependency checking walks a lot of classes looking at their oops, and this gets very slow with `+CheckUnhandledOops`. There are measures to improve `CheckUnhandledOops`, but we can also rewrite the test to puff up the same amount of Metaspace with less classes.
>
> I have selected the new constants to match the same Metaspace occupancy like the original test (~25M). New code requires absorbing a few more allocations, so heap size is bumped to 1G, which is similar to other Epsilon tests.
>
> Running with default options before:
>
>
> [26.945s][info ][gc ] Heap: 128M reserved, 128M (100.00%) committed, 66524K (50.75%) used
> [26.945s][info ][gc,metaspace] Metaspace: 69632K reserved, 24896K (35.75%) committed, 24703K (35.48%) used
>
> real 0m47.997s
> user 1m18.188s
> sys 0m4.365s
>
>
> ...and after:
>
>
> [0.818s][info ][gc ] Heap: 1024M reserved, 1024M (100.00%) committed, 181M (17.68%) used
> [0.818s][info ][gc,metaspace] Metaspace: 86016K reserved, 25856K (30.06%) committed, 25732K (29.92%) used
>
> real 0m19.919s
> user 0m50.806s
> sys 0m4.356s
>
>
> Running with `-XX:+CheckUnhandledOops` before:
>
>
> [394.089s][info ][gc ] Heap: 128M reserved, 128M (100.00%) committed, 52731K (40.23%) used
> [394.089s][info ][gc,metaspace] Metaspace: 69632K reserved, 19456K (27.94%) committed, 19267K (27.67%) used
> ...
> <timeout>
>
>
> ...and after:
>
>
> [1.952s][info ][gc ] Heap: 1024M reserved, 1024M (100.00%) committed, 180M (17.66%) used
> [1.952s][info ][gc,metaspace] Metaspace: 86016K reserved, 25856K (30.06%) committed, 25732K (29.92%) used
>
> real 0m27.555s
> user 0m57.851s
> sys 0m4.645s
>
>
> Additional testing:
> - [x] Affected test with `-XX:+CheckUnhandledOops`
This pull request has now been integrated.
Changeset: 7b98400c
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/7b98400c81900a8c779394d549b5fb61f1dd8638
Stats: 17 lines in 2 files changed: 12 ins; 1 del; 4 mod
8267348: Rewrite gc/epsilon/TestClasses.java to use Metaspace with less classes
Reviewed-by: stuefe
-------------
PR: https://git.openjdk.java.net/jdk/pull/4118
More information about the hotspot-gc-dev
mailing list