Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/compilationPolicy.cpp @ 10409:36bcc10e01c0
merge fixes
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 15:37:32 +0200 |
parents | 836a62f43af9 |
children | 88672775a26c |
line wrap: on
line diff
--- a/src/share/vm/runtime/compilationPolicy.cpp Wed Jun 19 10:45:56 2013 +0200 +++ b/src/share/vm/runtime/compilationPolicy.cpp Wed Jun 19 15:37:32 2013 +0200 @@ -482,8 +482,9 @@ void GraalCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) { MethodCounters* mcs = m->method_counters(); + assert(mcs != NULL, "method counters should be initialized"); int hot_count = m->invocation_count(); - jlong hot_time = (mcs == NULL) ? 0 : mcs->graal_invocation_time(); + jlong hot_time = mcs->graal_invocation_time(); reset_counter_for_invocation_event(m); if (is_compilation_enabled() && can_be_compiled(m)) { @@ -497,18 +498,18 @@ } if (UseNewCode) { if (m->queued_for_compilation()) { - if (time_per_call < (m->graal_priority() / 5)) { - m->set_graal_priority(time_per_call); + if (time_per_call < (mcs->graal_priority() / 5)) { + mcs->set_graal_priority(time_per_call); m->clear_queued_for_compilation(); } } else { - if (time_per_call < m->graal_priority()) { - m->set_graal_priority(time_per_call); + if (time_per_call < mcs->graal_priority()) { + mcs->set_graal_priority(time_per_call); } } } else { - if (time_per_call < m->graal_priority()) { - m->set_graal_priority(time_per_call); + if (time_per_call < mcs->graal_priority()) { + mcs->set_graal_priority(time_per_call); } } }