RFR: 8316328: Shenandoah: jdk/jfr/event/oldobject/TestSanityDefault.java times out for some heap sizes
Aleksey Shipilev
shade at openjdk.org
Wed May 22 09:27:02 UTC 2024
On Wed, 22 May 2024 09:03:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> This is a request to limit the memory used by the test, otherwise it could run "forever" on huge heaps.
>
> test/jdk/jdk/jfr/event/oldobject/TestSanityDefault.java line 40:
>
>> 38: * @library /test/lib /test/jdk
>> 39: * @summary Purpose of this test is to run leak profiler without command line tweaks or WhiteBox hacks until we succeed
>> 40: * @run main/othervm -mx64m jdk.jfr.event.oldobject.TestSanityDefault
>
> Should it be `-Xmx`? I understand `-mx` is de jure standard, but we use `-Xmx` everywhere.
I am thinking if 64M is a bit tight. For this test, we add `OldObjects.MIN_SIZE` (~100K) reachable objects in the list on every iteration. Ballparking each object having a marginal footprint of ~20 bytes, this means we allocate about 2M of data on every iteration. Suppose the previous iteration did not promote the object to old yet, but the very next allocation would. We would still need to absorb ~2M allocation into old, lest we run into OOM. Which means this thread implicitly relies on old being at least 2M, which might be not given for 64M heap. In practice, GCs would probably trash sooner.
So, maybe capping at more reasonable 1G would suffice to get reasonable test times without going into very tight heaps?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19163#discussion_r1609612990
More information about the hotspot-jfr-dev
mailing list