src/share/vm/prims/whitebox.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8130832-review Sdiff src/share/vm/prims

src/share/vm/prims/whitebox.cpp

Print this page
rev 8688 : 1234567: Invalid bug number
Summary: This is a local commit to reduce jprt submit time.
Reviewed-by: kvn


 511 WB_ENTRY(jboolean, WB_IsMethodCompilable(JNIEnv* env, jobject o, jobject method, jint comp_level, jboolean is_osr))
 512   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 513   CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
 514   MutexLockerEx mu(Compile_lock);
 515   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 516   if (is_osr) {
 517     return CompilationPolicy::can_be_osr_compiled(mh, comp_level);
 518   } else {
 519     return CompilationPolicy::can_be_compiled(mh, comp_level);
 520   }
 521 WB_END
 522 
 523 WB_ENTRY(jboolean, WB_IsMethodQueuedForCompilation(JNIEnv* env, jobject o, jobject method))
 524   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 525   CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
 526   MutexLockerEx mu(Compile_lock);
 527   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 528   return mh->queued_for_compilation();
 529 WB_END
 530 


















 531 WB_ENTRY(jint, WB_GetMethodCompilationLevel(JNIEnv* env, jobject o, jobject method, jboolean is_osr))
 532   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 533   CHECK_JNI_EXCEPTION_(env, CompLevel_none);
 534   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 535   nmethod* code = is_osr ? mh->lookup_osr_nmethod_for(InvocationEntryBci, CompLevel_none, false) : mh->code();
 536   return (code != NULL ? code->comp_level() : CompLevel_none);
 537 WB_END
 538 
 539 WB_ENTRY(void, WB_MakeMethodNotCompilable(JNIEnv* env, jobject o, jobject method, jint comp_level, jboolean is_osr))
 540   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 541   CHECK_JNI_EXCEPTION(env);
 542   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 543   if (is_osr) {
 544     mh->set_not_osr_compilable(comp_level, true /* report */, "WhiteBox");
 545   } else {
 546     mh->set_not_compilable(comp_level, true /* report */, "WhiteBox");
 547   }
 548 WB_END
 549 
 550 WB_ENTRY(jint, WB_GetMethodEntryBci(JNIEnv* env, jobject o, jobject method))


1468   {CC"NMTMalloc",           CC"(J)J",                 (void*)&WB_NMTMalloc          },
1469   {CC"NMTMallocWithPseudoStack", CC"(JI)J",           (void*)&WB_NMTMallocWithPseudoStack},
1470   {CC"NMTFree",             CC"(J)V",                 (void*)&WB_NMTFree            },
1471   {CC"NMTReserveMemory",    CC"(J)J",                 (void*)&WB_NMTReserveMemory   },
1472   {CC"NMTCommitMemory",     CC"(JJ)V",                (void*)&WB_NMTCommitMemory    },
1473   {CC"NMTUncommitMemory",   CC"(JJ)V",                (void*)&WB_NMTUncommitMemory  },
1474   {CC"NMTReleaseMemory",    CC"(JJ)V",                (void*)&WB_NMTReleaseMemory   },
1475   {CC"NMTChangeTrackingLevel", CC"()Z",               (void*)&WB_NMTChangeTrackingLevel},
1476   {CC"NMTGetHashSize",      CC"()I",                  (void*)&WB_NMTGetHashSize     },
1477 #endif // INCLUDE_NMT
1478   {CC"deoptimizeFrames",   CC"(Z)I",                  (void*)&WB_DeoptimizeFrames  },
1479   {CC"deoptimizeAll",      CC"()V",                   (void*)&WB_DeoptimizeAll     },
1480   {CC"deoptimizeMethod0",   CC"(Ljava/lang/reflect/Executable;Z)I",
1481                                                       (void*)&WB_DeoptimizeMethod  },
1482   {CC"isMethodCompiled0",   CC"(Ljava/lang/reflect/Executable;Z)Z",
1483                                                       (void*)&WB_IsMethodCompiled  },
1484   {CC"isMethodCompilable0", CC"(Ljava/lang/reflect/Executable;IZ)Z",
1485                                                       (void*)&WB_IsMethodCompilable},
1486   {CC"isMethodQueuedForCompilation0",
1487       CC"(Ljava/lang/reflect/Executable;)Z",          (void*)&WB_IsMethodQueuedForCompilation},



