hotspot/src/share/vm/prims/whitebox.cpp
changeset 17018 6ba29eb83bba
parent 17002 d86c9dfa4a5f
parent 17015 92390f57e8b1
child 17122 6ceb071b96de
child 17081 cf52c2bc3f8c
equal deleted inserted replaced
17003:c88b0123f0f6 17018:6ba29eb83bba
   235   nmethod* code = mh->code();
   235   nmethod* code = mh->code();
   236   return (code != NULL ? code->comp_level() : CompLevel_none);
   236   return (code != NULL ? code->comp_level() : CompLevel_none);
   237 WB_END
   237 WB_END
   238 
   238 
   239 
   239 
   240 WB_ENTRY(void, WB_MakeMethodNotCompilable(JNIEnv* env, jobject o, jobject method))
   240 WB_ENTRY(void, WB_MakeMethodNotCompilable(JNIEnv* env, jobject o, jobject method, jint comp_level))
   241   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
   241   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
   242   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
   242   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
   243   mh->set_not_compilable();
   243   mh->set_not_compilable(comp_level, true /* report */, "WhiteBox");
   244 WB_END
   244 WB_END
   245 
   245 
   246 WB_ENTRY(jboolean, WB_TestSetDontInlineMethod(JNIEnv* env, jobject o, jobject method, jboolean value))
   246 WB_ENTRY(jboolean, WB_TestSetDontInlineMethod(JNIEnv* env, jobject o, jobject method, jboolean value))
   247   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
   247   jmethodID jmid = reflected_method_to_jmid(thread, env, method);
   248   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
   248   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
   399   {CC"NMTUncommitMemory",   CC"(JJ)V",                (void*)&WB_NMTUncommitMemory  },
   399   {CC"NMTUncommitMemory",   CC"(JJ)V",                (void*)&WB_NMTUncommitMemory  },
   400   {CC"NMTReleaseMemory",    CC"(JJ)V",                (void*)&WB_NMTReleaseMemory   },
   400   {CC"NMTReleaseMemory",    CC"(JJ)V",                (void*)&WB_NMTReleaseMemory   },
   401   {CC"NMTWaitForDataMerge", CC"()Z",                  (void*)&WB_NMTWaitForDataMerge},
   401   {CC"NMTWaitForDataMerge", CC"()Z",                  (void*)&WB_NMTWaitForDataMerge},
   402 #endif // INCLUDE_NMT
   402 #endif // INCLUDE_NMT
   403   {CC"deoptimizeAll",      CC"()V",                   (void*)&WB_DeoptimizeAll     },
   403   {CC"deoptimizeAll",      CC"()V",                   (void*)&WB_DeoptimizeAll     },
   404   {CC"deoptimizeMethod",   CC"(Ljava/lang/reflect/Method;)I",
   404   {CC"deoptimizeMethod",   CC"(Ljava/lang/reflect/Executable;)I",
   405                                                       (void*)&WB_DeoptimizeMethod  },
   405                                                       (void*)&WB_DeoptimizeMethod  },
   406   {CC"isMethodCompiled",   CC"(Ljava/lang/reflect/Method;)Z",
   406   {CC"isMethodCompiled",   CC"(Ljava/lang/reflect/Executable;)Z",
   407                                                       (void*)&WB_IsMethodCompiled  },
   407                                                       (void*)&WB_IsMethodCompiled  },
   408   {CC"isMethodCompilable", CC"(Ljava/lang/reflect/Method;I)Z",
   408   {CC"isMethodCompilable", CC"(Ljava/lang/reflect/Executable;I)Z",
   409                                                       (void*)&WB_IsMethodCompilable},
   409                                                       (void*)&WB_IsMethodCompilable},
   410   {CC"isMethodQueuedForCompilation",
   410   {CC"isMethodQueuedForCompilation",
   411       CC"(Ljava/lang/reflect/Method;)Z",              (void*)&WB_IsMethodQueuedForCompilation},
   411       CC"(Ljava/lang/reflect/Executable;)Z",          (void*)&WB_IsMethodQueuedForCompilation},
   412   {CC"makeMethodNotCompilable",
   412   {CC"makeMethodNotCompilable",
   413       CC"(Ljava/lang/reflect/Method;)V",              (void*)&WB_MakeMethodNotCompilable},
   413       CC"(Ljava/lang/reflect/Executable;I)V",         (void*)&WB_MakeMethodNotCompilable},
   414   {CC"testSetDontInlineMethod",
   414   {CC"testSetDontInlineMethod",
   415       CC"(Ljava/lang/reflect/Method;Z)Z",             (void*)&WB_TestSetDontInlineMethod},
   415       CC"(Ljava/lang/reflect/Executable;Z)Z",         (void*)&WB_TestSetDontInlineMethod},
   416   {CC"getMethodCompilationLevel",
   416   {CC"getMethodCompilationLevel",
   417       CC"(Ljava/lang/reflect/Method;)I",              (void*)&WB_GetMethodCompilationLevel},
   417       CC"(Ljava/lang/reflect/Executable;)I",          (void*)&WB_GetMethodCompilationLevel},
   418   {CC"getCompileQueuesSize",
   418   {CC"getCompileQueuesSize",
   419       CC"()I",                                        (void*)&WB_GetCompileQueuesSize},
   419       CC"()I",                                        (void*)&WB_GetCompileQueuesSize},
   420   {CC"testSetForceInlineMethod",
   420   {CC"testSetForceInlineMethod",
   421       CC"(Ljava/lang/reflect/Method;Z)Z",             (void*)&WB_TestSetForceInlineMethod},
   421       CC"(Ljava/lang/reflect/Executable;Z)Z",         (void*)&WB_TestSetForceInlineMethod},
   422   {CC"enqueueMethodForCompilation",
   422   {CC"enqueueMethodForCompilation",
   423       CC"(Ljava/lang/reflect/Method;I)Z",             (void*)&WB_EnqueueMethodForCompilation},
   423       CC"(Ljava/lang/reflect/Executable;I)Z",         (void*)&WB_EnqueueMethodForCompilation},
   424   {CC"clearMethodState",
   424   {CC"clearMethodState",
   425       CC"(Ljava/lang/reflect/Method;)V",              (void*)&WB_ClearMethodState},
   425       CC"(Ljava/lang/reflect/Executable;)V",          (void*)&WB_ClearMethodState},
   426   {CC"isInStringTable",   CC"(Ljava/lang/String;)Z",  (void*)&WB_IsInStringTable  },
   426   {CC"isInStringTable",   CC"(Ljava/lang/String;)Z",  (void*)&WB_IsInStringTable  },
   427   {CC"fullGC",   CC"()V",                             (void*)&WB_FullGC },
   427   {CC"fullGC",   CC"()V",                             (void*)&WB_FullGC },
   428 };
   428 };
   429 
   429 
   430 #undef CC
   430 #undef CC