RFR: 8242440: use separate, destroyable JavaVM instances per libgraal compiler thread [v2]
Doug Simon
dnsimon at openjdk.java.net
Tue Apr 19 10:11:06 UTC 2022
On Sun, 17 Apr 2022 04:14:30 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Doug Simon has updated the pull request incrementally with six additional commits since the last revision:
>>
>> - avoid use of jobject for oop handles implementing foreign object references in libjvmci heap to HotSpot heap objects
>> - inlined JVMCIRuntime::_jobjects
>> - replace NULL with nullptr
>> - added JVMCIRuntime_lock global
>> - replace enum with const definition
>> - rename thread parameter to current
>
> 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 think _jobjects should be a nested object rather than a pointer.
Fixed: https://github.com/openjdk/jdk/pull/8262/commits/1d5b815d0dbc4781059ec1b9e7375dc593af9438
> src/hotspot/share/jvmci/jvmciRuntime.hpp line 177:
>
>> 175: int _num_attached_threads;
>> 176: enum {
>> 177: cannot_be_attached = -1 // See _num_attached_threads
>
> We no longer use enums (with unspecified type) to define constants. Use `static const` instead. (There's lots of old code that still does this, but new code should not.)
Fixed: https://github.com/openjdk/jdk/pull/8262/commits/53edb1d00a7d8ff6b22b3d9a32b7dc915874c3e7
-------------
PR: https://git.openjdk.java.net/jdk/pull/8262
More information about the hotspot-dev
mailing list