RFR: 8336489: Track scoped accesses in JVMCI compiled code

Gilles Duboscq gdub at openjdk.org
Mon Jul 22 10:37:31 UTC 2024


On Mon, 22 Jul 2024 08:08:00 GMT, Carlo Refice <duke at openjdk.org> wrote:

>> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java line 66:
>> 
>>> 64:      * @return true if Scoped annotation present, false otherwise
>>> 65:      */
>>> 66:     boolean isScoped();
>> 
>> Why not add this to `ResolvedJavaMethod`? If it is about compatibility you could add it as a default method that throws a `UnsupportedOperationException`.
>
> I don't know how much sense it makes to expose a flag that is only relevant for an optimization in HotSpot (and that exposes the presence of an annotation used only internally by the jdk) to non-hotspot methods

I think JVMCI is already very much JDK-specific so the question is rather whether it's need by any VM that'd try to interact with this JDK implementation. But i don't want to derail this PR, this can be moved up when/if that's needed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20256#discussion_r1686338635


More information about the hotspot-compiler-dev mailing list