Skip to content

Commit a88e2a5

Browse files
author
Doug Simon
committed
8349977: JVMCIRuntime::_shared_library_javavm_id should be jlong
Reviewed-by: yzheng, never
1 parent 2eac490 commit a88e2a5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,7 +2724,7 @@ C2V_VMENTRY_PREFIX(jboolean, attachCurrentThread, (JNIEnv* env, jobject c2vm, jb
27242724
if (res == JNI_OK) {
27252725
guarantee(peerJNIEnv != nullptr, "must be");
27262726
runtime->init_JavaVM_info(javaVM_info, JVMCI_CHECK_0);
2727-
JVMCI_event_1("attached to JavaVM[%d] for JVMCI runtime %d", runtime->get_shared_library_javavm_id(), runtime->id());
2727+
JVMCI_event_1("attached to JavaVM[" JLONG_FORMAT "] for JVMCI runtime %d", runtime->get_shared_library_javavm_id(), runtime->id());
27282728
return true;
27292729
}
27302730
JVMCI_THROW_MSG_0(InternalError, err_msg("Error %d while attaching %s", res, attach_args.name));
@@ -2757,7 +2757,7 @@ C2V_VMENTRY_PREFIX(jboolean, detachCurrentThread, (JNIEnv* env, jobject c2vm, jb
27572757
if (res != JNI_OK) {
27582758
JVMCI_THROW_MSG_0(InternalError, err_msg("Error %d while attaching %s", res, thread->name()));
27592759
}
2760-
JVMCI_event_1("detached from JavaVM[%d] for JVMCI runtime %d",
2760+
JVMCI_event_1("detached from JavaVM[" JLONG_FORMAT "] for JVMCI runtime %d",
27612761
runtime->get_shared_library_javavm_id(), runtime->id());
27622762
if (release) {
27632763
return runtime->detach_thread(thread, "user thread detach");

src/hotspot/share/jvmci/jvmciRuntime.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ bool JVMCIRuntime::destroy_shared_library_javavm() {
15691569
guarantee(_num_attached_threads == cannot_be_attached,
15701570
"cannot destroy JavaVM for JVMCI runtime %d with %d attached threads", _id, _num_attached_threads);
15711571
JavaVM* javaVM;
1572-
int javaVM_id = _shared_library_javavm_id;
1572+
jlong javaVM_id = _shared_library_javavm_id;
15731573
{
15741574
// Exactly one thread can destroy the JavaVM
15751575
// and release the handle to it.
@@ -1588,9 +1588,9 @@ bool JVMCIRuntime::destroy_shared_library_javavm() {
15881588
result = javaVM->DestroyJavaVM();
15891589
}
15901590
if (result == JNI_OK) {
1591-
JVMCI_event_1("destroyed JavaVM[%d]@" PTR_FORMAT " for JVMCI runtime %d", javaVM_id, p2i(javaVM), _id);
1591+
JVMCI_event_1("destroyed JavaVM[" JLONG_FORMAT "]@" PTR_FORMAT " for JVMCI runtime %d", javaVM_id, p2i(javaVM), _id);
15921592
} else {
1593-
warning("Non-zero result (%d) when calling JNI_DestroyJavaVM on JavaVM[%d]@" PTR_FORMAT, result, javaVM_id, p2i(javaVM));
1593+
warning("Non-zero result (%d) when calling JNI_DestroyJavaVM on JavaVM[" JLONG_FORMAT "]@" PTR_FORMAT, result, javaVM_id, p2i(javaVM));
15941594
}
15951595
return true;
15961596
}

src/hotspot/share/jvmci/jvmciRuntime.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class JVMCIRuntime: public CHeapObj<mtJVMCI> {
183183
JavaVM* _shared_library_javavm;
184184

185185
// Id for _shared_library_javavm.
186-
int _shared_library_javavm_id;
186+
jlong _shared_library_javavm_id;
187187

188188
// Position and link in global list of JVMCI shared library runtimes.
189189
// The HotSpot heap based runtime will have an id of -1 and the
@@ -280,7 +280,7 @@ class JVMCIRuntime: public CHeapObj<mtJVMCI> {
280280
bool has_shared_library_javavm() { return _shared_library_javavm != nullptr; }
281281

282282
// Gets an ID for the JVMCI shared library JavaVM associated with this runtime.
283-
int get_shared_library_javavm_id() { return _shared_library_javavm_id; }
283+
jlong get_shared_library_javavm_id() { return _shared_library_javavm_id; }
284284

285285
// Copies info about the JVMCI shared library JavaVM associated with this
286286
// runtime into `info` as follows:

0 commit comments

Comments
 (0)