Integrated: 8315220: Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native
Markus Grönlund
mgronlun at openjdk.org
Thu Sep 7 16:16:59 UTC 2023
On Fri, 1 Sep 2023 12:03:39 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
This pull request has now been integrated.
Changeset: 1cae0f53
Author: Markus Grönlund <mgronlun at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/1cae0f53a9d37fbae9471bd942f7157429a85cd1
Stats: 395 lines in 10 files changed: 243 ins; 114 del; 38 mod
8315220: Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native
Reviewed-by: mbaesken, egahlin
-------------
PR: https://git.openjdk.org/jdk/pull/15535
More information about the hotspot-jfr-dev
mailing list