RFR: 8242440: use separate, destroyable JavaVM instances per libgraal compiler thread

Kim Barrett kbarrett at openjdk.java.net
Mon Apr 18 04:52:38 UTC 2022


On Sun, 17 Apr 2022 08:58:37 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> src/hotspot/share/jvmci/jvmciRuntime.hpp line 168:
>> 
>>> 166:   // destroying remaining JNI handles when the JavaVM associated
>>> 167:   // with this runtime is shutdown.
>>> 168:   GrowableArray<jobject>* _jobjects;
>> 
>> I wonder if it would simplify anything to use OopHandle instead of jobject as the element type?
>
> Interesting proposal. What would be the advantage of `OopHandle` over `jobject`? That require a bunch of `reinterpret_cast`ing between `jobject` and `OopHandle` which I'm not sure is even possible?

The suggestion was about managing the handles and associated values (and I'm not even sure it would help there).  But maybe `jobject` is too deeply embedded in JVMCI usage?  Or maybe there are places where it really needs to be using `jobject` rather than `oop*` or a thin wrapper over `oop*` like `OopHandle`?

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

PR: https://git.openjdk.java.net/jdk/pull/8262


More information about the hotspot-dev mailing list