RFR: 8343953: Test jdk/jfr/threading/TestDeepVirtualStackTrace.java fails with Parallel/Serial GC
Hamlin Li
mli at openjdk.org
Wed Nov 13 09:33:01 UTC 2024
On Wed, 13 Nov 2024 00:33:49 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
> Test fails because it doesn't always trigger jdk.ObjectAllocationOutsideTLAB event.
>
> Test tries to trigger jdk.ObjectAllocationOutsideTLAB by allocating
> new Object[10_000_000];
> array.
>
> However, the TLAB is not limited for Parallel/Serial/Z GCs. So VM might just increase TLAB and allocate the array in new TLAB. The fix limit young generation size to ensure that TLAB of expected size can't be created and
> jdk.ObjectAllocationOutsideTLAB event is always generated.
> Verified by running 100 times with Parallel/Serial/ZGC on different platforms.
>
> Using jdk.ObjectAllocationOutsideTLAB is not the signifcant for the test. The better fix would be trigger some other event with 100% guarantee assuming that this event is not triggered outside of virtual thread. But not sure I which event is the good candidate.
I think the fix should be fine.
Just some minor comments.
I know this is not related to your fix: just a question about `testNativeEvent`, should the `stackMethod` parameter be "deepsleep" rather than "sleep"?
test/jdk/jdk/jfr/threading/TestDeepVirtualStackTrace.java line 45:
> 43: * @library /test/lib /test/jdk
> 44: * @modules jdk.jfr/jdk.jfr.internal
> 45: * @run main/othervm -XX:MaxNewSize=40M -XX:FlightRecorderOptions:stackdepth=2048
It would be be good to add some comment about why this extra option is necessary.
-------------
PR Review: https://git.openjdk.org/jdk/pull/22052#pullrequestreview-2432419165
PR Comment: https://git.openjdk.org/jdk/pull/22052#issuecomment-2472971330
PR Review Comment: https://git.openjdk.org/jdk/pull/22052#discussion_r1839823953
More information about the hotspot-gc-dev
mailing list