--- old/src/share/vm/runtime/compilationPolicy.cpp 2017-07-27 08:53:50.781569241 -0400 +++ new/src/share/vm/runtime/compilationPolicy.cpp 2017-07-27 08:53:50.553913753 -0400 @@ -96,7 +96,7 @@ // Returns true if m must be compiled before executing it // This is intended to force compiles for methods (usually for // debugging) that would otherwise be interpreted for some reason. -bool CompilationPolicy::must_be_compiled(methodHandle m, int comp_level) { +bool CompilationPolicy::must_be_compiled(const methodHandle& m, int comp_level) { // Don't allow Xcomp to cause compiles in replay mode if (ReplayCompiles) return false; @@ -107,7 +107,7 @@ (UseCompiler && AlwaysCompileLoopMethods && m->has_loops() && CompileBroker::should_compile_new_jobs()); // eagerly compile loop methods } -void CompilationPolicy::compile_if_required(methodHandle selected_method, TRAPS) { +void CompilationPolicy::compile_if_required(const methodHandle& selected_method, TRAPS) { if (must_be_compiled(selected_method)) { // This path is unusual, mostly used by the '-Xcomp' stress test mode. @@ -135,7 +135,7 @@ } // Returns true if m is allowed to be compiled -bool CompilationPolicy::can_be_compiled(methodHandle m, int comp_level) { +bool CompilationPolicy::can_be_compiled(const methodHandle& m, int comp_level) { // allow any levels for WhiteBox assert(WhiteBoxAPI || comp_level == CompLevel_all || is_compile(comp_level), "illegal compilation level"); @@ -166,7 +166,7 @@ } // Returns true if m is allowed to be osr compiled -bool CompilationPolicy::can_be_osr_compiled(methodHandle m, int comp_level) { +bool CompilationPolicy::can_be_osr_compiled(const methodHandle& m, int comp_level) { bool result = false; if (comp_level == CompLevel_all) { if (TieredCompilation) {