1488   {CC"makeMethodNotCompilable0",
1489       CC"(Ljava/lang/reflect/Executable;IZ)V",        (void*)&WB_MakeMethodNotCompilable},
1490   {CC"testSetDontInlineMethod0",
1491       CC"(Ljava/lang/reflect/Executable;Z)Z",         (void*)&WB_TestSetDontInlineMethod},
1492   {CC"getMethodCompilationLevel0",
1493       CC"(Ljava/lang/reflect/Executable;Z)I",         (void*)&WB_GetMethodCompilationLevel},
1494   {CC"getMethodEntryBci0",
1495       CC"(Ljava/lang/reflect/Executable;)I",          (void*)&WB_GetMethodEntryBci},
1496   {CC"getCompileQueueSize",
1497       CC"(I)I",                                       (void*)&WB_GetCompileQueueSize},
1498   {CC"testSetForceInlineMethod0",
1499       CC"(Ljava/lang/reflect/Executable;Z)Z",         (void*)&WB_TestSetForceInlineMethod},
1500   {CC"enqueueMethodForCompilation0",
1501       CC"(Ljava/lang/reflect/Executable;II)Z",        (void*)&WB_EnqueueMethodForCompilation},
1502   {CC"clearMethodState0",
1503       CC"(Ljava/lang/reflect/Executable;)V",          (void*)&WB_ClearMethodState},
1504   {CC"lockCompilation",    CC"()V",                   (void*)&WB_LockCompilation},
1505   {CC"unlockCompilation",  CC"()V",                   (void*)&WB_UnlockCompilation},
1506   {CC"isConstantVMFlag",   CC"(Ljava/lang/String;)Z", (void*)&WB_IsConstantVMFlag},
1507   {CC"isLockedVMFlag",     CC"(Ljava/lang/String;)Z", (void*)&WB_IsLockedVMFlag},




 511 WB_ENTRY(jboolean, WB_IsMethodCompilable(JNIEnv* env, jobject o, jobject method, jint comp_level, jboolean is_osr))
 512   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 513   CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
 514   MutexLockerEx mu(Compile_lock);
 515   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 516   if (is_osr) {
 517     return CompilationPolicy::can_be_osr_compiled(mh, comp_level);
 518   } else {
 519     return CompilationPolicy::can_be_compiled(mh, comp_level);
 520   }
 521 WB_END
 522 
 523 WB_ENTRY(jboolean, WB_IsMethodQueuedForCompilation(JNIEnv* env, jobject o, jobject method))
 524   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 525   CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
 526   MutexLockerEx mu(Compile_lock);
 527   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 528   return mh->queued_for_compilation();
 529 WB_END
 530 
 531 WB_ENTRY(jboolean, WB_IsIntrinsicAvailableForMethod(JNIEnv* env, jobject o, jobject method, jobject compilation_context, jint compLevel))
 532   if (compLevel < CompLevel_none || compLevel > CompLevel_highest_tier) {
 533     return false; // Intrinsic is not available on a non-existent compilation level.
 534   }
 535   jmethodID method_id, compilation_context_id;
 536   method_id = reflected_method_to_jmid(thread, env, method);
 537   CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
 538   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(method_id));
 539   if (compilation_context != NULL) {
 540     compilation_context_id = reflected_method_to_jmid(thread, env, compilation_context);
 541     CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
 542     methodHandle cch(THREAD, Method::checked_resolve_jmethod_id(compilation_context_id));
 543     return CompileBroker::compiler(compLevel)->is_intrinsic_available_for(mh, cch);
 544   } else {
 545     return CompileBroker::compiler(compLevel)->is_intrinsic_available_for(mh);
 546   }
 547 WB_END
 548 
 549 WB_ENTRY(jint, WB_GetMethodCompilationLevel(JNIEnv* env, jobject o, jobject method, jboolean is_osr))
 550   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 551   CHECK_JNI_EXCEPTION_(env, CompLevel_none);
 552   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 553   nmethod* code = is_osr ? mh->lookup_osr_nmethod_for(InvocationEntryBci, CompLevel_none, false) : mh->code();
 554   return (code != NULL ? code->comp_level() : CompLevel_none);
 555 WB_END
 556 
 557 WB_ENTRY(void, WB_MakeMethodNotCompilable(JNIEnv* env, jobject o, jobject method, jint comp_level, jboolean is_osr))
 558   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
 559   CHECK_JNI_EXCEPTION(env);
 560   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
 561   if (is_osr) {
 562     mh->set_not_osr_compilable(comp_level, true /* report */, "WhiteBox");
 563   } else {
 564     mh->set_not_compilable(comp_level, true /* report */, "WhiteBox");
 565   }
 566 WB_END
 567 
 568 WB_ENTRY(jint, WB_GetMethodEntryBci(JNIEnv* env, jobject o, jobject method))


