603 switch (typeChar) { 604 case 'Z': tty->print(value == 0 ? "false" : "true"); break; 605 case 'B': tty->print("%d", (jbyte) value); break; 606 case 'C': tty->print("%c", (jchar) value); break; 607 case 'S': tty->print("%d", (jshort) value); break; 608 case 'I': tty->print("%d", (jint) value); break; 609 case 'F': tty->print("%f", uu.f); break; 610 case 'J': tty->print(JLONG_FORMAT, value); break; 611 case 'D': tty->print("%lf", uu.d); break; 612 default: assert(false, "unknown typeChar"); break; 613 } 614 if (newline) { 615 tty->cr(); 616 } 617 JRT_END 618 619 JRT_ENTRY(jint, JVMCIRuntime::identity_hash_code(JavaThread* thread, oopDesc* obj)) 620 return (jint) obj->identity_hash(); 621 JRT_END 622 623 JRT_ENTRY(jboolean, JVMCIRuntime::thread_is_interrupted(JavaThread* thread, oopDesc* receiver, jboolean clear_interrupted)) 624 Handle receiverHandle(thread, receiver); 625 // A nested ThreadsListHandle may require the Threads_lock which 626 // requires thread_in_vm which is why this method cannot be JRT_LEAF. 627 ThreadsListHandle tlh; 628 629 JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle()); 630 if (receiverThread == NULL || (EnableThreadSMRExtraValidityChecks && !tlh.includes(receiverThread))) { 631 // The other thread may exit during this process, which is ok so return false. 632 return JNI_FALSE; 633 } else { 634 return (jint) receiverThread->is_interrupted(clear_interrupted != 0); 635 } 636 JRT_END 637 638 JRT_ENTRY(jint, JVMCIRuntime::test_deoptimize_call_int(JavaThread* thread, int value)) 639 deopt_caller(); 640 return (jint) value; 641 JRT_END 642 643 644 // private static JVMCIRuntime JVMCI.initializeRuntime() 645 JVM_ENTRY_NO_ENV(jobject, JVM_GetJVMCIRuntime(JNIEnv *env, jclass c)) 646 JNI_JVMCIENV(thread, env); 647 if (!EnableJVMCI) { 648 JVMCI_THROW_MSG_NULL(InternalError, "JVMCI is not enabled"); 649 } 650 JVMCIENV->runtime()->initialize_HotSpotJVMCIRuntime(JVMCI_CHECK_NULL); 651 JVMCIObject runtime = JVMCIENV->runtime()->get_HotSpotJVMCIRuntime(JVMCI_CHECK_NULL); 652 return JVMCIENV->get_jobject(runtime); 653 JVM_END 654 655 void JVMCIRuntime::call_getCompiler(TRAPS) { 656 THREAD_JVMCIENV(JavaThread::current()); 657 JVMCIObject jvmciRuntime = JVMCIRuntime::get_HotSpotJVMCIRuntime(JVMCI_CHECK); | 603 switch (typeChar) { 604 case 'Z': tty->print(value == 0 ? "false" : "true"); break; 605 case 'B': tty->print("%d", (jbyte) value); break; 606 case 'C': tty->print("%c", (jchar) value); break; 607 case 'S': tty->print("%d", (jshort) value); break; 608 case 'I': tty->print("%d", (jint) value); break; 609 case 'F': tty->print("%f", uu.f); break; 610 case 'J': tty->print(JLONG_FORMAT, value); break; 611 case 'D': tty->print("%lf", uu.d); break; 612 default: assert(false, "unknown typeChar"); break; 613 } 614 if (newline) { 615 tty->cr(); 616 } 617 JRT_END 618 619 JRT_ENTRY(jint, JVMCIRuntime::identity_hash_code(JavaThread* thread, oopDesc* obj)) 620 return (jint) obj->identity_hash(); 621 JRT_END 622 623 JRT_ENTRY(jint, JVMCIRuntime::test_deoptimize_call_int(JavaThread* thread, int value)) 624 deopt_caller(); 625 return (jint) value; 626 JRT_END 627 628 629 // private static JVMCIRuntime JVMCI.initializeRuntime() 630 JVM_ENTRY_NO_ENV(jobject, JVM_GetJVMCIRuntime(JNIEnv *env, jclass c)) 631 JNI_JVMCIENV(thread, env); 632 if (!EnableJVMCI) { 633 JVMCI_THROW_MSG_NULL(InternalError, "JVMCI is not enabled"); 634 } 635 JVMCIENV->runtime()->initialize_HotSpotJVMCIRuntime(JVMCI_CHECK_NULL); 636 JVMCIObject runtime = JVMCIENV->runtime()->get_HotSpotJVMCIRuntime(JVMCI_CHECK_NULL); 637 return JVMCIENV->get_jobject(runtime); 638 JVM_END 639 640 void JVMCIRuntime::call_getCompiler(TRAPS) { 641 THREAD_JVMCIENV(JavaThread::current()); 642 JVMCIObject jvmciRuntime = JVMCIRuntime::get_HotSpotJVMCIRuntime(JVMCI_CHECK); |