RFR: 8315220: Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native
Markus Grönlund
mgronlun at openjdk.org
Fri Sep 1 12:15:25 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
-------------
Commit messages:
- restore lf
- 8315220
Changes: https://git.openjdk.org/jdk/pull/15535/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15535&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8315220
Stats: 384 lines in 10 files changed: 232 ins; 114 del; 38 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-dev
mailing list