RFR: 8367142: Simplify java mirror handling in JNI methods [v2]
Ioi Lam
iklam at openjdk.org
Tue Sep 9 22:12:48 UTC 2025
On Tue, 9 Sep 2025 07:38:03 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > So I am not sure if we really have that separation anymore.
>
> I think it is more that there are many bits of code that actually form the "boundary" (prims, services, some runtime, jvmci, interpreter-related). But I guess it is hard to argue this makes it markedly worse.
Arguably the translation of Java mirrors to Klasses is also a boundary (from Java representation to VM representation) :-)
In reality I think because jobjects are easy to use and are just another kind of handle (like Handle and OopHandle), the leakage from JNI code to other parts of VM just happened naturally.
> > The code already assumes that it has an InstanceKlass, and I am not changing that.
>
> Okay.
BTW I removed the JVMTI changes from this PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27158#issuecomment-3272437346
More information about the serviceability-dev
mailing list