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

Matthias Baesken mbaesken at openjdk.org
Thu Aug 3 07:45:36 UTC 2023


On Thu, 3 Aug 2023 07:20:17 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use try with resources in test
>
> 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 ?

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

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


More information about the hotspot-jfr-dev mailing list