--- old/src/share/vm/runtime/compilationPolicy.hpp 2016-04-27 16:37:22.000000000 -0700 +++ new/src/share/vm/runtime/compilationPolicy.hpp 2016-04-27 16:37:22.000000000 -0700 @@ -43,13 +43,19 @@ static elapsedTimer _accumulated_time; static bool _in_vm_startup; + + // m must be compiled before executing it + static bool must_be_compiled(methodHandle m, int comp_level = CompLevel_all); + public: static void set_in_vm_startup(bool in_vm_startup) { _in_vm_startup = in_vm_startup; } static void completed_vm_startup(); static bool delay_compilation_during_startup() { return _in_vm_startup; } - // m must be compiled before executing it - static bool must_be_compiled(methodHandle m, int comp_level = CompLevel_all); + // If m must_be_compiled then request a compilation from the CompileBroker. + // This supports the -Xcomp option. + static void compile_if_required(methodHandle m, TRAPS); + // m is allowed to be compiled static bool can_be_compiled(methodHandle m, int comp_level = CompLevel_all); // m is allowed to be osr compiled