mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-06 11:46:35 +00:00
8349977: JVMCIRuntime::_shared_library_javavm_id should be jlong
Reviewed-by: yzheng, never
This commit is contained in:
parent
2eac490bd2
commit
a88e2a58bf
@ -2724,7 +2724,7 @@ C2V_VMENTRY_PREFIX(jboolean, attachCurrentThread, (JNIEnv* env, jobject c2vm, jb
|
||||
if (res == JNI_OK) {
|
||||
guarantee(peerJNIEnv != nullptr, "must be");
|
||||
runtime->init_JavaVM_info(javaVM_info, JVMCI_CHECK_0);
|
||||
JVMCI_event_1("attached to JavaVM[%d] for JVMCI runtime %d", runtime->get_shared_library_javavm_id(), runtime->id());
|
||||
JVMCI_event_1("attached to JavaVM[" JLONG_FORMAT "] for JVMCI runtime %d", runtime->get_shared_library_javavm_id(), runtime->id());
|
||||
return true;
|
||||
}
|
||||
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
|
||||
if (res != JNI_OK) {
|
||||
JVMCI_THROW_MSG_0(InternalError, err_msg("Error %d while attaching %s", res, thread->name()));
|
||||
}
|
||||
JVMCI_event_1("detached from JavaVM[%d] for JVMCI runtime %d",
|
||||
JVMCI_event_1("detached from JavaVM[" JLONG_FORMAT "] for JVMCI runtime %d",
|
||||
runtime->get_shared_library_javavm_id(), runtime->id());
|
||||
if (release) {
|
||||
return runtime->detach_thread(thread, "user thread detach");
|
||||
|
||||
@ -1569,7 +1569,7 @@ bool JVMCIRuntime::destroy_shared_library_javavm() {
|
||||
guarantee(_num_attached_threads == cannot_be_attached,
|
||||
"cannot destroy JavaVM for JVMCI runtime %d with %d attached threads", _id, _num_attached_threads);
|
||||
JavaVM* javaVM;
|
||||
int javaVM_id = _shared_library_javavm_id;
|
||||
jlong javaVM_id = _shared_library_javavm_id;
|
||||
{
|
||||
// Exactly one thread can destroy the JavaVM
|
||||
// and release the handle to it.
|
||||
@ -1588,9 +1588,9 @@ bool JVMCIRuntime::destroy_shared_library_javavm() {
|
||||
result = javaVM->DestroyJavaVM();
|
||||
}
|
||||
if (result == JNI_OK) {
|
||||
JVMCI_event_1("destroyed JavaVM[%d]@" PTR_FORMAT " for JVMCI runtime %d", javaVM_id, p2i(javaVM), _id);
|
||||
JVMCI_event_1("destroyed JavaVM[" JLONG_FORMAT "]@" PTR_FORMAT " for JVMCI runtime %d", javaVM_id, p2i(javaVM), _id);
|
||||
} else {
|
||||
warning("Non-zero result (%d) when calling JNI_DestroyJavaVM on JavaVM[%d]@" PTR_FORMAT, result, javaVM_id, p2i(javaVM));
|
||||
warning("Non-zero result (%d) when calling JNI_DestroyJavaVM on JavaVM[" JLONG_FORMAT "]@" PTR_FORMAT, result, javaVM_id, p2i(javaVM));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ class JVMCIRuntime: public CHeapObj<mtJVMCI> {
|
||||
JavaVM* _shared_library_javavm;
|
||||
|
||||
// Id for _shared_library_javavm.
|
||||
int _shared_library_javavm_id;
|
||||
jlong _shared_library_javavm_id;
|
||||
|
||||
// Position and link in global list of JVMCI shared library runtimes.
|
||||
// The HotSpot heap based runtime will have an id of -1 and the
|
||||
@ -280,7 +280,7 @@ class JVMCIRuntime: public CHeapObj<mtJVMCI> {
|
||||
bool has_shared_library_javavm() { return _shared_library_javavm != nullptr; }
|
||||
|
||||
// Gets an ID for the JVMCI shared library JavaVM associated with this runtime.
|
||||
int get_shared_library_javavm_id() { return _shared_library_javavm_id; }
|
||||
jlong get_shared_library_javavm_id() { return _shared_library_javavm_id; }
|
||||
|
||||
// Copies info about the JVMCI shared library JavaVM associated with this
|
||||
// runtime into `info` as follows:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user