--- old/src/share/vm/oops/generateOopMap.cpp 2017-06-28 15:44:13.000000000 -0700 +++ new/src/share/vm/oops/generateOopMap.cpp 2017-06-28 15:44:13.000000000 -0700 @@ -237,6 +237,8 @@ case Bytecodes::_jsr_w: add_jsr(i.next_bci(), i.dest_w()); break; + default: + break; } } } @@ -430,6 +432,8 @@ assert(!fellThrough, "should not happen"); bb_mark_fct(this, bci + Bytecodes::length_for(bytecode), NULL); break; + default: + break; } if (possible_gc_point(&bcs)) @@ -489,6 +493,8 @@ assert(!fell_through, "should not happen"); reachable_basicblock(this, bci + Bytecodes::length_for(bytecode), &change); break; + default: + break; } if (fell_through) { // Mark successor as alive @@ -1187,6 +1193,9 @@ return; } break; + + default: + break; } if (_has_exceptions) { @@ -1272,24 +1281,38 @@ void GenerateOopMap::print_current_state(outputStream *os, BytecodeStream *currentBC, bool detailed) { - if (detailed) { os->print(" %4d vars = ", currentBC->bci()); print_states(os, vars(), _max_locals); os->print(" %s", Bytecodes::name(currentBC->code())); - switch(currentBC->code()) { - case Bytecodes::_invokevirtual: - case Bytecodes::_invokespecial: - case Bytecodes::_invokestatic: - case Bytecodes::_invokedynamic: - case Bytecodes::_invokeinterface: - int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache(); - ConstantPool* cp = method()->constants(); - int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx); - int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx); - Symbol* signature = cp->symbol_at(signatureIdx); - os->print("%s", signature->as_C_string()); + } else { + os->print(" %4d vars = '%s' ", currentBC->bci(), state_vec_to_string(vars(), _max_locals)); + os->print(" stack = '%s' ", state_vec_to_string(stack(), _stack_top)); + if (_monitor_top != bad_monitors) { + os->print(" monitors = '%s' \t%s", state_vec_to_string(monitors(), _monitor_top), Bytecodes::name(currentBC->code())); + } else { + os->print(" [bad monitor stack]"); + } + } + + switch(currentBC->code()) { + case Bytecodes::_invokevirtual: + case Bytecodes::_invokespecial: + case Bytecodes::_invokestatic: + case Bytecodes::_invokedynamic: + case Bytecodes::_invokeinterface: { + int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache(); + ConstantPool* cp = method()->constants(); + int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx); + int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx); + Symbol* signature = cp->symbol_at(signatureIdx); + os->print("%s", signature->as_C_string()); } + default: + break; + } + + if (detailed) { os->cr(); os->print(" stack = "); print_states(os, stack(), _stack_top); @@ -1300,30 +1323,9 @@ } else { os->print(" [bad monitor stack]"); } - os->cr(); - } else { - os->print(" %4d vars = '%s' ", currentBC->bci(), state_vec_to_string(vars(), _max_locals)); - os->print(" stack = '%s' ", state_vec_to_string(stack(), _stack_top)); - if (_monitor_top != bad_monitors) { - os->print(" monitors = '%s' \t%s", state_vec_to_string(monitors(), _monitor_top), Bytecodes::name(currentBC->code())); - } else { - os->print(" [bad monitor stack]"); - } - switch(currentBC->code()) { - case Bytecodes::_invokevirtual: - case Bytecodes::_invokespecial: - case Bytecodes::_invokestatic: - case Bytecodes::_invokedynamic: - case Bytecodes::_invokeinterface: - int idx = currentBC->has_index_u4() ? currentBC->get_index_u4() : currentBC->get_index_u2_cpcache(); - ConstantPool* cp = method()->constants(); - int nameAndTypeIdx = cp->name_and_type_ref_index_at(idx); - int signatureIdx = cp->signature_ref_index_at(nameAndTypeIdx); - Symbol* signature = cp->symbol_at(signatureIdx); - os->print("%s", signature->as_C_string()); - } - os->cr(); } + + os->cr(); } // Sets the current state to be the state after executing the @@ -2476,8 +2478,9 @@ case Bytecodes::_astore: *index = itr->get_index(); return true; + default: + return false; } - return false; } bool GenerateOopMap::is_aload(BytecodeStream *itr, int *index) { @@ -2493,8 +2496,10 @@ case Bytecodes::_aload: *index = itr->get_index(); return true; + + default: + return false; } - return false; }