hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp
changeset 46727 6e4a84748e2c
parent 46630 75aa3e39d02c
--- a/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Thu Jul 27 15:36:15 2017 +0200
+++ b/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp	Thu Jul 27 18:06:41 2017 -0400
@@ -32,7 +32,7 @@
 
 #ifdef TIERED
 // Print an event.
-void AdvancedThresholdPolicy::print_specific(EventType type, methodHandle mh, methodHandle imh,
+void AdvancedThresholdPolicy::print_specific(EventType type, const methodHandle& mh, const methodHandle& imh,
                                              int bci, CompLevel level) {
   tty->print(" rate=");
   if (mh->prev_time() == 0) tty->print("n/a");
@@ -339,7 +339,7 @@
 }
 
 // Create MDO if necessary.
-void AdvancedThresholdPolicy::create_mdo(methodHandle mh, JavaThread* THREAD) {
+void AdvancedThresholdPolicy::create_mdo(const methodHandle& mh, JavaThread* THREAD) {
   if (mh->is_native() ||
       mh->is_abstract() ||
       mh->is_accessor() ||
@@ -546,7 +546,7 @@
   CompileBroker::compile_method(mh, bci, level, mh, hot_count, CompileTask::Reason_Tiered, thread);
 }
 
-bool AdvancedThresholdPolicy::maybe_switch_to_aot(methodHandle mh, CompLevel cur_level, CompLevel next_level, JavaThread* thread) {
+bool AdvancedThresholdPolicy::maybe_switch_to_aot(const methodHandle& mh, CompLevel cur_level, CompLevel next_level, JavaThread* thread) {
   if (UseAOT && !delay_compilation_during_startup()) {
     if (cur_level == CompLevel_full_profile || cur_level == CompLevel_none) {
       // If the current level is full profile or interpreter and we're switching to any other level,