RFR: 8290075: [JVMCI] only blessed methods can link against EventWriterFactory.getEventWriter

Doug Simon dnsimon at openjdk.org
Mon Jul 11 11:22:15 UTC 2022


On Mon, 11 Jul 2022 11:12:34 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> [JDK-8282420](https://bugs.openjdk.org/browse/JDK-8282420) introduced the notion of "blessed methods" which are those that can link against `jdk.jfr.internal.event.EventWriterFactory.getEventWriter(long)`.
> This PR enhances the JVMCI ConstantPool API so that it can take a caller context when resolving a method to enforce this constraint properly.

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

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

PR: https://git.openjdk.org/jdk/pull/9449


More information about the hotspot-dev mailing list