RFR: 8290075: [JVMCI] only blessed methods can link against EventWriterFactory.getEventWriter [v2]
Doug Simon
dnsimon at openjdk.org
Mon Aug 22 15:05:33 UTC 2022
On Mon, 22 Aug 2022 13:54:43 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> test/jdk/jdk/jfr/jvm/TestGetEventWriter.java line 60:
>>
>>> 58: * @run main/othervm jdk.jfr.jvm.TestGetEventWriter
>>> 59: *
>>> 60: * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -Dtest.jvmci=true --add-exports=jdk.jfr/jdk.jfr.internal.event=ALL-UNNAMED
>>
>> I think `--add-exports=jdk.jfr/jdk.jfr.internal.event=ALL-UNNAMED` should be added to all `@run` specs in this test. See more details [here](https://github.com/openjdk/jdk/pull/8383#discussion_r915755771).
>
> We export certain modules and packages dynamically to the caller module when it registers an event. So don't think it is needed for those.
Maybe I'm missing the point of these tests but I assume they are trying to exercise the blessed method checks in which case the IllegalAccessError message should be coming from here: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/jfr/instrumentation/jfrResolution.cpp#L81
Instead, it is coming from the module access checks.
Please see more details at https://github.com/openjdk/jdk/pull/8383#discussion_r915755771
-------------
PR: https://git.openjdk.org/jdk/pull/9449
More information about the hotspot-dev
mailing list