RFR: 8315220: Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native [v2]

Erik Gahlin egahlin at openjdk.org
Thu Sep 7 15:10:41 UTC 2023


On Thu, 7 Sep 2023 14:56:24 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

>> 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

Marked as reviewed by egahlin (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/15535#pullrequestreview-1615668304


More information about the hotspot-jfr-dev mailing list