Merge
authorecaspole
Tue, 08 Jan 2019 10:29:02 -0500
changeset 53196 48d09a9f4d2b
parent 53195 9fff411880fb (current diff)
parent 53194 c4a64760b1b0 (diff)
child 53197 c92f4465fff1
child 57101 2c738ab1d1cf
Merge
--- a/src/hotspot/share/runtime/compilationPolicy.cpp	Tue Jan 08 10:28:28 2019 -0500
+++ b/src/hotspot/share/runtime/compilationPolicy.cpp	Tue Jan 08 10:29:02 2019 -0500
@@ -40,7 +40,6 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.hpp"
 #include "runtime/tieredThresholdPolicy.hpp"
-#include "runtime/timer.hpp"
 #include "runtime/vframe.hpp"
 #include "runtime/vmOperations.hpp"
 #include "utilities/events.hpp"
@@ -54,7 +53,6 @@
 #endif
 
 CompilationPolicy* CompilationPolicy::_policy;
-elapsedTimer       CompilationPolicy::_accumulated_time;
 
 // Determine compilation policy based on command line argument
 void compilationPolicy_init() {
@@ -198,12 +196,6 @@
 }
 
 #ifndef PRODUCT
-void CompilationPolicy::print_time() {
-  tty->print_cr ("Accumulated compilationPolicy times:");
-  tty->print_cr ("---------------------------");
-  tty->print_cr ("  Total: %3.3f sec.", _accumulated_time.seconds());
-}
-
 void NonTieredCompPolicy::trace_osr_completion(nmethod* osr_nm) {
   if (TraceOnStackReplacement) {
     if (osr_nm == NULL) tty->print_cr("compilation failed");
@@ -537,11 +529,6 @@
     assert(fr.is_interpreted_frame(), "must be interpreted");
     assert(fr.interpreter_frame_method() == m(), "bad method");
 
-    if (TraceCompilationPolicy) {
-      tty->print("method invocation trigger: ");
-      m->print_short_name(tty);
-      tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", p2i((address)m()), m->code_size());
-    }
     RegisterMap reg_map(thread, false);
     javaVFrame* triggerVF = thread->last_java_vframe(&reg_map);
     // triggerVF is the frame that triggered its counter
@@ -549,15 +536,11 @@
 
     if (first->top_method()->code() != NULL) {
       // called obsolete method/nmethod -- no need to recompile
-      if (TraceCompilationPolicy) tty->print_cr(" --> " INTPTR_FORMAT, p2i(first->top_method()->code()));
     } else {
-      if (TimeCompilationPolicy) accumulated_time()->start();
       GrowableArray<RFrame*>* stack = new GrowableArray<RFrame*>(50);
       stack->push(first);
       RFrame* top = findTopInlinableFrame(stack);
-      if (TimeCompilationPolicy) accumulated_time()->stop();
       assert(top != NULL, "findTopInlinableFrame returned null");
-      if (TraceCompilationPolicy) top->print();
       CompileBroker::compile_method(top->top_method(), InvocationEntryBci, comp_level,
                                     m, hot_count, CompileTask::Reason_InvocationCount, thread);
     }
@@ -592,12 +575,6 @@
     Method* m = current->top_method();
     Method* next_m = next->top_method();
 
-    if (TraceCompilationPolicy && Verbose) {
-      tty->print("[caller: ");
-      next_m->print_short_name(tty);
-      tty->print("] ");
-    }
-
     if( !Inline ) {           // Inlining turned off
       msg = "Inlining turned off";
       break;
@@ -673,19 +650,11 @@
       break;
     }
 
-    if (TraceCompilationPolicy && Verbose) {
-      tty->print("\n\t     check caller: ");
-      next_m->print_short_name(tty);
-      tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", p2i((address)next_m), next_m->code_size());
-    }
-
     current = next;
   }
 
   assert( !current || !current->is_compiled(), "" );
 
-  if (TraceCompilationPolicy && msg) tty->print("(%s)\n", msg);
-
   return current;
 }
 
--- a/src/hotspot/share/runtime/compilationPolicy.hpp	Tue Jan 08 10:28:28 2019 -0500
+++ b/src/hotspot/share/runtime/compilationPolicy.hpp	Tue Jan 08 10:29:02 2019 -0500
@@ -40,10 +40,6 @@
 
 class CompilationPolicy : public CHeapObj<mtCompiler> {
   static CompilationPolicy* _policy;
-  // Accumulated time
-  static elapsedTimer       _accumulated_time;
-
-  static bool               _in_vm_startup;
 
   // m must be compiled before executing it
   static bool must_be_compiled(const methodHandle& m, int comp_level = CompLevel_all);
@@ -63,9 +59,6 @@
 
   static CompileTask* select_task_helper(CompileQueue* compile_queue);
 
-  // Profiling
-  elapsedTimer* accumulated_time() { return &_accumulated_time; }
-  void print_time() PRODUCT_RETURN;
   // Return initial compile level that is used with Xcomp
   virtual CompLevel initial_compile_level() = 0;
   virtual int compiler_count(CompLevel comp_level) = 0;
--- a/src/hotspot/share/runtime/globals.hpp	Tue Jan 08 10:28:28 2019 -0500
+++ b/src/hotspot/share/runtime/globals.hpp	Tue Jan 08 10:29:02 2019 -0500
@@ -1496,12 +1496,6 @@
   product(bool, UseCompiler, true,                                          \
           "Use Just-In-Time compilation")                                   \
                                                                             \
-  develop(bool, TraceCompilationPolicy, false,                              \
-          "Trace compilation policy")                                       \
-                                                                            \
-  develop(bool, TimeCompilationPolicy, false,                               \
-          "Time the compilation policy")                                    \
-                                                                            \
   product(bool, UseCounterDecay, true,                                      \
           "Adjust recompilation counters")                                  \
                                                                             \
--- a/src/hotspot/share/runtime/java.cpp	Tue Jan 08 10:28:28 2019 -0500
+++ b/src/hotspot/share/runtime/java.cpp	Tue Jan 08 10:29:02 2019 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -292,9 +292,6 @@
 
   print_method_profiling_data();
 
-  if (TimeCompilationPolicy) {
-    CompilationPolicy::policy()->print_time();
-  }
   if (TimeOopMap) {
     GenerateOopMap::print_time();
   }