--- old/src/share/vm/opto/compile.cpp 2015-10-02 15:58:58.330706718 +0200 +++ new/src/share/vm/opto/compile.cpp 2015-10-02 15:58:58.218706722 +0200 @@ -464,7 +464,7 @@ Type::Initialize(compile); _compile->set_scratch_buffer_blob(NULL); _compile->begin_method(); - _compile->clone_map().set_debug(_compile->has_method() && _compile->method_has_option(_compile->clone_map().debug_option_name)); + _compile->clone_map().set_debug(_compile->has_method() && _compile->directive()->CloneMapDebugOption); } CompileWrapper::~CompileWrapper() { _compile->end_method(); @@ -496,7 +496,7 @@ tty->print_cr("** Bailout: Recompile without boxing elimination **"); tty->print_cr("*********************************************************"); } - if (env()->break_at_compile()) { + if (C->directive()->BreakAtCompileOption) { // Open the debugger when compiling this method. tty->print("### Breaking when compiling: "); method()->print_short_name(); @@ -617,9 +617,10 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, - bool subsume_loads, bool do_escape_analysis, bool eliminate_boxing ) + bool subsume_loads, bool do_escape_analysis, bool eliminate_boxing, DirectiveSet* directive) : Phase(Compiler), _env(ci_env), + _directive(directive), _log(ci_env->log()), _compile_id(ci_env->compile_id()), _save_argument_registers(false), @@ -649,7 +650,7 @@ _dead_node_list(comp_arena()), _dead_node_count(0), #ifndef PRODUCT - _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")), + _trace_opto_output(directive->TraceOptoOutputOption), _in_dump_cnt(0), _printer(IdealGraphPrinter::printer()), #endif @@ -687,9 +688,9 @@ TraceTime t2(NULL, &_t_methodCompilation, CITime, false); #ifndef PRODUCT - bool print_opto_assembly = PrintOptoAssembly || _method->has_option("PrintOptoAssembly"); + bool print_opto_assembly = directive->PrintOptoAssemblyOption; if (!print_opto_assembly) { - bool print_assembly = (PrintAssembly || _method->should_print_assembly()); + bool print_assembly = directive->PrintAssemblyOption; if (print_assembly && !Disassembler::can_decode()) { tty->print_cr("PrintAssembly request changed to PrintOptoAssembly"); print_opto_assembly = true; @@ -698,12 +699,12 @@ set_print_assembly(print_opto_assembly); set_parsed_irreducible_loop(false); - if (method()->has_option("ReplayInline")) { + if (directive->ReplayInlineOption) { _replay_inline_data = ciReplay::load_inline_data(method(), entry_bci(), ci_env->comp_level()); } #endif - set_print_inlining(PrintInlining || method()->has_option("PrintInlining") NOT_PRODUCT( || PrintOptoInlining)); - set_print_intrinsics(PrintIntrinsics || method()->has_option("PrintIntrinsics")); + set_print_inlining(directive->PrintInliningOption NOT_PRODUCT( || PrintOptoInlining)); + set_print_intrinsics(directive->PrintIntrinsicsOption); set_has_irreducible_loop(true); // conservative until build_loop_tree() reset it if (ProfileTraps RTM_OPT_ONLY( || UseRTMLocking )) { @@ -837,7 +838,7 @@ // Drain the list. Finish_Warm(); #ifndef PRODUCT - if (_printer && _printer->should_print(_method)) { + if (_printer && _printer->should_print(1)) { _printer->print_inlining(this); } #endif @@ -871,10 +872,10 @@ NOT_PRODUCT( verify_barriers(); ) // Dump compilation data to replay it. - if (method()->has_option("DumpReplay")) { + if (directive->DumpReplayOption) { env()->dump_replay_data(_compile_id); } - if (method()->has_option("DumpInline") && (ilt() != NULL)) { + if (directive->DumpInlineOption && (ilt() != NULL)) { env()->dump_inline_data(_compile_id); } @@ -918,9 +919,9 @@ frame_size_in_words(), _oop_map_set, &_handler_table, &_inc_table, compiler, - env()->comp_level(), has_unsafe_access(), SharedRuntime::is_wide_vector(max_vector_size()), + _directive, rtm_state() ); @@ -938,9 +939,11 @@ int is_fancy_jump, bool pass_tls, bool save_arg_registers, - bool return_pc ) + bool return_pc, + DirectiveSet* directive) : Phase(Compiler), _env(ci_env), + _directive(directive), _log(ci_env->log()), _compile_id(0), _save_argument_registers(save_arg_registers), @@ -1090,7 +1093,7 @@ Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist)); set_decompile_count(0); - set_do_freq_based_layout(BlockLayoutByFrequency || method_has_option("BlockLayoutByFrequency")); + set_do_freq_based_layout(_directive->BlockLayoutByFrequencyOption); set_num_loop_opts(LoopOptsCount); set_do_inlining(Inline); set_max_inline_size(MaxInlineSize); @@ -1103,7 +1106,7 @@ bool do_vector = false; if (AllowVectorizeOnDemand) { - if (has_method() && (method()->has_option("Vectorize") || method()->has_option("VectorizeDebug"))) { + if (has_method() && (_directive->VectorizeOption || _directive->VectorizeDebugOption)) { set_do_vector_loop(true); } else if (has_method() && method()->name() != 0 && method()->intrinsic_id() == vmIntrinsics::_forEachRemaining) { @@ -1118,7 +1121,8 @@ set_age_code(has_method() && method()->profile_aging()); set_rtm_state(NoRTM); // No RTM lock eliding by default - method_has_option_value("MaxNodeLimit", _max_node_limit); + _max_node_limit = _directive->MaxNodeLimitOption; + #if INCLUDE_RTM_OPT if (UseRTMLocking && has_method() && (method()->method_data_or_null() != NULL)) { int rtm_state = method()->method_data()->rtm_state(); @@ -2091,7 +2095,7 @@ TracePhase tp("optimizer", &timers[_t_optimizer]); #ifndef PRODUCT - if (env()->break_at_compile()) { + if (_directive->BreakAtCompileOption) { BREAKPOINT; } @@ -4355,7 +4359,6 @@ return (os::random() & RANDOMIZED_DOMAIN_MASK) < (RANDOMIZED_DOMAIN / count); } -const char* CloneMap::debug_option_name = "CloneMapDebug"; CloneMap& Compile::clone_map() { return _clone_map; } void Compile::set_clone_map(Dict* d) { _clone_map._dict = d; }