RFR: 8315220: Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native [v2]
Markus Grönlund
mgronlun at openjdk.org
Thu Sep 7 14:56:24 UTC 2023
> Greetings,
>
> This change set fixes the issue of taking a JFR stack trace in the wrong thread state for the NativeLibraryLoad and NativeLibraryUnload events.
>
> A follow-up change set, [JDK-8315364](https://bugs.openjdk.org/browse/JDK-8315364) will add assertions to the JFR stack trace code to help find similar issues earlier.
>
> There are a few additional improvements:
>
> The event declaration in metadata.xml now includes the generating thread since a stack trace without the generating thread is subpar.
>
> In os_linux.cpp, the NativeLibraryLoad event was located after the call to dlopen(), which means that the event, declared durational, fails to capture the duration of the call.
>
> Finally, the test is extended to validate the captured stack trace.
>
> Testing: jdk_jfr, stress testing
>
> Thanks
> Markus
Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
renaming and commentary
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15535/files
- new: https://git.openjdk.org/jdk/pull/15535/files/aa4bc48a..b0094b7f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15535&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15535&range=00-01
Stats: 32 lines in 2 files changed: 11 ins; 0 del; 21 mod
Patch: https://git.openjdk.org/jdk/pull/15535.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15535/head:pull/15535
PR: https://git.openjdk.org/jdk/pull/15535
More information about the hotspot-jfr-dev
mailing list