RFR: 8281318: Improve jfr/event/allocation tests reliability

Aleksey Shipilev shade at openjdk.java.net
Mon Feb 7 09:40:25 UTC 2022


This fixes the failure on x86_32 by resolving an object/TLAB "sizing" problem. On x86_32, the 100K object gets 200K TLAB, which allocates the next object exactly in the same TLAB. Bumping the object size to 128K resolves this.

Additionally, rewired the tests to match object sizes exactly. In modern JDK, the header size depends on `UseCompressedClassPointers`, not on `UseCompressedOops`. Using `Whitebox`, we can poll the VM configuration exactly.

Additional testing: 
 - [x] Linux x86_32 fastdebug, `jfr/event/allocation/`
 - [x] Linux x86_64 fastdebug, `jfr/event/allocation/`, out of the box
 - [x] Linux x86_64 fastdebug, `jfr/event/allocation/`, with `-XX:-UseCompressedClassPointers`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.java.net/jdk/pull/7365/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7365&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8281318
  Stats: 54 lines in 3 files changed: 33 ins; 0 del; 21 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7365.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7365/head:pull/7365

PR: https://git.openjdk.java.net/jdk/pull/7365


More information about the hotspot-jfr-dev mailing list