RFR: 8372039: post_sampled_object_alloc is called while lock is handled [v4]
Leonid Mesnik
lmesnik at openjdk.org
Fri Nov 28 21:09:24 UTC 2025
> The AOT allocates objects while holding lock. The jvmti events can't be posted in such case. The allocation sampling might be just temporary disabled while AOT objects are allocated.
>
> I prefer to disable jvmti events for allocation only, not for AOT globally. If there are more events should be generated during AOT initialization, we might want to preserve them and post after initialization is completed.
>
> The existing failure could be reproduced by running tests with jvmti stress agent and ZGC enabled. Like
> make run-test JTREG_JVMTI_STRESS_AGENT=debugger=true TEST=gc/z/TestGarbageCollectorMXBean.java
>
> Note:
> I prelaced NoJvmtiVMObjectAllocMark, it was not used. Also it was incorrect. The
> NoJvmtiEventsMark should be set even if jvmti events are not enable for this thread. Since jvmti events might be enabled just in the middle of the mark.
Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
made jvmti_events_disalber as counter
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28544/files
- new: https://git.openjdk.org/jdk/pull/28544/files/1c070dc7..f7e869b2
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28544&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28544&range=02-03
Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/28544.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28544/head:pull/28544
PR: https://git.openjdk.org/jdk/pull/28544
More information about the hotspot-dev
mailing list