8007288: Additional WB API for compiler's testing
Reviewed-by: kvn, vlivanov
This commit is contained in:
parent
12be356d81
commit
ca90185607
@ -1206,11 +1206,8 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
|
|||||||
assert(osr_bci == InvocationEntryBci || (0 <= osr_bci && osr_bci < method->code_size()), "bci out of range");
|
assert(osr_bci == InvocationEntryBci || (0 <= osr_bci && osr_bci < method->code_size()), "bci out of range");
|
||||||
assert(!method->is_abstract() && (osr_bci == InvocationEntryBci || !method->is_native()), "cannot compile abstract/native methods");
|
assert(!method->is_abstract() && (osr_bci == InvocationEntryBci || !method->is_native()), "cannot compile abstract/native methods");
|
||||||
assert(!method->method_holder()->is_not_initialized(), "method holder must be initialized");
|
assert(!method->method_holder()->is_not_initialized(), "method holder must be initialized");
|
||||||
|
// allow any levels for WhiteBox
|
||||||
if (!TieredCompilation) {
|
assert(WhiteBoxAPI || TieredCompilation || comp_level == CompLevel_highest_tier, "only CompLevel_highest_tier must be used in non-tiered");
|
||||||
comp_level = CompLevel_highest_tier;
|
|
||||||
}
|
|
||||||
|
|
||||||
// return quickly if possible
|
// return quickly if possible
|
||||||
|
|
||||||
// lock, make sure that the compilation
|
// lock, make sure that the compilation
|
||||||
|
@ -760,13 +760,17 @@ class Method : public Metadata {
|
|||||||
public:
|
public:
|
||||||
bool is_not_c1_compilable() const { return access_flags().is_not_c1_compilable(); }
|
bool is_not_c1_compilable() const { return access_flags().is_not_c1_compilable(); }
|
||||||
void set_not_c1_compilable() { _access_flags.set_not_c1_compilable(); }
|
void set_not_c1_compilable() { _access_flags.set_not_c1_compilable(); }
|
||||||
|
void clear_not_c1_compilable() { _access_flags.clear_not_c1_compilable(); }
|
||||||
bool is_not_c2_compilable() const { return access_flags().is_not_c2_compilable(); }
|
bool is_not_c2_compilable() const { return access_flags().is_not_c2_compilable(); }
|
||||||
void set_not_c2_compilable() { _access_flags.set_not_c2_compilable(); }
|
void set_not_c2_compilable() { _access_flags.set_not_c2_compilable(); }
|
||||||
|
void clear_not_c2_compilable() { _access_flags.clear_not_c2_compilable(); }
|
||||||
|
|
||||||
bool is_not_c1_osr_compilable() const { return is_not_c1_compilable(); } // don't waste an accessFlags bit
|
bool is_not_c1_osr_compilable() const { return is_not_c1_compilable(); } // don't waste an accessFlags bit
|
||||||
void set_not_c1_osr_compilable() { set_not_c1_compilable(); } // don't waste an accessFlags bit
|
void set_not_c1_osr_compilable() { set_not_c1_compilable(); } // don't waste an accessFlags bit
|
||||||
|
void clear_not_c1_osr_compilable() { clear_not_c1_compilable(); } // don't waste an accessFlags bit
|
||||||
bool is_not_c2_osr_compilable() const { return access_flags().is_not_c2_osr_compilable(); }
|
bool is_not_c2_osr_compilable() const { return access_flags().is_not_c2_osr_compilable(); }
|
||||||
void set_not_c2_osr_compilable() { _access_flags.set_not_c2_osr_compilable(); }
|
void set_not_c2_osr_compilable() { _access_flags.set_not_c2_osr_compilable(); }
|
||||||
|
void clear_not_c2_osr_compilable() { _access_flags.clear_not_c2_osr_compilable(); }
|
||||||
|
|
||||||
// Background compilation support
|
// Background compilation support
|
||||||
bool queued_for_compilation() const { return access_flags().queued_for_compilation(); }
|
bool queued_for_compilation() const { return access_flags().queued_for_compilation(); }
|
||||||
|
@ -660,29 +660,9 @@ MethodData::MethodData(methodHandle method, int size, TRAPS) {
|
|||||||
// Set the method back-pointer.
|
// Set the method back-pointer.
|
||||||
_method = method();
|
_method = method();
|
||||||
|
|
||||||
_invocation_counter.init();
|
init();
|
||||||
_backedge_counter.init();
|
|
||||||
_invocation_counter_start = 0;
|
|
||||||
_backedge_counter_start = 0;
|
|
||||||
_num_loops = 0;
|
|
||||||
_num_blocks = 0;
|
|
||||||
_highest_comp_level = 0;
|
|
||||||
_highest_osr_comp_level = 0;
|
|
||||||
_would_profile = true;
|
|
||||||
set_creation_mileage(mileage_of(method()));
|
set_creation_mileage(mileage_of(method()));
|
||||||
|
|
||||||
// Initialize flags and trap history.
|
|
||||||
_nof_decompiles = 0;
|
|
||||||
_nof_overflow_recompiles = 0;
|
|
||||||
_nof_overflow_traps = 0;
|
|
||||||
_eflags = 0;
|
|
||||||
_arg_local = 0;
|
|
||||||
_arg_stack = 0;
|
|
||||||
_arg_returned = 0;
|
|
||||||
assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align");
|
|
||||||
Copy::zero_to_words((HeapWord*) &_trap_hist,
|
|
||||||
sizeof(_trap_hist) / sizeof(HeapWord));
|
|
||||||
|
|
||||||
// Go through the bytecodes and allocate and initialize the
|
// Go through the bytecodes and allocate and initialize the
|
||||||
// corresponding data cells.
|
// corresponding data cells.
|
||||||
int data_size = 0;
|
int data_size = 0;
|
||||||
@ -721,7 +701,27 @@ MethodData::MethodData(methodHandle method, int size, TRAPS) {
|
|||||||
post_initialize(&stream);
|
post_initialize(&stream);
|
||||||
|
|
||||||
set_size(object_size);
|
set_size(object_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MethodData::init() {
|
||||||
|
_invocation_counter.init();
|
||||||
|
_backedge_counter.init();
|
||||||
|
_invocation_counter_start = 0;
|
||||||
|
_backedge_counter_start = 0;
|
||||||
|
_num_loops = 0;
|
||||||
|
_num_blocks = 0;
|
||||||
|
_highest_comp_level = 0;
|
||||||
|
_highest_osr_comp_level = 0;
|
||||||
|
_would_profile = true;
|
||||||
|
|
||||||
|
// Initialize flags and trap history.
|
||||||
|
_nof_decompiles = 0;
|
||||||
|
_nof_overflow_recompiles = 0;
|
||||||
|
_nof_overflow_traps = 0;
|
||||||
|
clear_escape_info();
|
||||||
|
assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align");
|
||||||
|
Copy::zero_to_words((HeapWord*) &_trap_hist,
|
||||||
|
sizeof(_trap_hist) / sizeof(HeapWord));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a measure of how much mileage the method has on it.
|
// Get a measure of how much mileage the method has on it.
|
||||||
|
@ -1284,8 +1284,8 @@ public:
|
|||||||
return bytecode_cell_count(code) != no_profile_data;
|
return bytecode_cell_count(code) != no_profile_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform initialization of a new MethodData*
|
// reset into original state
|
||||||
void initialize(methodHandle method);
|
void init();
|
||||||
|
|
||||||
// My size
|
// My size
|
||||||
int size_in_bytes() const { return _size; }
|
int size_in_bytes() const { return _size; }
|
||||||
@ -1365,6 +1365,7 @@ public:
|
|||||||
intx arg_stack() { return _arg_stack; }
|
intx arg_stack() { return _arg_stack; }
|
||||||
intx arg_returned() { return _arg_returned; }
|
intx arg_returned() { return _arg_returned; }
|
||||||
uint arg_modified(int a) { ArgInfoData *aid = arg_info();
|
uint arg_modified(int a) { ArgInfoData *aid = arg_info();
|
||||||
|
assert(aid != NULL, "arg_info must be not null");
|
||||||
assert(a >= 0 && a < aid->number_of_args(), "valid argument number");
|
assert(a >= 0 && a < aid->number_of_args(), "valid argument number");
|
||||||
return aid->arg_modified(a); }
|
return aid->arg_modified(a); }
|
||||||
|
|
||||||
@ -1373,8 +1374,8 @@ public:
|
|||||||
void set_arg_stack(intx v) { _arg_stack = v; }
|
void set_arg_stack(intx v) { _arg_stack = v; }
|
||||||
void set_arg_returned(intx v) { _arg_returned = v; }
|
void set_arg_returned(intx v) { _arg_returned = v; }
|
||||||
void set_arg_modified(int a, uint v) { ArgInfoData *aid = arg_info();
|
void set_arg_modified(int a, uint v) { ArgInfoData *aid = arg_info();
|
||||||
|
assert(aid != NULL, "arg_info must be not null");
|
||||||
assert(a >= 0 && a < aid->number_of_args(), "valid argument number");
|
assert(a >= 0 && a < aid->number_of_args(), "valid argument number");
|
||||||
|
|
||||||
aid->set_arg_modified(a, v); }
|
aid->set_arg_modified(a, v); }
|
||||||
|
|
||||||
void clear_escape_info() { _eflags = _arg_local = _arg_stack = _arg_returned = 0; }
|
void clear_escape_info() { _eflags = _arg_local = _arg_stack = _arg_returned = 0; }
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#endif // INCLUDE_NMT
|
#endif // INCLUDE_NMT
|
||||||
|
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
|
#include "runtime/compilationPolicy.hpp"
|
||||||
|
|
||||||
bool WhiteBox::_used = false;
|
bool WhiteBox::_used = false;
|
||||||
|
|
||||||
@ -213,11 +214,11 @@ WB_ENTRY(jboolean, WB_IsMethodCompiled(JNIEnv* env, jobject o, jobject method))
|
|||||||
return (code->is_alive() && !code->is_marked_for_deoptimization());
|
return (code->is_alive() && !code->is_marked_for_deoptimization());
|
||||||
WB_END
|
WB_END
|
||||||
|
|
||||||
WB_ENTRY(jboolean, WB_IsMethodCompilable(JNIEnv* env, jobject o, jobject method))
|
WB_ENTRY(jboolean, WB_IsMethodCompilable(JNIEnv* env, jobject o, jobject method, jint comp_level))
|
||||||
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
|
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
|
||||||
MutexLockerEx mu(Compile_lock);
|
MutexLockerEx mu(Compile_lock);
|
||||||
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
|
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
|
||||||
return !mh->is_not_compilable();
|
return CompilationPolicy::can_be_compiled(mh, comp_level);
|
||||||
WB_END
|
WB_END
|
||||||
|
|
||||||
WB_ENTRY(jboolean, WB_IsMethodQueuedForCompilation(JNIEnv* env, jobject o, jobject method))
|
WB_ENTRY(jboolean, WB_IsMethodQueuedForCompilation(JNIEnv* env, jobject o, jobject method))
|
||||||
@ -241,7 +242,7 @@ WB_ENTRY(void, WB_MakeMethodNotCompilable(JNIEnv* env, jobject o, jobject method
|
|||||||
mh->set_not_compilable();
|
mh->set_not_compilable();
|
||||||
WB_END
|
WB_END
|
||||||
|
|
||||||
WB_ENTRY(jboolean, WB_SetDontInlineMethod(JNIEnv* env, jobject o, jobject method, jboolean value))
|
WB_ENTRY(jboolean, WB_TestSetDontInlineMethod(JNIEnv* env, jobject o, jobject method, jboolean value))
|
||||||
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
|
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
|
||||||
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
|
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
|
||||||
bool result = mh->dont_inline();
|
bool result = mh->dont_inline();
|
||||||
@ -254,6 +255,54 @@ WB_ENTRY(jint, WB_GetCompileQueuesSize(JNIEnv* env, jobject o))
|
|||||||
CompileBroker::queue_size(CompLevel_full_profile) /* C1 */;
|
CompileBroker::queue_size(CompLevel_full_profile) /* C1 */;
|
||||||
WB_END
|
WB_END
|
||||||
|
|
||||||
|
|
||||||
|
WB_ENTRY(jboolean, WB_TestSetForceInlineMethod(JNIEnv* env, jobject o, jobject method, jboolean value))
|
||||||
|
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
|
||||||
|
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
|
||||||
|
bool result = mh->force_inline();
|
||||||
|
mh->set_force_inline(value == JNI_TRUE);
|
||||||
|
return result;
|
||||||
|
WB_END
|
||||||
|
|
||||||
|
WB_ENTRY(jboolean, WB_EnqueueMethodForCompilation(JNIEnv* env, jobject o, jobject method, jint comp_level))
|
||||||
|
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
|
||||||
|
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
|
||||||
|
nmethod* nm = CompileBroker::compile_method(mh, InvocationEntryBci, comp_level, mh, mh->invocation_count(), "WhiteBox", THREAD);
|
||||||
|
MutexLockerEx mu(Compile_lock);
|
||||||
|
return (mh->queued_for_compilation() || nm != NULL);
|
||||||
|
WB_END
|
||||||
|
|
||||||
|
WB_ENTRY(void, WB_ClearMethodState(JNIEnv* env, jobject o, jobject method))
|
||||||
|
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
|
||||||
|
methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(jmid));
|
||||||
|
MutexLockerEx mu(Compile_lock);
|
||||||
|
MethodData* mdo = mh->method_data();
|
||||||
|
|
||||||
|
if (mdo != NULL) {
|
||||||
|
mdo->init();
|
||||||
|
ResourceMark rm;
|
||||||
|
int arg_count = mdo->method()->size_of_parameters();
|
||||||
|
for (int i = 0; i < arg_count; i++) {
|
||||||
|
mdo->set_arg_modified(i, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mh->backedge_counter()->init();
|
||||||
|
mh->invocation_counter()->init();
|
||||||
|
mh->set_interpreter_invocation_count(0);
|
||||||
|
mh->set_interpreter_throwout_count(0);
|
||||||
|
mh->clear_not_c1_compilable();
|
||||||
|
mh->clear_not_c2_compilable();
|
||||||
|
mh->clear_not_c2_osr_compilable();
|
||||||
|
NOT_PRODUCT(mh->set_compiled_invocation_count(0));
|
||||||
|
|
||||||
|
#ifdef TIERED
|
||||||
|
mh->set_rate(0.0F);
|
||||||
|
mh->set_prev_event_count(0);
|
||||||
|
mh->set_prev_time(0);
|
||||||
|
#endif
|
||||||
|
WB_END
|
||||||
|
|
||||||
WB_ENTRY(jboolean, WB_IsInStringTable(JNIEnv* env, jobject o, jstring javaString))
|
WB_ENTRY(jboolean, WB_IsInStringTable(JNIEnv* env, jobject o, jstring javaString))
|
||||||
ResourceMark rm(THREAD);
|
ResourceMark rm(THREAD);
|
||||||
int len;
|
int len;
|
||||||
@ -271,7 +320,6 @@ WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o))
|
|||||||
Universe::heap()->collect(GCCause::_last_ditch_collection);
|
Universe::heap()->collect(GCCause::_last_ditch_collection);
|
||||||
WB_END
|
WB_END
|
||||||
|
|
||||||
|
|
||||||
//Some convenience methods to deal with objects from java
|
//Some convenience methods to deal with objects from java
|
||||||
int WhiteBox::offset_for_field(const char* field_name, oop object,
|
int WhiteBox::offset_for_field(const char* field_name, oop object,
|
||||||
Symbol* signature_symbol) {
|
Symbol* signature_symbol) {
|
||||||
@ -349,18 +397,24 @@ static JNINativeMethod methods[] = {
|
|||||||
(void*)&WB_DeoptimizeMethod },
|
(void*)&WB_DeoptimizeMethod },
|
||||||
{CC"isMethodCompiled", CC"(Ljava/lang/reflect/Method;)Z",
|
{CC"isMethodCompiled", CC"(Ljava/lang/reflect/Method;)Z",
|
||||||
(void*)&WB_IsMethodCompiled },
|
(void*)&WB_IsMethodCompiled },
|
||||||
{CC"isMethodCompilable", CC"(Ljava/lang/reflect/Method;)Z",
|
{CC"isMethodCompilable", CC"(Ljava/lang/reflect/Method;I)Z",
|
||||||
(void*)&WB_IsMethodCompilable},
|
(void*)&WB_IsMethodCompilable},
|
||||||
{CC"isMethodQueuedForCompilation",
|
{CC"isMethodQueuedForCompilation",
|
||||||
CC"(Ljava/lang/reflect/Method;)Z", (void*)&WB_IsMethodQueuedForCompilation},
|
CC"(Ljava/lang/reflect/Method;)Z", (void*)&WB_IsMethodQueuedForCompilation},
|
||||||
{CC"makeMethodNotCompilable",
|
{CC"makeMethodNotCompilable",
|
||||||
CC"(Ljava/lang/reflect/Method;)V", (void*)&WB_MakeMethodNotCompilable},
|
CC"(Ljava/lang/reflect/Method;)V", (void*)&WB_MakeMethodNotCompilable},
|
||||||
{CC"setDontInlineMethod",
|
{CC"testSetDontInlineMethod",
|
||||||
CC"(Ljava/lang/reflect/Method;Z)Z", (void*)&WB_SetDontInlineMethod},
|
CC"(Ljava/lang/reflect/Method;Z)Z", (void*)&WB_TestSetDontInlineMethod},
|
||||||
{CC"getMethodCompilationLevel",
|
{CC"getMethodCompilationLevel",
|
||||||
CC"(Ljava/lang/reflect/Method;)I", (void*)&WB_GetMethodCompilationLevel},
|
CC"(Ljava/lang/reflect/Method;)I", (void*)&WB_GetMethodCompilationLevel},
|
||||||
{CC"getCompileQueuesSize",
|
{CC"getCompileQueuesSize",
|
||||||
CC"()I", (void*)&WB_GetCompileQueuesSize},
|
CC"()I", (void*)&WB_GetCompileQueuesSize},
|
||||||
|
{CC"testSetForceInlineMethod",
|
||||||
|
CC"(Ljava/lang/reflect/Method;Z)Z", (void*)&WB_TestSetForceInlineMethod},
|
||||||
|
{CC"enqueueMethodForCompilation",
|
||||||
|
CC"(Ljava/lang/reflect/Method;I)Z", (void*)&WB_EnqueueMethodForCompilation},
|
||||||
|
{CC"clearMethodState",
|
||||||
|
CC"(Ljava/lang/reflect/Method;)V", (void*)&WB_ClearMethodState},
|
||||||
{CC"isInStringTable", CC"(Ljava/lang/String;)Z", (void*)&WB_IsInStringTable },
|
{CC"isInStringTable", CC"(Ljava/lang/String;)Z", (void*)&WB_IsInStringTable },
|
||||||
{CC"fullGC", CC"()V", (void*)&WB_FullGC },
|
{CC"fullGC", CC"()V", (void*)&WB_FullGC },
|
||||||
};
|
};
|
||||||
|
@ -123,9 +123,10 @@ bool CompilationPolicy::can_be_compiled(methodHandle m, int comp_level) {
|
|||||||
}
|
}
|
||||||
if (comp_level == CompLevel_all) {
|
if (comp_level == CompLevel_all) {
|
||||||
return !m->is_not_compilable(CompLevel_simple) && !m->is_not_compilable(CompLevel_full_optimization);
|
return !m->is_not_compilable(CompLevel_simple) && !m->is_not_compilable(CompLevel_full_optimization);
|
||||||
} else {
|
} else if (is_compile(comp_level)) {
|
||||||
return !m->is_not_compilable(comp_level);
|
return !m->is_not_compilable(comp_level);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompilationPolicy::is_compilation_enabled() {
|
bool CompilationPolicy::is_compilation_enabled() {
|
||||||
|
@ -96,7 +96,7 @@ protected:
|
|||||||
void reset_counter_for_back_branch_event(methodHandle method);
|
void reset_counter_for_back_branch_event(methodHandle method);
|
||||||
public:
|
public:
|
||||||
NonTieredCompPolicy() : _compiler_count(0) { }
|
NonTieredCompPolicy() : _compiler_count(0) { }
|
||||||
virtual CompLevel initial_compile_level() { return CompLevel_initial_compile; }
|
virtual CompLevel initial_compile_level() { return CompLevel_highest_tier; }
|
||||||
virtual int compiler_count(CompLevel comp_level);
|
virtual int compiler_count(CompLevel comp_level);
|
||||||
virtual void do_safepoint_work();
|
virtual void do_safepoint_work();
|
||||||
virtual void reprofile(ScopeDesc* trap_scope, bool is_osr);
|
virtual void reprofile(ScopeDesc* trap_scope, bool is_osr);
|
||||||
|
@ -194,6 +194,9 @@ class AccessFlags VALUE_OBJ_CLASS_SPEC {
|
|||||||
void set_is_obsolete() { atomic_set_bits(JVM_ACC_IS_OBSOLETE); }
|
void set_is_obsolete() { atomic_set_bits(JVM_ACC_IS_OBSOLETE); }
|
||||||
void set_is_prefixed_native() { atomic_set_bits(JVM_ACC_IS_PREFIXED_NATIVE); }
|
void set_is_prefixed_native() { atomic_set_bits(JVM_ACC_IS_PREFIXED_NATIVE); }
|
||||||
|
|
||||||
|
void clear_not_c1_compilable() { atomic_clear_bits(JVM_ACC_NOT_C1_COMPILABLE); }
|
||||||
|
void clear_not_c2_compilable() { atomic_clear_bits(JVM_ACC_NOT_C2_COMPILABLE); }
|
||||||
|
void clear_not_c2_osr_compilable() { atomic_clear_bits(JVM_ACC_NOT_C2_OSR_COMPILABLE); }
|
||||||
// Klass* flags
|
// Klass* flags
|
||||||
void set_has_vanilla_constructor() { atomic_set_bits(JVM_ACC_HAS_VANILLA_CONSTRUCTOR); }
|
void set_has_vanilla_constructor() { atomic_set_bits(JVM_ACC_HAS_VANILLA_CONSTRUCTOR); }
|
||||||
void set_has_finalizer() { atomic_set_bits(JVM_ACC_HAS_FINALIZER); }
|
void set_has_finalizer() { atomic_set_bits(JVM_ACC_HAS_FINALIZER); }
|
||||||
|
@ -827,6 +827,10 @@ inline bool is_highest_tier_compile(int comp_level) {
|
|||||||
return comp_level == CompLevel_highest_tier;
|
return comp_level == CompLevel_highest_tier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool is_compile(int comp_level) {
|
||||||
|
return is_c1_compile(comp_level) || is_c2_compile(comp_level);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// 'Forward' declarations of frequently used classes
|
// 'Forward' declarations of frequently used classes
|
||||||
// (in order to reduce interface dependencies & reduce
|
// (in order to reduce interface dependencies & reduce
|
||||||
|
71
hotspot/test/compiler/whitebox/ClearMethodStateTest.java
Normal file
71
hotspot/test/compiler/whitebox/ClearMethodStateTest.java
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test ClearMethodStateTest
|
||||||
|
* @library /testlibrary /testlibrary/whitebox
|
||||||
|
* @build ClearMethodStateTest
|
||||||
|
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||||
|
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ClearMethodStateTest
|
||||||
|
* @author igor.ignatyev@oracle.com
|
||||||
|
*/
|
||||||
|
public class ClearMethodStateTest extends CompilerWhiteBoxTest {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
// to prevent inlining #method into #compile() and #test()
|
||||||
|
WHITE_BOX.testSetDontInlineMethod(METHOD, true);
|
||||||
|
new ClearMethodStateTest().runTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void test() throws Exception {
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
compile();
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
WHITE_BOX.clearMethodState(METHOD);
|
||||||
|
WHITE_BOX.deoptimizeMethod(METHOD);
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
|
||||||
|
|
||||||
|
if (!TIERED_COMPILATION) {
|
||||||
|
WHITE_BOX.clearMethodState(METHOD);
|
||||||
|
compile(COMPILE_THRESHOLD);
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
|
||||||
|
WHITE_BOX.deoptimizeMethod(METHOD);
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
WHITE_BOX.clearMethodState(METHOD);
|
||||||
|
|
||||||
|
if (COMPILE_THRESHOLD > 1) {
|
||||||
|
compile(COMPILE_THRESHOLD - 1);
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
} else {
|
||||||
|
System.err.println("Warning: 'CompileThreshold' <= 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
method();
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
} else {
|
||||||
|
System.err.println(
|
||||||
|
"Warning: part of test is not applicable in Tiered");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -37,6 +37,8 @@ public abstract class CompilerWhiteBoxTest {
|
|||||||
= Integer.parseInt(getVMOption("CompileThreshold", "10000"));
|
= Integer.parseInt(getVMOption("CompileThreshold", "10000"));
|
||||||
protected static final boolean BACKGROUND_COMPILATION
|
protected static final boolean BACKGROUND_COMPILATION
|
||||||
= Boolean.valueOf(getVMOption("BackgroundCompilation", "true"));
|
= Boolean.valueOf(getVMOption("BackgroundCompilation", "true"));
|
||||||
|
protected static final boolean TIERED_COMPILATION
|
||||||
|
= Boolean.valueOf(getVMOption("TieredCompilation", "false"));
|
||||||
|
|
||||||
protected static Method getMethod(String name) {
|
protected static Method getMethod(String name) {
|
||||||
try {
|
try {
|
||||||
@ -81,6 +83,9 @@ public abstract class CompilerWhiteBoxTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static void checkNotCompiled(Method method) {
|
protected static void checkNotCompiled(Method method) {
|
||||||
|
if (WHITE_BOX.isMethodQueuedForCompilation(method)) {
|
||||||
|
throw new RuntimeException(method + " must not be in queue");
|
||||||
|
}
|
||||||
if (WHITE_BOX.isMethodCompiled(method)) {
|
if (WHITE_BOX.isMethodCompiled(method)) {
|
||||||
throw new RuntimeException(method + " must be not compiled");
|
throw new RuntimeException(method + " must be not compiled");
|
||||||
}
|
}
|
||||||
@ -139,8 +144,11 @@ public abstract class CompilerWhiteBoxTest {
|
|||||||
protected abstract void test() throws Exception;
|
protected abstract void test() throws Exception;
|
||||||
|
|
||||||
protected final int compile() {
|
protected final int compile() {
|
||||||
|
return compile(Math.max(COMPILE_THRESHOLD, 150000));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final int compile(int count) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int count = Math.max(COMPILE_THRESHOLD, 150000);
|
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
result += method();
|
result += method();
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class DeoptimizeAllTest extends CompilerWhiteBoxTest {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// to prevent inlining #method into #compile()
|
// to prevent inlining #method into #compile()
|
||||||
WHITE_BOX.setDontInlineMethod(METHOD, true);
|
WHITE_BOX.testSetDontInlineMethod(METHOD, true);
|
||||||
new DeoptimizeAllTest().runTest();
|
new DeoptimizeAllTest().runTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ public class DeoptimizeMethodTest extends CompilerWhiteBoxTest {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// to prevent inlining #method into #compile()
|
// to prevent inlining #method into #compile()
|
||||||
WHITE_BOX.setDontInlineMethod(METHOD, true);
|
WHITE_BOX.testSetDontInlineMethod(METHOD, true);
|
||||||
new DeoptimizeMethodTest().runTest();
|
new DeoptimizeMethodTest().runTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test EnqueueMethodForCompilationTest
|
||||||
|
* @library /testlibrary /testlibrary/whitebox
|
||||||
|
* @build EnqueueMethodForCompilationTest
|
||||||
|
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||||
|
* @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI EnqueueMethodForCompilationTest
|
||||||
|
* @author igor.ignatyev@oracle.com
|
||||||
|
*/
|
||||||
|
public class EnqueueMethodForCompilationTest extends CompilerWhiteBoxTest {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
// to prevent inlining #method into #compile()
|
||||||
|
WHITE_BOX.testSetDontInlineMethod(METHOD, true);
|
||||||
|
new EnqueueMethodForCompilationTest().runTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void test() throws Exception {
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
|
||||||
|
WHITE_BOX.enqueueMethodForCompilation(METHOD, 0);
|
||||||
|
if (WHITE_BOX.isMethodCompilable(METHOD, 0)) {
|
||||||
|
throw new RuntimeException(METHOD + " is compilable at level 0");
|
||||||
|
}
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
|
||||||
|
WHITE_BOX.enqueueMethodForCompilation(METHOD, -1);
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
|
||||||
|
WHITE_BOX.enqueueMethodForCompilation(METHOD, 5);
|
||||||
|
if (!WHITE_BOX.isMethodCompilable(METHOD, 5)) {
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
compile();
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
} else {
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
int compLevel = WHITE_BOX.getMethodCompilationLevel(METHOD);
|
||||||
|
WHITE_BOX.deoptimizeMethod(METHOD);
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
|
||||||
|
WHITE_BOX.enqueueMethodForCompilation(METHOD, compLevel);
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
WHITE_BOX.deoptimizeMethod(METHOD);
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
|
||||||
|
compile();
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
WHITE_BOX.deoptimizeMethod(METHOD);
|
||||||
|
checkNotCompiled(METHOD);
|
||||||
|
}
|
||||||
|
}
|
@ -45,7 +45,7 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// to prevent inlining #method into #compile()
|
// to prevent inlining #method into #compile()
|
||||||
WHITE_BOX.setDontInlineMethod(METHOD, true);
|
WHITE_BOX.testSetDontInlineMethod(METHOD, true);
|
||||||
new IsMethodCompilableTest().runTest();
|
new IsMethodCompilableTest().runTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,26 +60,47 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
|
|||||||
"Warning: test is not applicable if PerMethodRecompilationCutoff == Inf");
|
"Warning: test is not applicable if PerMethodRecompilationCutoff == Inf");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean madeNotCompilable = false;
|
|
||||||
|
|
||||||
for (long i = 0; i < PER_METHOD_RECOMPILATION_CUTOFF; ++i) {
|
// deoptimze 'PerMethodRecompilationCutoff' times and clear state
|
||||||
compile();
|
for (long i = 0L, n = PER_METHOD_RECOMPILATION_CUTOFF - 1; i < n; ++i) {
|
||||||
waitBackgroundCompilation(METHOD);
|
compileAndDeoptimaze();
|
||||||
WHITE_BOX.deoptimizeMethod(METHOD);
|
}
|
||||||
if (!WHITE_BOX.isMethodCompilable(METHOD)) {
|
if (!WHITE_BOX.isMethodCompilable(METHOD)) {
|
||||||
madeNotCompilable = true;
|
throw new RuntimeException(METHOD + " is not compilable after "
|
||||||
break;
|
+ (PER_METHOD_RECOMPILATION_CUTOFF - 1) + " iterations");
|
||||||
}
|
}
|
||||||
|
WHITE_BOX.clearMethodState(METHOD);
|
||||||
|
|
||||||
|
// deoptimze 'PerMethodRecompilationCutoff' + 1 times
|
||||||
|
long i;
|
||||||
|
for (i = 0L; i < PER_METHOD_RECOMPILATION_CUTOFF
|
||||||
|
&& WHITE_BOX.isMethodCompilable(METHOD); ++i) {
|
||||||
|
compileAndDeoptimaze();
|
||||||
}
|
}
|
||||||
if (!madeNotCompilable) {
|
if (i != PER_METHOD_RECOMPILATION_CUTOFF) {
|
||||||
|
throw new RuntimeException(METHOD + " is not compilable after "
|
||||||
|
+ i + " iterations, but must only after "
|
||||||
|
+ PER_METHOD_RECOMPILATION_CUTOFF);
|
||||||
|
}
|
||||||
|
if (WHITE_BOX.isMethodCompilable(METHOD)) {
|
||||||
throw new RuntimeException(METHOD + " is still compilable after "
|
throw new RuntimeException(METHOD + " is still compilable after "
|
||||||
+ PER_METHOD_RECOMPILATION_CUTOFF + " iterations");
|
+ PER_METHOD_RECOMPILATION_CUTOFF + " iterations");
|
||||||
}
|
}
|
||||||
compile();
|
compile();
|
||||||
if (WHITE_BOX.isMethodCompiled(METHOD)) {
|
checkNotCompiled(METHOD);
|
||||||
printInfo(METHOD);
|
|
||||||
throw new RuntimeException(
|
WHITE_BOX.clearMethodState(METHOD);
|
||||||
METHOD + " is not compilable but compiled");
|
if (!WHITE_BOX.isMethodCompilable(METHOD)) {
|
||||||
}
|
throw new RuntimeException(METHOD
|
||||||
|
+ " is compilable after clearMethodState()");
|
||||||
|
}
|
||||||
|
compile();
|
||||||
|
checkCompiled(METHOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void compileAndDeoptimaze() throws Exception {
|
||||||
|
compile();
|
||||||
|
waitBackgroundCompilation(METHOD);
|
||||||
|
WHITE_BOX.deoptimizeMethod(METHOD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// to prevent inlining #method into #compile()
|
// to prevent inlining #method into #compile()
|
||||||
WHITE_BOX.setDontInlineMethod(METHOD, true);
|
WHITE_BOX.testSetDontInlineMethod(METHOD, true);
|
||||||
new MakeMethodNotCompilableTest().runTest();
|
new MakeMethodNotCompilableTest().runTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,9 +46,6 @@ public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
|
|||||||
throw new RuntimeException(METHOD + " must be not compilable");
|
throw new RuntimeException(METHOD + " must be not compilable");
|
||||||
}
|
}
|
||||||
compile();
|
compile();
|
||||||
if (WHITE_BOX.isMethodQueuedForCompilation(METHOD)) {
|
|
||||||
throw new RuntimeException(METHOD + " must not be in queue");
|
|
||||||
}
|
|
||||||
checkNotCompiled(METHOD);
|
checkNotCompiled(METHOD);
|
||||||
if (WHITE_BOX.isMethodCompilable(METHOD)) {
|
if (WHITE_BOX.isMethodCompilable(METHOD)) {
|
||||||
throw new RuntimeException(METHOD + " must be not compilable");
|
throw new RuntimeException(METHOD + " must be not compilable");
|
||||||
|
@ -36,23 +36,23 @@ public class SetDontInlineMethodTest extends CompilerWhiteBoxTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void test() throws Exception {
|
protected void test() throws Exception {
|
||||||
if (WHITE_BOX.setDontInlineMethod(METHOD, true)) {
|
if (WHITE_BOX.testSetDontInlineMethod(METHOD, true)) {
|
||||||
throw new RuntimeException("on start " + METHOD
|
throw new RuntimeException("on start " + METHOD
|
||||||
+ " must be inlineable");
|
+ " must be inlineable");
|
||||||
}
|
}
|
||||||
if (!WHITE_BOX.setDontInlineMethod(METHOD, true)) {
|
if (!WHITE_BOX.testSetDontInlineMethod(METHOD, true)) {
|
||||||
throw new RuntimeException("after first change to true " + METHOD
|
throw new RuntimeException("after first change to true " + METHOD
|
||||||
+ " must be not inlineable");
|
+ " must be not inlineable");
|
||||||
}
|
}
|
||||||
if (!WHITE_BOX.setDontInlineMethod(METHOD, false)) {
|
if (!WHITE_BOX.testSetDontInlineMethod(METHOD, false)) {
|
||||||
throw new RuntimeException("after second change to true " + METHOD
|
throw new RuntimeException("after second change to true " + METHOD
|
||||||
+ " must be still not inlineable");
|
+ " must be still not inlineable");
|
||||||
}
|
}
|
||||||
if (WHITE_BOX.setDontInlineMethod(METHOD, false)) {
|
if (WHITE_BOX.testSetDontInlineMethod(METHOD, false)) {
|
||||||
throw new RuntimeException("after first change to false" + METHOD
|
throw new RuntimeException("after first change to false" + METHOD
|
||||||
+ " must be inlineable");
|
+ " must be inlineable");
|
||||||
}
|
}
|
||||||
if (WHITE_BOX.setDontInlineMethod(METHOD, false)) {
|
if (WHITE_BOX.testSetDontInlineMethod(METHOD, false)) {
|
||||||
throw new RuntimeException("after second change to false " + METHOD
|
throw new RuntimeException("after second change to false " + METHOD
|
||||||
+ " must be inlineable");
|
+ " must be inlineable");
|
||||||
}
|
}
|
||||||
|
60
hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java
Normal file
60
hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test SetForceInlineMethodTest
|
||||||
|
* @library /testlibrary /testlibrary/whitebox
|
||||||
|
* @build SetForceInlineMethodTest
|
||||||
|
* @run main ClassFileInstaller sun.hotspot.WhiteBox
|
||||||
|
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI SetForceInlineMethodTest
|
||||||
|
* @author igor.ignatyev@oracle.com
|
||||||
|
*/
|
||||||
|
public class SetForceInlineMethodTest extends CompilerWhiteBoxTest {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
new SetForceInlineMethodTest().runTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void test() throws Exception {
|
||||||
|
if (WHITE_BOX.testSetForceInlineMethod(METHOD, true)) {
|
||||||
|
throw new RuntimeException("on start " + METHOD
|
||||||
|
+ " must be not force inlineable");
|
||||||
|
}
|
||||||
|
if (!WHITE_BOX.testSetForceInlineMethod(METHOD, true)) {
|
||||||
|
throw new RuntimeException("after first change to true " + METHOD
|
||||||
|
+ " must be force inlineable");
|
||||||
|
}
|
||||||
|
if (!WHITE_BOX.testSetForceInlineMethod(METHOD, false)) {
|
||||||
|
throw new RuntimeException("after second change to true " + METHOD
|
||||||
|
+ " must be still force inlineable");
|
||||||
|
}
|
||||||
|
if (WHITE_BOX.testSetForceInlineMethod(METHOD, false)) {
|
||||||
|
throw new RuntimeException("after first change to false" + METHOD
|
||||||
|
+ " must be not force inlineable");
|
||||||
|
}
|
||||||
|
if (WHITE_BOX.testSetForceInlineMethod(METHOD, false)) {
|
||||||
|
throw new RuntimeException("after second change to false " + METHOD
|
||||||
|
+ " must be not force inlineable");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -87,13 +87,19 @@ public class WhiteBox {
|
|||||||
// Compiler
|
// Compiler
|
||||||
public native void deoptimizeAll();
|
public native void deoptimizeAll();
|
||||||
public native boolean isMethodCompiled(Method method);
|
public native boolean isMethodCompiled(Method method);
|
||||||
public native boolean isMethodCompilable(Method method);
|
public boolean isMethodCompilable(Method method) {
|
||||||
|
return isMethodCompilable(method, -1 /*any*/);
|
||||||
|
}
|
||||||
|
public native boolean isMethodCompilable(Method method, int compLevel);
|
||||||
public native boolean isMethodQueuedForCompilation(Method method);
|
public native boolean isMethodQueuedForCompilation(Method method);
|
||||||
public native int deoptimizeMethod(Method method);
|
public native int deoptimizeMethod(Method method);
|
||||||
public native void makeMethodNotCompilable(Method method);
|
public native void makeMethodNotCompilable(Method method);
|
||||||
public native int getMethodCompilationLevel(Method method);
|
public native int getMethodCompilationLevel(Method method);
|
||||||
public native boolean setDontInlineMethod(Method method, boolean value);
|
public native boolean testSetDontInlineMethod(Method method, boolean value);
|
||||||
public native int getCompileQueuesSize();
|
public native int getCompileQueuesSize();
|
||||||
|
public native boolean testSetForceInlineMethod(Method method, boolean value);
|
||||||
|
public native boolean enqueueMethodForCompilation(Method method, int compLevel);
|
||||||
|
public native void clearMethodState(Method method);
|
||||||
|
|
||||||
//Intered strings
|
//Intered strings
|
||||||
public native boolean isInStringTable(String str);
|
public native boolean isInStringTable(String str);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user