diff -r 7801367e3cc9 -r 6e4a84748e2c hotspot/src/share/vm/runtime/compilationPolicy.cpp --- a/hotspot/src/share/vm/runtime/compilationPolicy.cpp Thu Jul 27 15:36:15 2017 +0200 +++ b/hotspot/src/share/vm/runtime/compilationPolicy.cpp Thu Jul 27 18:06:41 2017 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -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) {