src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/compile.cpp	Wed Oct  7 12:14:51 2015
--- new/src/share/vm/opto/compile.cpp	Wed Oct  7 12:14:51 2015

*** 462,472 **** --- 462,472 ---- compile->set_indexSet_free_block_list(NULL); compile->init_type_arena(); 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(); if (_compile->scratch_buffer_blob() != NULL) BufferBlob::free(_compile->scratch_buffer_blob());
*** 494,504 **** --- 494,504 ---- // Recompiling without boxing elimination tty->print_cr("*********************************************************"); 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(); tty->cr(); BREAKPOINT;
*** 615,627 **** --- 615,628 ---- // Compile a method. entry_bci is -1 for normal compilations and indicates // the continuation bci for on stack replacement. Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, ! 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), _stub_name(NULL), _stub_function(NULL),
*** 647,657 **** --- 648,658 ---- _scratch_const_size(-1), _in_scratch_emit_size(false), _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 _congraph(NULL), _comp_arena(mtCompiler),
*** 671,681 **** --- 672,686 ---- _print_inlining_idx(0), _print_inlining_output(NULL), _interpreter_frame_size(0), _max_node_limit(MaxNodeLimit) { C = this; + #ifndef PRODUCT + if (_printer != NULL) { + _printer->set_compile(this); + } + #endif CompileWrapper cw(this); if (CITimeVerbose) { tty->print(" "); target->holder()->name()->print();
*** 685,711 **** --- 690,716 ---- } TraceTime t1("Total compilation time", &_t_totalCompilation, CITime, CITimeVerbose); 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; } } 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 )) { // Make sure the method being compiled gets its own MDO, // so we can at least track the decompile_count().
*** 835,846 **** --- 840,851 ---- } // Drain the list. Finish_Warm(); #ifndef PRODUCT ! if (_printer && _printer->should_print(_method)) { - _printer->print_inlining(this); ! if (_printer && _printer->should_print(1)) { ! _printer->print_inlining(); } #endif if (failing()) return; NOT_PRODUCT( verify_graph_edges(); )
*** 869,882 **** --- 874,887 ---- #endif 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); } // Now that we know the size of all the monitors we can add a fixed slot // for the original deopt pc.
*** 916,928 **** --- 921,933 ---- _orig_pc_slot_offset_in_bytes, code_buffer(), 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() ); if (log() != NULL) // Print code cache state into compiler log log()->code_cache_state();
*** 936,948 **** --- 941,955 ---- address stub_function, const char *stub_name, 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), _method(NULL), _stub_name(stub_name),
*** 1088,1098 **** --- 1095,1105 ---- set_has_unsafe_access(false); set_max_vector_size(0); 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); set_freq_inline_size(FreqInlineSize); set_do_scheduling(OptoScheduling);
*** 1101,1111 **** --- 1108,1118 ---- set_do_vector_loop(false); 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) { set_do_vector_loop(true); }
*** 1116,1126 **** --- 1123,1134 ---- #endif } 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(); if (method_has_option("NoRTMLockEliding") || ((rtm_state & NoRTM) != 0)) { // Don't generate RTM lock eliding code.
*** 2089,2099 **** --- 2097,2107 ---- // Given a graph, optimize it. void Compile::Optimize() { TracePhase tp("optimizer", &timers[_t_optimizer]); #ifndef PRODUCT ! if (env()->break_at_compile()) { ! if (_directive->BreakAtCompileOption) { BREAKPOINT; } #endif
*** 4353,4363 **** --- 4361,4370 ---- bool Compile::randomized_select(int count) { assert(count > 0, "only positive"); 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; } void NodeCloneInfo::dump() const { tty->print(" {%d:%d} ", idx(), gen());

src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File