# HG changeset patch # Parent 16562060df599f263d06596d36c759c36f084fc4 diff -r 16562060df59 src/cpu/ppc/vm/cppInterpreter_ppc.cpp --- a/src/cpu/ppc/vm/cppInterpreter_ppc.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/cpu/ppc/vm/cppInterpreter_ppc.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -2697,7 +2697,7 @@ // Provide a debugger breakpoint in the frame manager if breakpoints // in osr'd methods are requested. #ifdef COMPILER2 - NOT_PRODUCT( if (OptoBreakpointOSR) { __ illtrap(); } ) + if (OptoBreakpointOSR) { __ illtrap(); } #endif // Load callee's pointer to locals array from callee's state. diff -r 16562060df59 src/cpu/sparc/vm/vm_version_sparc.cpp --- a/src/cpu/sparc/vm/vm_version_sparc.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/cpu/sparc/vm/vm_version_sparc.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -358,7 +358,6 @@ FLAG_SET_DEFAULT(UseUnalignedAccesses, false); } -#ifndef PRODUCT if (PrintMiscellaneous && Verbose) { tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size()); tty->print_cr("L2 data cache line size: %u", L2_data_cache_line_size()); @@ -391,7 +390,6 @@ tty->print_cr("ContendedPaddingWidth %d", (int) ContendedPaddingWidth); } } -#endif // PRODUCT } void VM_Version::print_features() { @@ -400,7 +398,7 @@ int VM_Version::determine_features() { if (UseV8InstrsOnly) { - NOT_PRODUCT(if (PrintMiscellaneous && Verbose) tty->print_cr("Version is Forced-V8");) + if (PrintMiscellaneous && Verbose) { tty->print_cr("Version is Forced-V8"); } return generic_v8_m; } @@ -416,12 +414,12 @@ if (is_T_family(features)) { // Happy to accomodate... } else { - NOT_PRODUCT(if (PrintMiscellaneous && Verbose) tty->print_cr("Version is Forced-Niagara");) + if (PrintMiscellaneous && Verbose) { tty->print_cr("Version is Forced-Niagara"); } features |= T_family_m; } } else { if (is_T_family(features) && !FLAG_IS_DEFAULT(UseNiagaraInstrs)) { - NOT_PRODUCT(if (PrintMiscellaneous && Verbose) tty->print_cr("Version is Forced-Not-Niagara");) + if (PrintMiscellaneous && Verbose) { tty->print_cr("Version is Forced-Not-Niagara"); } features &= ~(T_family_m | T1_model_m); } else { // Happy to accomodate... diff -r 16562060df59 src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp --- a/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -66,12 +66,12 @@ features = generic_v9_m; if (detect_niagara()) { - NOT_PRODUCT(if (PrintMiscellaneous && Verbose) tty->print_cr("Detected Linux on Niagara");) + if (PrintMiscellaneous && Verbose) { tty->print_cr("Detected Linux on Niagara"); } features = niagara1_m | T_family_m; } if (detect_M_family()) { - NOT_PRODUCT(if (PrintMiscellaneous && Verbose) tty->print_cr("Detected Linux on M family");) + if (PrintMiscellaneous && Verbose) { tty->print_cr("Detected Linux on M family"); } features = sun4v_m | generic_v9_m | M_family_m | T_family_m; } diff -r 16562060df59 src/share/vm/c1/c1_GraphBuilder.cpp --- a/src/share/vm/c1/c1_GraphBuilder.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -707,12 +707,10 @@ BlockBegin* block = bci2block()->at(bci); if (block != NULL && block == parent()->bci2block()->at(bci)) { BlockBegin* new_block = new BlockBegin(block->bci()); -#ifndef PRODUCT if (PrintInitialBlockList) { tty->print_cr("CFG: cloned block %d (bci %d) as block %d for jsr", block->block_id(), block->bci(), new_block->block_id()); } -#endif // copy data from cloned blocked new_block->set_depth_first_number(block->depth_first_number()); if (block->is_set(BlockBegin::parser_loop_header_flag)) new_block->set(BlockBegin::parser_loop_header_flag); @@ -3785,12 +3783,10 @@ cont = new BlockBegin(next_bci()); // low number so that continuation gets parsed as early as possible cont->set_depth_first_number(0); -#ifndef PRODUCT if (PrintInitialBlockList) { tty->print_cr("CFG: created block %d (bci %d) as continuation for inline at bci %d", cont->block_id(), cont->bci(), bci()); } -#endif continuation_existed = false; } // Record number of predecessors of continuation block before diff -r 16562060df59 src/share/vm/code/codeCache.cpp --- a/src/share/vm/code/codeCache.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/code/codeCache.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -577,11 +577,9 @@ assert(cur->on_scavenge_root_list(), "else shouldn't be on this list"); bool is_live = (!cur->is_zombie() && !cur->is_unloaded()); -#ifndef PRODUCT if (TraceScavenge) { cur->print_on(tty, is_live ? "scavenge root" : "dead scavenge root"); tty->cr(); } -#endif //PRODUCT if (is_live) { // Perform cur->oops_do(f), maybe just once per nmethod. f->do_code_blob(cur); diff -r 16562060df59 src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/code/nmethod.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -2275,7 +2275,7 @@ break; } // Mark was clear when we first saw this guy. - NOT_PRODUCT(if (TraceScavenge) print_on(tty, "oops_do, mark")); + if (TraceScavenge) { print_on(tty, "oops_do, mark"); } return false; } } @@ -2284,7 +2284,7 @@ } void nmethod::oops_do_marking_prologue() { - NOT_PRODUCT(if (TraceScavenge) tty->print_cr("[oops_do_marking_prologue")); + if (TraceScavenge) { tty->print_cr("[oops_do_marking_prologue"); } assert(_oops_do_mark_nmethods == NULL, "must not call oops_do_marking_prologue twice in a row"); // We use cmpxchg_ptr instead of regular assignment here because the user // may fork a bunch of threads, and we need them all to see the same state. @@ -2300,13 +2300,13 @@ nmethod* next = cur->_oops_do_mark_link; cur->_oops_do_mark_link = NULL; cur->verify_oop_relocations(); - NOT_PRODUCT(if (TraceScavenge) cur->print_on(tty, "oops_do, unmark")); + if (TraceScavenge) { cur->print_on(tty, "oops_do, unmark"); } cur = next; } void* required = _oops_do_mark_nmethods; void* observed = Atomic::cmpxchg_ptr(NULL, &_oops_do_mark_nmethods, required); guarantee(observed == required, "no races in this sequential code"); - NOT_PRODUCT(if (TraceScavenge) tty->print_cr("oops_do_marking_epilogue]")); + if (TraceScavenge) { tty->print_cr("oops_do_marking_epilogue]"); } } class DetectScavengeRoot: public OopClosure { diff -r 16562060df59 src/share/vm/gc/cms/parNewGeneration.cpp --- a/src/share/vm/gc/cms/parNewGeneration.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/gc/cms/parNewGeneration.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -1162,7 +1162,6 @@ } assert(new_obj != NULL, "just checking"); -#ifndef PRODUCT // This code must come after the CAS test, or it will print incorrect // information. if (TraceScavenge) { @@ -1170,7 +1169,6 @@ is_in_reserved(new_obj) ? "copying" : "tenuring", new_obj->klass()->internal_name(), p2i(old), p2i(new_obj), new_obj->size()); } -#endif if (forward_ptr == NULL) { oop obj_to_push = new_obj; diff -r 16562060df59 src/share/vm/gc/cms/parOopClosures.inline.hpp --- a/src/share/vm/gc/cms/parOopClosures.inline.hpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/gc/cms/parOopClosures.inline.hpp Fri Nov 06 12:30:19 2015 +0100 @@ -108,14 +108,11 @@ if (m->is_marked()) { // Contains forwarding pointer. new_obj = ParNewGeneration::real_forwardee(obj); oopDesc::encode_store_heap_oop_not_null(p, new_obj); -#ifndef PRODUCT if (TraceScavenge) { gclog_or_tty->print_cr("{%s %s ( " PTR_FORMAT " ) " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", "forwarded ", new_obj->klass()->internal_name(), p2i(p), p2i((void *)obj), p2i((void *)new_obj), new_obj->size()); } -#endif - } else { size_t obj_sz = obj->size_given_klass(objK); new_obj = _g->copy_to_survivor_space(_par_scan_state, obj, obj_sz, m); diff -r 16562060df59 src/share/vm/gc/parallel/psPromotionManager.cpp --- a/src/share/vm/gc/parallel/psPromotionManager.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/gc/parallel/psPromotionManager.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -430,7 +430,6 @@ obj = obj->forwardee(); } -#ifndef PRODUCT if (TraceScavenge) { gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " (%d)}", "promotion-failure", @@ -438,7 +437,6 @@ p2i(obj), obj->size()); } -#endif return obj; } diff -r 16562060df59 src/share/vm/gc/parallel/psPromotionManager.inline.hpp --- a/src/share/vm/gc/parallel/psPromotionManager.inline.hpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/gc/parallel/psPromotionManager.inline.hpp Fri Nov 06 12:30:19 2015 +0100 @@ -260,7 +260,6 @@ new_obj = o->forwardee(); } -#ifndef PRODUCT // This code must come after the CAS test, or it will print incorrect // information. if (TraceScavenge) { @@ -268,7 +267,6 @@ should_scavenge(&new_obj) ? "copying" : "tenuring", new_obj->klass()->internal_name(), p2i((void *)o), p2i((void *)new_obj), new_obj->size()); } -#endif return new_obj; } @@ -285,15 +283,13 @@ ? o->forwardee() : copy_to_survivor_space(o); -#ifndef PRODUCT // This code must come after the CAS test, or it will print incorrect // information. - if (TraceScavenge && o->is_forwarded()) { + if (TraceScavenge && o->is_forwarded()) { gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", "forwarding", new_obj->klass()->internal_name(), p2i((void *)o), p2i((void *)new_obj), new_obj->size()); } -#endif oopDesc::encode_store_heap_oop_not_null(p, new_obj); diff -r 16562060df59 src/share/vm/gc/parallel/psScavenge.inline.hpp --- a/src/share/vm/gc/parallel/psScavenge.inline.hpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/gc/parallel/psScavenge.inline.hpp Fri Nov 06 12:30:19 2015 +0100 @@ -138,7 +138,6 @@ // If the klass has not been dirtied we know that there's // no references into the young gen and we can skip it. -#ifndef PRODUCT if (TraceScavenge) { ResourceMark rm; gclog_or_tty->print_cr("PSScavengeKlassClosure::do_klass " PTR_FORMAT ", %s, dirty: %s", @@ -146,7 +145,6 @@ klass->external_name(), klass->has_modified_oops() ? "true" : "false"); } -#endif if (klass->has_modified_oops()) { // Clean the klass since we're going to scavenge all the metadata. diff -r 16562060df59 src/share/vm/gc/serial/defNewGeneration.cpp --- a/src/share/vm/gc/serial/defNewGeneration.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/gc/serial/defNewGeneration.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -134,7 +134,6 @@ void FastScanClosure::do_oop(narrowOop* p) { FastScanClosure::do_oop_work(p); } void KlassScanClosure::do_klass(Klass* klass) { -#ifndef PRODUCT if (TraceScavenge) { ResourceMark rm; gclog_or_tty->print_cr("KlassScanClosure::do_klass " PTR_FORMAT ", %s, dirty: %s", @@ -142,7 +141,6 @@ klass->external_name(), klass->has_modified_oops() ? "true" : "false"); } -#endif // If the klass has not been dirtied we know that there's // no references into the young gen and we can skip it. diff -r 16562060df59 src/share/vm/opto/buildOopMap.cpp --- a/src/share/vm/opto/buildOopMap.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/buildOopMap.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -542,10 +542,11 @@ if (i == cfg->number_of_blocks()) { break; // Got 'em all } -#ifndef PRODUCT - if( PrintOpto && Verbose ) + + if (PrintOpto && Verbose) { tty->print_cr("retripping live calc"); -#endif + } + // Force the issue (expensively): recheck everybody for (i = 1; i < cfg->number_of_blocks(); i++) { worklist->push(cfg->get_block(i)); diff -r 16562060df59 src/share/vm/opto/compile.cpp --- a/src/share/vm/opto/compile.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/compile.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -707,7 +707,7 @@ _replay_inline_data = ciReplay::load_inline_data(method(), entry_bci(), ci_env->comp_level()); } #endif - set_print_inlining(directive->PrintInliningOption NOT_PRODUCT( || PrintOptoInlining)); + set_print_inlining(directive->PrintInliningOption || PrintOptoInlining); set_print_intrinsics(directive->PrintIntrinsicsOption); set_has_irreducible_loop(true); // conservative until build_loop_tree() reset it diff -r 16562060df59 src/share/vm/opto/doCall.cpp --- a/src/share/vm/opto/doCall.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/doCall.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -45,7 +45,7 @@ if (TraceTypeProfile || C->print_inlining()) { outputStream* out = tty; if (!C->print_inlining()) { - if (NOT_PRODUCT(!PrintOpto &&) !PrintCompilation) { + if (!PrintOpto && !PrintCompilation) { method->print_short_name(); tty->cr(); } @@ -426,12 +426,10 @@ // uncommon-trap when callee is unloaded, uninitialized or will not link // bailout when too many arguments for register representation if (!will_link || can_not_compile_call_site(orig_callee, klass)) { -#ifndef PRODUCT if (PrintOpto && (Verbose || WizardMode)) { method()->print_name(); tty->print_cr(" can not compile call at bci %d to:", bci()); orig_callee->print_name(); tty->cr(); } -#endif return; } assert(holder_klass->is_loaded(), ""); @@ -634,12 +632,10 @@ // If the return type of the method is not loaded, assert that the // value we got is a null. Otherwise, we need to recompile. if (!rtype->is_loaded()) { -#ifndef PRODUCT if (PrintOpto && (Verbose || WizardMode)) { method()->print_name(); tty->print_cr(" asserting nullness of result at bci: %d", bci()); cg->method()->print_name(); tty->cr(); } -#endif if (C->log() != NULL) { C->log()->elem("assert_null reason='return' klass='%d'", C->log()->identify(rtype)); @@ -851,11 +847,9 @@ if (remaining == 1) { push_ex_oop(ex_node); // Push exception oop for handler -#ifndef PRODUCT if (PrintOpto && WizardMode) { tty->print_cr(" Catching every inline exception bci:%d -> handler_bci:%d", bci(), handler_bci); } -#endif merge_exception(handler_bci); // jump to handler return; // No more handling to be done here! } @@ -882,13 +876,11 @@ assert(klass->has_subklass() || tinst->klass_is_exact(), "lost exactness"); Node* ex_oop = _gvn.transform(new CheckCastPPNode(control(), ex_node, tinst)); push_ex_oop(ex_oop); // Push exception oop for handler -#ifndef PRODUCT if (PrintOpto && WizardMode) { tty->print(" Catching inline exception bci:%d -> handler_bci:%d -- ", bci(), handler_bci); klass->print_name(); tty->cr(); } -#endif merge_exception(handler_bci); } set_control(not_subtype_ctrl); @@ -1067,13 +1059,11 @@ // such method can be changed when its class is redefined. ciMethod* exact_method = callee->resolve_invoke(calling_klass, actual_receiver); if (exact_method != NULL) { -#ifndef PRODUCT if (PrintOpto) { tty->print(" Calling method via exact type @%d --- ", bci); exact_method->print_name(); tty->cr(); } -#endif return exact_method; } } diff -r 16562060df59 src/share/vm/opto/loopTransform.cpp --- a/src/share/vm/opto/loopTransform.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/loopTransform.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -792,8 +792,10 @@ return false; } - if(cl->do_unroll_only()) { - NOT_PRODUCT(if (TraceSuperWordLoopUnrollAnalysis) tty->print_cr("policy_unroll passed vector loop(vlen=%d,factor = %d)\n", slp_max_unroll_factor, future_unroll_ct)); + if (cl->do_unroll_only()) { + if (TraceSuperWordLoopUnrollAnalysis) { + tty->print_cr("policy_unroll passed vector loop(vlen=%d,factor = %d)\n", slp_max_unroll_factor, future_unroll_ct); + } } // Unroll once! (Each trip will soon do double iterations) @@ -818,7 +820,9 @@ if (slp_max_unroll_factor >= future_unroll_ct) { int new_limit = cl->node_count_before_unroll() * slp_max_unroll_factor; if (new_limit > LoopUnrollLimit) { - NOT_PRODUCT(if (TraceSuperWordLoopUnrollAnalysis) tty->print_cr("slp analysis unroll=%d, default limit=%d\n", new_limit, _local_loop_unroll_limit)); + if (TraceSuperWordLoopUnrollAnalysis) { + tty->print_cr("slp analysis unroll=%d, default limit=%d\n", new_limit, _local_loop_unroll_limit); + } _local_loop_unroll_limit = new_limit; } } @@ -2119,10 +2123,9 @@ conditional_rc = !loop->dominates_backedge(iff) || RangeLimitCheck; } } else { -#ifndef PRODUCT - if( PrintOpto ) + if (PrintOpto) { tty->print_cr("missed RCE opportunity"); -#endif + } continue; // In release mode, ignore it } } else { // Otherwise work on normal compares @@ -2157,10 +2160,9 @@ } break; default: -#ifndef PRODUCT - if( PrintOpto ) + if (PrintOpto) { tty->print_cr("missed RCE opportunity"); -#endif + } continue; // Unhandled case } } @@ -2504,9 +2506,7 @@ return false; } if (should_peel) { // Should we peel? -#ifndef PRODUCT - if (PrintOpto) tty->print_cr("should_peel"); -#endif + if (PrintOpto) { tty->print_cr("should_peel"); } phase->do_peeling(this,old_new); } else if (should_unswitch) { phase->do_unswitching(this, old_new); diff -r 16562060df59 src/share/vm/opto/loopUnswitch.cpp --- a/src/share/vm/opto/loopUnswitch.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/loopUnswitch.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -359,16 +359,22 @@ } if(!_lpt->_head->is_CountedLoop()) { - NOT_PRODUCT(if(TraceLoopOpts) {tty->print_cr("CountedLoopReserveKit::create_reserve: %d not counted loop", _lpt->_head->_idx);}) + if (TraceLoopOpts) { + tty->print_cr("CountedLoopReserveKit::create_reserve: %d not counted loop", _lpt->_head->_idx); + } return false; } CountedLoopNode *cl = _lpt->_head->as_CountedLoop(); if (!cl->is_valid_counted_loop()) { - NOT_PRODUCT(if(TraceLoopOpts) {tty->print_cr("CountedLoopReserveKit::create_reserve: %d not valid counted loop", cl->_idx);}) + if (TraceLoopOpts) { + tty->print_cr("CountedLoopReserveKit::create_reserve: %d not valid counted loop", cl->_idx); + } return false; // skip malformed counted loop } if (!cl->is_main_loop()) { - NOT_PRODUCT(if(TraceLoopOpts) {tty->print_cr("CountedLoopReserveKit::create_reserve: %d not main loop", cl->_idx);}) + if (TraceLoopOpts) { + tty->print_cr("CountedLoopReserveKit::create_reserve: %d not main loop", cl->_idx); + } return false; // skip normal, pre, and post loops } diff -r 16562060df59 src/share/vm/opto/loopnode.cpp --- a/src/share/vm/opto/loopnode.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/loopnode.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -2397,11 +2397,9 @@ // After that switch predicates off and do more loop optimizations. if (!C->major_progress() && (C->predicate_count() > 0)) { C->cleanup_loop_predicates(_igvn); -#ifndef PRODUCT if (TraceLoopOpts) { tty->print_cr("PredicatesOff"); } -#endif C->set_major_progress(); } diff -r 16562060df59 src/share/vm/opto/loopopts.cpp --- a/src/share/vm/opto/loopopts.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/loopopts.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -199,10 +199,7 @@ // IGVN worklist for later cleanup. Move control-dependent data Nodes on the // live path up to the dominating control. void PhaseIdealLoop::dominated_by( Node *prevdom, Node *iff, bool flip, bool exclude_loop_predicate ) { -#ifndef PRODUCT - if (VerifyLoopOptimizations && PrintOpto) tty->print_cr("dominating test"); -#endif - + if (VerifyLoopOptimizations && PrintOpto) { tty->print_cr("dominating test"); } // prevdom is the dominating projection of the dominating test. assert( iff->is_If(), "" ); @@ -617,9 +614,7 @@ } } if (phi == NULL) break; -#ifndef PRODUCT - if (PrintOpto && VerifyLoopOptimizations) tty->print_cr("CMOV"); -#endif + if (PrintOpto && VerifyLoopOptimizations) { tty->print_cr("CMOV"); } // Move speculative ops for (uint j = 1; j < region->req(); j++) { Node *proj = region->in(j); @@ -963,10 +958,9 @@ } int nodes_left = C->max_node_limit() - C->live_nodes(); if (weight * 8 > nodes_left) { -#ifndef PRODUCT - if (PrintOpto) + if (PrintOpto) { tty->print_cr("*** Split-if bails out: %d nodes, region weight %d", C->unique(), weight); -#endif + } return true; } else { return false; @@ -1489,14 +1483,12 @@ void PhaseIdealLoop::clone_loop( IdealLoopTree *loop, Node_List &old_new, int dd, Node* side_by_side_idom) { -#ifndef PRODUCT if (C->do_vector_loop() && PrintOpto) { const char* mname = C->method()->name()->as_quoted_ascii(); if (mname != NULL) { tty->print("PhaseIdealLoop::clone_loop: for vectorize method %s\n", mname); } } -#endif CloneMap& cm = C->clone_map(); Dict* dict = cm.dict(); diff -r 16562060df59 src/share/vm/opto/matcher.cpp --- a/src/share/vm/opto/matcher.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/matcher.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -1569,13 +1569,11 @@ // Can NOT include the match of a subtree when its memory state // is used by any of the other subtrees (input_mem == NodeSentinel) ) { -#ifndef PRODUCT // Print when we exclude matching due to different memory states at input-loads - if( PrintOpto && (Verbose && WizardMode) && (input_mem == NodeSentinel) - && !((mem!=(Node*)1) && m->is_Load() && m->in(MemNode::Memory) != mem) ) { + if (PrintOpto && (Verbose && WizardMode) && (input_mem == NodeSentinel) + && !((mem!=(Node*)1) && m->is_Load() && m->in(MemNode::Memory) != mem)) { tty->print_cr("invalid input_mem"); } -#endif // Switch to a register-only opcode; this value must be in a register // and cannot be subsumed as part of a larger instruction. s->DFA( m->ideal_reg(), m ); diff -r 16562060df59 src/share/vm/opto/movenode.cpp --- a/src/share/vm/opto/movenode.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/movenode.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -230,9 +230,7 @@ // Convert to a bool (flipped) // Build int->bool conversion -#ifndef PRODUCT - if( PrintOpto ) tty->print_cr("CMOV to I2B"); -#endif + if (PrintOpto) { tty->print_cr("CMOV to I2B"); } Node *n = new Conv2BNode( cmp->in(1) ); if( flip ) n = new XorINode( phase->transform(n), phase->intcon(1) ); diff -r 16562060df59 src/share/vm/opto/output.cpp --- a/src/share/vm/opto/output.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/output.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -91,13 +91,10 @@ } // Break before main entry point - if( (_method && C->directive()->BreakAtExecuteOption) -#ifndef PRODUCT - ||(OptoBreakpoint && is_method_compilation()) - ||(OptoBreakpointOSR && is_osr_compilation()) - ||(OptoBreakpointC2R && !_method) -#endif - ) { + if ((_method && C->directive()->BreakAtExecuteOption) || + (OptoBreakpoint && is_method_compilation()) || + (OptoBreakpointOSR && is_osr_compilation()) || + (OptoBreakpointC2R && !_method) ) { // checking for _method means that OptoBreakpoint does not apply to // runtime stubs or frame converters _cfg->insert( entry, 1, new MachBreakpointNode() ); diff -r 16562060df59 src/share/vm/opto/parse1.cpp --- a/src/share/vm/opto/parse1.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/parse1.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -958,12 +958,10 @@ PPC64_ONLY(wrote_volatile() ||) (AlwaysSafeConstructors && wrote_fields()))) { _exits.insert_mem_bar(Op_MemBarRelease, alloc_with_final()); -#ifndef PRODUCT if (PrintOpto && (Verbose || WizardMode)) { method()->print_name(); tty->print_cr(" writes finals and needs a memory barrier"); } -#endif } // Any method can write a @Stable field; insert memory barriers after @@ -971,12 +969,10 @@ // barrier there. if (wrote_stable()) { _exits.insert_mem_bar(Op_MemBarRelease, alloc_with_final()); -#ifndef PRODUCT if (PrintOpto && (Verbose || WizardMode)) { method()->print_name(); tty->print_cr(" writes @Stable and needs a memory barrier"); } -#endif } for (MergeMemStream mms(_exits.merged_memory()); mms.next_non_empty(); ) { diff -r 16562060df59 src/share/vm/opto/parse2.cpp --- a/src/share/vm/opto/parse2.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/parse2.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -940,13 +940,11 @@ //-------------------------------repush_if_args-------------------------------- // Push arguments of an "if" bytecode back onto the stack by adjusting _sp. inline int Parse::repush_if_args() { -#ifndef PRODUCT if (PrintOpto && WizardMode) { tty->print("defending against excessive implicit null exceptions on %s @%d in ", Bytecodes::name(iter().cur_bc()), iter().cur_bci()); method()->print_name(); tty->cr(); } -#endif int bc_depth = - Bytecodes::depth(iter().cur_bc()); assert(bc_depth == 1 || bc_depth == 2, "only two kinds of branches"); DEBUG_ONLY(sync_jvms()); // argument(n) requires a synced jvms @@ -967,10 +965,9 @@ float prob = branch_prediction(cnt, btest, target_bci, c); if (prob == PROB_UNKNOWN) { // (An earlier version of do_ifnull omitted this trap for OSR methods.) -#ifndef PRODUCT - if (PrintOpto && Verbose) - tty->print_cr("Never-taken edge stops compilation at bci %d",bci()); -#endif + if (PrintOpto && Verbose) { + tty->print_cr("Never-taken edge stops compilation at bci %d", bci()); + } repush_if_args(); // to gather stats on loop // We need to mark this branch as taken so that if we recompile we will // see that it is possible. In the tiered system the interpreter doesn't @@ -1049,10 +1046,9 @@ float untaken_prob = 1.0 - prob; if (prob == PROB_UNKNOWN) { -#ifndef PRODUCT - if (PrintOpto && Verbose) - tty->print_cr("Never-taken edge stops compilation at bci %d",bci()); -#endif + if (PrintOpto && Verbose) { + tty->print_cr("Never-taken edge stops compilation at bci %d", bci()); + } repush_if_args(); // to gather stats on loop // We need to mark this branch as taken so that if we recompile we will // see that it is possible. In the tiered system the interpreter doesn't diff -r 16562060df59 src/share/vm/opto/parse3.cpp --- a/src/share/vm/opto/parse3.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/parse3.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -213,11 +213,9 @@ // not need to mention the class index, since the class will // already have been loaded if we ever see a non-null value.) // uncommon_trap(iter().get_field_signature_index()); -#ifndef PRODUCT if (PrintOpto && (Verbose || WizardMode)) { method()->print_name(); tty->print_cr(" asserting nullness of field at bci: %d", bci()); } -#endif if (C->log() != NULL) { C->log()->elem("assert_null reason='field' klass='%d'", C->log()->identify(field->type())); diff -r 16562060df59 src/share/vm/opto/reg_split.cpp --- a/src/share/vm/opto/reg_split.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/reg_split.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -506,10 +506,9 @@ // Initialize the split counts to zero splits.append(0); #endif -#ifndef PRODUCT - if( PrintOpto && WizardMode && lrgs(bidx)._was_spilled1 ) + if (PrintOpto && WizardMode && lrgs(bidx)._was_spilled1) { tty->print_cr("Warning, 2nd spill of L%d",bidx); -#endif + } } } diff -r 16562060df59 src/share/vm/opto/split_if.cpp --- a/src/share/vm/opto/split_if.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/split_if.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -390,13 +390,13 @@ // Found an If getting its condition-code input from a Phi in the same block. // Split thru the Region. void PhaseIdealLoop::do_split_if( Node *iff ) { -#ifndef PRODUCT - if( PrintOpto && VerifyLoopOptimizations ) + if (PrintOpto && VerifyLoopOptimizations) { tty->print_cr("Split-if"); + } if (TraceLoopOpts) { tty->print_cr("SplitIf"); } -#endif + C->set_major_progress(); Node *region = iff->in(0); Node *region_dom = idom(region); diff -r 16562060df59 src/share/vm/opto/superword.cpp --- a/src/share/vm/opto/superword.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/opto/superword.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -276,7 +276,9 @@ // stop looking, we already have the max vector to map to. if (cur_max_vector < local_loop_unroll_factor) { is_slp = false; - NOT_PRODUCT(if (TraceSuperWordLoopUnrollAnalysis) tty->print_cr("slp analysis fails: unroll limit greater than max vector\n")); + if (TraceSuperWordLoopUnrollAnalysis) { + tty->print_cr("slp analysis fails: unroll limit greater than max vector\n"); + } break; } @@ -389,11 +391,9 @@ if (_do_vector_loop) { if (_packset.length() == 0) { -#ifndef PRODUCT if (TraceSuperWord) { tty->print_cr("\nSuperWord::_do_vector_loop DFA could not build packset, now trying to build anyway"); } -#endif pack_parallel(); } } @@ -560,7 +560,9 @@ } MemNode* best_align_to_mem_ref = find_align_to_ref(memops); if (best_align_to_mem_ref == NULL) { - NOT_PRODUCT(if (TraceSuperWord) tty->print_cr("SuperWord::find_adjacent_refs(): best_align_to_mem_ref == NULL");) + if (TraceSuperWord) { + tty->print_cr("SuperWord::find_adjacent_refs(): best_align_to_mem_ref == NULL"); + } break; } best_iv_adjustment = get_iv_adjustment(best_align_to_mem_ref); @@ -582,12 +584,10 @@ } // while (memops.size() != 0 set_align_to_ref(best_align_to_mem_ref); -#ifndef PRODUCT if (TraceSuperWord) { tty->print_cr("\nAfter find_adjacent_refs"); print_packset(); } -#endif } #ifndef PRODUCT @@ -874,7 +874,7 @@ _dg.make_edge(s1, slice_sink); } } -#ifndef PRODUCT + if (TraceSuperWord) { tty->print_cr("\nDependence graph for slice: %d", n->_idx); for (int q = 0; q < _nlist.length(); q++) { @@ -882,11 +882,10 @@ } tty->cr(); } -#endif + _nlist.clear(); } -#ifndef PRODUCT if (TraceSuperWord) { tty->print_cr("\ndisjoint_ptrs: %s", _disjoint_ptrs.length() > 0 ? "" : "NONE"); for (int r = 0; r < _disjoint_ptrs.length(); r++) { @@ -895,7 +894,7 @@ } tty->cr(); } -#endif + } //---------------------------mem_slice_preds--------------------------- @@ -912,7 +911,9 @@ if (out->is_Load()) { if (in_bb(out)) { preds.push(out); - NOT_PRODUCT(if (TraceSuperWord && Verbose) tty->print_cr("SuperWord::mem_slice_preds: added pred(%d)", out->_idx);) + if (TraceSuperWord && Verbose) { + tty->print_cr("SuperWord::mem_slice_preds: added pred(%d)", out->_idx); + } } } else { // FIXME @@ -931,7 +932,9 @@ }//for if (n == stop) break; preds.push(n); - NOT_PRODUCT(if (TraceSuperWord && Verbose) tty->print_cr("SuperWord::mem_slice_preds: added pred(%d)", n->_idx);) + if (TraceSuperWord && Verbose) { + tty->print_cr("SuperWord::mem_slice_preds: added pred(%d)", n->_idx); + } prev = n; assert(n->is_Mem(), "unexpected node %s", n->Name()); n = n->in(MemNode::Memory); @@ -1123,12 +1126,10 @@ } } -#ifndef PRODUCT if (TraceSuperWord) { tty->print_cr("\nAfter extend_packlist"); print_packset(); } -#endif } //------------------------------follow_use_defs--------------------------- @@ -1412,12 +1413,10 @@ } } -#ifndef PRODUCT if (TraceSuperWord) { tty->print_cr("\nAfter combine_packs"); print_packset(); } -#endif } //-----------------------------construct_my_pack_map-------------------------- @@ -2244,7 +2243,9 @@ if (cl->has_passed_slp()) { uint slp_max_unroll_factor = cl->slp_max_unroll(); if (slp_max_unroll_factor == max_vlen) { - NOT_PRODUCT(if (TraceSuperWordLoopUnrollAnalysis) tty->print_cr("vector loop(unroll=%d, len=%d)\n", max_vlen, max_vlen_in_bytes*BitsPerByte)); + if (TraceSuperWordLoopUnrollAnalysis) { + tty->print_cr("vector loop(unroll=%d, len=%d)\n", max_vlen, max_vlen_in_bytes*BitsPerByte); + } // For atomic unrolled loops which are vector mapped, instigate more unrolling. cl->set_notpassed_slp(); C->set_major_progress(); @@ -2650,10 +2651,10 @@ } ct++; } while (again); -#ifndef PRODUCT - if (TraceSuperWord && Verbose) + + if (TraceSuperWord && Verbose) { tty->print_cr("compute_max_depth iterated: %d times", ct); -#endif + } } //-------------------------compute_vector_element_type----------------------- @@ -2664,10 +2665,9 @@ // Normally the type of the add is integer, but for packed character // operations the type of the add needs to be char. void SuperWord::compute_vector_element_type() { -#ifndef PRODUCT - if (TraceSuperWord && Verbose) + if (TraceSuperWord && Verbose) { tty->print_cr("\ncompute_velt_type:"); -#endif + } // Initial type for (int i = 0; i < _block.length(); i++) { @@ -2758,7 +2758,9 @@ offset += iv_adjust*p.memory_size(); int off_rem = offset % vw; int off_mod = off_rem >= 0 ? off_rem : off_rem + vw; - NOT_PRODUCT(if(TraceSuperWord && Verbose) tty->print_cr("SWPointer::memory_alignment: off_rem = %d, off_mod = %d", off_rem, off_mod);) + if (TraceSuperWord && Verbose) { + tty->print_cr("SWPointer::memory_alignment: off_rem = %d, off_mod = %d", off_rem, off_mod); + } return off_mod; } @@ -4046,11 +4048,9 @@ }//for (int i... if (_ii_first == -1 || _ii_last == -1) { -#ifndef PRODUCT if (TraceSuperWord && Verbose) { tty->print_cr("SuperWord::mark_generations unknown error, something vent wrong"); } -#endif return -1; // something vent wrong } // collect nodes in the first and last generations @@ -4083,11 +4083,9 @@ }//for if (found == false) { -#ifndef PRODUCT if (TraceSuperWord && Verbose) { tty->print_cr("SuperWord::mark_generations: Cannot build order of iterations - no dependent Store for %d", nd->_idx); } -#endif _ii_order.clear(); return -1; } @@ -4153,11 +4151,10 @@ return true; } -#ifndef PRODUCT if (TraceSuperWord && Verbose) { tty->print_cr("SuperWord::fix_commutative_inputs: cannot fix node %d", fix->_idx); } -#endif + return false; } @@ -4224,11 +4221,9 @@ for (int i = 0; i < _mem_slice_head.length(); i++) { Node* n = _mem_slice_head.at(i); if ( !in_bb(n) || !n->is_Phi() || n->bottom_type() != Type::MEMORY) { -#ifndef PRODUCT if (TraceSuperWord && Verbose) { tty->print_cr("SuperWord::hoist_loads_in_graph: skipping unexpected node n=%d", n->_idx); } -#endif continue; } @@ -4275,11 +4270,10 @@ restart(); // invalidate all basic structures, since we rebuilt the graph -#ifndef PRODUCT if (TraceSuperWord && Verbose) { tty->print_cr("\nSuperWord::hoist_loads_in_graph() the graph was rebuilt, all structures invalidated and need rebuild"); } -#endif + return true; } diff -r 16562060df59 src/share/vm/prims/jni.cpp --- a/src/share/vm/prims/jni.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/prims/jni.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -3899,7 +3899,7 @@ void TestBufferingOopClosure_test(); void TestCodeCacheRemSet_test(); void FreeRegionList_test(); -void test_memset_with_concurrent_readers(); +void test_memset_with_concurrent_readers() NOT_DEBUG_RETURN; void TestPredictions_test(); #endif diff -r 16562060df59 src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Fri Nov 06 12:09:20 2015 +0100 +++ b/src/share/vm/runtime/arguments.cpp Fri Nov 06 12:30:19 2015 +0100 @@ -456,7 +456,7 @@ return flag_name; } -#ifndef PRODUCT +#ifdef ASSERT static bool lookup_special_flag(const char *flag_name, size_t skip_index) { for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) { if ((i != skip_index) && (strcmp(special_jvm_flags[i].name, flag_name) == 0)) {