RFR: JDK-8313251: Add NativeLibraryLoad event [v5]

David Holmes dholmes at openjdk.org
Thu Aug 3 07:52:31 UTC 2023


On Thu, 3 Aug 2023 07:42:38 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> test/jdk/jdk/jfr/event/runtime/TestNativeLibraryLoadEvent.java line 54:
>> 
>>> 52:             recording.enable(EVENT_NAME);
>>> 53:             recording.start();
>>> 54:             System.loadLibrary("awt");
>> 
>> I don't think loading libawt is a good choice - maybe libnet or libnio? Headless builds may not have libawt and I'd be concerned about loading it directly and running the OnLoad hooks.
>
> libnet does not work, it gives us the error  'Native Library /testdir/images/jdk/lib/libnet.so already loaded in another classloader' . So we have to load something that is not there already.  But I agree, awt might not be the best choice.  What about libinstrument ?

Yeah that might work. If worse comes to worst, you could create a trivial library just or the test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15065#discussion_r1282792645


More information about the hotspot-jfr-dev mailing list