8265360: several compiler/whitebox tests fail with "private compiler.whitebox.SimpleTestCaseHelper(int) must be compiled"
Reviewed-by: kvn, thartmann
This commit is contained in:
parent
ffca23a531
commit
4434c7df03
@ -191,7 +191,7 @@ CompileTask* CompilationPolicy::select_task_helper(CompileQueue* compile_queue)
|
|||||||
|
|
||||||
// Simple methods are as good being compiled with C1 as C2.
|
// Simple methods are as good being compiled with C1 as C2.
|
||||||
// Determine if a given method is such a case.
|
// Determine if a given method is such a case.
|
||||||
bool CompilationPolicy::is_trivial(Method* method) {
|
bool CompilationPolicy::is_trivial(const methodHandle& method) {
|
||||||
if (method->is_accessor() ||
|
if (method->is_accessor() ||
|
||||||
method->is_constant_getter()) {
|
method->is_constant_getter()) {
|
||||||
return true;
|
return true;
|
||||||
@ -245,7 +245,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool apply(int i, int b, CompLevel cur_level, const methodHandle& method) {
|
static bool apply(const methodHandle& method, CompLevel cur_level, int i, int b) {
|
||||||
double k = 1;
|
double k = 1;
|
||||||
switch(cur_level) {
|
switch(cur_level) {
|
||||||
case CompLevel_none:
|
case CompLevel_none:
|
||||||
@ -285,7 +285,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool apply(int i, int b, CompLevel cur_level, const methodHandle& method) {
|
static bool apply(const methodHandle& method, CompLevel cur_level, int i, int b) {
|
||||||
double k = 1;
|
double k = 1;
|
||||||
switch(cur_level) {
|
switch(cur_level) {
|
||||||
case CompLevel_none:
|
case CompLevel_none:
|
||||||
@ -596,7 +596,7 @@ CompLevel CompilationPolicy::initial_compile_level(const methodHandle& method) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set carry flags on the counters if necessary
|
// Set carry flags on the counters if necessary
|
||||||
void CompilationPolicy::handle_counter_overflow(Method* method) {
|
void CompilationPolicy::handle_counter_overflow(const methodHandle& method) {
|
||||||
MethodCounters *mcs = method->method_counters();
|
MethodCounters *mcs = method->method_counters();
|
||||||
if (mcs != NULL) {
|
if (mcs != NULL) {
|
||||||
mcs->invocation_counter()->set_carry_on_overflow();
|
mcs->invocation_counter()->set_carry_on_overflow();
|
||||||
@ -619,21 +619,25 @@ CompileTask* CompilationPolicy::select_task(CompileQueue* compile_queue) {
|
|||||||
// Iterate through the queue and find a method with a maximum rate.
|
// Iterate through the queue and find a method with a maximum rate.
|
||||||
for (CompileTask* task = compile_queue->first(); task != NULL;) {
|
for (CompileTask* task = compile_queue->first(); task != NULL;) {
|
||||||
CompileTask* next_task = task->next();
|
CompileTask* next_task = task->next();
|
||||||
Method* method = task->method();
|
|
||||||
// If a method was unloaded or has been stale for some time, remove it from the queue.
|
// If a method was unloaded or has been stale for some time, remove it from the queue.
|
||||||
// Blocking tasks and tasks submitted from whitebox API don't become stale
|
// Blocking tasks and tasks submitted from whitebox API don't become stale
|
||||||
if (task->is_unloaded() || (task->can_become_stale() && is_stale(t, TieredCompileTaskTimeout, method) && !is_old(method))) {
|
if (task->is_unloaded()) {
|
||||||
if (!task->is_unloaded()) {
|
|
||||||
if (PrintTieredEvents) {
|
|
||||||
print_event(REMOVE_FROM_QUEUE, method, method, task->osr_bci(), (CompLevel) task->comp_level());
|
|
||||||
}
|
|
||||||
method->clear_queued_for_compilation();
|
|
||||||
}
|
|
||||||
compile_queue->remove_and_mark_stale(task);
|
compile_queue->remove_and_mark_stale(task);
|
||||||
task = next_task;
|
task = next_task;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
update_rate(t, method);
|
Method* method = task->method();
|
||||||
|
methodHandle mh(Thread::current(), method);
|
||||||
|
if (task->can_become_stale() && is_stale(t, TieredCompileTaskTimeout, mh) && !is_old(mh)) {
|
||||||
|
if (PrintTieredEvents) {
|
||||||
|
print_event(REMOVE_FROM_QUEUE, method, method, task->osr_bci(), (CompLevel) task->comp_level());
|
||||||
|
}
|
||||||
|
method->clear_queued_for_compilation();
|
||||||
|
compile_queue->remove_and_mark_stale(task);
|
||||||
|
task = next_task;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
update_rate(t, mh);
|
||||||
if (max_task == NULL || compare_methods(method, max_method)) {
|
if (max_task == NULL || compare_methods(method, max_method)) {
|
||||||
// Select a method with the highest rate
|
// Select a method with the highest rate
|
||||||
max_task = task;
|
max_task = task;
|
||||||
@ -711,9 +715,9 @@ nmethod* CompilationPolicy::event(const methodHandle& method, const methodHandle
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_counter_overflow(method());
|
handle_counter_overflow(method);
|
||||||
if (method() != inlinee()) {
|
if (method() != inlinee()) {
|
||||||
handle_counter_overflow(inlinee());
|
handle_counter_overflow(inlinee);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bci == InvocationEntryBci) {
|
if (bci == InvocationEntryBci) {
|
||||||
@ -792,43 +796,43 @@ void CompilationPolicy::compile(const methodHandle& mh, int bci, CompLevel level
|
|||||||
print_event(COMPILE, mh(), mh(), bci, level);
|
print_event(COMPILE, mh(), mh(), bci, level);
|
||||||
}
|
}
|
||||||
int hot_count = (bci == InvocationEntryBci) ? mh->invocation_count() : mh->backedge_count();
|
int hot_count = (bci == InvocationEntryBci) ? mh->invocation_count() : mh->backedge_count();
|
||||||
update_rate(nanos_to_millis(os::javaTimeNanos()), mh());
|
update_rate(nanos_to_millis(os::javaTimeNanos()), mh);
|
||||||
CompileBroker::compile_method(mh, bci, level, mh, hot_count, CompileTask::Reason_Tiered, THREAD);
|
CompileBroker::compile_method(mh, bci, level, mh, hot_count, CompileTask::Reason_Tiered, THREAD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update_rate() is called from select_task() while holding a compile queue lock.
|
// update_rate() is called from select_task() while holding a compile queue lock.
|
||||||
void CompilationPolicy::update_rate(jlong t, Method* m) {
|
void CompilationPolicy::update_rate(jlong t, const methodHandle& method) {
|
||||||
// Skip update if counters are absent.
|
// Skip update if counters are absent.
|
||||||
// Can't allocate them since we are holding compile queue lock.
|
// Can't allocate them since we are holding compile queue lock.
|
||||||
if (m->method_counters() == NULL) return;
|
if (method->method_counters() == NULL) return;
|
||||||
|
|
||||||
if (is_old(m)) {
|
if (is_old(method)) {
|
||||||
// We don't remove old methods from the queue,
|
// We don't remove old methods from the queue,
|
||||||
// so we can just zero the rate.
|
// so we can just zero the rate.
|
||||||
m->set_rate(0);
|
method->set_rate(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't update the rate if we've just came out of a safepoint.
|
// We don't update the rate if we've just came out of a safepoint.
|
||||||
// delta_s is the time since last safepoint in milliseconds.
|
// delta_s is the time since last safepoint in milliseconds.
|
||||||
jlong delta_s = t - SafepointTracing::end_of_last_safepoint_ms();
|
jlong delta_s = t - SafepointTracing::end_of_last_safepoint_ms();
|
||||||
jlong delta_t = t - (m->prev_time() != 0 ? m->prev_time() : start_time()); // milliseconds since the last measurement
|
jlong delta_t = t - (method->prev_time() != 0 ? method->prev_time() : start_time()); // milliseconds since the last measurement
|
||||||
// How many events were there since the last time?
|
// How many events were there since the last time?
|
||||||
int event_count = m->invocation_count() + m->backedge_count();
|
int event_count = method->invocation_count() + method->backedge_count();
|
||||||
int delta_e = event_count - m->prev_event_count();
|
int delta_e = event_count - method->prev_event_count();
|
||||||
|
|
||||||
// We should be running for at least 1ms.
|
// We should be running for at least 1ms.
|
||||||
if (delta_s >= TieredRateUpdateMinTime) {
|
if (delta_s >= TieredRateUpdateMinTime) {
|
||||||
// And we must've taken the previous point at least 1ms before.
|
// And we must've taken the previous point at least 1ms before.
|
||||||
if (delta_t >= TieredRateUpdateMinTime && delta_e > 0) {
|
if (delta_t >= TieredRateUpdateMinTime && delta_e > 0) {
|
||||||
m->set_prev_time(t);
|
method->set_prev_time(t);
|
||||||
m->set_prev_event_count(event_count);
|
method->set_prev_event_count(event_count);
|
||||||
m->set_rate((float)delta_e / (float)delta_t); // Rate is events per millisecond
|
method->set_rate((float)delta_e / (float)delta_t); // Rate is events per millisecond
|
||||||
} else {
|
} else {
|
||||||
if (delta_t > TieredRateUpdateMaxTime && delta_e == 0) {
|
if (delta_t > TieredRateUpdateMaxTime && delta_e == 0) {
|
||||||
// If nothing happened for 25ms, zero the rate. Don't modify prev values.
|
// If nothing happened for 25ms, zero the rate. Don't modify prev values.
|
||||||
m->set_rate(0);
|
method->set_rate(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -836,12 +840,12 @@ void CompilationPolicy::update_rate(jlong t, Method* m) {
|
|||||||
|
|
||||||
// Check if this method has been stale for a given number of milliseconds.
|
// Check if this method has been stale for a given number of milliseconds.
|
||||||
// See select_task().
|
// See select_task().
|
||||||
bool CompilationPolicy::is_stale(jlong t, jlong timeout, Method* m) {
|
bool CompilationPolicy::is_stale(jlong t, jlong timeout, const methodHandle& method) {
|
||||||
jlong delta_s = t - SafepointTracing::end_of_last_safepoint_ms();
|
jlong delta_s = t - SafepointTracing::end_of_last_safepoint_ms();
|
||||||
jlong delta_t = t - m->prev_time();
|
jlong delta_t = t - method->prev_time();
|
||||||
if (delta_t > timeout && delta_s > timeout) {
|
if (delta_t > timeout && delta_s > timeout) {
|
||||||
int event_count = m->invocation_count() + m->backedge_count();
|
int event_count = method->invocation_count() + method->backedge_count();
|
||||||
int delta_e = event_count - m->prev_event_count();
|
int delta_e = event_count - method->prev_event_count();
|
||||||
// Return true if there were no events.
|
// Return true if there were no events.
|
||||||
return delta_e == 0;
|
return delta_e == 0;
|
||||||
}
|
}
|
||||||
@ -850,13 +854,16 @@ bool CompilationPolicy::is_stale(jlong t, jlong timeout, Method* m) {
|
|||||||
|
|
||||||
// We don't remove old methods from the compile queue even if they have
|
// We don't remove old methods from the compile queue even if they have
|
||||||
// very low activity. See select_task().
|
// very low activity. See select_task().
|
||||||
bool CompilationPolicy::is_old(Method* method) {
|
bool CompilationPolicy::is_old(const methodHandle& method) {
|
||||||
return method->invocation_count() > 50000 || method->backedge_count() > 500000;
|
int i = method->invocation_count();
|
||||||
|
int b = method->backedge_count();
|
||||||
|
double k = TieredOldPercentage / 100.0;
|
||||||
|
|
||||||
|
return CallPredicate::apply_scaled(method, CompLevel_none, i, b, k) || LoopPredicate::apply_scaled(method, CompLevel_none, i, b, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
double CompilationPolicy::weight(Method* method) {
|
double CompilationPolicy::weight(Method* method) {
|
||||||
return (double)(method->rate() + 1) *
|
return (double)(method->rate() + 1) * (method->invocation_count() + 1) * (method->backedge_count() + 1);
|
||||||
(method->invocation_count() + 1) * (method->backedge_count() + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply heuristics and return true if x should be compiled before y
|
// Apply heuristics and return true if x should be compiled before y
|
||||||
@ -909,13 +916,16 @@ bool CompilationPolicy::should_create_mdo(const methodHandle& method, CompLevel
|
|||||||
if (cur_level != CompLevel_none || force_comp_at_level_simple(method) || CompilationModeFlag::quick_only() || !ProfileInterpreter) {
|
if (cur_level != CompLevel_none || force_comp_at_level_simple(method) || CompilationModeFlag::quick_only() || !ProfileInterpreter) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (is_old(method)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
int i = method->invocation_count();
|
int i = method->invocation_count();
|
||||||
int b = method->backedge_count();
|
int b = method->backedge_count();
|
||||||
double k = Tier0ProfilingStartPercentage / 100.0;
|
double k = Tier0ProfilingStartPercentage / 100.0;
|
||||||
|
|
||||||
// If the top level compiler is not keeping up, delay profiling.
|
// If the top level compiler is not keeping up, delay profiling.
|
||||||
if (CompileBroker::queue_size(CompLevel_full_optimization) <= Tier0Delay * compiler_count(CompLevel_full_optimization)) {
|
if (CompileBroker::queue_size(CompLevel_full_optimization) <= Tier0Delay * compiler_count(CompLevel_full_optimization)) {
|
||||||
return CallPredicate::apply_scaled(method, CompLevel_full_profile, i, b, k) || LoopPredicate::apply_scaled(method, CompLevel_full_profile, i, b, k);
|
return CallPredicate::apply_scaled(method, CompLevel_none, i, b, k) || LoopPredicate::apply_scaled(method, CompLevel_none, i, b, k);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1005,7 +1015,7 @@ CompLevel CompilationPolicy::common(const methodHandle& method, CompLevel cur_le
|
|||||||
if (force_comp_at_level_simple(method)) {
|
if (force_comp_at_level_simple(method)) {
|
||||||
next_level = CompLevel_simple;
|
next_level = CompLevel_simple;
|
||||||
} else {
|
} else {
|
||||||
if (is_trivial(method())) {
|
if (is_trivial(method)) {
|
||||||
next_level = CompilationModeFlag::disable_intermediate() ? CompLevel_full_optimization : CompLevel_simple;
|
next_level = CompilationModeFlag::disable_intermediate() ? CompLevel_full_optimization : CompLevel_simple;
|
||||||
} else {
|
} else {
|
||||||
switch(cur_level) {
|
switch(cur_level) {
|
||||||
@ -1014,7 +1024,7 @@ CompLevel CompilationPolicy::common(const methodHandle& method, CompLevel cur_le
|
|||||||
// If we were at full profile level, would we switch to full opt?
|
// If we were at full profile level, would we switch to full opt?
|
||||||
if (common<Predicate>(method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
|
if (common<Predicate>(method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
|
||||||
next_level = CompLevel_full_optimization;
|
next_level = CompLevel_full_optimization;
|
||||||
} else if (!CompilationModeFlag::disable_intermediate() && Predicate::apply(i, b, cur_level, method)) {
|
} else if (!CompilationModeFlag::disable_intermediate() && Predicate::apply(method, cur_level, i, b)) {
|
||||||
// C1-generated fully profiled code is about 30% slower than the limited profile
|
// C1-generated fully profiled code is about 30% slower than the limited profile
|
||||||
// code that has only invocation and backedge counters. The observation is that
|
// code that has only invocation and backedge counters. The observation is that
|
||||||
// if C2 queue is large enough we can spend too much time in the fully profiled code
|
// if C2 queue is large enough we can spend too much time in the fully profiled code
|
||||||
@ -1040,7 +1050,7 @@ CompLevel CompilationPolicy::common(const methodHandle& method, CompLevel cur_le
|
|||||||
if (mdo->would_profile()) {
|
if (mdo->would_profile()) {
|
||||||
if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
|
if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
|
||||||
Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
|
Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
|
||||||
Predicate::apply(i, b, cur_level, method))) {
|
Predicate::apply(method, cur_level, i, b))) {
|
||||||
next_level = CompLevel_full_profile;
|
next_level = CompLevel_full_profile;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1050,7 +1060,7 @@ CompLevel CompilationPolicy::common(const methodHandle& method, CompLevel cur_le
|
|||||||
// If there is no MDO we need to profile
|
// If there is no MDO we need to profile
|
||||||
if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
|
if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
|
||||||
Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
|
Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
|
||||||
Predicate::apply(i, b, cur_level, method))) {
|
Predicate::apply(method, cur_level, i, b))) {
|
||||||
next_level = CompLevel_full_profile;
|
next_level = CompLevel_full_profile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1063,7 +1073,7 @@ CompLevel CompilationPolicy::common(const methodHandle& method, CompLevel cur_le
|
|||||||
if (mdo->would_profile() || CompilationModeFlag::disable_intermediate()) {
|
if (mdo->would_profile() || CompilationModeFlag::disable_intermediate()) {
|
||||||
int mdo_i = mdo->invocation_count_delta();
|
int mdo_i = mdo->invocation_count_delta();
|
||||||
int mdo_b = mdo->backedge_count_delta();
|
int mdo_b = mdo->backedge_count_delta();
|
||||||
if (Predicate::apply(mdo_i, mdo_b, cur_level, method)) {
|
if (Predicate::apply(method, cur_level, mdo_i, mdo_b)) {
|
||||||
next_level = CompLevel_full_optimization;
|
next_level = CompLevel_full_optimization;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1083,7 +1093,7 @@ CompLevel CompilationPolicy::common(const methodHandle& method, CompLevel cur_le
|
|||||||
// Determine if a method should be compiled with a normal entry point at a different level.
|
// Determine if a method should be compiled with a normal entry point at a different level.
|
||||||
CompLevel CompilationPolicy::call_event(const methodHandle& method, CompLevel cur_level, Thread* thread) {
|
CompLevel CompilationPolicy::call_event(const methodHandle& method, CompLevel cur_level, Thread* thread) {
|
||||||
CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(), common<LoopPredicate>(method, cur_level, true));
|
CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(), common<LoopPredicate>(method, cur_level, true));
|
||||||
CompLevel next_level = common<CallPredicate>(method, cur_level);
|
CompLevel next_level = common<CallPredicate>(method, cur_level, is_old(method));
|
||||||
|
|
||||||
// If OSR method level is greater than the regular method level, the levels should be
|
// If OSR method level is greater than the regular method level, the levels should be
|
||||||
// equalized by raising the regular method level in order to avoid OSRs during each
|
// equalized by raising the regular method level in order to avoid OSRs during each
|
||||||
|
@ -169,7 +169,7 @@ class CompilationPolicy : AllStatic {
|
|||||||
static double _increase_threshold_at_ratio;
|
static double _increase_threshold_at_ratio;
|
||||||
|
|
||||||
// Set carry flags in the counters (in Method* and MDO).
|
// Set carry flags in the counters (in Method* and MDO).
|
||||||
inline static void handle_counter_overflow(Method* method);
|
inline static void handle_counter_overflow(const methodHandle& method);
|
||||||
// Verify that a level is consistent with the compilation mode
|
// Verify that a level is consistent with the compilation mode
|
||||||
static bool verify_level(CompLevel level);
|
static bool verify_level(CompLevel level);
|
||||||
// Clamp the request level according to various constraints.
|
// Clamp the request level according to various constraints.
|
||||||
@ -188,17 +188,17 @@ class CompilationPolicy : AllStatic {
|
|||||||
// Has a method been long around?
|
// Has a method been long around?
|
||||||
// We don't remove old methods from the compile queue even if they have
|
// We don't remove old methods from the compile queue even if they have
|
||||||
// very low activity (see select_task()).
|
// very low activity (see select_task()).
|
||||||
inline static bool is_old(Method* method);
|
inline static bool is_old(const methodHandle& method);
|
||||||
// Was a given method inactive for a given number of milliseconds.
|
// Was a given method inactive for a given number of milliseconds.
|
||||||
// If it is, we would remove it from the queue (see select_task()).
|
// If it is, we would remove it from the queue (see select_task()).
|
||||||
inline static bool is_stale(jlong t, jlong timeout, Method* m);
|
inline static bool is_stale(jlong t, jlong timeout, const methodHandle& method);
|
||||||
// Compute the weight of the method for the compilation scheduling
|
// Compute the weight of the method for the compilation scheduling
|
||||||
inline static double weight(Method* method);
|
inline static double weight(Method* method);
|
||||||
// Apply heuristics and return true if x should be compiled before y
|
// Apply heuristics and return true if x should be compiled before y
|
||||||
inline static bool compare_methods(Method* x, Method* y);
|
inline static bool compare_methods(Method* x, Method* y);
|
||||||
// Compute event rate for a given method. The rate is the number of event (invocations + backedges)
|
// Compute event rate for a given method. The rate is the number of event (invocations + backedges)
|
||||||
// per millisecond.
|
// per millisecond.
|
||||||
inline static void update_rate(jlong t, Method* m);
|
inline static void update_rate(jlong t, const methodHandle& method);
|
||||||
// Compute threshold scaling coefficient
|
// Compute threshold scaling coefficient
|
||||||
inline static double threshold_scale(CompLevel level, int feedback_k);
|
inline static double threshold_scale(CompLevel level, int feedback_k);
|
||||||
// If a method is old enough and is still in the interpreter we would want to
|
// If a method is old enough and is still in the interpreter we would want to
|
||||||
@ -219,7 +219,7 @@ class CompilationPolicy : AllStatic {
|
|||||||
static void compile(const methodHandle& mh, int bci, CompLevel level, TRAPS);
|
static void compile(const methodHandle& mh, int bci, CompLevel level, TRAPS);
|
||||||
// Simple methods are as good being compiled with C1 as C2.
|
// Simple methods are as good being compiled with C1 as C2.
|
||||||
// This function tells if it's such a function.
|
// This function tells if it's such a function.
|
||||||
inline static bool is_trivial(Method* method);
|
inline static bool is_trivial(const methodHandle& method);
|
||||||
// Force method to be compiled at CompLevel_simple?
|
// Force method to be compiled at CompLevel_simple?
|
||||||
inline static bool force_comp_at_level_simple(const methodHandle& method);
|
inline static bool force_comp_at_level_simple(const methodHandle& method);
|
||||||
|
|
||||||
|
@ -267,12 +267,11 @@ void CompilerConfig::set_legacy_emulation_flags() {
|
|||||||
FLAG_SET_ERGO(Tier0BackedgeNotifyFreqLog, MAX2<intx>(10, osr_threshold_log));
|
FLAG_SET_ERGO(Tier0BackedgeNotifyFreqLog, MAX2<intx>(10, osr_threshold_log));
|
||||||
}
|
}
|
||||||
// Adjust the tiered policy flags to approximate the legacy behavior.
|
// Adjust the tiered policy flags to approximate the legacy behavior.
|
||||||
if (CompilerConfig::is_c1_only()) {
|
FLAG_SET_ERGO(Tier3InvocationThreshold, threshold);
|
||||||
FLAG_SET_ERGO(Tier3InvocationThreshold, threshold);
|
FLAG_SET_ERGO(Tier3MinInvocationThreshold, threshold);
|
||||||
FLAG_SET_ERGO(Tier3MinInvocationThreshold, threshold);
|
FLAG_SET_ERGO(Tier3CompileThreshold, threshold);
|
||||||
FLAG_SET_ERGO(Tier3CompileThreshold, threshold);
|
FLAG_SET_ERGO(Tier3BackEdgeThreshold, osr_threshold);
|
||||||
FLAG_SET_ERGO(Tier3BackEdgeThreshold, osr_threshold);
|
if (CompilerConfig::is_c2_or_jvmci_compiler_only()) {
|
||||||
} else {
|
|
||||||
FLAG_SET_ERGO(Tier4InvocationThreshold, threshold);
|
FLAG_SET_ERGO(Tier4InvocationThreshold, threshold);
|
||||||
FLAG_SET_ERGO(Tier4MinInvocationThreshold, threshold);
|
FLAG_SET_ERGO(Tier4MinInvocationThreshold, threshold);
|
||||||
FLAG_SET_ERGO(Tier4CompileThreshold, threshold);
|
FLAG_SET_ERGO(Tier4CompileThreshold, threshold);
|
||||||
@ -338,6 +337,20 @@ void CompilerConfig::set_compilation_policy_flags() {
|
|||||||
if (FLAG_IS_DEFAULT(Tier4BackEdgeThreshold)) {
|
if (FLAG_IS_DEFAULT(Tier4BackEdgeThreshold)) {
|
||||||
FLAG_SET_DEFAULT(Tier4BackEdgeThreshold, 15000);
|
FLAG_SET_DEFAULT(Tier4BackEdgeThreshold, 15000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FLAG_IS_DEFAULT(Tier3InvocationThreshold)) {
|
||||||
|
FLAG_SET_DEFAULT(Tier3InvocationThreshold, Tier4InvocationThreshold);
|
||||||
|
}
|
||||||
|
if (FLAG_IS_DEFAULT(Tier3MinInvocationThreshold)) {
|
||||||
|
FLAG_SET_DEFAULT(Tier3MinInvocationThreshold, Tier4MinInvocationThreshold);
|
||||||
|
}
|
||||||
|
if (FLAG_IS_DEFAULT(Tier3CompileThreshold)) {
|
||||||
|
FLAG_SET_DEFAULT(Tier3CompileThreshold, Tier4CompileThreshold);
|
||||||
|
}
|
||||||
|
if (FLAG_IS_DEFAULT(Tier3BackEdgeThreshold)) {
|
||||||
|
FLAG_SET_DEFAULT(Tier3BackEdgeThreshold, Tier4BackEdgeThreshold);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale tiered compilation thresholds.
|
// Scale tiered compilation thresholds.
|
||||||
|
@ -217,6 +217,12 @@
|
|||||||
"do not start profiling in the interpreter") \
|
"do not start profiling in the interpreter") \
|
||||||
range(0, max_jint) \
|
range(0, max_jint) \
|
||||||
\
|
\
|
||||||
|
product(intx, TieredOldPercentage, 1000, DIAGNOSTIC, \
|
||||||
|
"Percentage over tier 3 thresholds after which a method is " \
|
||||||
|
"considered old (turns off parts of prioritization based on " \
|
||||||
|
"compile queue length)") \
|
||||||
|
range(0, max_jint) \
|
||||||
|
\
|
||||||
product(intx, Tier3DelayOn, 5, \
|
product(intx, Tier3DelayOn, 5, \
|
||||||
"If C2 queue size grows over this amount per compiler thread " \
|
"If C2 queue size grows over this amount per compiler thread " \
|
||||||
"stop compiling at tier 3 and start compiling at tier 2") \
|
"stop compiling at tier 3 and start compiling at tier 2") \
|
||||||
@ -248,8 +254,7 @@
|
|||||||
\
|
\
|
||||||
product(intx, Tier0ProfilingStartPercentage, 200, \
|
product(intx, Tier0ProfilingStartPercentage, 200, \
|
||||||
"Start profiling in interpreter if the counters exceed the " \
|
"Start profiling in interpreter if the counters exceed the " \
|
||||||
"specified percentage of tier 3 thresholds (tier 4 thresholds " \
|
"specified percentage of tier 3 thresholds") \
|
||||||
"with CompilationMode=high-only|high-only-quick-internal)") \
|
|
||||||
range(0, max_jint) \
|
range(0, max_jint) \
|
||||||
\
|
\
|
||||||
product(uintx, IncreaseFirstTierCompileThresholdAt, 50, \
|
product(uintx, IncreaseFirstTierCompileThresholdAt, 50, \
|
||||||
|
@ -67,10 +67,6 @@ compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java 8183263 generic-x64
|
|||||||
|
|
||||||
compiler/c2/Test8004741.java 8235801 generic-all
|
compiler/c2/Test8004741.java 8235801 generic-all
|
||||||
|
|
||||||
compiler/whitebox/ClearMethodStateTest.java 8265360 macosx-all
|
|
||||||
compiler/whitebox/EnqueueMethodForCompilationTest.java 8265360 macosx-all
|
|
||||||
compiler/whitebox/MakeMethodNotCompilableTest.java 8265360 macosx-all
|
|
||||||
|
|
||||||
compiler/codecache/jmx/PoolsIndependenceTest.java 8264632 macosx-all
|
compiler/codecache/jmx/PoolsIndependenceTest.java 8264632 macosx-all
|
||||||
compiler/codecache/TestStressCodeBuffers.java 8272094 generic-aarch64
|
compiler/codecache/TestStressCodeBuffers.java 8272094 generic-aarch64
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user