diff src/share/vm/classfile/classLoader.cpp @ 3837:43f9d800f276

7066339: Tiered: policy should make consistent decisions about osr levels Summary: Added feedback disabling flag to common(), fixed handling of TieredStopAtLevel. Reviewed-by: kvn, never
author iveresov
date Wed, 20 Jul 2011 18:04:17 -0700
parents 1d1603768966
children f08d439fab8c
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoader.cpp	Fri Jul 15 15:35:50 2011 -0700
+++ b/src/share/vm/classfile/classLoader.cpp	Wed Jul 20 18:04:17 2011 -0700
@@ -1350,13 +1350,13 @@
                 _codecache_sweep_counter = 0;
               }
               // Force compilation
-              CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_initial_compile,
+              CompileBroker::compile_method(m, InvocationEntryBci, CompilationPolicy::policy()->initial_compile_level(),
                                             methodHandle(), 0, "CTW", THREAD);
               if (HAS_PENDING_EXCEPTION) {
                 clear_pending_exception_if_not_oom(CHECK);
                 tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_counter, m->name()->as_C_string());
               }
-              if (TieredCompilation) {
+              if (TieredCompilation && TieredStopAtLevel >= CompLevel_full_optimization) {
                 // Clobber the first compile and force second tier compilation
                 nmethod* nm = m->code();
                 if (nm != NULL) {