diff src/share/vm/compiler/compileBroker.cpp @ 20489:966205f0e717

8058564: Tiered compilation performance drop in PIT Summary: Ensure MethodCounters are created before method is enqueued for compilation Reviewed-by: kvn, drchase, jiangli, roland
author iveresov
date Fri, 19 Sep 2014 11:53:58 -0700
parents dd89808e49ba
children b9c94af14fd0
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp	Fri Sep 19 11:12:39 2014 -0400
+++ b/src/share/vm/compiler/compileBroker.cpp	Fri Sep 19 11:53:58 2014 -0700
@@ -1175,6 +1175,12 @@
     return;
   }
 
+  if (TieredCompilation) {
+    // Tiered policy requires MethodCounters to exist before adding a method to
+    // the queue. Create if we don't have them yet.
+    method->get_method_counters(thread);
+  }
+
   // Outputs from the following MutexLocker block:
   CompileTask* task     = NULL;
   bool         blocking = false;