1486   {CC"NMTMalloc",           CC"(J)J",                 (void*)&WB_NMTMalloc          },
1487   {CC"NMTMallocWithPseudoStack", CC"(JI)J",           (void*)&WB_NMTMallocWithPseudoStack},
1488   {CC"NMTFree",             CC"(J)V",                 (void*)&WB_NMTFree            },
1489   {CC"NMTReserveMemory",    CC"(J)J",                 (void*)&WB_NMTReserveMemory   },
1490   {CC"NMTCommitMemory",     CC"(JJ)V",                (void*)&WB_NMTCommitMemory    },
1491   {CC"NMTUncommitMemory",   CC"(JJ)V",                (void*)&WB_NMTUncommitMemory  },
1492   {CC"NMTReleaseMemory",    CC"(JJ)V",                (void*)&WB_NMTReleaseMemory   },
1493   {CC"NMTChangeTrackingLevel", CC"()Z",               (void*)&WB_NMTChangeTrackingLevel},
1494   {CC"NMTGetHashSize",      CC"()I",                  (void*)&WB_NMTGetHashSize     },
1495 #endif // INCLUDE_NMT
1496   {CC"deoptimizeFrames",   CC"(Z)I",                  (void*)&WB_DeoptimizeFrames  },
1497   {CC"deoptimizeAll",      CC"()V",                   (void*)&WB_DeoptimizeAll     },
1498     {CC"deoptimizeMethod0",   CC"(Ljava/lang/reflect/Executable;Z)I",
1499                                                         (void*)&WB_DeoptimizeMethod  },
1500   {CC"isMethodCompiled0",   CC"(Ljava/lang/reflect/Executable;Z)Z",
1501                                                       (void*)&WB_IsMethodCompiled  },
1502   {CC"isMethodCompilable0", CC"(Ljava/lang/reflect/Executable;IZ)Z",
1503                                                       (void*)&WB_IsMethodCompilable},
1504   {CC"isMethodQueuedForCompilation0",
1505       CC"(Ljava/lang/reflect/Executable;)Z",          (void*)&WB_IsMethodQueuedForCompilation},
1506   {CC"isIntrinsicAvailableForMethod0",
1507       CC"(Ljava/lang/reflect/Executable;Ljava/lang/reflect/Executable;I)Z",
1508                                                       (void*)&WB_IsIntrinsicAvailableForMethod},
1509   {CC"makeMethodNotCompilable0",
1510       CC"(Ljava/lang/reflect/Executable;IZ)V",        (void*)&WB_MakeMethodNotCompilable},
1511   {CC"testSetDontInlineMethod0",
1512       CC"(Ljava/lang/reflect/Executable;Z)Z",         (void*)&WB_TestSetDontInlineMethod},
1513   {CC"getMethodCompilationLevel0",
1514       CC"(Ljava/lang/reflect/Executable;Z)I",         (void*)&WB_GetMethodCompilationLevel},
1515   {CC"getMethodEntryBci0",
1516       CC"(Ljava/lang/reflect/Executable;)I",          (void*)&WB_GetMethodEntryBci},
1517   {CC"getCompileQueueSize",
1518       CC"(I)I",                                       (void*)&WB_GetCompileQueueSize},
1519   {CC"testSetForceInlineMethod0",
1520       CC"(Ljava/lang/reflect/Executable;Z)Z",         (void*)&WB_TestSetForceInlineMethod},
1521   {CC"enqueueMethodForCompilation0",
1522       CC"(Ljava/lang/reflect/Executable;II)Z",        (void*)&WB_EnqueueMethodForCompilation},
1523   {CC"clearMethodState0",
1524       CC"(Ljava/lang/reflect/Executable;)V",          (void*)&WB_ClearMethodState},
1525   {CC"lockCompilation",    CC"()V",                   (void*)&WB_LockCompilation},
1526   {CC"unlockCompilation",  CC"()V",                   (void*)&WB_UnlockCompilation},
1527   {CC"isConstantVMFlag",   CC"(Ljava/lang/String;)Z", (void*)&WB_IsConstantVMFlag},
1528   {CC"isLockedVMFlag",     CC"(Ljava/lang/String;)Z", (void*)&WB_IsLockedVMFlag},


src/share/vm/prims/whitebox.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File