From 9b131fbbb88a4a7286d32b8f7bcfc5755ce399c2 Mon Sep 17 00:00:00 2001 From: Christian Wimmer Date: Tue, 29 Dec 2009 19:08:54 +0100 Subject: [PATCH 001/722] 6986046: C1 valuestack cleanup Fixes an historical oddity in C1 with inlining where all of the expression stacks are kept in the topmost ValueStack instead of being in their respective ValueStacks. Reviewed-by: never --- .../src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp | 1 + .../cpu/sparc/vm/c1_LIRGenerator_sparc.cpp | 15 +- hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp | 3 +- .../src/cpu/x86/vm/c1_LIRGenerator_x86.cpp | 16 +- hotspot/src/share/vm/c1/c1_CFGPrinter.cpp | 57 ++- hotspot/src/share/vm/c1/c1_Canonicalizer.cpp | 8 +- hotspot/src/share/vm/c1/c1_Compilation.hpp | 1 - hotspot/src/share/vm/c1/c1_GraphBuilder.cpp | 484 ++++++++---------- hotspot/src/share/vm/c1/c1_GraphBuilder.hpp | 44 +- hotspot/src/share/vm/c1/c1_IR.cpp | 73 +-- hotspot/src/share/vm/c1/c1_IR.hpp | 52 +- hotspot/src/share/vm/c1/c1_Instruction.cpp | 143 ++---- hotspot/src/share/vm/c1/c1_Instruction.hpp | 317 +++++------- .../src/share/vm/c1/c1_InstructionPrinter.cpp | 4 +- hotspot/src/share/vm/c1/c1_LIR.cpp | 8 +- hotspot/src/share/vm/c1/c1_LIRAssembler.cpp | 15 +- hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 74 +-- hotspot/src/share/vm/c1/c1_LinearScan.cpp | 69 +-- hotspot/src/share/vm/c1/c1_LinearScan.hpp | 2 +- hotspot/src/share/vm/c1/c1_Optimizer.cpp | 32 +- hotspot/src/share/vm/c1/c1_ValueStack.cpp | 221 ++++---- hotspot/src/share/vm/c1/c1_ValueStack.hpp | 138 ++--- hotspot/src/share/vm/c1/c1_globals.hpp | 3 - hotspot/src/share/vm/includeDB_compiler1 | 4 + 24 files changed, 728 insertions(+), 1056 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp index 709259740f5..4eb6680dfa8 100644 --- a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp @@ -32,6 +32,7 @@ RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) , _index(index) { + assert(info != NULL, "must have info"); _info = new CodeEmitInfo(info); } diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp index dbdf2027dfe..2566f3f8227 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @@ -311,7 +311,7 @@ void LIRGenerator::store_stack_parameter (LIR_Opr item, ByteSize offset_from_sp) void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { - assert(x->is_root(),""); + assert(x->is_pinned(),""); bool needs_range_check = true; bool use_length = x->length() != NULL; bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT; @@ -386,7 +386,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { - assert(x->is_root(),""); + assert(x->is_pinned(),""); LIRItem obj(x->obj(), this); obj.load_item(); @@ -398,7 +398,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { CodeEmitInfo* info_for_exception = NULL; if (x->needs_null_check()) { - info_for_exception = state_for(x, x->lock_stack_before()); + info_for_exception = state_for(x); } // this CodeEmitInfo must not have the xhandlers because here the @@ -409,7 +409,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { void LIRGenerator::do_MonitorExit(MonitorExit* x) { - assert(x->is_root(),""); + assert(x->is_pinned(),""); LIRItem obj(x->obj(), this); obj.dont_load_item(); @@ -871,10 +871,11 @@ void LIRGenerator::do_NewInstance(NewInstance* x) { // This instruction can be deoptimized in the slow path : use // O0 as result register. const LIR_Opr reg = result_register_for(x->type()); - +#ifndef PRODUCT if (PrintNotLoaded && !x->klass()->is_loaded()) { - tty->print_cr(" ###class not loaded at new bci %d", x->bci()); + tty->print_cr(" ###class not loaded at new bci %d", x->printable_bci()); } +#endif CodeEmitInfo* info = state_for(x, x->state()); LIR_Opr tmp1 = FrameMap::G1_oop_opr; LIR_Opr tmp2 = FrameMap::G3_oop_opr; @@ -1018,7 +1019,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); LIR_Opr out_reg = rlock_result(x); CodeStub* stub; - CodeEmitInfo* info_for_exception = state_for(x, x->state()->copy_locks()); + CodeEmitInfo* info_for_exception = state_for(x); if (x->is_incompatible_class_change_check()) { assert(patching_info == NULL, "can't patch this"); diff --git a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp index 42269daf59e..f5bea330c2f 100644 --- a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp @@ -83,7 +83,8 @@ RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) , _index(index) { - _info = info == NULL ? NULL : new CodeEmitInfo(info); + assert(info != NULL, "must have info"); + _info = new CodeEmitInfo(info); } diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp index 05df6bda708..dd8bc8d9962 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @@ -107,7 +107,7 @@ bool LIRGenerator::can_store_as_constant(Value v, BasicType type) const { return false; } Constant* c = v->as_Constant(); - if (c && c->state() == NULL) { + if (c && c->state_before() == NULL) { // constants of any type can be stored directly, except for // unloaded object constants. return true; @@ -250,7 +250,7 @@ void LIRGenerator::store_stack_parameter (LIR_Opr item, ByteSize offset_from_sp) void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { - assert(x->is_root(),""); + assert(x->is_pinned(),""); bool needs_range_check = true; bool use_length = x->length() != NULL; bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT; @@ -325,7 +325,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { - assert(x->is_root(),""); + assert(x->is_pinned(),""); LIRItem obj(x->obj(), this); obj.load_item(); @@ -341,7 +341,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { CodeEmitInfo* info_for_exception = NULL; if (x->needs_null_check()) { - info_for_exception = state_for(x, x->lock_stack_before()); + info_for_exception = state_for(x); } // this CodeEmitInfo must not have the xhandlers because here the // object is already locked (xhandlers expect object to be unlocked) @@ -352,7 +352,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { void LIRGenerator::do_MonitorExit(MonitorExit* x) { - assert(x->is_root(),""); + assert(x->is_pinned(),""); LIRItem obj(x->obj(), this); obj.dont_load_item(); @@ -984,9 +984,11 @@ void LIRGenerator::do_Convert(Convert* x) { void LIRGenerator::do_NewInstance(NewInstance* x) { +#ifndef PRODUCT if (PrintNotLoaded && !x->klass()->is_loaded()) { - tty->print_cr(" ###class not loaded at new bci %d", x->bci()); + tty->print_cr(" ###class not loaded at new bci %d", x->printable_bci()); } +#endif CodeEmitInfo* info = state_for(x, x->state()); LIR_Opr reg = result_register_for(x->type()); LIR_Opr klass_reg = new_register(objectType); @@ -1127,7 +1129,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { obj.load_item(); // info for exceptions - CodeEmitInfo* info_for_exception = state_for(x, x->state()->copy_locks()); + CodeEmitInfo* info_for_exception = state_for(x); CodeStub* stub; if (x->is_incompatible_class_change_check()) { diff --git a/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp b/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp index 4a72b166f90..fa1e08ff0f4 100644 --- a/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp +++ b/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp @@ -174,31 +174,6 @@ void CFGPrinterOutput::print_state(BlockBegin* block) { int index; Value value; - if (state->stack_size() > 0) { - print_begin("stack"); - print("size %d", state->stack_size()); - - for_each_stack_value(state, index, value) { - ip.print_phi(index, value, block); - print_operand(value); - output()->cr(); - } - - print_end("stack"); - } - - if (state->locks_size() > 0) { - print_begin("locks"); - print("size %d", state->locks_size()); - - for_each_lock_value(state, index, value) { - ip.print_phi(index, value, block); - print_operand(value); - output()->cr(); - } - print_end("locks"); - } - for_each_state(state) { print_begin("locals"); print("size %d", state->locals_size()); @@ -210,6 +185,33 @@ void CFGPrinterOutput::print_state(BlockBegin* block) { output()->cr(); } print_end("locals"); + + if (state->stack_size() > 0) { + print_begin("stack"); + print("size %d", state->stack_size()); + print("method \"%s\"", method_name(state->scope()->method())); + + for_each_stack_value(state, index, value) { + ip.print_phi(index, value, block); + print_operand(value); + output()->cr(); + } + + print_end("stack"); + } + + if (state->locks_size() > 0) { + print_begin("locks"); + print("size %d", state->locks_size()); + print("method \"%s\"", method_name(state->scope()->method())); + + for_each_lock_value(state, index, value) { + ip.print_phi(index, value, block); + print_operand(value); + output()->cr(); + } + print_end("locks"); + } } print_end("states"); @@ -230,7 +232,8 @@ void CFGPrinterOutput::print_HIR(Value instr) { if (instr->is_pinned()) { output()->put('.'); } - output()->print("%d %d ", instr->bci(), instr->use_count()); + + output()->print("%d %d ", instr->printable_bci(), instr->use_count()); print_operand(instr); @@ -271,7 +274,7 @@ void CFGPrinterOutput::print_block(BlockBegin* block) { print("name \"B%d\"", block->block_id()); print("from_bci %d", block->bci()); - print("to_bci %d", (block->end() == NULL ? -1 : block->end()->bci())); + print("to_bci %d", (block->end() == NULL ? -1 : block->end()->printable_bci())); output()->indent(); output()->print("predecessors "); diff --git a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp index ec89b0edd06..024e1ed369a 100644 --- a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp +++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp @@ -205,7 +205,7 @@ void Canonicalizer::do_StoreField (StoreField* x) { // limit this optimization to current block if (value != NULL && in_current_block(conv)) { set_canonical(new StoreField(x->obj(), x->offset(), x->field(), value, x->is_static(), - x->lock_stack(), x->state_before(), x->is_loaded(), x->is_initialized())); + x->state_before(), x->is_loaded(), x->is_initialized())); return; } } @@ -256,7 +256,7 @@ void Canonicalizer::do_StoreIndexed (StoreIndexed* x) { // limit this optimization to current block if (value != NULL && in_current_block(conv)) { set_canonical(new StoreIndexed(x->array(), x->index(), x->length(), - x->elt_type(), value, x->lock_stack())); + x->elt_type(), value, x->state_before())); return; } } @@ -667,7 +667,7 @@ void Canonicalizer::do_If(If* x) { } } set_canonical(canon); - set_bci(cmp->bci()); + set_bci(cmp->state_before()->bci()); } } } else if (l->as_InstanceOf() != NULL) { @@ -685,7 +685,7 @@ void Canonicalizer::do_If(If* x) { set_canonical(new Goto(is_inst_sux, x->state_before(), x->is_safepoint())); } else { // successors differ => simplify to: IfInstanceOf - set_canonical(new IfInstanceOf(inst->klass(), inst->obj(), true, inst->bci(), is_inst_sux, no_inst_sux)); + set_canonical(new IfInstanceOf(inst->klass(), inst->obj(), true, inst->state_before()->bci(), is_inst_sux, no_inst_sux)); } } } else if (rt == objectNull && (l->as_NewInstance() || l->as_NewArray())) { diff --git a/hotspot/src/share/vm/c1/c1_Compilation.hpp b/hotspot/src/share/vm/c1/c1_Compilation.hpp index a66db089173..cb3ae41c421 100644 --- a/hotspot/src/share/vm/c1/c1_Compilation.hpp +++ b/hotspot/src/share/vm/c1/c1_Compilation.hpp @@ -22,7 +22,6 @@ * */ -class BlockBegin; class CompilationResourceObj; class XHandlers; class ExceptionInfo; diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp index 5b7b7045aa2..eee48450964 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp @@ -659,7 +659,6 @@ GraphBuilder::ScopeData::ScopeData(ScopeData* parent) , _jsr_xhandlers(NULL) , _caller_stack_size(-1) , _continuation(NULL) - , _continuation_state(NULL) , _num_returns(0) , _cleanup_block(NULL) , _cleanup_return_prev(NULL) @@ -795,14 +794,6 @@ void GraphBuilder::sort_top_into_worklist(BlockList* worklist, BlockBegin* top) if (i >= -1) worklist->at_put(i + 1, top); } -int GraphBuilder::ScopeData::caller_stack_size() const { - ValueStack* state = scope()->caller_state(); - if (state == NULL) { - return 0; - } - return state->stack_size(); -} - BlockBegin* GraphBuilder::ScopeData::remove_from_work_list() { if (is_work_list_empty()) { @@ -880,7 +871,7 @@ void GraphBuilder::load_constant() { ciObject* obj = con.as_object(); if (!obj->is_loaded() || (PatchALot && obj->klass() != ciEnv::current()->String_klass())) { - patch_state = state()->copy(); + patch_state = copy_state_before(); t = new ObjectConstant(obj); } else { assert(!obj->is_klass(), "must be java_mirror of klass"); @@ -902,7 +893,8 @@ void GraphBuilder::load_constant() { void GraphBuilder::load_local(ValueType* type, int index) { - Value x = state()->load_local(index); + Value x = state()->local_at(index); + assert(x != NULL && !x->type()->is_illegal(), "access of illegal local variable"); push(type, x); } @@ -942,19 +934,21 @@ void GraphBuilder::store_local(ValueStack* state, Value x, ValueType* type, int void GraphBuilder::load_indexed(BasicType type) { + ValueStack* state_before = copy_state_for_exception(); Value index = ipop(); Value array = apop(); Value length = NULL; if (CSEArrayLength || (array->as_AccessField() && array->as_AccessField()->field()->is_constant()) || (array->as_NewArray() && array->as_NewArray()->length() && array->as_NewArray()->length()->type()->is_constant())) { - length = append(new ArrayLength(array, lock_stack())); + length = append(new ArrayLength(array, state_before)); } - push(as_ValueType(type), append(new LoadIndexed(array, index, length, type, lock_stack()))); + push(as_ValueType(type), append(new LoadIndexed(array, index, length, type, state_before))); } void GraphBuilder::store_indexed(BasicType type) { + ValueStack* state_before = copy_state_for_exception(); Value value = pop(as_ValueType(type)); Value index = ipop(); Value array = apop(); @@ -962,9 +956,9 @@ void GraphBuilder::store_indexed(BasicType type) { if (CSEArrayLength || (array->as_AccessField() && array->as_AccessField()->field()->is_constant()) || (array->as_NewArray() && array->as_NewArray()->length() && array->as_NewArray()->length()->type()->is_constant())) { - length = append(new ArrayLength(array, lock_stack())); + length = append(new ArrayLength(array, state_before)); } - StoreIndexed* result = new StoreIndexed(array, index, length, type, value, lock_stack()); + StoreIndexed* result = new StoreIndexed(array, index, length, type, value, state_before); append(result); _memory->store_value(value); @@ -1063,12 +1057,12 @@ void GraphBuilder::stack_op(Bytecodes::Code code) { } -void GraphBuilder::arithmetic_op(ValueType* type, Bytecodes::Code code, ValueStack* stack) { +void GraphBuilder::arithmetic_op(ValueType* type, Bytecodes::Code code, ValueStack* state_before) { Value y = pop(type); Value x = pop(type); // NOTE: strictfp can be queried from current method since we don't // inline methods with differing strictfp bits - Value res = new ArithmeticOp(code, x, y, method()->is_strict(), stack); + Value res = new ArithmeticOp(code, x, y, method()->is_strict(), state_before); // Note: currently single-precision floating-point rounding on Intel is handled at the LIRGenerator level res = append(res); if (method()->is_strict()) { @@ -1132,7 +1126,7 @@ void GraphBuilder::logic_op(ValueType* type, Bytecodes::Code code) { void GraphBuilder::compare_op(ValueType* type, Bytecodes::Code code) { - ValueStack* state_before = state()->copy(); + ValueStack* state_before = copy_state_before(); Value y = pop(type); Value x = pop(type); ipush(append(new CompareOp(code, x, y, state_before))); @@ -1217,7 +1211,7 @@ void GraphBuilder::if_node(Value x, If::Condition cond, Value y, ValueStack* sta void GraphBuilder::if_zero(ValueType* type, If::Condition cond) { Value y = append(new Constant(intZero)); - ValueStack* state_before = state()->copy(); + ValueStack* state_before = copy_state_before(); Value x = ipop(); if_node(x, cond, y, state_before); } @@ -1225,14 +1219,14 @@ void GraphBuilder::if_zero(ValueType* type, If::Condition cond) { void GraphBuilder::if_null(ValueType* type, If::Condition cond) { Value y = append(new Constant(objectNull)); - ValueStack* state_before = state()->copy(); + ValueStack* state_before = copy_state_before(); Value x = apop(); if_node(x, cond, y, state_before); } void GraphBuilder::if_same(ValueType* type, If::Condition cond) { - ValueStack* state_before = state()->copy(); + ValueStack* state_before = copy_state_before(); Value y = pop(type); Value x = pop(type); if_node(x, cond, y, state_before); @@ -1282,7 +1276,7 @@ void GraphBuilder::table_switch() { BlockBegin* tsux = block_at(bci() + switch_->dest_offset_at(0)); BlockBegin* fsux = block_at(bci() + switch_->default_offset()); bool is_bb = tsux->bci() < bci() || fsux->bci() < bci(); - ValueStack* state_before = is_bb ? state() : NULL; + ValueStack* state_before = is_bb ? copy_state_before() : NULL; append(new If(ipop(), If::eql, true, key, tsux, fsux, state_before, is_bb)); } else { // collect successors @@ -1295,7 +1289,7 @@ void GraphBuilder::table_switch() { } // add default successor sux->at_put(i, block_at(bci() + switch_->default_offset())); - ValueStack* state_before = has_bb ? state() : NULL; + ValueStack* state_before = has_bb ? copy_state_before() : NULL; append(new TableSwitch(ipop(), sux, switch_->low_key(), state_before, has_bb)); } } @@ -1314,7 +1308,7 @@ void GraphBuilder::lookup_switch() { BlockBegin* tsux = block_at(bci() + pair->offset()); BlockBegin* fsux = block_at(bci() + switch_->default_offset()); bool is_bb = tsux->bci() < bci() || fsux->bci() < bci(); - ValueStack* state_before = is_bb ? state() : NULL; + ValueStack* state_before = is_bb ? copy_state_before() : NULL; append(new If(ipop(), If::eql, true, key, tsux, fsux, state_before, is_bb)); } else { // collect successors & keys @@ -1330,7 +1324,7 @@ void GraphBuilder::lookup_switch() { } // add default successor sux->at_put(i, block_at(bci() + switch_->default_offset())); - ValueStack* state_before = has_bb ? state() : NULL; + ValueStack* state_before = has_bb ? copy_state_before() : NULL; append(new LookupSwitch(ipop(), sux, keys, state_before, has_bb)); } } @@ -1340,7 +1334,7 @@ void GraphBuilder::call_register_finalizer() { // the registration on return. // Gather some type information about the receiver - Value receiver = state()->load_local(0); + Value receiver = state()->local_at(0); assert(receiver != NULL, "must have a receiver"); ciType* declared_type = receiver->declared_type(); ciType* exact_type = receiver->exact_type(); @@ -1373,10 +1367,11 @@ void GraphBuilder::call_register_finalizer() { if (needs_check) { // Perform the registration of finalizable objects. + ValueStack* state_before = copy_state_for_exception(); load_local(objectType, 0); append_split(new Intrinsic(voidType, vmIntrinsics::_Object_init, state()->pop_arguments(1), - true, lock_stack(), true)); + true, state_before, true)); } } @@ -1395,12 +1390,14 @@ void GraphBuilder::method_return(Value x) { // If the inlined method is synchronized, the monitor must be // released before we jump to the continuation block. if (method()->is_synchronized()) { - int i = state()->caller_state()->locks_size(); - assert(state()->locks_size() == i + 1, "receiver must be locked here"); - monitorexit(state()->lock_at(i), SynchronizationEntryBCI); + assert(state()->locks_size() == 1, "receiver must be locked here"); + monitorexit(state()->lock_at(0), SynchronizationEntryBCI); } - state()->truncate_stack(caller_stack_size()); + // State at end of inlined method is the state of the caller + // without the method parameters on stack, including the + // return value, if any, of the inlined method on operand stack. + set_state(state()->caller_state()->copy_for_parsing()); if (x != NULL) { state()->push(x->type(), x); } @@ -1412,14 +1409,6 @@ void GraphBuilder::method_return(Value x) { set_inline_cleanup_info(_block, _last, state()); } - // State at end of inlined method is the state of the caller - // without the method parameters on stack, including the - // return value, if any, of the inlined method on operand stack. - set_state(scope_data()->continuation_state()->copy()); - if (x) { - state()->push(x->type(), x); - } - // The current bci() is in the wrong scope, so use the bci() of // the continuation point. append_with_bci(goto_callee, scope_data()->continuation()->bci()); @@ -1455,11 +1444,11 @@ void GraphBuilder::access_field(Bytecodes::Code code) { field->will_link(method()->holder(), code); const bool is_initialized = is_loaded && holder->is_initialized(); - ValueStack* state_copy = NULL; + ValueStack* state_before = NULL; if (!is_initialized || PatchALot) { // save state before instruction for debug info when // deoptimization happens during patching - state_copy = state()->copy(); + state_before = copy_state_before(); } Value obj = NULL; @@ -1468,9 +1457,9 @@ void GraphBuilder::access_field(Bytecodes::Code code) { // fully initialized and resolved in this constant pool. The will_link test // above essentially checks if this class is resolved in this constant pool // so, the is_initialized flag should be suffiect. - if (state_copy != NULL) { + if (state_before != NULL) { // build a patching constant - obj = new Constant(new ClassConstant(holder), state_copy); + obj = new Constant(new ClassConstant(holder), state_before); } else { obj = new Constant(new ClassConstant(holder)); } @@ -1499,25 +1488,32 @@ void GraphBuilder::access_field(Bytecodes::Code code) { } if (constant != NULL) { push(type, append(constant)); - state_copy = NULL; // Not a potential deoptimization point (see set_state_before logic below) } else { + if (state_before == NULL) { + state_before = copy_state_for_exception(); + } push(type, append(new LoadField(append(obj), offset, field, true, - lock_stack(), state_copy, is_loaded, is_initialized))); + state_before, is_loaded, is_initialized))); } break; } case Bytecodes::_putstatic: { Value val = pop(type); - append(new StoreField(append(obj), offset, field, val, true, lock_stack(), state_copy, is_loaded, is_initialized)); + if (state_before == NULL) { + state_before = copy_state_for_exception(); + } + append(new StoreField(append(obj), offset, field, val, true, state_before, is_loaded, is_initialized)); } break; case Bytecodes::_getfield : { - LoadField* load = new LoadField(apop(), offset, field, false, lock_stack(), state_copy, is_loaded, true); + if (state_before == NULL) { + state_before = copy_state_for_exception(); + } + LoadField* load = new LoadField(apop(), offset, field, false, state_before, is_loaded, true); Value replacement = is_loaded ? _memory->load(load) : load; if (replacement != load) { - assert(replacement->bci() != -99 || replacement->as_Phi() || replacement->as_Local(), - "should already by linked"); + assert(replacement->is_linked() || !replacement->can_be_linked(), "should already by linked"); push(type, replacement); } else { push(type, append(load)); @@ -1527,7 +1523,10 @@ void GraphBuilder::access_field(Bytecodes::Code code) { case Bytecodes::_putfield : { Value val = pop(type); - StoreField* store = new StoreField(apop(), offset, field, val, false, lock_stack(), state_copy, is_loaded, true); + if (state_before == NULL) { + state_before = copy_state_for_exception(); + } + StoreField* store = new StoreField(apop(), offset, field, val, false, state_before, is_loaded, true); if (is_loaded) store = _memory->store(store); if (store != NULL) { append(store); @@ -1647,7 +1646,7 @@ void GraphBuilder::invoke(Bytecodes::Code code) { actual_recv = target->holder(); // insert a check it's really the expected class. - CheckCast* c = new CheckCast(klass, receiver, NULL); + CheckCast* c = new CheckCast(klass, receiver, copy_state_for_exception()); c->set_incompatible_class_change_check(); c->set_direct_compare(klass->is_final()); append_split(c); @@ -1732,7 +1731,7 @@ void GraphBuilder::invoke(Bytecodes::Code code) { // We require the debug info to be the "state before" because // invokedynamics may deoptimize. - ValueStack* state_before = is_invokedynamic ? state()->copy() : NULL; + ValueStack* state_before = is_invokedynamic ? copy_state_before() : copy_state_exhandling(); Values* args = state()->pop_arguments(target->arg_size_no_receiver()); Value recv = has_receiver ? apop() : NULL; @@ -1795,24 +1794,26 @@ void GraphBuilder::invoke(Bytecodes::Code code) { void GraphBuilder::new_instance(int klass_index) { + ValueStack* state_before = copy_state_exhandling(); bool will_link; ciKlass* klass = stream()->get_klass(will_link); assert(klass->is_instance_klass(), "must be an instance klass"); - NewInstance* new_instance = new NewInstance(klass->as_instance_klass()); + NewInstance* new_instance = new NewInstance(klass->as_instance_klass(), state_before); _memory->new_instance(new_instance); apush(append_split(new_instance)); } void GraphBuilder::new_type_array() { - apush(append_split(new NewTypeArray(ipop(), (BasicType)stream()->get_index()))); + ValueStack* state_before = copy_state_exhandling(); + apush(append_split(new NewTypeArray(ipop(), (BasicType)stream()->get_index(), state_before))); } void GraphBuilder::new_object_array() { bool will_link; ciKlass* klass = stream()->get_klass(will_link); - ValueStack* state_before = !klass->is_loaded() || PatchALot ? state()->copy() : NULL; + ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling(); NewArray* n = new NewObjectArray(klass, ipop(), state_before); apush(append_split(n)); } @@ -1838,7 +1839,7 @@ bool GraphBuilder::direct_compare(ciKlass* k) { void GraphBuilder::check_cast(int klass_index) { bool will_link; ciKlass* klass = stream()->get_klass(will_link); - ValueStack* state_before = !klass->is_loaded() || PatchALot ? state()->copy() : NULL; + ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_for_exception(); CheckCast* c = new CheckCast(klass, apop(), state_before); apush(append_split(c)); c->set_direct_compare(direct_compare(klass)); @@ -1859,7 +1860,7 @@ void GraphBuilder::check_cast(int klass_index) { void GraphBuilder::instance_of(int klass_index) { bool will_link; ciKlass* klass = stream()->get_klass(will_link); - ValueStack* state_before = !klass->is_loaded() || PatchALot ? state()->copy() : NULL; + ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling(); InstanceOf* i = new InstanceOf(klass, apop(), state_before); ipush(append_split(i)); i->set_direct_compare(direct_compare(klass)); @@ -1879,25 +1880,13 @@ void GraphBuilder::instance_of(int klass_index) { void GraphBuilder::monitorenter(Value x, int bci) { // save state before locking in case of deoptimization after a NullPointerException - ValueStack* lock_stack_before = lock_stack(); - append_with_bci(new MonitorEnter(x, state()->lock(scope(), x), lock_stack_before), bci); + ValueStack* state_before = copy_state_for_exception_with_bci(bci); + append_with_bci(new MonitorEnter(x, state()->lock(x), state_before), bci); kill_all(); } void GraphBuilder::monitorexit(Value x, int bci) { - // Note: the comment below is only relevant for the case where we do - // not deoptimize due to asynchronous exceptions (!(DeoptC1 && - // DeoptOnAsyncException), which is not used anymore) - - // Note: Potentially, the monitor state in an exception handler - // can be wrong due to wrong 'initialization' of the handler - // via a wrong asynchronous exception path. This can happen, - // if the exception handler range for asynchronous exceptions - // is too long (see also java bug 4327029, and comment in - // GraphBuilder::handle_exception()). This may cause 'under- - // flow' of the monitor stack => bailout instead. - if (state()->locks_size() < 1) BAILOUT("monitor stack underflow"); append_with_bci(new MonitorExit(x, state()->unlock()), bci); kill_all(); } @@ -1906,7 +1895,7 @@ void GraphBuilder::monitorexit(Value x, int bci) { void GraphBuilder::new_multi_array(int dimensions) { bool will_link; ciKlass* klass = stream()->get_klass(will_link); - ValueStack* state_before = !klass->is_loaded() || PatchALot ? state()->copy() : NULL; + ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling(); Values* dims = new Values(dimensions, NULL); // fill in all dimensions @@ -1921,8 +1910,10 @@ void GraphBuilder::new_multi_array(int dimensions) { void GraphBuilder::throw_op(int bci) { // We require that the debug info for a Throw be the "state before" // the Throw (i.e., exception oop is still on TOS) - ValueStack* state_before = state()->copy(); + ValueStack* state_before = copy_state_before_with_bci(bci); Throw* t = new Throw(apop(), state_before); + // operand stack not needed after a throw + state()->truncate_stack(0); append_with_bci(t, bci); } @@ -1947,60 +1938,62 @@ Value GraphBuilder::round_fp(Value fp_value) { Instruction* GraphBuilder::append_with_bci(Instruction* instr, int bci) { Canonicalizer canon(compilation(), instr, bci); Instruction* i1 = canon.canonical(); - if (i1->bci() != -99) { + if (i1->is_linked() || !i1->can_be_linked()) { // Canonicalizer returned an instruction which was already // appended so simply return it. return i1; - } else if (UseLocalValueNumbering) { + } + + if (UseLocalValueNumbering) { // Lookup the instruction in the ValueMap and add it to the map if // it's not found. Instruction* i2 = vmap()->find_insert(i1); if (i2 != i1) { // found an entry in the value map, so just return it. - assert(i2->bci() != -1, "should already be linked"); + assert(i2->is_linked(), "should already be linked"); return i2; } ValueNumberingEffects vne(vmap()); i1->visit(&vne); } - if (i1->as_Phi() == NULL && i1->as_Local() == NULL) { - // i1 was not eliminated => append it - assert(i1->next() == NULL, "shouldn't already be linked"); - _last = _last->set_next(i1, canon.bci()); - if (++_instruction_count >= InstructionCountCutoff - && !bailed_out()) { - // set the bailout state but complete normal processing. We - // might do a little more work before noticing the bailout so we - // want processing to continue normally until it's noticed. - bailout("Method and/or inlining is too large"); - } + // i1 was not eliminated => append it + assert(i1->next() == NULL, "shouldn't already be linked"); + _last = _last->set_next(i1, canon.bci()); + + if (++_instruction_count >= InstructionCountCutoff && !bailed_out()) { + // set the bailout state but complete normal processing. We + // might do a little more work before noticing the bailout so we + // want processing to continue normally until it's noticed. + bailout("Method and/or inlining is too large"); + } #ifndef PRODUCT - if (PrintIRDuringConstruction) { - InstructionPrinter ip; - ip.print_line(i1); - if (Verbose) { - state()->print(); - } + if (PrintIRDuringConstruction) { + InstructionPrinter ip; + ip.print_line(i1); + if (Verbose) { + state()->print(); } + } #endif - assert(_last == i1, "adjust code below"); - StateSplit* s = i1->as_StateSplit(); - if (s != NULL && i1->as_BlockEnd() == NULL) { - if (EliminateFieldAccess) { - Intrinsic* intrinsic = s->as_Intrinsic(); - if (s->as_Invoke() != NULL || (intrinsic && !intrinsic->preserves_state())) { - _memory->kill(); - } + + // save state after modification of operand stack for StateSplit instructions + StateSplit* s = i1->as_StateSplit(); + if (s != NULL) { + if (EliminateFieldAccess) { + Intrinsic* intrinsic = s->as_Intrinsic(); + if (s->as_Invoke() != NULL || (intrinsic && !intrinsic->preserves_state())) { + _memory->kill(); } - s->set_state(state()->copy()); - } - // set up exception handlers for this instruction if necessary - if (i1->can_trap()) { - assert(exception_state() != NULL || !has_handler(), "must have setup exception state"); - i1->set_exception_handlers(handle_exception(bci)); } + s->set_state(state()->copy(ValueStack::StateAfter, canon.bci())); + } + + // set up exception handlers for this instruction if necessary + if (i1->can_trap()) { + i1->set_exception_handlers(handle_exception(i1)); + assert(i1->exception_state() != NULL || !i1->needs_exception_state() || bailed_out(), "handle_exception must set exception state"); } return i1; } @@ -2032,26 +2025,30 @@ void GraphBuilder::null_check(Value value) { } } } - append(new NullCheck(value, lock_stack())); + append(new NullCheck(value, copy_state_for_exception())); } -XHandlers* GraphBuilder::handle_exception(int cur_bci) { - // fast path if it is guaranteed that no exception handlers are present - if (!has_handler()) { - // TODO: check if return NULL is possible (avoids empty lists) +XHandlers* GraphBuilder::handle_exception(Instruction* instruction) { + if (!has_handler() && (!instruction->needs_exception_state() || instruction->exception_state() != NULL)) { + assert(instruction->exception_state() == NULL + || instruction->exception_state()->kind() == ValueStack::EmptyExceptionState + || (instruction->exception_state()->kind() == ValueStack::ExceptionState && _compilation->env()->jvmti_can_access_local_variables()), + "exception_state should be of exception kind"); return new XHandlers(); } XHandlers* exception_handlers = new XHandlers(); ScopeData* cur_scope_data = scope_data(); - ValueStack* s = exception_state(); + ValueStack* cur_state = instruction->state_before(); + ValueStack* prev_state = NULL; int scope_count = 0; - assert(s != NULL, "exception state must be set"); + assert(cur_state != NULL, "state_before must be set"); do { - assert(cur_scope_data->scope() == s->scope(), "scopes do not match"); + int cur_bci = cur_state->bci(); + assert(cur_scope_data->scope() == cur_state->scope(), "scopes do not match"); assert(cur_bci == SynchronizationEntryBCI || cur_bci == cur_scope_data->stream()->cur_bci(), "invalid bci"); // join with all potential exception handlers @@ -2075,10 +2072,15 @@ XHandlers* GraphBuilder::handle_exception(int cur_bci) { // previously this was a BAILOUT, but this is not necessary // now because asynchronous exceptions are not handled this way. - assert(entry->state() == NULL || s->locks_size() == entry->state()->locks_size(), "locks do not match"); + assert(entry->state() == NULL || cur_state->total_locks_size() == entry->state()->total_locks_size(), "locks do not match"); // xhandler start with an empty expression stack - s->truncate_stack(cur_scope_data->caller_stack_size()); + if (cur_state->stack_size() != 0) { + cur_state = cur_state->copy(ValueStack::ExceptionState, cur_state->bci()); + } + if (instruction->exception_state() == NULL) { + instruction->set_exception_state(cur_state); + } // Note: Usually this join must work. However, very // complicated jsr-ret structures where we don't ret from @@ -2087,12 +2089,12 @@ XHandlers* GraphBuilder::handle_exception(int cur_bci) { // The only test case we've seen so far which exhibits this // problem is caught by the infinite recursion test in // GraphBuilder::jsr() if the join doesn't work. - if (!entry->try_merge(s)) { + if (!entry->try_merge(cur_state)) { BAILOUT_("error while joining with exception handler, prob. due to complicated jsr/rets", exception_handlers); } // add current state for correct handling of phi functions at begin of xhandler - int phi_operand = entry->add_exception_state(s); + int phi_operand = entry->add_exception_state(cur_state); // add entry to the list of xhandlers of this block _block->add_exception_handler(entry); @@ -2119,26 +2121,39 @@ XHandlers* GraphBuilder::handle_exception(int cur_bci) { } } + if (exception_handlers->length() == 0) { + // This scope and all callees do not handle exceptions, so the local + // variables of this scope are not needed. However, the scope itself is + // required for a correct exception stack trace -> clear out the locals. + if (_compilation->env()->jvmti_can_access_local_variables()) { + cur_state = cur_state->copy(ValueStack::ExceptionState, cur_state->bci()); + } else { + cur_state = cur_state->copy(ValueStack::EmptyExceptionState, cur_state->bci()); + } + if (prev_state != NULL) { + prev_state->set_caller_state(cur_state); + } + if (instruction->exception_state() == NULL) { + instruction->set_exception_state(cur_state); + } + } + // Set up iteration for next time. // If parsing a jsr, do not grab exception handlers from the // parent scopes for this method (already got them, and they // needed to be cloned) - if (cur_scope_data->parsing_jsr()) { - IRScope* tmp_scope = cur_scope_data->scope(); - while (cur_scope_data->parent() != NULL && - cur_scope_data->parent()->scope() == tmp_scope) { - cur_scope_data = cur_scope_data->parent(); - } - } - if (cur_scope_data != NULL) { - if (cur_scope_data->parent() != NULL) { - // must use pop_scope instead of caller_state to preserve all monitors - s = s->pop_scope(); - } - cur_bci = cur_scope_data->scope()->caller_bci(); + + while (cur_scope_data->parsing_jsr()) { cur_scope_data = cur_scope_data->parent(); - scope_count++; } + + assert(cur_scope_data->scope() == cur_state->scope(), "scopes do not match"); + assert(cur_state->locks_size() == 0 || cur_state->locks_size() == 1, "unlocking must be done in a catchall exception handler"); + + prev_state = cur_state; + cur_state = cur_state->caller_state(); + cur_scope_data = cur_scope_data->parent(); + scope_count++; } while (cur_scope_data != NULL); return exception_handlers; @@ -2243,14 +2258,10 @@ void PhiSimplifier::block_do(BlockBegin* b) { ); ValueStack* state = b->state()->caller_state(); - int index; - Value value; - for_each_state(state) { - for_each_local_value(state, index, value) { - Phi* phi = value->as_Phi(); - assert(phi == NULL || phi->block() != b, "must not have phi function to simplify in caller state"); - } - } + for_each_state_value(state, value, + Phi* phi = value->as_Phi(); + assert(phi == NULL || phi->block() != b, "must not have phi function to simplify in caller state"); + ); #endif } @@ -2265,7 +2276,7 @@ void GraphBuilder::connect_to_end(BlockBegin* beg) { // setup iteration kill_all(); _block = beg; - _state = beg->state()->copy(); + _state = beg->state()->copy_for_parsing(); _last = beg; iterate_bytecodes_for_block(beg->bci()); } @@ -2301,14 +2312,7 @@ BlockEnd* GraphBuilder::iterate_bytecodes_for_block(int bci) { while (!bailed_out() && last()->as_BlockEnd() == NULL && (code = stream()->next()) != ciBytecodeStream::EOBC() && (block_at(s.cur_bci()) == NULL || block_at(s.cur_bci()) == block())) { - - if (has_handler() && can_trap(method(), code)) { - // copy the state because it is modified before handle_exception is called - set_exception_state(state()->copy()); - } else { - // handle_exception is not called for this bytecode - set_exception_state(NULL); - } + assert(state()->kind() == ValueStack::Parsing, "invalid state kind"); // Check for active jsr during OSR compilation if (compilation()->is_osr_compile() @@ -2433,12 +2437,12 @@ BlockEnd* GraphBuilder::iterate_bytecodes_for_block(int bci) { case Bytecodes::_lmul : arithmetic_op(longType , code); break; case Bytecodes::_fmul : arithmetic_op(floatType , code); break; case Bytecodes::_dmul : arithmetic_op(doubleType, code); break; - case Bytecodes::_idiv : arithmetic_op(intType , code, lock_stack()); break; - case Bytecodes::_ldiv : arithmetic_op(longType , code, lock_stack()); break; + case Bytecodes::_idiv : arithmetic_op(intType , code, copy_state_for_exception()); break; + case Bytecodes::_ldiv : arithmetic_op(longType , code, copy_state_for_exception()); break; case Bytecodes::_fdiv : arithmetic_op(floatType , code); break; case Bytecodes::_ddiv : arithmetic_op(doubleType, code); break; - case Bytecodes::_irem : arithmetic_op(intType , code, lock_stack()); break; - case Bytecodes::_lrem : arithmetic_op(longType , code, lock_stack()); break; + case Bytecodes::_irem : arithmetic_op(intType , code, copy_state_for_exception()); break; + case Bytecodes::_lrem : arithmetic_op(longType , code, copy_state_for_exception()); break; case Bytecodes::_frem : arithmetic_op(floatType , code); break; case Bytecodes::_drem : arithmetic_op(doubleType, code); break; case Bytecodes::_ineg : negate_op(intType ); break; @@ -2515,11 +2519,10 @@ BlockEnd* GraphBuilder::iterate_bytecodes_for_block(int bci) { case Bytecodes::_new : new_instance(s.get_index_u2()); break; case Bytecodes::_newarray : new_type_array(); break; case Bytecodes::_anewarray : new_object_array(); break; - case Bytecodes::_arraylength : ipush(append(new ArrayLength(apop(), lock_stack()))); break; + case Bytecodes::_arraylength : { ValueStack* state_before = copy_state_for_exception(); ipush(append(new ArrayLength(apop(), state_before))); break; } case Bytecodes::_athrow : throw_op(s.cur_bci()); break; case Bytecodes::_checkcast : check_cast(s.get_index_u2()); break; case Bytecodes::_instanceof : instance_of(s.get_index_u2()); break; - // Note: we do not have special handling for the monitorenter bytecode if DeoptC1 && DeoptOnAsyncException case Bytecodes::_monitorenter : monitorenter(apop(), s.cur_bci()); break; case Bytecodes::_monitorexit : monitorexit (apop(), s.cur_bci()); break; case Bytecodes::_wide : ShouldNotReachHere(); break; @@ -2546,28 +2549,22 @@ BlockEnd* GraphBuilder::iterate_bytecodes_for_block(int bci) { if (end == NULL) { // all blocks must end with a BlockEnd instruction => add a Goto end = new Goto(block_at(s.cur_bci()), false); - _last = _last->set_next(end, prev_bci); + append(end); } assert(end == last()->as_BlockEnd(), "inconsistency"); - // if the method terminates, we don't need the stack anymore - if (end->as_Return() != NULL) { - state()->clear_stack(); - } else if (end->as_Throw() != NULL) { - // May have exception handler in caller scopes - state()->truncate_stack(scope()->lock_stack_size()); - } + assert(end->state() != NULL, "state must already be present"); + assert(end->as_Return() == NULL || end->as_Throw() == NULL || end->state()->stack_size() == 0, "stack not needed for return and throw"); // connect to begin & set state // NOTE that inlining may have changed the block we are parsing block()->set_end(end); - end->set_state(state()); // propagate state for (int i = end->number_of_sux() - 1; i >= 0; i--) { BlockBegin* sux = end->sux_at(i); assert(sux->is_predecessor(block()), "predecessor missing"); // be careful, bailout if bytecodes are strange - if (!sux->try_merge(state())) BAILOUT_("block join failed", NULL); + if (!sux->try_merge(end->state())) BAILOUT_("block join failed", NULL); scope_data()->add_to_work_list(end->sux_at(i)); } @@ -2605,7 +2602,6 @@ void GraphBuilder::iterate_all_blocks(bool start_in_current_block_for_inlining) bool GraphBuilder::_can_trap [Bytecodes::number_of_java_codes]; -bool GraphBuilder::_is_async[Bytecodes::number_of_java_codes]; void GraphBuilder::initialize() { // the following bytecodes are assumed to potentially @@ -2657,67 +2653,14 @@ void GraphBuilder::initialize() { , Bytecodes::_multianewarray }; - // the following bytecodes are assumed to potentially - // throw asynchronous exceptions in compiled code due - // to safepoints (note: these entries could be merged - // with the can_trap_list - however, we need to know - // which ones are asynchronous for now - see also the - // comment in GraphBuilder::handle_exception) - Bytecodes::Code is_async_list[] = - { Bytecodes::_ifeq - , Bytecodes::_ifne - , Bytecodes::_iflt - , Bytecodes::_ifge - , Bytecodes::_ifgt - , Bytecodes::_ifle - , Bytecodes::_if_icmpeq - , Bytecodes::_if_icmpne - , Bytecodes::_if_icmplt - , Bytecodes::_if_icmpge - , Bytecodes::_if_icmpgt - , Bytecodes::_if_icmple - , Bytecodes::_if_acmpeq - , Bytecodes::_if_acmpne - , Bytecodes::_goto - , Bytecodes::_jsr - , Bytecodes::_ret - , Bytecodes::_tableswitch - , Bytecodes::_lookupswitch - , Bytecodes::_ireturn - , Bytecodes::_lreturn - , Bytecodes::_freturn - , Bytecodes::_dreturn - , Bytecodes::_areturn - , Bytecodes::_return - , Bytecodes::_ifnull - , Bytecodes::_ifnonnull - , Bytecodes::_goto_w - , Bytecodes::_jsr_w - }; - // inititialize trap tables for (int i = 0; i < Bytecodes::number_of_java_codes; i++) { _can_trap[i] = false; - _is_async[i] = false; } // set standard trap info for (uint j = 0; j < ARRAY_SIZE(can_trap_list); j++) { _can_trap[can_trap_list[j]] = true; } - - // We now deoptimize if an asynchronous exception is thrown. This - // considerably cleans up corner case issues related to javac's - // incorrect exception handler ranges for async exceptions and - // allows us to precisely analyze the types of exceptions from - // certain bytecodes. - if (!(DeoptC1 && DeoptOnAsyncException)) { - // set asynchronous trap info - for (uint k = 0; k < ARRAY_SIZE(is_async_list); k++) { - assert(!_can_trap[is_async_list[k]], "can_trap_list and is_async_list should be disjoint"); - _can_trap[is_async_list[k]] = true; - _is_async[is_async_list[k]] = true; - } - } } @@ -2733,7 +2676,7 @@ BlockBegin* GraphBuilder::header_block(BlockBegin* entry, BlockBegin::Flag f, Va h->set_end(g); h->set(f); // setup header block end state - ValueStack* s = state->copy(); // can use copy since stack is empty (=> no phis) + ValueStack* s = state->copy(ValueStack::StateAfter, entry->bci()); // can use copy since stack is empty (=> no phis) assert(s->stack_is_empty(), "must have empty stack at entry point"); g->set_state(s); return h; @@ -2768,8 +2711,8 @@ BlockBegin* GraphBuilder::setup_start_block(int osr_bci, BlockBegin* std_entry, start->set_next(base, 0); start->set_end(base); // create & setup state for start block - start->set_state(state->copy()); - base->set_state(state->copy()); + start->set_state(state->copy(ValueStack::StateAfter, std_entry->bci())); + base->set_state(state->copy(ValueStack::StateAfter, std_entry->bci())); if (base->std_entry()->state() == NULL) { // setup states for header blocks @@ -2803,6 +2746,7 @@ void GraphBuilder::setup_osr_entry_block() { kill_all(); _block = _osr_entry; _state = _osr_entry->state()->copy(); + assert(_state->bci() == osr_bci, "mismatch"); _last = _osr_entry; Value e = append(new OsrEntry()); e->set_needs_null_check(false); @@ -2852,7 +2796,6 @@ void GraphBuilder::setup_osr_entry_block() { assert(state->caller_state() == NULL, "should be top scope"); state->clear_locals(); Goto* g = new Goto(target, false); - g->set_state(_state->copy()); append(g); _osr_entry->set_end(g); target->merge(_osr_entry->end()->state()); @@ -2862,7 +2805,7 @@ void GraphBuilder::setup_osr_entry_block() { ValueStack* GraphBuilder::state_at_entry() { - ValueStack* state = new ValueStack(scope(), method()->max_locals(), method()->max_stack()); + ValueStack* state = new ValueStack(scope(), NULL); // Set up locals for receiver int idx = 0; @@ -2886,7 +2829,7 @@ ValueStack* GraphBuilder::state_at_entry() { // lock synchronized method if (method()->is_synchronized()) { - state->lock(scope(), NULL); + state->lock(NULL); } return state; @@ -2895,7 +2838,6 @@ ValueStack* GraphBuilder::state_at_entry() { GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope) : _scope_data(NULL) - , _exception_state(NULL) , _instruction_count(0) , _osr_entry(NULL) , _memory(new MemoryBuffer()) @@ -2919,7 +2861,6 @@ GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope) // complete graph _vmap = new ValueMap(); - scope->compute_lock_stack_size(); switch (scope->method()->intrinsic_id()) { case vmIntrinsics::_dabs : // fall through case vmIntrinsics::_dsqrt : // fall through @@ -2945,7 +2886,7 @@ GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope) // setup the initial block state _block = start_block; - _state = start_block->state()->copy(); + _state = start_block->state()->copy_for_parsing(); _last = start_block; load_local(doubleType, 0); @@ -2957,7 +2898,6 @@ GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope) // connect the begin and end blocks and we're all done. BlockEnd* end = last()->as_BlockEnd(); block()->set_end(end); - end->set_state(state()); break; } default: @@ -2988,13 +2928,38 @@ GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope) } -ValueStack* GraphBuilder::lock_stack() { - // return a new ValueStack representing just the current lock stack - // (for debug info at safepoints in exception throwing or handling) - ValueStack* new_stack = state()->copy_locks(); - return new_stack; +ValueStack* GraphBuilder::copy_state_before() { + return copy_state_before_with_bci(bci()); } +ValueStack* GraphBuilder::copy_state_exhandling() { + return copy_state_exhandling_with_bci(bci()); +} + +ValueStack* GraphBuilder::copy_state_for_exception() { + return copy_state_for_exception_with_bci(bci()); +} + +ValueStack* GraphBuilder::copy_state_before_with_bci(int bci) { + return state()->copy(ValueStack::StateBefore, bci); +} + +ValueStack* GraphBuilder::copy_state_exhandling_with_bci(int bci) { + if (!has_handler()) return NULL; + return state()->copy(ValueStack::StateBefore, bci); +} + +ValueStack* GraphBuilder::copy_state_for_exception_with_bci(int bci) { + ValueStack* s = copy_state_exhandling_with_bci(bci); + if (s == NULL) { + if (_compilation->env()->jvmti_can_access_local_variables()) { + s = state()->copy(ValueStack::ExceptionState, bci); + } else { + s = state()->copy(ValueStack::EmptyExceptionState, bci); + } + } + return s; +} int GraphBuilder::recursive_inline_level(ciMethod* cur_callee) const { int recur_level = 0; @@ -3177,9 +3142,9 @@ bool GraphBuilder::try_inline_intrinsics(ciMethod* callee) { // create intrinsic node const bool has_receiver = !callee->is_static(); ValueType* result_type = as_ValueType(callee->return_type()); + ValueStack* state_before = copy_state_for_exception(); Values* args = state()->pop_arguments(callee->arg_size()); - ValueStack* locks = lock_stack(); if (is_profiling()) { // Don't profile in the special case where the root method @@ -3198,7 +3163,7 @@ bool GraphBuilder::try_inline_intrinsics(ciMethod* callee) { } } - Intrinsic* result = new Intrinsic(result_type, id, args, has_receiver, lock_stack(), + Intrinsic* result = new Intrinsic(result_type, id, args, has_receiver, state_before, preserves_state, cantrap); // append instruction & push result Value value = append_split(result); @@ -3236,10 +3201,9 @@ bool GraphBuilder::try_inline_jsr(int jsr_dest_bci) { assert(jsr_start_block != NULL, "jsr start block must exist"); assert(!jsr_start_block->is_set(BlockBegin::was_visited_flag), "should not have visited jsr yet"); Goto* goto_sub = new Goto(jsr_start_block, false); - goto_sub->set_state(state()); // Must copy state to avoid wrong sharing when parsing bytecodes assert(jsr_start_block->state() == NULL, "should have fresh jsr starting block"); - jsr_start_block->set_state(state()->copy()); + jsr_start_block->set_state(copy_state_before_with_bci(jsr_dest_bci)); append(goto_sub); _block->set_end(goto_sub); _last = _block = jsr_start_block; @@ -3290,7 +3254,6 @@ bool GraphBuilder::try_inline_jsr(int jsr_dest_bci) { void GraphBuilder::inline_sync_entry(Value lock, BlockBegin* sync_handler) { assert(lock != NULL && sync_handler != NULL, "lock or handler missing"); - set_exception_state(state()->copy()); monitorenter(lock, SynchronizationEntryBCI); assert(_last->as_MonitorEnter() != NULL, "monitor enter expected"); _last->set_needs_null_check(false); @@ -3332,7 +3295,7 @@ void GraphBuilder::fill_sync_handler(Value lock, BlockBegin* sync_handler, bool int bci = SynchronizationEntryBCI; if (lock) { assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); - if (lock->bci() == -99) { + if (!lock->is_linked()) { lock = append_with_bci(lock, -1); } @@ -3342,21 +3305,17 @@ void GraphBuilder::fill_sync_handler(Value lock, BlockBegin* sync_handler, bool // exit the context of the synchronized method if (!default_handler) { pop_scope(); - _state = _state->copy(); - bci = _state->scope()->caller_bci(); - _state = _state->pop_scope()->copy(); + bci = _state->caller_state()->bci(); + _state = _state->caller_state()->copy_for_parsing(); } } // perform the throw as if at the the call site apush(exception); - - set_exception_state(state()->copy()); throw_op(bci); BlockEnd* end = last()->as_BlockEnd(); block()->set_end(end); - end->set_state(state()); _block = orig_block; _state = orig_state; @@ -3487,7 +3446,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { // Pass parameters into callee state: add assignments // note: this will also ensure that all arguments are computed before being passed ValueStack* callee_state = state(); - ValueStack* caller_state = scope()->caller_state(); + ValueStack* caller_state = state()->caller_state(); { int i = args_base; while (i < caller_state->stack_size()) { const int par_no = i - args_base; @@ -3502,16 +3461,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { // Note that we preserve locals state in case we can use it later // (see use of pop_scope() below) caller_state->truncate_stack(args_base); - callee_state->truncate_stack(args_base); - - // Setup state that is used at returns form the inlined method. - // This is essentially the state of the continuation block, - // but without the return value on stack, if any, this will - // be pushed at the return instruction (see method_return). - scope_data()->set_continuation_state(caller_state->copy()); - - // Compute lock stack size for callee scope now that args have been passed - scope()->compute_lock_stack_size(); + assert(callee_state->stack_size() == 0, "callee stack must be empty"); Value lock; BlockBegin* sync_handler; @@ -3520,11 +3470,8 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { if (callee->is_synchronized()) { lock = callee->is_static() ? append(new Constant(new InstanceConstant(callee->holder()->java_mirror()))) : state()->local_at(0); - sync_handler = new BlockBegin(-1); + sync_handler = new BlockBegin(SynchronizationEntryBCI); inline_sync_entry(lock, sync_handler); - - // recompute the lock stack size - scope()->compute_lock_stack_size(); } @@ -3532,7 +3479,6 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { if (callee_start_block != NULL) { assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header"); Goto* goto_callee = new Goto(callee_start_block, false); - goto_callee->set_state(state()); // The state for this goto is in the scope of the callee, so use // the entry bci for the callee instead of the call site bci. append_with_bci(goto_callee, 0); @@ -3579,7 +3525,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { && block() == orig_block && block() == inline_cleanup_block()) { _last = inline_cleanup_return_prev(); - _state = inline_cleanup_state()->pop_scope(); + _state = inline_cleanup_state(); } else if (continuation_preds == cont->number_of_preds()) { // Inlining caused that the instructions after the invoke in the // caller are not reachable any more. So skip filling this block @@ -3645,8 +3591,7 @@ void GraphBuilder::push_scope(ciMethod* callee, BlockBegin* continuation) { blb.bci2block()->at_put(0, NULL); } - callee_scope->set_caller_state(state()); - set_state(state()->push_scope(callee_scope)); + set_state(new ValueStack(callee_scope, state()->copy(ValueStack::CallerState, bci()))); ScopeData* data = new ScopeData(scope_data()); data->set_scope(callee_scope); @@ -3670,10 +3615,6 @@ void GraphBuilder::push_scope_for_jsr(BlockBegin* jsr_continuation, int jsr_dest data->set_scope(scope()); data->setup_jsr_xhandlers(); data->set_continuation(continuation()); - if (continuation() != NULL) { - assert(continuation_state() != NULL, ""); - data->set_continuation_state(continuation_state()->copy()); - } data->set_jsr_continuation(jsr_continuation); _scope_data = data; } @@ -3768,6 +3709,7 @@ bool GraphBuilder::append_unsafe_prefetch(ciMethod* callee, bool is_static, bool void GraphBuilder::append_unsafe_CAS(ciMethod* callee) { + ValueStack* state_before = copy_state_for_exception(); ValueType* result_type = as_ValueType(callee->return_type()); assert(result_type->is_int(), "int result"); Values* args = state()->pop_arguments(callee->arg_size()); @@ -3796,7 +3738,7 @@ void GraphBuilder::append_unsafe_CAS(ciMethod* callee) { // know which ones so mark the state as no preserved. This will // cause CSE to invalidate memory across it. bool preserves_state = false; - Intrinsic* result = new Intrinsic(result_type, callee->intrinsic_id(), args, false, lock_stack(), preserves_state); + Intrinsic* result = new Intrinsic(result_type, callee->intrinsic_id(), args, false, state_before, preserves_state); append_split(result); push(result_type, result); compilation()->set_has_unsafe_access(true); diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp index 1a6c6f28d22..76699ef82a0 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp @@ -58,9 +58,6 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { // BlockEnds. BlockBegin* _continuation; - // Without return value of inlined method on stack - ValueStack* _continuation_state; - // Was this ScopeData created only for the parsing and inlining of // a jsr? bool _parsing_jsr; @@ -125,14 +122,10 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { void set_stream(ciBytecodeStream* stream) { _stream = stream; } intx max_inline_size() const { return _max_inline_size; } - int caller_stack_size() const; BlockBegin* continuation() const { return _continuation; } void set_continuation(BlockBegin* cont) { _continuation = cont; } - ValueStack* continuation_state() const { return _continuation_state; } - void set_continuation_state(ValueStack* s) { _continuation_state = s; } - // Indicates whether this ScopeData was pushed only for the // parsing and inlining of a jsr bool parsing_jsr() const { return _parsing_jsr; } @@ -163,7 +156,6 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { // for all GraphBuilders static bool _can_trap[Bytecodes::number_of_java_codes]; - static bool _is_async[Bytecodes::number_of_java_codes]; // for each instance of GraphBuilder ScopeData* _scope_data; // Per-scope data; used for inlining @@ -179,7 +171,6 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { // for each call to connect_to_end; can also be set by inliner BlockBegin* _block; // the current block ValueStack* _state; // the current execution state - ValueStack* _exception_state; // state that will be used by handle_exception Instruction* _last; // the last instruction added bool _skip_block; // skip processing of the rest of this block @@ -194,8 +185,6 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { ValueStack* state() const { return _state; } void set_state(ValueStack* state) { _state = state; } IRScope* scope() const { return scope_data()->scope(); } - ValueStack* exception_state() const { return _exception_state; } - void set_exception_state(ValueStack* s) { _exception_state = s; } ciMethod* method() const { return scope()->method(); } ciBytecodeStream* stream() const { return scope_data()->stream(); } Instruction* last() const { return _last; } @@ -230,7 +219,7 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { void load_indexed (BasicType type); void store_indexed(BasicType type); void stack_op(Bytecodes::Code code); - void arithmetic_op(ValueType* type, Bytecodes::Code code, ValueStack* lock_stack = NULL); + void arithmetic_op(ValueType* type, Bytecodes::Code code, ValueStack* state_before = NULL); void negate_op(ValueType* type); void shift_op(ValueType* type, Bytecodes::Code code); void logic_op(ValueType* type, Bytecodes::Code code); @@ -267,12 +256,8 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { Instruction* append_split(StateSplit* instr); // other helpers - static bool is_async(Bytecodes::Code code) { - assert(0 <= code && code < Bytecodes::number_of_java_codes, "illegal bytecode"); - return _is_async[code]; - } BlockBegin* block_at(int bci) { return scope_data()->block_at(bci); } - XHandlers* handle_exception(int bci); + XHandlers* handle_exception(Instruction* instruction); void connect_to_end(BlockBegin* beg); void null_check(Value value); void eliminate_redundant_phis(BlockBegin* start); @@ -283,7 +268,28 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { void kill_all(); - ValueStack* lock_stack(); + // use of state copy routines (try to minimize unnecessary state + // object allocations): + + // - if the instruction unconditionally needs a full copy of the + // state (for patching for example), then use copy_state_before* + + // - if the instruction needs a full copy of the state only for + // handler generation (Instruction::needs_exception_state() returns + // false) then use copy_state_exhandling* + + // - if the instruction needs either a full copy of the state for + // handler generation and a least a minimal copy of the state (as + // returned by Instruction::exception_state()) for debug info + // generation (that is when Instruction::needs_exception_state() + // returns true) then use copy_state_for_exception* + + ValueStack* copy_state_before_with_bci(int bci); + ValueStack* copy_state_before(); + ValueStack* copy_state_exhandling_with_bci(int bci); + ValueStack* copy_state_exhandling(); + ValueStack* copy_state_for_exception_with_bci(int bci); + ValueStack* copy_state_for_exception(); // // Inlining support @@ -292,9 +298,7 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { // accessors bool parsing_jsr() const { return scope_data()->parsing_jsr(); } BlockBegin* continuation() const { return scope_data()->continuation(); } - ValueStack* continuation_state() const { return scope_data()->continuation_state(); } BlockBegin* jsr_continuation() const { return scope_data()->jsr_continuation(); } - int caller_stack_size() const { return scope_data()->caller_stack_size(); } void set_continuation(BlockBegin* continuation) { scope_data()->set_continuation(continuation); } void set_inline_cleanup_info(BlockBegin* block, Instruction* return_prev, diff --git a/hotspot/src/share/vm/c1/c1_IR.cpp b/hotspot/src/share/vm/c1/c1_IR.cpp index cb5e2098ece..d916f04ffc6 100644 --- a/hotspot/src/share/vm/c1/c1_IR.cpp +++ b/hotspot/src/share/vm/c1/c1_IR.cpp @@ -116,24 +116,6 @@ bool XHandler::equals(XHandler* other) const { // Implementation of IRScope - -BlockBegin* IRScope::header_block(BlockBegin* entry, BlockBegin::Flag f, ValueStack* state) { - if (entry == NULL) return NULL; - assert(entry->is_set(f), "entry/flag mismatch"); - // create header block - BlockBegin* h = new BlockBegin(entry->bci()); - BlockEnd* g = new Goto(entry, false); - h->set_next(g, entry->bci()); - h->set_end(g); - h->set(f); - // setup header block end state - ValueStack* s = state->copy(); // can use copy since stack is empty (=> no phis) - assert(s->stack_is_empty(), "must have empty stack at entry point"); - g->set_state(s); - return h; -} - - BlockBegin* IRScope::build_graph(Compilation* compilation, int osr_bci) { GraphBuilder gm(compilation, this); NOT_PRODUCT(if (PrintValueNumbering && Verbose) gm.print_stats()); @@ -145,12 +127,9 @@ BlockBegin* IRScope::build_graph(Compilation* compilation, int osr_bci) { IRScope::IRScope(Compilation* compilation, IRScope* caller, int caller_bci, ciMethod* method, int osr_bci, bool create_graph) : _callees(2) , _compilation(compilation) -, _lock_stack_size(-1) , _requires_phi_function(method->max_locals()) { _caller = caller; - _caller_bci = caller == NULL ? -1 : caller_bci; - _caller_state = NULL; // Must be set later if needed _level = caller == NULL ? 0 : caller->level() + 1; _method = method; _xhandlers = new XHandlers(method); @@ -182,32 +161,6 @@ int IRScope::max_stack() const { } -void IRScope::compute_lock_stack_size() { - if (!InlineMethodsWithExceptionHandlers) { - _lock_stack_size = 0; - return; - } - - // Figure out whether we have to preserve expression stack elements - // for parent scopes, and if so, how many - IRScope* cur_scope = this; - while (cur_scope != NULL && !cur_scope->xhandlers()->has_handlers()) { - cur_scope = cur_scope->caller(); - } - _lock_stack_size = (cur_scope == NULL ? 0 : - (cur_scope->caller_state() == NULL ? 0 : - cur_scope->caller_state()->stack_size())); -} - -int IRScope::top_scope_bci() const { - assert(!is_top_scope(), "no correct answer for top scope possible"); - const IRScope* scope = this; - while (!scope->caller()->is_top_scope()) { - scope = scope->caller(); - } - return scope->caller_bci(); -} - bool IRScopeDebugInfo::should_reexecute() { ciMethod* cur_method = scope()->method(); int cur_bci = bci(); @@ -222,37 +175,24 @@ bool IRScopeDebugInfo::should_reexecute() { // Implementation of CodeEmitInfo // Stack must be NON-null -CodeEmitInfo::CodeEmitInfo(int bci, ValueStack* stack, XHandlers* exception_handlers) +CodeEmitInfo::CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers) : _scope(stack->scope()) - , _bci(bci) , _scope_debug_info(NULL) , _oop_map(NULL) , _stack(stack) , _exception_handlers(exception_handlers) - , _next(NULL) - , _id(-1) , _is_method_handle_invoke(false) { assert(_stack != NULL, "must be non null"); - assert(_bci == SynchronizationEntryBCI || Bytecodes::is_defined(scope()->method()->java_code_at_bci(_bci)), "make sure bci points at a real bytecode"); } -CodeEmitInfo::CodeEmitInfo(CodeEmitInfo* info, bool lock_stack_only) +CodeEmitInfo::CodeEmitInfo(CodeEmitInfo* info, ValueStack* stack) : _scope(info->_scope) , _exception_handlers(NULL) - , _bci(info->_bci) , _scope_debug_info(NULL) , _oop_map(NULL) + , _stack(stack == NULL ? info->_stack : stack) , _is_method_handle_invoke(info->_is_method_handle_invoke) { - if (lock_stack_only) { - if (info->_stack != NULL) { - _stack = info->_stack->copy_locks(); - } else { - _stack = NULL; - } - } else { - _stack = info->_stack; - } // deep copy of exception handlers if (info->_exception_handlers != NULL) { @@ -273,8 +213,6 @@ void CodeEmitInfo::add_register_oop(LIR_Opr opr) { assert(_oop_map != NULL, "oop map must already exist"); assert(opr->is_single_cpu(), "should not call otherwise"); - int frame_size = frame_map()->framesize(); - int arg_count = frame_map()->oop_map_arg_count(); VMReg name = frame_map()->regname(opr); _oop_map->set_oop(name); } @@ -383,8 +321,7 @@ class UseCountComputer: public ValueVisitor, BlockClosure { void visit(Value* n) { // Local instructions and Phis for expression stack values at the // start of basic blocks are not added to the instruction list - if ((*n)->bci() == -99 && (*n)->as_Local() == NULL && - (*n)->as_Phi() == NULL) { + if (!(*n)->is_linked()&& (*n)->can_be_linked()) { assert(false, "a node was not appended to the graph"); Compilation::current()->bailout("a node was not appended to the graph"); } @@ -1338,7 +1275,7 @@ void SubstitutionResolver::block_do(BlockBegin* block) { // need to remove this instruction from the instruction stream if (n->subst() != n) { assert(last != NULL, "must have last"); - last->set_next(n->next(), n->next()->bci()); + last->set_next(n->next()); } else { last = n; } diff --git a/hotspot/src/share/vm/c1/c1_IR.hpp b/hotspot/src/share/vm/c1/c1_IR.hpp index 05ef1789f85..35204c21f8e 100644 --- a/hotspot/src/share/vm/c1/c1_IR.hpp +++ b/hotspot/src/share/vm/c1/c1_IR.hpp @@ -132,8 +132,6 @@ class IRScope: public CompilationResourceObj { // hierarchy Compilation* _compilation; // the current compilation IRScope* _caller; // the caller scope, or NULL - int _caller_bci; // the caller bci of the corresponding (inlined) invoke, or < 0 - ValueStack* _caller_state; // the caller state, or NULL int _level; // the inlining level ciMethod* _method; // the corresponding method IRScopeList _callees; // the inlined method scopes @@ -144,15 +142,9 @@ class IRScope: public CompilationResourceObj { bool _monitor_pairing_ok; // the monitor pairing info BlockBegin* _start; // the start block, successsors are method entries - // lock stack management - int _lock_stack_size; // number of expression stack elements which, if present, - // must be spilled to the stack because of exception - // handling inside inlined methods - BitMap _requires_phi_function; // bit is set if phi functions at loop headers are necessary for a local variable // helper functions - BlockBegin* header_block(BlockBegin* entry, BlockBegin::Flag f, ValueStack* state); BlockBegin* build_graph(Compilation* compilation, int osr_bci); public: @@ -162,33 +154,16 @@ class IRScope: public CompilationResourceObj { // accessors Compilation* compilation() const { return _compilation; } IRScope* caller() const { return _caller; } - int caller_bci() const { return _caller_bci; } - ValueStack* caller_state() const { return _caller_state; } int level() const { return _level; } ciMethod* method() const { return _method; } int max_stack() const; // NOTE: expensive - int lock_stack_size() const { - assert(_lock_stack_size != -1, "uninitialized"); - return _lock_stack_size; - } BitMap& requires_phi_function() { return _requires_phi_function; } - // mutators - // Needed because caller state is not ready at time of IRScope construction - void set_caller_state(ValueStack* state) { _caller_state = state; } - // Needed because caller state changes after IRScope construction. - // Computes number of expression stack elements whose state must be - // preserved in the case of an exception; these may be seen by - // caller scopes. Zero when inlining of methods containing exception - // handlers is disabled, otherwise a conservative approximation. - void compute_lock_stack_size(); - // hierarchy bool is_top_scope() const { return _caller == NULL; } void add_callee(IRScope* callee) { _callees.append(callee); } int number_of_callees() const { return _callees.length(); } IRScope* callee_no(int i) const { return _callees.at(i); } - int top_scope_bci() const; // accessors, graph bool is_valid() const { return start() != NULL; } @@ -266,9 +241,6 @@ class CodeEmitInfo: public CompilationResourceObj { XHandlers* _exception_handlers; OopMap* _oop_map; ValueStack* _stack; // used by deoptimization (contains also monitors - int _bci; - CodeEmitInfo* _next; - int _id; bool _is_method_handle_invoke; // true if the associated call site is a MethodHandle call site. FrameMap* frame_map() const { return scope()->compilation()->frame_map(); } @@ -277,23 +249,10 @@ class CodeEmitInfo: public CompilationResourceObj { public: // use scope from ValueStack - CodeEmitInfo(int bci, ValueStack* stack, XHandlers* exception_handlers); - - // used by natives - CodeEmitInfo(IRScope* scope, int bci) - : _scope(scope) - , _bci(bci) - , _oop_map(NULL) - , _scope_debug_info(NULL) - , _stack(NULL) - , _exception_handlers(NULL) - , _next(NULL) - , _id(-1) - , _is_method_handle_invoke(false) { - } + CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers); // make a copy - CodeEmitInfo(CodeEmitInfo* info, bool lock_stack_only = false); + CodeEmitInfo(CodeEmitInfo* info, ValueStack* stack = NULL); // accessors OopMap* oop_map() { return _oop_map; } @@ -301,17 +260,10 @@ class CodeEmitInfo: public CompilationResourceObj { IRScope* scope() const { return _scope; } XHandlers* exception_handlers() const { return _exception_handlers; } ValueStack* stack() const { return _stack; } - int bci() const { return _bci; } void add_register_oop(LIR_Opr opr); void record_debug_info(DebugInformationRecorder* recorder, int pc_offset); - CodeEmitInfo* next() const { return _next; } - void set_next(CodeEmitInfo* next) { _next = next; } - - int id() const { return _id; } - void set_id(int id) { _id = id; } - bool is_method_handle_invoke() const { return _is_method_handle_invoke; } void set_is_method_handle_invoke(bool x) { _is_method_handle_invoke = x; } }; diff --git a/hotspot/src/share/vm/c1/c1_Instruction.cpp b/hotspot/src/share/vm/c1/c1_Instruction.cpp index e0728b2f304..14c834d1f42 100644 --- a/hotspot/src/share/vm/c1/c1_Instruction.cpp +++ b/hotspot/src/share/vm/c1/c1_Instruction.cpp @@ -29,13 +29,6 @@ // Implementation of Instruction -#ifdef ASSERT -void Instruction::create_hi_word() { - assert(type()->is_double_word() && _hi_word == NULL, "only double word has high word"); - _hi_word = new HiWord(this); -} -#endif - Instruction::Condition Instruction::mirror(Condition cond) { switch (cond) { case eql: return eql; @@ -63,6 +56,15 @@ Instruction::Condition Instruction::negate(Condition cond) { return eql; } +void Instruction::update_exception_state(ValueStack* state) { + if (state != NULL && (state->kind() == ValueStack::EmptyExceptionState || state->kind() == ValueStack::ExceptionState)) { + assert(state->kind() == ValueStack::EmptyExceptionState || Compilation::current()->env()->jvmti_can_access_local_variables(), "unexpected state kind"); + _exception_state = state; + } else { + _exception_state = NULL; + } +} + Instruction* Instruction::prev(BlockBegin* block) { Instruction* p = NULL; @@ -75,7 +77,24 @@ Instruction* Instruction::prev(BlockBegin* block) { } +void Instruction::state_values_do(ValueVisitor* f) { + if (state_before() != NULL) { + state_before()->values_do(f); + } + if (exception_state() != NULL){ + exception_state()->values_do(f); + } +} + + #ifndef PRODUCT +void Instruction::check_state(ValueStack* state) { + if (state != NULL) { + state->verify(); + } +} + + void Instruction::print() { InstructionPrinter ip; print(ip); @@ -190,35 +209,6 @@ ciType* CheckCast::exact_type() const { return NULL; } - -void ArithmeticOp::other_values_do(ValueVisitor* f) { - if (lock_stack() != NULL) lock_stack()->values_do(f); -} - -void NullCheck::other_values_do(ValueVisitor* f) { - lock_stack()->values_do(f); -} - -void AccessArray::other_values_do(ValueVisitor* f) { - if (lock_stack() != NULL) lock_stack()->values_do(f); -} - - -// Implementation of AccessField - -void AccessField::other_values_do(ValueVisitor* f) { - if (state_before() != NULL) state_before()->values_do(f); - if (lock_stack() != NULL) lock_stack()->values_do(f); -} - - -// Implementation of StoreIndexed - -IRScope* StoreIndexed::scope() const { - return lock_stack()->scope(); -} - - // Implementation of ArithmeticOp bool ArithmeticOp::is_commutative() const { @@ -266,13 +256,6 @@ bool LogicOp::is_commutative() const { } -// Implementation of CompareOp - -void CompareOp::other_values_do(ValueVisitor* f) { - if (state_before() != NULL) state_before()->values_do(f); -} - - // Implementation of IfOp bool IfOp::is_commutative() const { @@ -301,6 +284,7 @@ IRScope* StateSplit::scope() const { void StateSplit::state_values_do(ValueVisitor* f) { + Instruction::state_values_do(f); if (state() != NULL) state()->values_do(f); } @@ -316,30 +300,17 @@ void BlockBegin::state_values_do(ValueVisitor* f) { } -void MonitorEnter::state_values_do(ValueVisitor* f) { - StateSplit::state_values_do(f); - _lock_stack_before->values_do(f); -} - - -void Intrinsic::state_values_do(ValueVisitor* f) { - StateSplit::state_values_do(f); - if (lock_stack() != NULL) lock_stack()->values_do(f); -} - - // Implementation of Invoke Invoke::Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values* args, int vtable_index, ciMethod* target, ValueStack* state_before) - : StateSplit(result_type) + : StateSplit(result_type, state_before) , _code(code) , _recv(recv) , _args(args) , _vtable_index(vtable_index) , _target(target) - , _state_before(state_before) { set_flag(TargetIsLoadedFlag, target->is_loaded()); set_flag(TargetIsFinalFlag, target_is_loaded() && target->is_final_method()); @@ -376,7 +347,7 @@ void Invoke::state_values_do(ValueVisitor* f) { // Implementation of Contant intx Constant::hash() const { - if (_state == NULL) { + if (state_before() == NULL) { switch (type()->tag()) { case intTag: return HASH2(name(), type()->as_IntConstant()->value()); @@ -499,25 +470,6 @@ BlockBegin* Constant::compare(Instruction::Condition cond, Value right, } -void Constant::other_values_do(ValueVisitor* f) { - if (state() != NULL) state()->values_do(f); -} - - -// Implementation of NewArray - -void NewArray::other_values_do(ValueVisitor* f) { - if (state_before() != NULL) state_before()->values_do(f); -} - - -// Implementation of TypeCheck - -void TypeCheck::other_values_do(ValueVisitor* f) { - if (state_before() != NULL) state_before()->values_do(f); -} - - // Implementation of BlockBegin void BlockBegin::set_end(BlockEnd* end) { @@ -604,23 +556,14 @@ void BlockBegin::substitute_sux(BlockBegin* old_sux, BlockBegin* new_sux) { // of the inserted block, without recomputing the values of the other blocks // in the CFG. Therefore the value of "depth_first_number" in BlockBegin becomes meaningless. BlockBegin* BlockBegin::insert_block_between(BlockBegin* sux) { - // Try to make the bci close to a block with a single pred or sux, - // since this make the block layout algorithm work better. - int bci = -1; - if (sux->number_of_preds() == 1) { - bci = sux->bci(); - } else { - bci = end()->bci(); - } - - BlockBegin* new_sux = new BlockBegin(bci); + BlockBegin* new_sux = new BlockBegin(-99); // mark this block (special treatment when block order is computed) new_sux->set(critical_edge_split_flag); // This goto is not a safepoint. Goto* e = new Goto(sux, false); - new_sux->set_next(e, bci); + new_sux->set_next(e, end()->state()->bci()); new_sux->set_end(e); // setup states ValueStack* s = end()->state(); @@ -763,7 +706,7 @@ bool BlockBegin::try_merge(ValueStack* new_state) { } // copy state because it is altered - new_state = new_state->copy(); + new_state = new_state->copy(ValueStack::BlockBeginState, bci()); // Use method liveness to invalidate dead locals MethodLivenessResult liveness = new_state->scope()->method()->liveness_at_bci(bci()); @@ -800,19 +743,9 @@ bool BlockBegin::try_merge(ValueStack* new_state) { // initialize state of block set_state(new_state); - } else if (existing_state->is_same_across_scopes(new_state)) { + } else if (existing_state->is_same(new_state)) { TRACE_PHI(tty->print_cr("exisiting state found")); - // Inlining may cause the local state not to match up, so walk up - // the new state until we get to the same scope as the - // existing and then start processing from there. - while (existing_state->scope() != new_state->scope()) { - new_state = new_state->caller_state(); - assert(new_state != NULL, "could not match up scopes"); - - assert(false, "check if this is necessary"); - } - assert(existing_state->scope() == new_state->scope(), "not matching"); assert(existing_state->locals_size() == new_state->locals_size(), "not matching"); assert(existing_state->stack_size() == new_state->stack_size(), "not matching"); @@ -969,11 +902,6 @@ void BlockEnd::substitute_sux(BlockBegin* old_sux, BlockBegin* new_sux) { } -void BlockEnd::other_values_do(ValueVisitor* f) { - if (state_before() != NULL) state_before()->values_do(f); -} - - // Implementation of Phi // Normal phi functions take their operands from the last instruction of the @@ -1006,11 +934,6 @@ int Phi::operand_count() const { } -// Implementation of Throw - -void Throw::state_values_do(ValueVisitor* f) { - BlockEnd::state_values_do(f); -} void ProfileInvoke::state_values_do(ValueVisitor* f) { if (state() != NULL) state()->values_do(f); diff --git a/hotspot/src/share/vm/c1/c1_Instruction.hpp b/hotspot/src/share/vm/c1/c1_Instruction.hpp index 52b2f84a76f..9f0a25ab38d 100644 --- a/hotspot/src/share/vm/c1/c1_Instruction.hpp +++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp @@ -38,7 +38,6 @@ typedef LIR_OprDesc* LIR_Opr; // serve factoring. class Instruction; -class HiWord; class Phi; class Local; class Constant; @@ -149,7 +148,6 @@ class BlockList: public _BlockList { class InstructionVisitor: public StackObj { public: - void do_HiWord (HiWord* x) { ShouldNotReachHere(); } virtual void do_Phi (Phi* x) = 0; virtual void do_Local (Local* x) = 0; virtual void do_Constant (Constant* x) = 0; @@ -272,7 +270,9 @@ class InstructionVisitor: public StackObj { class Instruction: public CompilationResourceObj { private: int _id; // the unique instruction id - int _bci; // the instruction bci +#ifndef PRODUCT + int _printable_bci; // the bci of the instruction for printing +#endif int _use_count; // the number of instructions refering to this value (w/o prev/next); only roots can have use count = 0 or > 1 int _pin_state; // set of PinReason describing the reason for pinning ValueType* _type; // the instruction value type @@ -281,17 +281,18 @@ class Instruction: public CompilationResourceObj { LIR_Opr _operand; // LIR specific information unsigned int _flags; // Flag bits + ValueStack* _state_before; // Copy of state with input operands still on stack (or NULL) + ValueStack* _exception_state; // Copy of state for exception handling XHandlers* _exception_handlers; // Flat list of exception handlers covering this instruction -#ifdef ASSERT - HiWord* _hi_word; -#endif - friend class UseCountComputer; friend class BlockBegin; + void update_exception_state(ValueStack* state); + + bool has_printable_bci() const { return NOT_PRODUCT(_printable_bci != -99) PRODUCT_ONLY(false); } + protected: - void set_bci(int bci) { assert(bci == SynchronizationEntryBCI || bci >= 0, "illegal bci"); _bci = bci; } void set_type(ValueType* type) { assert(type != NULL, "type must exist"); _type = type; @@ -325,6 +326,7 @@ class Instruction: public CompilationResourceObj { NeedsPatchingFlag, ThrowIncompatibleClassChangeErrorFlag, ProfileMDOFlag, + IsLinkedInBlockFlag, InstructionLastFlag }; @@ -356,31 +358,31 @@ class Instruction: public CompilationResourceObj { } // creation - Instruction(ValueType* type, bool type_is_constant = false, bool create_hi = true) - : _bci(-99) - , _use_count(0) + Instruction(ValueType* type, ValueStack* state_before = NULL, bool type_is_constant = false, bool create_hi = true) + : _use_count(0) +#ifndef PRODUCT + , _printable_bci(-99) +#endif , _pin_state(0) , _type(type) , _next(NULL) , _subst(NULL) , _flags(0) , _operand(LIR_OprFact::illegalOpr) + , _state_before(state_before) , _exception_handlers(NULL) -#ifdef ASSERT - , _hi_word(NULL) -#endif { + check_state(state_before); assert(type != NULL && (!type->is_constant() || type_is_constant), "type must exist"); -#ifdef ASSERT - if (create_hi && type->is_double_word()) { - create_hi_word(); - } -#endif + update_exception_state(_state_before); } // accessors int id() const { return _id; } - int bci() const { return _bci; } +#ifndef PRODUCT + int printable_bci() const { assert(has_printable_bci(), "_printable_bci should have been set"); return _printable_bci; } + void set_printable_bci(int bci) { NOT_PRODUCT(_printable_bci = bci;) } +#endif int use_count() const { return _use_count; } int pin_state() const { return _pin_state; } bool is_pinned() const { return _pin_state != 0 || PinAllInstructions; } @@ -393,9 +395,13 @@ class Instruction: public CompilationResourceObj { void set_needs_null_check(bool f) { set_flag(NeedsNullCheckFlag, f); } bool needs_null_check() const { return check_flag(NeedsNullCheckFlag); } + bool is_linked() const { return check_flag(IsLinkedInBlockFlag); } + bool can_be_linked() { return as_Local() == NULL && as_Phi() == NULL; } bool has_uses() const { return use_count() > 0; } - bool is_root() const { return is_pinned() || use_count() > 1; } + ValueStack* state_before() const { return _state_before; } + ValueStack* exception_state() const { return _exception_state; } + virtual bool needs_exception_state() const { return true; } XHandlers* exception_handlers() const { return _exception_handlers; } // manipulation @@ -403,19 +409,25 @@ class Instruction: public CompilationResourceObj { void pin() { _pin_state |= PinUnknown; } // DANGEROUS: only used by EliminateStores void unpin(PinReason reason) { assert((reason & PinUnknown) == 0, "can't unpin unknown state"); _pin_state &= ~reason; } - virtual void set_lock_stack(ValueStack* l) { /* do nothing*/ } - virtual ValueStack* lock_stack() const { return NULL; } - Instruction* set_next(Instruction* next, int bci) { - if (next != NULL) { - assert(as_BlockEnd() == NULL, "BlockEnd instructions must have no next"); - assert(next->as_Phi() == NULL && next->as_Local() == NULL, "shouldn't link these instructions into list"); - next->set_bci(bci); - } + Instruction* set_next(Instruction* next) { + assert(next->has_printable_bci(), "_printable_bci should have been set"); + assert(next != NULL, "must not be NULL"); + assert(as_BlockEnd() == NULL, "BlockEnd instructions must have no next"); + assert(next->can_be_linked(), "shouldn't link these instructions into list"); + + next->set_flag(Instruction::IsLinkedInBlockFlag, true); _next = next; return next; } + Instruction* set_next(Instruction* next, int bci) { +#ifndef PRODUCT + next->set_printable_bci(bci); +#endif + return set_next(next); + } + void set_subst(Instruction* subst) { assert(subst == NULL || type()->base() == subst->type()->base() || @@ -423,14 +435,7 @@ class Instruction: public CompilationResourceObj { _subst = subst; } void set_exception_handlers(XHandlers *xhandlers) { _exception_handlers = xhandlers; } - -#ifdef ASSERT - // HiWord is used for debugging and is allocated early to avoid - // allocation at inconvenient points - HiWord* hi_word() { return _hi_word; } - void create_hi_word(); -#endif - + void set_exception_state(ValueStack* s) { check_state(s); _exception_state = s; } // machine-specifics void set_operand(LIR_Opr operand) { assert(operand != LIR_OprFact::illegalOpr, "operand must exist"); _operand = operand; } @@ -438,7 +443,6 @@ class Instruction: public CompilationResourceObj { // generic virtual Instruction* as_Instruction() { return this; } // to satisfy HASHING1 macro - virtual HiWord* as_HiWord() { return NULL; } virtual Phi* as_Phi() { return NULL; } virtual Local* as_Local() { return NULL; } virtual Constant* as_Constant() { return NULL; } @@ -493,7 +497,7 @@ class Instruction: public CompilationResourceObj { virtual bool can_trap() const { return false; } virtual void input_values_do(ValueVisitor* f) = 0; - virtual void state_values_do(ValueVisitor* f) { /* usually no state - override on demand */ } + virtual void state_values_do(ValueVisitor* f); virtual void other_values_do(ValueVisitor* f) { /* usually no other - override on demand */ } void values_do(ValueVisitor* f) { input_values_do(f); state_values_do(f); other_values_do(f); } @@ -505,6 +509,7 @@ class Instruction: public CompilationResourceObj { HASHING1(Instruction, false, id()) // hashing disabled by default // debugging + static void check_state(ValueStack* state) PRODUCT_RETURN; void print() PRODUCT_RETURN; void print_line() PRODUCT_RETURN; void print(InstructionPrinter& ip) PRODUCT_RETURN; @@ -541,40 +546,6 @@ class AssertValues: public ValueVisitor { #endif // ASSERT -// A HiWord occupies the 'high word' of a 2-word -// expression stack entry. Hi & lo words must be -// paired on the expression stack (otherwise the -// bytecode sequence is illegal). Note that 'hi' -// refers to the IR expression stack format and -// does *not* imply a machine word ordering. No -// HiWords are used in optimized mode for speed, -// but NULL pointers are used instead. - -LEAF(HiWord, Instruction) - private: - Value _lo_word; - - public: - // creation - HiWord(Value lo_word) - : Instruction(illegalType, false, false), - _lo_word(lo_word) { - // hi-words are also allowed for illegal lo-words - assert(lo_word->type()->is_double_word() || lo_word->type()->is_illegal(), - "HiWord must be used for 2-word values only"); - } - - // accessors - Value lo_word() const { return _lo_word->subst(); } - - // for invalidating of HiWords - void make_illegal() { set_type(illegalType); } - - // generic - virtual void input_values_do(ValueVisitor* f) { ShouldNotReachHere(); } -}; - - // A Phi is a phi function in the sense of SSA form. It stands for // the value of a local variable at the beginning of a join block. // A Phi consists of n operands, one for every incoming branch. @@ -656,31 +627,25 @@ LEAF(Local, Instruction) LEAF(Constant, Instruction) - ValueStack* _state; - public: // creation Constant(ValueType* type): - Instruction(type, true) - , _state(NULL) { + Instruction(type, NULL, true) + { assert(type->is_constant(), "must be a constant"); } - Constant(ValueType* type, ValueStack* state): - Instruction(type, true) - , _state(state) { - assert(state != NULL, "only used for constants which need patching"); + Constant(ValueType* type, ValueStack* state_before): + Instruction(type, state_before, true) + { + assert(state_before != NULL, "only used for constants which need patching"); assert(type->is_constant(), "must be a constant"); // since it's patching it needs to be pinned pin(); } - ValueStack* state() const { return _state; } - - // generic - virtual bool can_trap() const { return state() != NULL; } + virtual bool can_trap() const { return state_before() != NULL; } virtual void input_values_do(ValueVisitor* f) { /* no values */ } - virtual void other_values_do(ValueVisitor* f); virtual intx hash() const; virtual bool is_equal(Value v) const; @@ -695,20 +660,16 @@ BASE(AccessField, Instruction) Value _obj; int _offset; ciField* _field; - ValueStack* _state_before; // state is set only for unloaded or uninitialized fields - ValueStack* _lock_stack; // contains lock and scope information NullCheck* _explicit_null_check; // For explicit null check elimination public: // creation - AccessField(Value obj, int offset, ciField* field, bool is_static, ValueStack* lock_stack, + AccessField(Value obj, int offset, ciField* field, bool is_static, ValueStack* state_before, bool is_loaded, bool is_initialized) - : Instruction(as_ValueType(field->type()->basic_type())) + : Instruction(as_ValueType(field->type()->basic_type()), state_before) , _obj(obj) , _offset(offset) , _field(field) - , _lock_stack(lock_stack) - , _state_before(state_before) , _explicit_null_check(NULL) { set_needs_null_check(!is_static); @@ -734,13 +695,11 @@ BASE(AccessField, Instruction) bool is_static() const { return check_flag(IsStaticFlag); } bool is_loaded() const { return check_flag(IsLoadedFlag); } bool is_initialized() const { return check_flag(IsInitializedFlag); } - ValueStack* state_before() const { return _state_before; } - ValueStack* lock_stack() const { return _lock_stack; } NullCheck* explicit_null_check() const { return _explicit_null_check; } bool needs_patching() const { return check_flag(NeedsPatchingFlag); } // manipulation - void set_lock_stack(ValueStack* l) { _lock_stack = l; } + // Under certain circumstances, if a previous NullCheck instruction // proved the target object non-null, we can eliminate the explicit // null check and do an implicit one, simply specifying the debug @@ -751,16 +710,15 @@ BASE(AccessField, Instruction) // generic virtual bool can_trap() const { return needs_null_check() || needs_patching(); } virtual void input_values_do(ValueVisitor* f) { f->visit(&_obj); } - virtual void other_values_do(ValueVisitor* f); }; LEAF(LoadField, AccessField) public: // creation - LoadField(Value obj, int offset, ciField* field, bool is_static, ValueStack* lock_stack, + LoadField(Value obj, int offset, ciField* field, bool is_static, ValueStack* state_before, bool is_loaded, bool is_initialized) - : AccessField(obj, offset, field, is_static, lock_stack, state_before, is_loaded, is_initialized) + : AccessField(obj, offset, field, is_static, state_before, is_loaded, is_initialized) {} ciType* declared_type() const; @@ -777,9 +735,9 @@ LEAF(StoreField, AccessField) public: // creation - StoreField(Value obj, int offset, ciField* field, Value value, bool is_static, ValueStack* lock_stack, + StoreField(Value obj, int offset, ciField* field, Value value, bool is_static, ValueStack* state_before, bool is_loaded, bool is_initialized) - : AccessField(obj, offset, field, is_static, lock_stack, state_before, is_loaded, is_initialized) + : AccessField(obj, offset, field, is_static, state_before, is_loaded, is_initialized) , _value(value) { set_flag(NeedsWriteBarrierFlag, as_ValueType(field_type())->is_object()); @@ -799,29 +757,23 @@ LEAF(StoreField, AccessField) BASE(AccessArray, Instruction) private: Value _array; - ValueStack* _lock_stack; public: // creation - AccessArray(ValueType* type, Value array, ValueStack* lock_stack) - : Instruction(type) + AccessArray(ValueType* type, Value array, ValueStack* state_before) + : Instruction(type, state_before) , _array(array) - , _lock_stack(lock_stack) { + { set_needs_null_check(true); ASSERT_VALUES pin(); // instruction with side effect (null exception or range check throwing) } Value array() const { return _array; } - ValueStack* lock_stack() const { return _lock_stack; } - - // setters - void set_lock_stack(ValueStack* l) { _lock_stack = l; } // generic virtual bool can_trap() const { return needs_null_check(); } virtual void input_values_do(ValueVisitor* f) { f->visit(&_array); } - virtual void other_values_do(ValueVisitor* f); }; @@ -831,8 +783,8 @@ LEAF(ArrayLength, AccessArray) public: // creation - ArrayLength(Value array, ValueStack* lock_stack) - : AccessArray(intType, array, lock_stack) + ArrayLength(Value array, ValueStack* state_before) + : AccessArray(intType, array, state_before) , _explicit_null_check(NULL) {} // accessors @@ -855,8 +807,8 @@ BASE(AccessIndexed, AccessArray) public: // creation - AccessIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* lock_stack) - : AccessArray(as_ValueType(elt_type), array, lock_stack) + AccessIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* state_before) + : AccessArray(as_ValueType(elt_type), array, state_before) , _index(index) , _length(length) , _elt_type(elt_type) @@ -883,8 +835,8 @@ LEAF(LoadIndexed, AccessIndexed) public: // creation - LoadIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* lock_stack) - : AccessIndexed(array, index, length, elt_type, lock_stack) + LoadIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* state_before) + : AccessIndexed(array, index, length, elt_type, state_before) , _explicit_null_check(NULL) {} // accessors @@ -910,8 +862,8 @@ LEAF(StoreIndexed, AccessIndexed) int _profiled_bci; public: // creation - StoreIndexed(Value array, Value index, Value length, BasicType elt_type, Value value, ValueStack* lock_stack) - : AccessIndexed(array, index, length, elt_type, lock_stack) + StoreIndexed(Value array, Value index, Value length, BasicType elt_type, Value value, ValueStack* state_before) + : AccessIndexed(array, index, length, elt_type, state_before) , _value(value), _profiled_method(NULL), _profiled_bci(0) { set_flag(NeedsWriteBarrierFlag, (as_ValueType(elt_type)->is_object())); @@ -922,7 +874,6 @@ LEAF(StoreIndexed, AccessIndexed) // accessors Value value() const { return _value; } - IRScope* scope() const; // the state's scope bool needs_write_barrier() const { return check_flag(NeedsWriteBarrierFlag); } bool needs_store_check() const { return check_flag(NeedsStoreCheckFlag); } // Helpers for methodDataOop profiling @@ -963,7 +914,12 @@ BASE(Op2, Instruction) public: // creation - Op2(ValueType* type, Bytecodes::Code op, Value x, Value y) : Instruction(type), _op(op), _x(x), _y(y) { + Op2(ValueType* type, Bytecodes::Code op, Value x, Value y, ValueStack* state_before = NULL) + : Instruction(type, state_before) + , _op(op) + , _x(x) + , _y(y) + { ASSERT_VALUES } @@ -985,28 +941,21 @@ BASE(Op2, Instruction) LEAF(ArithmeticOp, Op2) - private: - ValueStack* _lock_stack; // used only for division operations public: // creation - ArithmeticOp(Bytecodes::Code op, Value x, Value y, bool is_strictfp, ValueStack* lock_stack) - : Op2(x->type()->meet(y->type()), op, x, y) - , _lock_stack(lock_stack) { + ArithmeticOp(Bytecodes::Code op, Value x, Value y, bool is_strictfp, ValueStack* state_before) + : Op2(x->type()->meet(y->type()), op, x, y, state_before) + { set_flag(IsStrictfpFlag, is_strictfp); if (can_trap()) pin(); } // accessors - ValueStack* lock_stack() const { return _lock_stack; } bool is_strictfp() const { return check_flag(IsStrictfpFlag); } - // setters - void set_lock_stack(ValueStack* l) { _lock_stack = l; } - // generic virtual bool is_commutative() const; virtual bool can_trap() const; - virtual void other_values_do(ValueVisitor* f); HASHING3(Op2, true, op(), x()->subst(), y()->subst()) }; @@ -1033,21 +982,14 @@ LEAF(LogicOp, Op2) LEAF(CompareOp, Op2) - private: - ValueStack* _state_before; // for deoptimization, when canonicalizing public: // creation CompareOp(Bytecodes::Code op, Value x, Value y, ValueStack* state_before) - : Op2(intType, op, x, y) - , _state_before(state_before) + : Op2(intType, op, x, y, state_before) {} - // accessors - ValueStack* state_before() const { return _state_before; } - // generic HASHING3(Op2, true, op(), x()->subst(), y()->subst()) - virtual void other_values_do(ValueVisitor* f); }; @@ -1103,11 +1045,13 @@ LEAF(Convert, Instruction) LEAF(NullCheck, Instruction) private: Value _obj; - ValueStack* _lock_stack; public: // creation - NullCheck(Value obj, ValueStack* lock_stack) : Instruction(obj->type()->base()), _obj(obj), _lock_stack(lock_stack) { + NullCheck(Value obj, ValueStack* state_before) + : Instruction(obj->type()->base(), state_before) + , _obj(obj) + { ASSERT_VALUES set_can_trap(true); assert(_obj->type()->is_object(), "null check must be applied to objects only"); @@ -1116,16 +1060,13 @@ LEAF(NullCheck, Instruction) // accessors Value obj() const { return _obj; } - ValueStack* lock_stack() const { return _lock_stack; } // setters - void set_lock_stack(ValueStack* l) { _lock_stack = l; } void set_can_trap(bool can_trap) { set_flag(CanTrapFlag, can_trap); } // generic virtual bool can_trap() const { return check_flag(CanTrapFlag); /* null-check elimination sets to false */ } virtual void input_values_do(ValueVisitor* f) { f->visit(&_obj); } - virtual void other_values_do(ValueVisitor* f); HASHING1(NullCheck, true, obj()->subst()) }; @@ -1139,7 +1080,10 @@ BASE(StateSplit, Instruction) public: // creation - StateSplit(ValueType* type) : Instruction(type), _state(NULL) { + StateSplit(ValueType* type, ValueStack* state_before = NULL) + : Instruction(type, state_before) + , _state(NULL) + { pin(PinStateSplitConstructor); } @@ -1148,7 +1092,7 @@ BASE(StateSplit, Instruction) IRScope* scope() const; // the state's scope // manipulation - void set_state(ValueStack* state) { _state = state; } + void set_state(ValueStack* state) { assert(_state == NULL, "overwriting existing state"); check_state(state); _state = state; } // generic virtual void input_values_do(ValueVisitor* f) { /* no values */ } @@ -1164,7 +1108,6 @@ LEAF(Invoke, StateSplit) BasicTypeList* _signature; int _vtable_index; ciMethod* _target; - ValueStack* _state_before; // Required for deoptimization. public: // creation @@ -1180,7 +1123,6 @@ LEAF(Invoke, StateSplit) int vtable_index() const { return _vtable_index; } BasicTypeList* signature() const { return _signature; } ciMethod* target() const { return _target; } - ValueStack* state_before() const { return _state_before; } // Returns false if target is not loaded bool target_is_final() const { return check_flag(TargetIsFinalFlag); } @@ -1191,6 +1133,8 @@ LEAF(Invoke, StateSplit) // JSR 292 support bool is_invokedynamic() const { return code() == Bytecodes::_invokedynamic; } + virtual bool needs_exception_state() const { return false; } + // generic virtual bool can_trap() const { return true; } virtual void input_values_do(ValueVisitor* f) { @@ -1208,11 +1152,16 @@ LEAF(NewInstance, StateSplit) public: // creation - NewInstance(ciInstanceKlass* klass) : StateSplit(instanceType), _klass(klass) {} + NewInstance(ciInstanceKlass* klass, ValueStack* state_before) + : StateSplit(instanceType, state_before) + , _klass(klass) + {} // accessors ciInstanceKlass* klass() const { return _klass; } + virtual bool needs_exception_state() const { return false; } + // generic virtual bool can_trap() const { return true; } ciType* exact_type() const; @@ -1222,22 +1171,24 @@ LEAF(NewInstance, StateSplit) BASE(NewArray, StateSplit) private: Value _length; - ValueStack* _state_before; public: // creation - NewArray(Value length, ValueStack* state_before) : StateSplit(objectType), _length(length), _state_before(state_before) { + NewArray(Value length, ValueStack* state_before) + : StateSplit(objectType, state_before) + , _length(length) + { // Do not ASSERT_VALUES since length is NULL for NewMultiArray } // accessors - ValueStack* state_before() const { return _state_before; } Value length() const { return _length; } + virtual bool needs_exception_state() const { return false; } + // generic virtual bool can_trap() const { return true; } virtual void input_values_do(ValueVisitor* f) { StateSplit::input_values_do(f); f->visit(&_length); } - virtual void other_values_do(ValueVisitor* f); }; @@ -1247,7 +1198,10 @@ LEAF(NewTypeArray, NewArray) public: // creation - NewTypeArray(Value length, BasicType elt_type) : NewArray(length, NULL), _elt_type(elt_type) {} + NewTypeArray(Value length, BasicType elt_type, ValueStack* state_before) + : NewArray(length, state_before) + , _elt_type(elt_type) + {} // accessors BasicType elt_type() const { return _elt_type; } @@ -1303,7 +1257,6 @@ BASE(TypeCheck, StateSplit) private: ciKlass* _klass; Value _obj; - ValueStack* _state_before; ciMethod* _profiled_method; int _profiled_bci; @@ -1311,14 +1264,13 @@ BASE(TypeCheck, StateSplit) public: // creation TypeCheck(ciKlass* klass, Value obj, ValueType* type, ValueStack* state_before) - : StateSplit(type), _klass(klass), _obj(obj), _state_before(state_before), + : StateSplit(type, state_before), _klass(klass), _obj(obj), _profiled_method(NULL), _profiled_bci(0) { ASSERT_VALUES set_direct_compare(false); } // accessors - ValueStack* state_before() const { return _state_before; } ciKlass* klass() const { return _klass; } Value obj() const { return _obj; } bool is_loaded() const { return klass() != NULL; } @@ -1330,7 +1282,6 @@ BASE(TypeCheck, StateSplit) // generic virtual bool can_trap() const { return true; } virtual void input_values_do(ValueVisitor* f) { StateSplit::input_values_do(f); f->visit(&_obj); } - virtual void other_values_do(ValueVisitor* f); // Helpers for methodDataOop profiling void set_should_profile(bool value) { set_flag(ProfileMDOFlag, value); } @@ -1364,6 +1315,8 @@ LEAF(InstanceOf, TypeCheck) public: // creation InstanceOf(ciKlass* klass, Value obj, ValueStack* state_before) : TypeCheck(klass, obj, intType, state_before) {} + + virtual bool needs_exception_state() const { return false; } }; @@ -1374,8 +1327,8 @@ BASE(AccessMonitor, StateSplit) public: // creation - AccessMonitor(Value obj, int monitor_no) - : StateSplit(illegalType) + AccessMonitor(Value obj, int monitor_no, ValueStack* state_before = NULL) + : StateSplit(illegalType, state_before) , _obj(obj) , _monitor_no(monitor_no) { @@ -1393,22 +1346,14 @@ BASE(AccessMonitor, StateSplit) LEAF(MonitorEnter, AccessMonitor) - private: - ValueStack* _lock_stack_before; - public: // creation - MonitorEnter(Value obj, int monitor_no, ValueStack* lock_stack_before) - : AccessMonitor(obj, monitor_no) - , _lock_stack_before(lock_stack_before) + MonitorEnter(Value obj, int monitor_no, ValueStack* state_before) + : AccessMonitor(obj, monitor_no, state_before) { ASSERT_VALUES } - // accessors - ValueStack* lock_stack_before() const { return _lock_stack_before; } - virtual void state_values_do(ValueVisitor* f); - // generic virtual bool can_trap() const { return true; } }; @@ -1417,7 +1362,11 @@ LEAF(MonitorEnter, AccessMonitor) LEAF(MonitorExit, AccessMonitor) public: // creation - MonitorExit(Value obj, int monitor_no) : AccessMonitor(obj, monitor_no) {} + MonitorExit(Value obj, int monitor_no) + : AccessMonitor(obj, monitor_no, NULL) + { + ASSERT_VALUES + } }; @@ -1425,7 +1374,6 @@ LEAF(Intrinsic, StateSplit) private: vmIntrinsics::ID _id; Values* _args; - ValueStack* _lock_stack; Value _recv; public: @@ -1440,13 +1388,12 @@ LEAF(Intrinsic, StateSplit) vmIntrinsics::ID id, Values* args, bool has_receiver, - ValueStack* lock_stack, + ValueStack* state_before, bool preserves_state, bool cantrap = true) - : StateSplit(type) + : StateSplit(type, state_before) , _id(id) , _args(args) - , _lock_stack(lock_stack) , _recv(NULL) { assert(args != NULL, "args must exist"); @@ -1468,7 +1415,6 @@ LEAF(Intrinsic, StateSplit) vmIntrinsics::ID id() const { return _id; } int number_of_arguments() const { return _args->length(); } Value argument_at(int i) const { return _args->at(i); } - ValueStack* lock_stack() const { return _lock_stack; } bool has_receiver() const { return (_recv != NULL); } Value receiver() const { assert(has_receiver(), "must have receiver"); return _recv; } @@ -1480,8 +1426,6 @@ LEAF(Intrinsic, StateSplit) StateSplit::input_values_do(f); for (int i = 0; i < _args->length(); i++) f->visit(_args->adr_at(i)); } - virtual void state_values_do(ValueVisitor* f); - }; @@ -1490,6 +1434,7 @@ class LIR_List; LEAF(BlockBegin, StateSplit) private: int _block_id; // the unique block id + int _bci; // start-bci of block int _depth_first_number; // number of this block in a depth-first ordering int _linear_scan_number; // number of this block in linear-scan ordering int _loop_depth; // the loop nesting level of this block @@ -1546,6 +1491,7 @@ LEAF(BlockBegin, StateSplit) // creation BlockBegin(int bci) : StateSplit(illegalType) + , _bci(bci) , _depth_first_number(-1) , _linear_scan_number(-1) , _loop_depth(0) @@ -1570,11 +1516,14 @@ LEAF(BlockBegin, StateSplit) , _total_preds(0) , _stores_to_locals() { - set_bci(bci); +#ifndef PRODUCT + set_printable_bci(bci); +#endif } // accessors int block_id() const { return _block_id; } + int bci() const { return _bci; } BlockList* successors() { return &_successors; } BlockBegin* dominator() const { return _dominator; } int loop_depth() const { return _loop_depth; } @@ -1596,7 +1545,6 @@ LEAF(BlockBegin, StateSplit) BitMap& stores_to_locals() { return _stores_to_locals; } // manipulation - void set_bci(int bci) { Instruction::set_bci(bci); } void set_dominator(BlockBegin* dom) { _dominator = dom; } void set_loop_depth(int d) { _loop_depth = d; } void set_depth_first_number(int dfn) { _depth_first_number = dfn; } @@ -1694,7 +1642,6 @@ BASE(BlockEnd, StateSplit) private: BlockBegin* _begin; BlockList* _sux; - ValueStack* _state_before; protected: BlockList* sux() const { return _sux; } @@ -1710,24 +1657,20 @@ BASE(BlockEnd, StateSplit) public: // creation BlockEnd(ValueType* type, ValueStack* state_before, bool is_safepoint) - : StateSplit(type) + : StateSplit(type, state_before) , _begin(NULL) , _sux(NULL) - , _state_before(state_before) { + { set_flag(IsSafepointFlag, is_safepoint); } // accessors - ValueStack* state_before() const { return _state_before; } bool is_safepoint() const { return check_flag(IsSafepointFlag); } BlockBegin* begin() const { return _begin; } // manipulation void set_begin(BlockBegin* begin); - // generic - virtual void other_values_do(ValueVisitor* f); - // successors int number_of_sux() const { return _sux != NULL ? _sux->length() : 0; } BlockBegin* sux_at(int i) const { return _sux->at(i); } @@ -1919,6 +1862,8 @@ BASE(Switch, BlockEnd) Value tag() const { return _tag; } int length() const { return number_of_sux() - 1; } + virtual bool needs_exception_state() const { return false; } + // generic virtual void input_values_do(ValueVisitor* f) { BlockEnd::input_values_do(f); f->visit(&_tag); } }; @@ -1996,7 +1941,6 @@ LEAF(Throw, BlockEnd) // generic virtual bool can_trap() const { return true; } virtual void input_values_do(ValueVisitor* f) { BlockEnd::input_values_do(f); f->visit(&_exception); } - virtual void state_values_do(ValueVisitor* f); }; @@ -2091,7 +2035,6 @@ BASE(UnsafeOp, Instruction) // generic virtual void input_values_do(ValueVisitor* f) { } - virtual void other_values_do(ValueVisitor* f) { } }; diff --git a/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp b/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp index 84e7b6fb897..c88a9a60a8c 100644 --- a/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp +++ b/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp @@ -316,7 +316,7 @@ void InstructionPrinter::print_head() { void InstructionPrinter::print_line(Instruction* instr) { // print instruction data on one line if (instr->is_pinned()) output()->put('.'); - fill_to(bci_pos ); output()->print("%d", instr->bci()); + fill_to(bci_pos ); output()->print("%d", instr->printable_bci()); fill_to(use_pos ); output()->print("%d", instr->use_count()); fill_to(temp_pos ); print_temp(instr); fill_to(instr_pos); print_instr(instr); @@ -569,7 +569,7 @@ void InstructionPrinter::do_BlockBegin(BlockBegin* x) { if (printed_flag) output()->print(") "); // print block bci range - output()->print("[%d, %d]", x->bci(), (end == NULL ? -1 : end->bci())); + output()->print("[%d, %d]", x->bci(), (end == NULL ? -1 : end->printable_bci())); // print block successors if (end != NULL && end->number_of_sux() > 0) { diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp index 8a53cd5c39d..62a3a81c94d 100644 --- a/hotspot/src/share/vm/c1/c1_LIR.cpp +++ b/hotspot/src/share/vm/c1/c1_LIR.cpp @@ -1520,7 +1520,7 @@ static void print_block(BlockBegin* x) { if (x->is_set(BlockBegin::linear_scan_loop_end_flag)) tty->print("le "); // print block bci range - tty->print("[%d, %d] ", x->bci(), (end == NULL ? -1 : end->bci())); + tty->print("[%d, %d] ", x->bci(), (end == NULL ? -1 : end->printable_bci())); // print predecessors and successors if (x->number_of_preds() > 0) { @@ -1576,7 +1576,7 @@ void LIR_Op::print_on(outputStream* out) const { } out->print(name()); out->print(" "); print_instr(out); - if (info() != NULL) out->print(" [bci:%d]", info()->bci()); + if (info() != NULL) out->print(" [bci:%d]", info()->stack()->bci()); #ifdef ASSERT if (Verbose && _file != NULL) { out->print(" (%s:%d)", _file, _line); @@ -1781,7 +1781,7 @@ void LIR_OpBranch::print_instr(outputStream* out) const { out->print("["); stub()->print_name(out); out->print(": 0x%x]", stub()); - if (stub()->info() != NULL) out->print(" [bci:%d]", stub()->info()->bci()); + if (stub()->info() != NULL) out->print(" [bci:%d]", stub()->info()->stack()->bci()); } else { out->print("[label:0x%x] ", label()); } @@ -1896,7 +1896,7 @@ void LIR_OpTypeCheck::print_instr(outputStream* out) const { tmp2()->print(out); out->print(" "); tmp3()->print(out); out->print(" "); result_opr()->print(out); out->print(" "); - if (info_for_exception() != NULL) out->print(" [bci:%d]", info_for_exception()->bci()); + if (info_for_exception() != NULL) out->print(" [bci:%d]", info_for_exception()->stack()->bci()); } diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp index de2a1a9f21d..95127d8abae 100644 --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp @@ -35,7 +35,7 @@ void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_cod append_patching_stub(patch); #ifdef ASSERT - Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->bci()); + Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci()); if (patch->id() == PatchingStub::access_field_id) { switch (code) { case Bytecodes::_putstatic: @@ -221,7 +221,7 @@ void LIR_Assembler::emit_block(BlockBegin* block) { #ifndef PRODUCT if (CommentedAssembly) { stringStream st; - st.print_cr(" block B%d [%d, %d]", block->block_id(), block->bci(), block->end()->bci()); + st.print_cr(" block B%d [%d, %d]", block->block_id(), block->bci(), block->end()->printable_bci()); _masm->block_comment(st.as_string()); } #endif @@ -312,7 +312,7 @@ void LIR_Assembler::add_call_info(int pc_offset, CodeEmitInfo* cinfo) { static ValueStack* debug_info(Instruction* ins) { StateSplit* ss = ins->as_StateSplit(); if (ss != NULL) return ss->state(); - return ins->lock_stack(); + return ins->state_before(); } void LIR_Assembler::process_debug_info(LIR_Op* op) { @@ -327,8 +327,7 @@ void LIR_Assembler::process_debug_info(LIR_Op* op) { if (vstack == NULL) return; if (_pending_non_safepoint != NULL) { // Got some old debug info. Get rid of it. - if (_pending_non_safepoint->bci() == src->bci() && - debug_info(_pending_non_safepoint) == vstack) { + if (debug_info(_pending_non_safepoint) == vstack) { _pending_non_safepoint_offset = pc_offset; return; } @@ -358,7 +357,7 @@ static ValueStack* nth_oldest(ValueStack* s, int n, int& bci_result) { ValueStack* tc = t->caller_state(); if (tc == NULL) return s; t = tc; - bci_result = s->scope()->caller_bci(); + bci_result = tc->bci(); s = s->caller_state(); } } @@ -366,7 +365,7 @@ static ValueStack* nth_oldest(ValueStack* s, int n, int& bci_result) { void LIR_Assembler::record_non_safepoint_debug_info() { int pc_offset = _pending_non_safepoint_offset; ValueStack* vstack = debug_info(_pending_non_safepoint); - int bci = _pending_non_safepoint->bci(); + int bci = vstack->bci(); DebugInformationRecorder* debug_info = compilation()->debug_info_recorder(); assert(debug_info->recording_non_safepoints(), "sanity"); @@ -380,7 +379,7 @@ void LIR_Assembler::record_non_safepoint_debug_info() { if (s == NULL) break; IRScope* scope = s->scope(); //Always pass false for reexecute since these ScopeDescs are never used for deopt - debug_info->describe_scope(pc_offset, scope->method(), s_bci, false/*reexecute*/); + debug_info->describe_scope(pc_offset, scope->method(), s->bci(), false/*reexecute*/); } debug_info->end_non_safepoint(pc_offset); diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp index 41356516d79..ed3596dc67c 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp @@ -386,18 +386,26 @@ void LIRGenerator::walk(Value instr) { CodeEmitInfo* LIRGenerator::state_for(Instruction* x, ValueStack* state, bool ignore_xhandler) { - int index; - Value value; - for_each_stack_value(state, index, value) { - assert(value->subst() == value, "missed substition"); - if (!value->is_pinned() && value->as_Constant() == NULL && value->as_Local() == NULL) { - walk(value); - assert(value->operand()->is_valid(), "must be evaluated now"); - } - } + assert(state != NULL, "state must be defined"); + ValueStack* s = state; - int bci = x->bci(); for_each_state(s) { + if (s->kind() == ValueStack::EmptyExceptionState) { + assert(s->stack_size() == 0 && s->locals_size() == 0 && (s->locks_size() == 0 || s->locks_size() == 1), "state must be empty"); + continue; + } + + int index; + Value value; + for_each_stack_value(s, index, value) { + assert(value->subst() == value, "missed substitution"); + if (!value->is_pinned() && value->as_Constant() == NULL && value->as_Local() == NULL) { + walk(value); + assert(value->operand()->is_valid(), "must be evaluated now"); + } + } + + int bci = s->bci(); IRScope* scope = s->scope(); ciMethod* method = scope->method(); @@ -428,15 +436,14 @@ CodeEmitInfo* LIRGenerator::state_for(Instruction* x, ValueStack* state, bool ig } } } - bci = scope->caller_bci(); } - return new CodeEmitInfo(x->bci(), state, ignore_xhandler ? NULL : x->exception_handlers()); + return new CodeEmitInfo(state, ignore_xhandler ? NULL : x->exception_handlers()); } CodeEmitInfo* LIRGenerator::state_for(Instruction* x) { - return state_for(x, x->lock_stack()); + return state_for(x, x->exception_state()); } @@ -900,18 +907,14 @@ void LIRGenerator::move_to_phi(ValueStack* cur_state) { Value sux_value; int index; + assert(cur_state->scope() == sux_state->scope(), "not matching"); + assert(cur_state->locals_size() == sux_state->locals_size(), "not matching"); + assert(cur_state->stack_size() == sux_state->stack_size(), "not matching"); + for_each_stack_value(sux_state, index, sux_value) { move_to_phi(&resolver, cur_state->stack_at(index), sux_value); } - // Inlining may cause the local state not to match up, so walk up - // the caller state until we get to the same scope as the - // successor and then start processing from there. - while (cur_state->scope() != sux_state->scope()) { - cur_state = cur_state->caller_state(); - assert(cur_state != NULL, "scopes don't match up"); - } - for_each_local_value(sux_state, index, sux_value) { move_to_phi(&resolver, cur_state->local_at(index), sux_value); } @@ -1023,10 +1026,10 @@ void LIRGenerator::do_Phi(Phi* x) { // Code for a constant is generated lazily unless the constant is frequently used and can't be inlined. void LIRGenerator::do_Constant(Constant* x) { - if (x->state() != NULL) { + if (x->state_before() != NULL) { // Any constant with a ValueStack requires patching so emit the patch here LIR_Opr reg = rlock_result(x); - CodeEmitInfo* info = state_for(x, x->state()); + CodeEmitInfo* info = state_for(x, x->state_before()); __ oop2reg_patch(NULL, reg, info); } else if (x->use_count() > 1 && !can_inline_as_constant(x)) { if (!x->is_pinned()) { @@ -1102,7 +1105,7 @@ void LIRGenerator::do_getClass(Intrinsic* x) { // need to perform the null check on the rcvr CodeEmitInfo* info = NULL; if (x->needs_null_check()) { - info = state_for(x, x->state()->copy_locks()); + info = state_for(x); } __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_OBJECT), result, info); __ move(new LIR_Address(result, Klass::java_mirror_offset_in_bytes() + @@ -1481,7 +1484,7 @@ void LIRGenerator::do_StoreField(StoreField* x) { } else if (x->needs_null_check()) { NullCheck* nc = x->explicit_null_check(); if (nc == NULL) { - info = state_for(x, x->lock_stack()); + info = state_for(x); } else { info = state_for(nc); } @@ -1509,10 +1512,12 @@ void LIRGenerator::do_StoreField(StoreField* x) { set_no_result(x); +#ifndef PRODUCT if (PrintNotLoaded && needs_patching) { tty->print_cr(" ###class not loaded at store_%s bci %d", - x->is_static() ? "static" : "field", x->bci()); + x->is_static() ? "static" : "field", x->printable_bci()); } +#endif if (x->needs_null_check() && (needs_patching || @@ -1575,7 +1580,7 @@ void LIRGenerator::do_LoadField(LoadField* x) { } else if (x->needs_null_check()) { NullCheck* nc = x->explicit_null_check(); if (nc == NULL) { - info = state_for(x, x->lock_stack()); + info = state_for(x); } else { info = state_for(nc); } @@ -1585,10 +1590,12 @@ void LIRGenerator::do_LoadField(LoadField* x) { object.load_item(); +#ifndef PRODUCT if (PrintNotLoaded && needs_patching) { tty->print_cr(" ###class not loaded at load_%s bci %d", - x->is_static() ? "static" : "field", x->bci()); + x->is_static() ? "static" : "field", x->printable_bci()); } +#endif if (x->needs_null_check() && (needs_patching || @@ -1781,7 +1788,7 @@ void LIRGenerator::do_Throw(Throw* x) { if (GenerateCompilerNullChecks && (x->exception()->as_NewInstance() == NULL && x->exception()->as_ExceptionObject() == NULL)) { // if the exception object wasn't created using new then it might be null. - __ null_check(exception_opr, new CodeEmitInfo(info, true)); + __ null_check(exception_opr, new CodeEmitInfo(info, x->state()->copy(ValueStack::ExceptionState, x->state()->bci()))); } if (compilation()->env()->jvmti_can_post_on_exceptions()) { @@ -2127,7 +2134,6 @@ void LIRGenerator::do_TableSwitch(TableSwitch* x) { int lo_key = x->lo_key(); int hi_key = x->hi_key(); int len = x->length(); - CodeEmitInfo* info = state_for(x, x->state()); LIR_Opr value = tag.result(); if (UseTableRanges) { do_SwitchRanges(create_lookup_ranges(x), value, x->default_sux()); @@ -2186,7 +2192,7 @@ void LIRGenerator::do_Goto(Goto* x) { // increment backedge counter if needed CodeEmitInfo* info = state_for(x, state); - increment_backedge_counter(info, info->bci()); + increment_backedge_counter(info, info->stack()->bci()); CodeEmitInfo* safepoint_info = state_for(x, state); __ safepoint(safepoint_poll_register(), safepoint_info); } @@ -2293,7 +2299,7 @@ void LIRGenerator::do_Base(Base* x) { LIR_Opr lock = new_register(T_INT); __ load_stack_address_monitor(0, lock); - CodeEmitInfo* info = new CodeEmitInfo(SynchronizationEntryBCI, scope()->start()->state(), NULL); + CodeEmitInfo* info = new CodeEmitInfo(scope()->start()->state()->copy(ValueStack::StateBefore, SynchronizationEntryBCI), NULL); CodeStub* slow_path = new MonitorEnterStub(obj, lock, info); // receiver is guaranteed non-NULL so don't need CodeEmitInfo @@ -2303,7 +2309,7 @@ void LIRGenerator::do_Base(Base* x) { // increment invocation counters if needed if (!method()->is_accessor()) { // Accessors do not have MDOs, so no counting. - CodeEmitInfo* info = new CodeEmitInfo(InvocationEntryBci, scope()->start()->state(), NULL); + CodeEmitInfo* info = new CodeEmitInfo(scope()->start()->state(), NULL); increment_invocation_counter(info); } @@ -2463,7 +2469,7 @@ void LIRGenerator::do_Invoke(Invoke* x) { break; case Bytecodes::_invokedynamic: { ciBytecodeStream bcs(x->scope()->method()); - bcs.force_bci(x->bci()); + bcs.force_bci(x->state()->bci()); assert(bcs.cur_bc() == Bytecodes::_invokedynamic, "wrong stream"); ciCPCache* cpcache = bcs.get_cpcache(); diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp index 1b99ef83539..166c9fd844b 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp @@ -2274,8 +2274,8 @@ void assert_equal(IRScopeDebugInfo* d1, IRScopeDebugInfo* d2) { } void check_stack_depth(CodeEmitInfo* info, int stack_end) { - if (info->bci() != SynchronizationEntryBCI && !info->scope()->method()->is_native()) { - Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->bci()); + if (info->stack()->bci() != SynchronizationEntryBCI && !info->scope()->method()->is_native()) { + Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci()); switch (code) { case Bytecodes::_ifnull : // fall through case Bytecodes::_ifnonnull : // fall through @@ -2379,7 +2379,7 @@ OopMap* LinearScan::compute_oop_map(IntervalWalker* iw, LIR_Op* op, CodeEmitInfo // add oops from lock stack assert(info->stack() != NULL, "CodeEmitInfo must always have a stack"); - int locks_count = info->stack()->locks_size(); + int locks_count = info->stack()->total_locks_size(); for (int i = 0; i < locks_count; i++) { map->set_oop(frame_map()->monitor_object_regname(i)); } @@ -2762,19 +2762,13 @@ int LinearScan::append_scope_value(int op_id, Value value, GrowableArraycaller_state(); + ValueStack* caller_state = cur_state->caller_state(); if (caller_state != NULL) { // process recursively to compute outermost scope first - stack_begin = caller_state->stack_size(); - locks_begin = caller_state->locks_size(); - caller_debug_info = compute_debug_info_for_scope(op_id, cur_scope->caller(), caller_state, innermost_state, cur_scope->caller_bci(), stack_begin, locks_begin); - } else { - stack_begin = 0; - locks_begin = 0; + caller_debug_info = compute_debug_info_for_scope(op_id, cur_scope->caller(), caller_state, innermost_state); } // initialize these to null. @@ -2785,7 +2779,7 @@ IRScopeDebugInfo* LinearScan::compute_debug_info_for_scope(int op_id, IRScope* c GrowableArray* monitors = NULL; // describe local variable values - int nof_locals = cur_scope->method()->max_locals(); + int nof_locals = cur_state->locals_size(); if (nof_locals > 0) { locals = new GrowableArray(nof_locals); @@ -2800,45 +2794,41 @@ IRScopeDebugInfo* LinearScan::compute_debug_info_for_scope(int op_id, IRScope* c } assert(locals->length() == cur_scope->method()->max_locals(), "wrong number of locals"); assert(locals->length() == cur_state->locals_size(), "wrong number of locals"); + } else if (cur_scope->method()->max_locals() > 0) { + assert(cur_state->kind() == ValueStack::EmptyExceptionState, "should be"); + nof_locals = cur_scope->method()->max_locals(); + locals = new GrowableArray(nof_locals); + for(int i = 0; i < nof_locals; i++) { + locals->append(&_illegal_value); + } } - // describe expression stack - // - // When we inline methods containing exception handlers, the - // "lock_stacks" are changed to preserve expression stack values - // in caller scopes when exception handlers are present. This - // can cause callee stacks to be smaller than caller stacks. - if (stack_end > innermost_state->stack_size()) { - stack_end = innermost_state->stack_size(); - } - - - - int nof_stack = stack_end - stack_begin; + int nof_stack = cur_state->stack_size(); if (nof_stack > 0) { expressions = new GrowableArray(nof_stack); - int pos = stack_begin; - while (pos < stack_end) { - Value expression = innermost_state->stack_at_inc(pos); + int pos = 0; + while (pos < nof_stack) { + Value expression = cur_state->stack_at_inc(pos); append_scope_value(op_id, expression, expressions); - assert(expressions->length() + stack_begin == pos, "must match"); + assert(expressions->length() == pos, "must match"); } + assert(expressions->length() == cur_state->stack_size(), "wrong number of stack entries"); } // describe monitors - assert(locks_begin <= locks_end, "error in scope iteration"); - int nof_locks = locks_end - locks_begin; + int nof_locks = cur_state->locks_size(); if (nof_locks > 0) { + int lock_offset = cur_state->caller_state() != NULL ? cur_state->caller_state()->total_locks_size() : 0; monitors = new GrowableArray(nof_locks); - for (int i = locks_begin; i < locks_end; i++) { - monitors->append(location_for_monitor_index(i)); + for (int i = 0; i < nof_locks; i++) { + monitors->append(location_for_monitor_index(lock_offset + i)); } } - return new IRScopeDebugInfo(cur_scope, cur_bci, locals, expressions, monitors, caller_debug_info); + return new IRScopeDebugInfo(cur_scope, cur_state->bci(), locals, expressions, monitors, caller_debug_info); } @@ -2850,17 +2840,14 @@ void LinearScan::compute_debug_info(CodeEmitInfo* info, int op_id) { assert(innermost_scope != NULL && innermost_state != NULL, "why is it missing?"); - int stack_end = innermost_state->stack_size(); - int locks_end = innermost_state->locks_size(); - - DEBUG_ONLY(check_stack_depth(info, stack_end)); + DEBUG_ONLY(check_stack_depth(info, innermost_state->stack_size())); if (info->_scope_debug_info == NULL) { // compute debug information - info->_scope_debug_info = compute_debug_info_for_scope(op_id, innermost_scope, innermost_state, innermost_state, info->bci(), stack_end, locks_end); + info->_scope_debug_info = compute_debug_info_for_scope(op_id, innermost_scope, innermost_state, innermost_state); } else { // debug information already set. Check that it is correct from the current point of view - DEBUG_ONLY(assert_equal(info->_scope_debug_info, compute_debug_info_for_scope(op_id, innermost_scope, innermost_state, innermost_state, info->bci(), stack_end, locks_end))); + DEBUG_ONLY(assert_equal(info->_scope_debug_info, compute_debug_info_for_scope(op_id, innermost_scope, innermost_state, innermost_state))); } } diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.hpp b/hotspot/src/share/vm/c1/c1_LinearScan.hpp index 9d5b2171e52..a161c679991 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.hpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.hpp @@ -346,7 +346,7 @@ class LinearScan : public CompilationResourceObj { int append_scope_value_for_operand(LIR_Opr opr, GrowableArray* scope_values); int append_scope_value(int op_id, Value value, GrowableArray* scope_values); - IRScopeDebugInfo* compute_debug_info_for_scope(int op_id, IRScope* cur_scope, ValueStack* cur_state, ValueStack* innermost_state, int cur_bci, int stack_end, int locks_end); + IRScopeDebugInfo* compute_debug_info_for_scope(int op_id, IRScope* cur_scope, ValueStack* cur_state, ValueStack* innermost_state); void compute_debug_info(CodeEmitInfo* info, int op_id); void assign_reg_num(LIR_OpList* instructions, IntervalWalker* iw); diff --git a/hotspot/src/share/vm/c1/c1_Optimizer.cpp b/hotspot/src/share/vm/c1/c1_Optimizer.cpp index d3d51cedb09..bb5cd837ecd 100644 --- a/hotspot/src/share/vm/c1/c1_Optimizer.cpp +++ b/hotspot/src/share/vm/c1/c1_Optimizer.cpp @@ -140,25 +140,27 @@ class CE_Eliminator: public BlockClosure { // with an IfOp followed by a Goto // cut if_ away and get node before Instruction* cur_end = if_->prev(block); - int bci = if_->bci(); // append constants of true- and false-block if necessary // clone constants because original block must not be destroyed assert((t_value != f_const && f_value != t_const) || t_const == f_const, "mismatch"); if (t_value == t_const) { t_value = new Constant(t_const->type()); - cur_end = cur_end->set_next(t_value, bci); + NOT_PRODUCT(t_value->set_printable_bci(if_->printable_bci())); + cur_end = cur_end->set_next(t_value); } if (f_value == f_const) { f_value = new Constant(f_const->type()); - cur_end = cur_end->set_next(f_value, bci); + NOT_PRODUCT(f_value->set_printable_bci(if_->printable_bci())); + cur_end = cur_end->set_next(f_value); } // it is very unlikely that the condition can be statically decided // (this was checked previously by the Canonicalizer), so always // append IfOp Value result = new IfOp(if_->x(), if_->cond(), if_->y(), t_value, f_value); - cur_end = cur_end->set_next(result, bci); + NOT_PRODUCT(result->set_printable_bci(if_->printable_bci())); + cur_end = cur_end->set_next(result); // append Goto to successor ValueStack* state_before = if_->is_safepoint() ? if_->state_before() : NULL; @@ -167,16 +169,15 @@ class CE_Eliminator: public BlockClosure { // prepare state for Goto ValueStack* goto_state = if_->state(); while (sux_state->scope() != goto_state->scope()) { - goto_state = goto_state->pop_scope(); + goto_state = goto_state->caller_state(); assert(goto_state != NULL, "states do not match up"); } - goto_state = goto_state->copy(); + goto_state = goto_state->copy(ValueStack::StateAfter, goto_state->bci()); goto_state->push(result->type(), result); - assert(goto_state->is_same_across_scopes(sux_state), "states must match now"); + assert(goto_state->is_same(sux_state), "states must match now"); goto_->set_state(goto_state); - // Steal the bci for the goto from the sux - cur_end = cur_end->set_next(goto_, sux->bci()); + cur_end = cur_end->set_next(goto_, goto_state->bci()); // Adjust control flow graph BlockBegin::disconnect_edge(block, t_block); @@ -251,10 +252,8 @@ class BlockMerger: public BlockClosure { // no phi functions must be present at beginning of sux ValueStack* sux_state = sux->state(); ValueStack* end_state = end->state(); - while (end_state->scope() != sux_state->scope()) { - // match up inlining level - end_state = end_state->pop_scope(); - } + + assert(end_state->scope() == sux_state->scope(), "scopes must match"); assert(end_state->stack_size() == sux_state->stack_size(), "stack not equal"); assert(end_state->locals_size() == sux_state->locals_size(), "locals not equal"); @@ -273,7 +272,7 @@ class BlockMerger: public BlockClosure { Instruction* prev = end->prev(block); Instruction* next = sux->next(); assert(prev->as_BlockEnd() == NULL, "must not be a BlockEnd"); - prev->set_next(next, next->bci()); + prev->set_next(next); sux->disconnect_from_graph(); block->set_end(sux->end()); // add exception handlers of deleted block, if any @@ -337,7 +336,8 @@ class BlockMerger: public BlockClosure { newif->set_state(if_->state()->copy()); assert(prev->next() == if_, "must be guaranteed by above search"); - prev->set_next(newif, if_->bci()); + NOT_PRODUCT(newif->set_printable_bci(if_->printable_bci())); + prev->set_next(newif); block->set_end(newif); _merge_count++; @@ -705,7 +705,7 @@ void NullCheckEliminator::iterate_one(BlockBegin* block) { // visiting instructions which are references in other blocks or // visiting instructions more than once. mark_visitable(instr); - if (instr->is_root() || instr->can_trap() || (instr->as_NullCheck() != NULL)) { + if (instr->is_pinned() || instr->can_trap() || (instr->as_NullCheck() != NULL)) { mark_visited(instr); instr->input_values_do(this); instr->visit(&_visitor); diff --git a/hotspot/src/share/vm/c1/c1_ValueStack.cpp b/hotspot/src/share/vm/c1/c1_ValueStack.cpp index 261176507b3..40dfadbff61 100644 --- a/hotspot/src/share/vm/c1/c1_ValueStack.cpp +++ b/hotspot/src/share/vm/c1/c1_ValueStack.cpp @@ -28,55 +28,60 @@ // Implementation of ValueStack -ValueStack::ValueStack(IRScope* scope, int locals_size, int max_stack_size) +ValueStack::ValueStack(IRScope* scope, ValueStack* caller_state) : _scope(scope) -, _locals(locals_size, NULL) -, _stack(max_stack_size) -, _lock_stack(false) -, _locks(1) +, _caller_state(caller_state) +, _bci(-99) +, _kind(Parsing) +, _locals(scope->method()->max_locals(), NULL) +, _stack(scope->method()->max_stack()) +, _locks() { - assert(scope != NULL, "scope must exist"); -} - -ValueStack* ValueStack::copy() { - ValueStack* s = new ValueStack(scope(), locals_size(), max_stack_size()); - s->_stack.appendAll(&_stack); - s->_locks.appendAll(&_locks); - s->replace_locals(this); - return s; + verify(); } -ValueStack* ValueStack::copy_locks() { - int sz = scope()->lock_stack_size(); - if (stack_size() == 0) { - sz = 0; +ValueStack::ValueStack(ValueStack* copy_from, Kind kind, int bci) + : _scope(copy_from->scope()) + , _caller_state(copy_from->caller_state()) + , _bci(bci) + , _kind(kind) + , _locals() + , _stack() + , _locks(copy_from->locks_size()) +{ + assert(kind != EmptyExceptionState || !Compilation::current()->env()->jvmti_can_access_local_variables(), "need locals"); + if (kind != EmptyExceptionState) { + // only allocate space if we need to copy the locals-array + _locals = Values(copy_from->locals_size()); + _locals.appendAll(©_from->_locals); } - ValueStack* s = new ValueStack(scope(), locals_size(), sz); - s->_lock_stack = true; - s->_locks.appendAll(&_locks); - s->replace_locals(this); - if (sz > 0) { - assert(sz <= stack_size(), "lock stack underflow"); - for (int i = 0; i < sz; i++) { - s->_stack.append(_stack[i]); + + if (kind != ExceptionState && kind != EmptyExceptionState) { + if (kind == Parsing) { + // stack will be modified, so reserve enough space to avoid resizing + _stack = Values(scope()->method()->max_stack()); + } else { + // stack will not be modified, so do not waste space + _stack = Values(copy_from->stack_size()); } + _stack.appendAll(©_from->_stack); } - return s; + + _locks.appendAll(©_from->_locks); + + verify(); } + bool ValueStack::is_same(ValueStack* s) { - assert(s != NULL, "state must exist"); - assert(scope () == s->scope (), "scopes must correspond"); - assert(locals_size() == s->locals_size(), "locals sizes must correspond"); - return is_same_across_scopes(s); -} + if (scope() != s->scope()) return false; + if (caller_state() != s->caller_state()) return false; + if (locals_size() != s->locals_size()) return false; + if (stack_size() != s->stack_size()) return false; + if (locks_size() != s->locks_size()) return false; -bool ValueStack::is_same_across_scopes(ValueStack* s) { - assert(s != NULL, "state must exist"); - assert(stack_size () == s->stack_size (), "stack sizes must correspond"); - assert(locks_size () == s->locks_size (), "locks sizes must correspond"); // compare each stack element with the corresponding stack element of s int index; Value value; @@ -89,12 +94,6 @@ bool ValueStack::is_same_across_scopes(ValueStack* s) { return true; } - -ValueStack* ValueStack::caller_state() const { - return scope()->caller_state(); -} - - void ValueStack::clear_locals() { for (int i = _locals.length() - 1; i >= 0; i--) { _locals.at_put(i, NULL); @@ -102,13 +101,6 @@ void ValueStack::clear_locals() { } -void ValueStack::replace_locals(ValueStack* with) { - assert(locals_size() == with->locals_size(), "number of locals must match"); - for (int i = locals_size() - 1; i >= 0; i--) { - _locals.at_put(i, with->_locals.at(i)); - } -} - void ValueStack::pin_stack_for_linear_scan() { for_each_state_value(this, v, if (v->as_Constant() == NULL && v->as_Local() == NULL) { @@ -123,33 +115,25 @@ void ValueStack::apply(Values list, ValueVisitor* f) { for (int i = 0; i < list.length(); i++) { Value* va = list.adr_at(i); Value v0 = *va; - if (v0 != NULL) { - if (!v0->type()->is_illegal()) { - assert(v0->as_HiWord() == NULL, "should never see HiWord during traversal"); - f->visit(va); + if (v0 != NULL && !v0->type()->is_illegal()) { + f->visit(va); #ifdef ASSERT - Value v1 = *va; - if (v0 != v1) { - assert(v1->type()->is_illegal() || v0->type()->tag() == v1->type()->tag(), "types must match"); - if (v0->type()->is_double_word()) { - list.at_put(i + 1, v0->hi_word()); - } - } + Value v1 = *va; + assert(v1->type()->is_illegal() || v0->type()->tag() == v1->type()->tag(), "types must match"); + assert(!v1->type()->is_double_word() || list.at(i + 1) == NULL, "hi-word of doubleword value must be NULL"); #endif - if (v0->type()->is_double_word()) i++; - } + if (v0->type()->is_double_word()) i++; } } } void ValueStack::values_do(ValueVisitor* f) { - apply(_stack, f); - apply(_locks, f); - ValueStack* state = this; for_each_state(state) { apply(state->_locals, f); + apply(state->_stack, f); + apply(state->_locks, f); } } @@ -164,52 +148,26 @@ Values* ValueStack::pop_arguments(int argument_size) { } -int ValueStack::lock(IRScope* scope, Value obj) { +int ValueStack::total_locks_size() const { + int num_locks = 0; + const ValueStack* state = this; + for_each_state(state) { + num_locks += state->locks_size(); + } + return num_locks; +} + +int ValueStack::lock(Value obj) { _locks.push(obj); - scope->set_min_number_of_locks(locks_size()); - return locks_size() - 1; + int num_locks = total_locks_size(); + scope()->set_min_number_of_locks(num_locks); + return num_locks - 1; } int ValueStack::unlock() { _locks.pop(); - return locks_size(); -} - - -ValueStack* ValueStack::push_scope(IRScope* scope) { - assert(scope->caller() == _scope, "scopes must have caller/callee relationship"); - ValueStack* res = new ValueStack(scope, - scope->method()->max_locals(), - max_stack_size() + scope->method()->max_stack()); - // Preserves stack and monitors. - res->_stack.appendAll(&_stack); - res->_locks.appendAll(&_locks); - assert(res->_stack.size() <= res->max_stack_size(), "stack overflow"); - return res; -} - - -ValueStack* ValueStack::pop_scope() { - assert(_scope->caller() != NULL, "scope must have caller"); - IRScope* scope = _scope->caller(); - int max_stack = max_stack_size() - _scope->method()->max_stack(); - assert(max_stack >= 0, "stack underflow"); - ValueStack* res = new ValueStack(scope, - scope->method()->max_locals(), - max_stack); - // Preserves stack and monitors. Restores local and store state from caller scope. - res->_stack.appendAll(&_stack); - res->_locks.appendAll(&_locks); - ValueStack* caller = caller_state(); - if (caller != NULL) { - for (int i = 0; i < caller->_locals.length(); i++) { - res->_locals.at_put(i, caller->_locals.at(i)); - } - assert(res->_locals.length() == res->scope()->method()->max_locals(), "just checking"); - } - assert(res->_stack.size() <= res->max_stack_size(), "stack overflow"); - return res; + return total_locks_size(); } @@ -220,11 +178,7 @@ void ValueStack::setup_phi_for_stack(BlockBegin* b, int index) { Value phi = new Phi(t, b, -index - 1); _stack[index] = phi; -#ifdef ASSERT - if (t->is_double_word()) { - _stack[index + 1] = phi->hi_word(); - } -#endif + assert(!t->is_double_word() || _stack.at(index + 1) == NULL, "hi-word of doubleword value must be NULL"); } void ValueStack::setup_phi_for_local(BlockBegin* b, int index) { @@ -236,7 +190,9 @@ void ValueStack::setup_phi_for_local(BlockBegin* b, int index) { } #ifndef PRODUCT + void ValueStack::print() { + scope()->method()->print_name(); if (stack_is_empty()) { tty->print_cr("empty stack"); } else { @@ -244,18 +200,20 @@ void ValueStack::print() { for (int i = 0; i < stack_size();) { Value t = stack_at_inc(i); tty->print("%2d ", i); + tty->print("%c%d ", t->type()->tchar(), t->id()); ip.print_instr(t); tty->cr(); } } if (!no_active_locks()) { InstructionPrinter ip; - for (int i = 0; i < locks_size(); i--) { + for (int i = 0; i < locks_size(); i++) { Value t = lock_at(i); tty->print("lock %2d ", i); if (t == NULL) { tty->print("this"); } else { + tty->print("%c%d ", t->type()->tchar(), t->id()); ip.print_instr(t); } tty->cr(); @@ -270,16 +228,55 @@ void ValueStack::print() { tty->print("null"); i ++; } else { + tty->print("%c%d ", l->type()->tchar(), l->id()); ip.print_instr(l); if (l->type()->is_illegal() || l->type()->is_single_word()) i ++; else i += 2; } tty->cr(); } } + + if (caller_state() != NULL) { + caller_state()->print(); + } } void ValueStack::verify() { - Unimplemented(); + assert(scope() != NULL, "scope must exist"); + if (caller_state() != NULL) { + assert(caller_state()->scope() == scope()->caller(), "invalid caller scope"); + caller_state()->verify(); + } + + if (kind() == Parsing) { + assert(bci() == -99, "bci not defined during parsing"); + } else { + assert(bci() >= -1, "bci out of range"); + assert(bci() < scope()->method()->code_size(), "bci out of range"); + assert(bci() == SynchronizationEntryBCI || Bytecodes::is_defined(scope()->method()->java_code_at_bci(bci())), "make sure bci points at a real bytecode"); + assert(scope()->method()->liveness_at_bci(bci()).is_valid(), "liveness at bci must be valid"); + } + + int i; + for (i = 0; i < stack_size(); i++) { + Value v = _stack.at(i); + if (v == NULL) { + assert(_stack.at(i - 1)->type()->is_double_word(), "only hi-words are NULL on stack"); + } else if (v->type()->is_double_word()) { + assert(_stack.at(i + 1) == NULL, "hi-word must be NULL"); + } + } + + for (i = 0; i < locals_size(); i++) { + Value v = _locals.at(i); + if (v != NULL && v->type()->is_double_word()) { + assert(_locals.at(i + 1) == NULL, "hi-word must be NULL"); + } + } + + for_each_state_value(this, v, + assert(v != NULL, "just test if state-iteration succeeds"); + ); } #endif // PRODUCT diff --git a/hotspot/src/share/vm/c1/c1_ValueStack.hpp b/hotspot/src/share/vm/c1/c1_ValueStack.hpp index 9e254bf0dcd..c65422567e1 100644 --- a/hotspot/src/share/vm/c1/c1_ValueStack.hpp +++ b/hotspot/src/share/vm/c1/c1_ValueStack.hpp @@ -23,9 +23,23 @@ */ class ValueStack: public CompilationResourceObj { + public: + enum Kind { + Parsing, // During abstract interpretation in GraphBuilder + CallerState, // Caller state when inlining + StateBefore, // Before before execution of instruction + StateAfter, // After execution of instruction + ExceptionState, // Exception handling of instruction + EmptyExceptionState, // Exception handling of instructions not covered by an xhandler + BlockBeginState // State of BlockBegin instruction with phi functions of this block + }; + private: IRScope* _scope; // the enclosing scope - bool _lock_stack; // indicates that this ValueStack is for an exception site + ValueStack* _caller_state; + int _bci; + Kind _kind; + Values _locals; // the locals Values _stack; // the expression stack Values _locks; // the monitor stack (holding the locked values) @@ -36,100 +50,79 @@ class ValueStack: public CompilationResourceObj { } Value check(ValueTag tag, Value t, Value h) { - assert(h->as_HiWord()->lo_word() == t, "incorrect stack pair"); + assert(h == NULL, "hi-word of doubleword value must be NULL"); return check(tag, t); } // helper routine static void apply(Values list, ValueVisitor* f); + // for simplified copying + ValueStack(ValueStack* copy_from, Kind kind, int bci); + public: // creation - ValueStack(IRScope* scope, int locals_size, int max_stack_size); + ValueStack(IRScope* scope, ValueStack* caller_state); + + ValueStack* copy() { return new ValueStack(this, _kind, _bci); } + ValueStack* copy(Kind new_kind, int new_bci) { return new ValueStack(this, new_kind, new_bci); } + ValueStack* copy_for_parsing() { return new ValueStack(this, Parsing, -99); } + + void set_caller_state(ValueStack* s) { assert(kind() == EmptyExceptionState, "only EmptyExceptionStates can be modified"); _caller_state = s; } - // merging - ValueStack* copy(); // returns a copy of this w/ cleared locals - ValueStack* copy_locks(); // returns a copy of this w/ cleared locals and stack - // Note that when inlining of methods with exception - // handlers is enabled, this stack may have a - // non-empty expression stack (size defined by - // scope()->lock_stack_size()) bool is_same(ValueStack* s); // returns true if this & s's types match (w/o checking locals) - bool is_same_across_scopes(ValueStack* s); // same as is_same but returns true even if stacks are in different scopes (used for block merging w/inlining) // accessors IRScope* scope() const { return _scope; } - bool is_lock_stack() const { return _lock_stack; } + ValueStack* caller_state() const { return _caller_state; } + int bci() const { return _bci; } + Kind kind() const { return _kind; } + int locals_size() const { return _locals.length(); } int stack_size() const { return _stack.length(); } int locks_size() const { return _locks.length(); } - int max_stack_size() const { return _stack.capacity(); } bool stack_is_empty() const { return _stack.is_empty(); } bool no_active_locks() const { return _locks.is_empty(); } - ValueStack* caller_state() const; + int total_locks_size() const; // locals access void clear_locals(); // sets all locals to NULL; - // Kill local i. Also kill local i+1 if i was a long or double. void invalidate_local(int i) { - Value x = _locals.at(i); - if (x != NULL && x->type()->is_double_word()) { - assert(_locals.at(i + 1)->as_HiWord()->lo_word() == x, "locals inconsistent"); - _locals.at_put(i + 1, NULL); - } + assert(_locals.at(i)->type()->is_single_word() || + _locals.at(i + 1) == NULL, "hi-word of doubleword value must be NULL"); _locals.at_put(i, NULL); } - - Value load_local(int i) const { + Value local_at(int i) const { Value x = _locals.at(i); - if (x != NULL && x->type()->is_illegal()) return NULL; - assert(x == NULL || x->as_HiWord() == NULL, "index points to hi word"); - assert(x == NULL || x->type()->is_illegal() || x->type()->is_single_word() || x == _locals.at(i+1)->as_HiWord()->lo_word(), "locals inconsistent"); + assert(x == NULL || x->type()->is_single_word() || + _locals.at(i + 1) == NULL, "hi-word of doubleword value must be NULL"); return x; } - Value local_at(int i) const { return _locals.at(i); } - - // Store x into local i. void store_local(int i, Value x) { - // Kill the old value - invalidate_local(i); - _locals.at_put(i, x); - - // Writing a double word can kill other locals - if (x != NULL && x->type()->is_double_word()) { - // If x + i was the start of a double word local then kill i + 2. - Value x2 = _locals.at(i + 1); - if (x2 != NULL && x2->type()->is_double_word()) { - _locals.at_put(i + 2, NULL); - } - - // If x is a double word local, also update i + 1. -#ifdef ASSERT - _locals.at_put(i + 1, x->hi_word()); -#else - _locals.at_put(i + 1, NULL); -#endif - } - // If x - 1 was the start of a double word local then kill i - 1. + // When overwriting local i, check if i - 1 was the start of a + // double word local and kill it. if (i > 0) { Value prev = _locals.at(i - 1); if (prev != NULL && prev->type()->is_double_word()) { _locals.at_put(i - 1, NULL); } } - } - void replace_locals(ValueStack* with); + _locals.at_put(i, x); + if (x->type()->is_double_word()) { + // hi-word of doubleword value is always NULL + _locals.at_put(i + 1, NULL); + } + } // stack access Value stack_at(int i) const { Value x = _stack.at(i); - assert(x->as_HiWord() == NULL, "index points to hi word"); assert(x->type()->is_single_word() || - x->subst() == _stack.at(i+1)->as_HiWord()->lo_word(), "stack inconsistent"); + _stack.at(i + 1) == NULL, "hi-word of doubleword value must be NULL"); return x; } @@ -146,7 +139,6 @@ class ValueStack: public CompilationResourceObj { void values_do(ValueVisitor* f); // untyped manipulation (for dup_x1, etc.) - void clear_stack() { _stack.clear(); } void truncate_stack(int size) { _stack.trunc_to(size); } void raw_push(Value t) { _stack.push(t); } Value raw_pop() { return _stack.pop(); } @@ -156,15 +148,8 @@ class ValueStack: public CompilationResourceObj { void fpush(Value t) { _stack.push(check(floatTag , t)); } void apush(Value t) { _stack.push(check(objectTag , t)); } void rpush(Value t) { _stack.push(check(addressTag, t)); } -#ifdef ASSERT - // in debug mode, use HiWord for 2-word values - void lpush(Value t) { _stack.push(check(longTag , t)); _stack.push(new HiWord(t)); } - void dpush(Value t) { _stack.push(check(doubleTag , t)); _stack.push(new HiWord(t)); } -#else - // in optimized mode, use NULL for 2-word values void lpush(Value t) { _stack.push(check(longTag , t)); _stack.push(NULL); } void dpush(Value t) { _stack.push(check(doubleTag , t)); _stack.push(NULL); } -#endif // ASSERT void push(ValueType* type, Value t) { switch (type->tag()) { @@ -182,15 +167,8 @@ class ValueStack: public CompilationResourceObj { Value fpop() { return check(floatTag , _stack.pop()); } Value apop() { return check(objectTag , _stack.pop()); } Value rpop() { return check(addressTag, _stack.pop()); } -#ifdef ASSERT - // in debug mode, check for HiWord consistency Value lpop() { Value h = _stack.pop(); return check(longTag , _stack.pop(), h); } Value dpop() { Value h = _stack.pop(); return check(doubleTag, _stack.pop(), h); } -#else - // in optimized mode, ignore HiWord since it is NULL - Value lpop() { _stack.pop(); return check(longTag , _stack.pop()); } - Value dpop() { _stack.pop(); return check(doubleTag, _stack.pop()); } -#endif // ASSERT Value pop(ValueType* type) { switch (type->tag()) { @@ -208,16 +186,10 @@ class ValueStack: public CompilationResourceObj { Values* pop_arguments(int argument_size); // locks access - int lock (IRScope* scope, Value obj); + int lock (Value obj); int unlock(); Value lock_at(int i) const { return _locks.at(i); } - // Inlining support - ValueStack* push_scope(IRScope* scope); // "Push" new scope, returning new resulting stack - // Preserves stack and locks, destroys locals - ValueStack* pop_scope(); // "Pop" topmost scope, returning new resulting stack - // Preserves stack and locks, destroys locals - // SSA form IR support void setup_phi_for_stack(BlockBegin* b, int index); void setup_phi_for_local(BlockBegin* b, int index); @@ -298,16 +270,18 @@ class ValueStack: public CompilationResourceObj { { \ int cur_index; \ ValueStack* cur_state = v_state; \ - Value v_value; \ - { \ - for_each_stack_value(cur_state, cur_index, v_value) { \ - v_code; \ - } \ - } \ + Value v_value; \ for_each_state(cur_state) { \ - for_each_local_value(cur_state, cur_index, v_value) { \ - v_code; \ + { \ + for_each_local_value(cur_state, cur_index, v_value) { \ + v_code; \ + } \ } \ + { \ + for_each_stack_value(cur_state, cur_index, v_value) { \ + v_code; \ + } \ + } \ } \ } diff --git a/hotspot/src/share/vm/c1/c1_globals.hpp b/hotspot/src/share/vm/c1/c1_globals.hpp index 25633a63832..e6a3f6ad7ca 100644 --- a/hotspot/src/share/vm/c1/c1_globals.hpp +++ b/hotspot/src/share/vm/c1/c1_globals.hpp @@ -216,9 +216,6 @@ develop(bool, DeoptC1, true, \ "Use deoptimization in C1") \ \ - develop(bool, DeoptOnAsyncException, true, \ - "Deoptimize upon Thread.stop(); improves precision of IR") \ - \ develop(bool, PrintBailouts, false, \ "Print bailout and its reason") \ \ diff --git a/hotspot/src/share/vm/includeDB_compiler1 b/hotspot/src/share/vm/includeDB_compiler1 index 18ff024df70..f578561609e 100644 --- a/hotspot/src/share/vm/includeDB_compiler1 +++ b/hotspot/src/share/vm/includeDB_compiler1 @@ -448,3 +448,7 @@ thread.cpp c1_Compiler.hpp top.hpp c1_globals.hpp vmStructs.hpp c1_Runtime1.hpp + +c1_Canonicalizer.cpp c1_ValueStack.hpp + +c1_LIR.cpp c1_ValueStack.hpp From 83f6032e228378d5732bec86a0177a9972c90cc2 Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Thu, 12 Aug 2010 23:21:17 -0700 Subject: [PATCH 002/722] 6976516: Add support for compiling deploy ws without compiling j2se Reviewed-by: herrick, ohair --- jdk/make/common/internal/Resources.gmk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/make/common/internal/Resources.gmk b/jdk/make/common/internal/Resources.gmk index 03b90dd7408..63a61188261 100644 --- a/jdk/make/common/internal/Resources.gmk +++ b/jdk/make/common/internal/Resources.gmk @@ -251,13 +251,13 @@ compile_all_props: $(COMPILEPROPERTIES_JARFILE) $(COMPILE_PROP_options) # Make sure the build rule creates all the properties resources: -ifneq ($(PROPERTIES_FILES),) +ifneq ($(strip $(PROPERTIES_FILES)),) resources: strip_prop_options_clean strip_all_props clobber clean:: $(RM) $(STRIP_PROP_FILES) $(STRIP_PROP_options) endif -ifneq ($(COMPILED_PROPERTIES),) +ifneq ($(strip $(COMPILED_PROPERTIES)),) resources: compile_prop_options_clean compile_all_props clobber clean:: $(RM) $(COMPILE_PROP_JAVA_FILES) $(COMPILE_PROP_options) From bb23e30511113b30d942e3a306085fabf761be2c Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Tue, 24 Aug 2010 17:24:33 -0400 Subject: [PATCH 003/722] 6974966: G1: unnecessary direct-to-old allocations This change revamps the slow allocation path of G1. Improvements include the following: a) Allocations directly to old regions are now totally banned. G1 now only allows allocations out of young regions (with the only exception being humongous regions). b) The thread that allocates a new region (which is now guaranteed to be young) does not dirty all its cards. Each thread that successfully allocates out of a young region is now responsible for dirtying the cards that corresponding to the "block" that just got allocated. c) allocate_new_tlab() and mem_allocate() are now implemented differently and TLAB allocations are only done by allocate_new_tlab(). d) If a thread schedules an evacuation pause in order to satisfy an allocation request, it will perform the allocation at the end of the safepoint so that the thread that initiated the GC also gets "first pick" of any space made available by the GC. e) If a thread is unable to allocate a humongous object it will schedule an evacuation pause in case it reclaims enough regions so that the humongous allocation can be satisfied aftewards. f) The G1 policy is more careful to set the young list target length to be the survivor number +1. g) Lots of code tidy up, removal, refactoring to make future changes easier. Reviewed-by: johnc, ysr --- .../gc_implementation/g1/g1CollectedHeap.cpp | 739 +++++++++++++----- .../gc_implementation/g1/g1CollectedHeap.hpp | 277 +++++-- .../g1/g1CollectedHeap.inline.hpp | 134 +++- .../g1/g1CollectorPolicy.cpp | 67 +- .../g1/g1CollectorPolicy.hpp | 17 +- .../gc_implementation/g1/vm_operations_g1.cpp | 55 +- .../gc_implementation/g1/vm_operations_g1.hpp | 70 +- 7 files changed, 985 insertions(+), 374 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index dae8c98b180..bdd886d50c3 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -58,10 +58,11 @@ size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0; // INVARIANTS/NOTES // // All allocation activity covered by the G1CollectedHeap interface is -// serialized by acquiring the HeapLock. This happens in -// mem_allocate_work, which all such allocation functions call. -// (Note that this does not apply to TLAB allocation, which is not part -// of this interface: it is done by clients of this interface.) +// serialized by acquiring the HeapLock. This happens in mem_allocate +// and allocate_new_tlab, which are the "entry" points to the +// allocation code from the rest of the JVM. (Note that this does not +// apply to TLAB allocation, which is not part of this interface: it +// is done by clients of this interface.) // Local to this file. @@ -536,18 +537,20 @@ HeapRegion* G1CollectedHeap::newAllocRegionWithExpansion(int purpose, // If could fit into free regions w/o expansion, try. // Otherwise, if can expand, do so. // Otherwise, if using ex regions might help, try with ex given back. -HeapWord* G1CollectedHeap::humongousObjAllocate(size_t word_size) { +HeapWord* G1CollectedHeap::humongous_obj_allocate(size_t word_size) { + assert_heap_locked_or_at_safepoint(); assert(regions_accounted_for(), "Region leakage!"); - // We can't allocate H regions while cleanupComplete is running, since - // some of the regions we find to be empty might not yet be added to the - // unclean list. (If we're already at a safepoint, this call is - // unnecessary, not to mention wrong.) - if (!SafepointSynchronize::is_at_safepoint()) + // We can't allocate humongous regions while cleanupComplete is + // running, since some of the regions we find to be empty might not + // yet be added to the unclean list. If we're already at a + // safepoint, this call is unnecessary, not to mention wrong. + if (!SafepointSynchronize::is_at_safepoint()) { wait_for_cleanup_complete(); + } size_t num_regions = - round_to(word_size, HeapRegion::GrainWords) / HeapRegion::GrainWords; + round_to(word_size, HeapRegion::GrainWords) / HeapRegion::GrainWords; // Special case if < one region??? @@ -598,153 +601,472 @@ HeapWord* G1CollectedHeap::humongousObjAllocate(size_t word_size) { return res; } +void +G1CollectedHeap::retire_cur_alloc_region(HeapRegion* cur_alloc_region) { + // The cleanup operation might update _summary_bytes_used + // concurrently with this method. So, right now, if we don't wait + // for it to complete, updates to _summary_bytes_used might get + // lost. This will be resolved in the near future when the operation + // of the free region list is revamped as part of CR 6977804. + wait_for_cleanup_complete(); + + retire_cur_alloc_region_common(cur_alloc_region); + assert(_cur_alloc_region == NULL, "post-condition"); +} + +// See the comment in the .hpp file about the locking protocol and +// assumptions of this method (and other related ones). HeapWord* -G1CollectedHeap::attempt_allocation_slow(size_t word_size, - bool permit_collection_pause) { - HeapWord* res = NULL; - HeapRegion* allocated_young_region = NULL; +G1CollectedHeap::replace_cur_alloc_region_and_allocate(size_t word_size, + bool at_safepoint, + bool do_dirtying) { + assert_heap_locked_or_at_safepoint(); + assert(_cur_alloc_region == NULL, + "replace_cur_alloc_region_and_allocate() should only be called " + "after retiring the previous current alloc region"); + assert(SafepointSynchronize::is_at_safepoint() == at_safepoint, + "at_safepoint and is_at_safepoint() should be a tautology"); - assert( SafepointSynchronize::is_at_safepoint() || - Heap_lock->owned_by_self(), "pre condition of the call" ); - - if (isHumongous(word_size)) { - // Allocation of a humongous object can, in a sense, complete a - // partial region, if the previous alloc was also humongous, and - // caused the test below to succeed. - if (permit_collection_pause) - do_collection_pause_if_appropriate(word_size); - res = humongousObjAllocate(word_size); - assert(_cur_alloc_region == NULL - || !_cur_alloc_region->isHumongous(), - "Prevent a regression of this bug."); - - } else { - // We may have concurrent cleanup working at the time. Wait for it - // to complete. In the future we would probably want to make the - // concurrent cleanup truly concurrent by decoupling it from the - // allocation. - if (!SafepointSynchronize::is_at_safepoint()) + if (!g1_policy()->is_young_list_full()) { + if (!at_safepoint) { + // The cleanup operation might update _summary_bytes_used + // concurrently with this method. So, right now, if we don't + // wait for it to complete, updates to _summary_bytes_used might + // get lost. This will be resolved in the near future when the + // operation of the free region list is revamped as part of + // CR 6977804. If we're already at a safepoint, this call is + // unnecessary, not to mention wrong. wait_for_cleanup_complete(); - // If we do a collection pause, this will be reset to a non-NULL - // value. If we don't, nulling here ensures that we allocate a new - // region below. - if (_cur_alloc_region != NULL) { - // We're finished with the _cur_alloc_region. - // As we're builing (at least the young portion) of the collection - // set incrementally we'll add the current allocation region to - // the collection set here. - if (_cur_alloc_region->is_young()) { - g1_policy()->add_region_to_incremental_cset_lhs(_cur_alloc_region); - } - _summary_bytes_used += _cur_alloc_region->used(); - _cur_alloc_region = NULL; } - assert(_cur_alloc_region == NULL, "Invariant."); - // Completion of a heap region is perhaps a good point at which to do - // a collection pause. - if (permit_collection_pause) - do_collection_pause_if_appropriate(word_size); - // Make sure we have an allocation region available. - if (_cur_alloc_region == NULL) { - if (!SafepointSynchronize::is_at_safepoint()) - wait_for_cleanup_complete(); - bool next_is_young = should_set_young_locked(); - // If the next region is not young, make sure it's zero-filled. - _cur_alloc_region = newAllocRegion(word_size, !next_is_young); - if (_cur_alloc_region != NULL) { - _summary_bytes_used -= _cur_alloc_region->used(); - if (next_is_young) { - set_region_short_lived_locked(_cur_alloc_region); - allocated_young_region = _cur_alloc_region; + + HeapRegion* new_cur_alloc_region = newAllocRegion(word_size, + false /* zero_filled */); + if (new_cur_alloc_region != NULL) { + assert(new_cur_alloc_region->is_empty(), + "the newly-allocated region should be empty, " + "as right now we only allocate new regions out of the free list"); + g1_policy()->update_region_num(true /* next_is_young */); + _summary_bytes_used -= new_cur_alloc_region->used(); + set_region_short_lived_locked(new_cur_alloc_region); + + assert(!new_cur_alloc_region->isHumongous(), + "Catch a regression of this bug."); + + // We need to ensure that the stores to _cur_alloc_region and, + // subsequently, to top do not float above the setting of the + // young type. + OrderAccess::storestore(); + + // Now allocate out of the new current alloc region. We could + // have re-used allocate_from_cur_alloc_region() but its + // operation is slightly different to what we need here. First, + // allocate_from_cur_alloc_region() is only called outside a + // safepoint and will always unlock the Heap_lock if it returns + // a non-NULL result. Second, it assumes that the current alloc + // region is what's already assigned in _cur_alloc_region. What + // we want here is to actually do the allocation first before we + // assign the new region to _cur_alloc_region. This ordering is + // not currently important, but it will be essential when we + // change the code to support CAS allocation in the future (see + // CR 6994297). + // + // This allocate method does BOT updates and we don't need them in + // the young generation. This will be fixed in the near future by + // CR 6994297. + HeapWord* result = new_cur_alloc_region->allocate(word_size); + assert(result != NULL, "we just allocate out of an empty region " + "so allocation should have been successful"); + assert(is_in(result), "result should be in the heap"); + + _cur_alloc_region = new_cur_alloc_region; + + if (!at_safepoint) { + Heap_lock->unlock(); + } + + // do the dirtying, if necessary, after we release the Heap_lock + if (do_dirtying) { + dirty_young_block(result, word_size); + } + return result; + } + } + + assert(_cur_alloc_region == NULL, "we failed to allocate a new current " + "alloc region, it should still be NULL"); + assert_heap_locked_or_at_safepoint(); + return NULL; +} + +// See the comment in the .hpp file about the locking protocol and +// assumptions of this method (and other related ones). +HeapWord* +G1CollectedHeap::attempt_allocation_slow(size_t word_size) { + assert_heap_locked_and_not_at_safepoint(); + assert(!isHumongous(word_size), "attempt_allocation_slow() should not be " + "used for humongous allocations"); + + // We will loop while succeeded is false, which means that we tried + // to do a collection, but the VM op did not succeed. So, when we + // exit the loop, either one of the allocation attempts was + // successful, or we succeeded in doing the VM op but which was + // unable to allocate after the collection. + for (int try_count = 1; /* we'll return or break */; try_count += 1) { + bool succeeded = true; + + { + // We may have concurrent cleanup working at the time. Wait for + // it to complete. In the future we would probably want to make + // the concurrent cleanup truly concurrent by decoupling it from + // the allocation. This will happen in the near future as part + // of CR 6977804 which will revamp the operation of the free + // region list. The fact that wait_for_cleanup_complete() will + // do a wait() means that we'll give up the Heap_lock. So, it's + // possible that when we exit wait_for_cleanup_complete() we + // might be able to allocate successfully (since somebody else + // might have done a collection meanwhile). So, we'll attempt to + // allocate again, just in case. When we make cleanup truly + // concurrent with allocation, we should remove this allocation + // attempt as it's redundant (we only reach here after an + // allocation attempt has been unsuccessful). + wait_for_cleanup_complete(); + HeapWord* result = attempt_allocation(word_size); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + } + + if (GC_locker::is_active_and_needs_gc()) { + // We are locked out of GC because of the GC locker. Right now, + // we'll just stall until the GC locker-induced GC + // completes. This will be fixed in the near future by extending + // the eden while waiting for the GC locker to schedule the GC + // (see CR 6994056). + + // If this thread is not in a jni critical section, we stall + // the requestor until the critical section has cleared and + // GC allowed. When the critical section clears, a GC is + // initiated by the last thread exiting the critical section; so + // we retry the allocation sequence from the beginning of the loop, + // rather than causing more, now probably unnecessary, GC attempts. + JavaThread* jthr = JavaThread::current(); + assert(jthr != NULL, "sanity"); + if (!jthr->in_critical()) { + MutexUnlocker mul(Heap_lock); + GC_locker::stall_until_clear(); + + // We'll then fall off the end of the ("if GC locker active") + // if-statement and retry the allocation further down in the + // loop. + } else { + if (CheckJNICalls) { + fatal("Possible deadlock due to allocating while" + " in jni critical section"); } + return NULL; } - } - assert(_cur_alloc_region == NULL || !_cur_alloc_region->isHumongous(), - "Prevent a regression of this bug."); + } else { + // We are not locked out. So, let's try to do a GC. The VM op + // will retry the allocation before it completes. - // Now retry the allocation. - if (_cur_alloc_region != NULL) { - if (allocated_young_region != NULL) { - // We need to ensure that the store to top does not - // float above the setting of the young type. - OrderAccess::storestore(); - } - res = _cur_alloc_region->allocate(word_size); - } - } + // Read the GC count while holding the Heap_lock + unsigned int gc_count_before = SharedHeap::heap()->total_collections(); - // NOTE: fails frequently in PRT - assert(regions_accounted_for(), "Region leakage!"); - - if (res != NULL) { - if (!SafepointSynchronize::is_at_safepoint()) { - assert( permit_collection_pause, "invariant" ); - assert( Heap_lock->owned_by_self(), "invariant" ); Heap_lock->unlock(); + + HeapWord* result = + do_collection_pause(word_size, gc_count_before, &succeeded); + assert_heap_not_locked(); + if (result != NULL) { + assert(succeeded, "the VM op should have succeeded"); + + // Allocations that take place on VM operations do not do any + // card dirtying and we have to do it here. + dirty_young_block(result, word_size); + return result; + } + + Heap_lock->lock(); } - if (allocated_young_region != NULL) { - HeapRegion* hr = allocated_young_region; - HeapWord* bottom = hr->bottom(); - HeapWord* end = hr->end(); - MemRegion mr(bottom, end); - ((CardTableModRefBS*)_g1h->barrier_set())->dirty(mr); + assert_heap_locked(); + + // We can reach here when we were unsuccessful in doing a GC, + // because another thread beat us to it, or because we were locked + // out of GC due to the GC locker. In either case a new alloc + // region might be available so we will retry the allocation. + HeapWord* result = attempt_allocation(word_size); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + + // So far our attempts to allocate failed. The only time we'll go + // around the loop and try again is if we tried to do a GC and the + // VM op that we tried to schedule was not successful because + // another thread beat us to it. If that happened it's possible + // that by the time we grabbed the Heap_lock again and tried to + // allocate other threads filled up the young generation, which + // means that the allocation attempt after the GC also failed. So, + // it's worth trying to schedule another GC pause. + if (succeeded) { + break; + } + + // Give a warning if we seem to be looping forever. + if ((QueuedAllocationWarningCount > 0) && + (try_count % QueuedAllocationWarningCount == 0)) { + warning("G1CollectedHeap::attempt_allocation_slow() " + "retries %d times", try_count); } } - assert( SafepointSynchronize::is_at_safepoint() || - (res == NULL && Heap_lock->owned_by_self()) || - (res != NULL && !Heap_lock->owned_by_self()), - "post condition of the call" ); + assert_heap_locked(); + return NULL; +} - return res; +// See the comment in the .hpp file about the locking protocol and +// assumptions of this method (and other related ones). +HeapWord* +G1CollectedHeap::attempt_allocation_humongous(size_t word_size, + bool at_safepoint) { + // This is the method that will allocate a humongous object. All + // allocation paths that attempt to allocate a humongous object + // should eventually reach here. Currently, the only paths are from + // mem_allocate() and attempt_allocation_at_safepoint(). + assert_heap_locked_or_at_safepoint(); + assert(isHumongous(word_size), "attempt_allocation_humongous() " + "should only be used for humongous allocations"); + assert(SafepointSynchronize::is_at_safepoint() == at_safepoint, + "at_safepoint and is_at_safepoint() should be a tautology"); + + HeapWord* result = NULL; + + // We will loop while succeeded is false, which means that we tried + // to do a collection, but the VM op did not succeed. So, when we + // exit the loop, either one of the allocation attempts was + // successful, or we succeeded in doing the VM op but which was + // unable to allocate after the collection. + for (int try_count = 1; /* we'll return or break */; try_count += 1) { + bool succeeded = true; + + // Given that humongous objects are not allocated in young + // regions, we'll first try to do the allocation without doing a + // collection hoping that there's enough space in the heap. + result = humongous_obj_allocate(word_size); + assert(_cur_alloc_region == NULL || !_cur_alloc_region->isHumongous(), + "catch a regression of this bug."); + if (result != NULL) { + if (!at_safepoint) { + // If we're not at a safepoint, unlock the Heap_lock. + Heap_lock->unlock(); + } + return result; + } + + // If we failed to allocate the humongous object, we should try to + // do a collection pause (if we're allowed) in case it reclaims + // enough space for the allocation to succeed after the pause. + if (!at_safepoint) { + // Read the GC count while holding the Heap_lock + unsigned int gc_count_before = SharedHeap::heap()->total_collections(); + + // If we're allowed to do a collection we're not at a + // safepoint, so it is safe to unlock the Heap_lock. + Heap_lock->unlock(); + + result = do_collection_pause(word_size, gc_count_before, &succeeded); + assert_heap_not_locked(); + if (result != NULL) { + assert(succeeded, "the VM op should have succeeded"); + return result; + } + + // If we get here, the VM operation either did not succeed + // (i.e., another thread beat us to it) or it succeeded but + // failed to allocate the object. + + // If we're allowed to do a collection we're not at a + // safepoint, so it is safe to lock the Heap_lock. + Heap_lock->lock(); + } + + assert(result == NULL, "otherwise we should have exited the loop earlier"); + + // So far our attempts to allocate failed. The only time we'll go + // around the loop and try again is if we tried to do a GC and the + // VM op that we tried to schedule was not successful because + // another thread beat us to it. That way it's possible that some + // space was freed up by the thread that successfully scheduled a + // GC. So it's worth trying to allocate again. + if (succeeded) { + break; + } + + // Give a warning if we seem to be looping forever. + if ((QueuedAllocationWarningCount > 0) && + (try_count % QueuedAllocationWarningCount == 0)) { + warning("G1CollectedHeap::attempt_allocation_humongous " + "retries %d times", try_count); + } + } + + assert_heap_locked_or_at_safepoint(); + return NULL; +} + +HeapWord* G1CollectedHeap::attempt_allocation_at_safepoint(size_t word_size, + bool expect_null_cur_alloc_region) { + assert_at_safepoint(); + assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region, + "The current alloc region should only be non-NULL if we're " + "expecting it not to be NULL"); + + if (!isHumongous(word_size)) { + if (!expect_null_cur_alloc_region) { + HeapRegion* cur_alloc_region = _cur_alloc_region; + if (cur_alloc_region != NULL) { + // This allocate method does BOT updates and we don't need them in + // the young generation. This will be fixed in the near future by + // CR 6994297. + HeapWord* result = cur_alloc_region->allocate(word_size); + if (result != NULL) { + assert(is_in(result), "result should be in the heap"); + + // We will not do any dirtying here. This is guaranteed to be + // called during a safepoint and the thread that scheduled the + // pause will do the dirtying if we return a non-NULL result. + return result; + } + + retire_cur_alloc_region_common(cur_alloc_region); + } + } + + assert(_cur_alloc_region == NULL, + "at this point we should have no cur alloc region"); + return replace_cur_alloc_region_and_allocate(word_size, + true, /* at_safepoint */ + false /* do_dirtying */); + } else { + return attempt_allocation_humongous(word_size, + true /* at_safepoint */); + } + + ShouldNotReachHere(); +} + +HeapWord* G1CollectedHeap::allocate_new_tlab(size_t word_size) { + assert_heap_not_locked_and_not_at_safepoint(); + assert(!isHumongous(word_size), "we do not allow TLABs of humongous size"); + + Heap_lock->lock(); + + // First attempt: try allocating out of the current alloc region or + // after replacing the current alloc region. + HeapWord* result = attempt_allocation(word_size); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + + assert_heap_locked(); + + // Second attempt: go into the even slower path where we might + // try to schedule a collection. + result = attempt_allocation_slow(word_size); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + + assert_heap_locked(); + Heap_lock->unlock(); + return NULL; } HeapWord* G1CollectedHeap::mem_allocate(size_t word_size, bool is_noref, bool is_tlab, - bool* gc_overhead_limit_was_exceeded) { - debug_only(check_for_valid_allocation_state()); - assert(no_gc_in_progress(), "Allocation during gc not allowed"); - HeapWord* result = NULL; + bool* gc_overhead_limit_was_exceeded) { + assert_heap_not_locked_and_not_at_safepoint(); + assert(!is_tlab, "mem_allocate() this should not be called directly " + "to allocate TLABs"); // Loop until the allocation is satisified, // or unsatisfied after GC. - for (int try_count = 1; /* return or throw */; try_count += 1) { - int gc_count_before; + for (int try_count = 1; /* we'll return */; try_count += 1) { + unsigned int gc_count_before; { Heap_lock->lock(); - result = attempt_allocation(word_size); - if (result != NULL) { - // attempt_allocation should have unlocked the heap lock - assert(is_in(result), "result not in heap"); - return result; + + if (!isHumongous(word_size)) { + // First attempt: try allocating out of the current alloc + // region or after replacing the current alloc region. + HeapWord* result = attempt_allocation(word_size); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + + assert_heap_locked(); + + // Second attempt: go into the even slower path where we might + // try to schedule a collection. + result = attempt_allocation_slow(word_size); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + } else { + HeapWord* result = attempt_allocation_humongous(word_size, + false /* at_safepoint */); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } } + + assert_heap_locked(); // Read the gc count while the heap lock is held. gc_count_before = SharedHeap::heap()->total_collections(); + // We cannot be at a safepoint, so it is safe to unlock the Heap_lock Heap_lock->unlock(); } // Create the garbage collection operation... - VM_G1CollectForAllocation op(word_size, - gc_count_before); - + VM_G1CollectForAllocation op(gc_count_before, word_size); // ...and get the VM thread to execute it. VMThread::execute(&op); - if (op.prologue_succeeded()) { - result = op.result(); - assert(result == NULL || is_in(result), "result not in heap"); + + assert_heap_not_locked(); + if (op.prologue_succeeded() && op.pause_succeeded()) { + // If the operation was successful we'll return the result even + // if it is NULL. If the allocation attempt failed immediately + // after a Full GC, it's unlikely we'll be able to allocate now. + HeapWord* result = op.result(); + if (result != NULL && !isHumongous(word_size)) { + // Allocations that take place on VM operations do not do any + // card dirtying and we have to do it here. We only have to do + // this for non-humongous allocations, though. + dirty_young_block(result, word_size); + } return result; + } else { + assert(op.result() == NULL, + "the result should be NULL if the VM op did not succeed"); } // Give a warning if we seem to be looping forever. if ((QueuedAllocationWarningCount > 0) && (try_count % QueuedAllocationWarningCount == 0)) { - warning("G1CollectedHeap::mem_allocate_work retries %d times", - try_count); + warning("G1CollectedHeap::mem_allocate retries %d times", try_count); } } + + ShouldNotReachHere(); } void G1CollectedHeap::abandon_cur_alloc_region() { @@ -841,11 +1163,11 @@ public: } }; -void G1CollectedHeap::do_collection(bool explicit_gc, +bool G1CollectedHeap::do_collection(bool explicit_gc, bool clear_all_soft_refs, size_t word_size) { if (GC_locker::check_active_before_gc()) { - return; // GC is disabled (e.g. JNI GetXXXCritical operation) + return false; } ResourceMark rm; @@ -1047,12 +1369,19 @@ void G1CollectedHeap::do_collection(bool explicit_gc, if (PrintHeapAtGC) { Universe::print_heap_after_gc(); } + + return true; } void G1CollectedHeap::do_full_collection(bool clear_all_soft_refs) { - do_collection(true, /* explicit_gc */ - clear_all_soft_refs, - 0 /* word_size */); + // do_collection() will return whether it succeeded in performing + // the GC. Currently, there is no facility on the + // do_full_collection() API to notify the caller than the collection + // did not succeed (e.g., because it was locked out by the GC + // locker). So, right now, we'll ignore the return value. + bool dummy = do_collection(true, /* explicit_gc */ + clear_all_soft_refs, + 0 /* word_size */); } // This code is mostly copied from TenuredGeneration. @@ -1175,46 +1504,74 @@ resize_if_necessary_after_full_collection(size_t word_size) { HeapWord* -G1CollectedHeap::satisfy_failed_allocation(size_t word_size) { - HeapWord* result = NULL; +G1CollectedHeap::satisfy_failed_allocation(size_t word_size, + bool* succeeded) { + assert(SafepointSynchronize::is_at_safepoint(), + "satisfy_failed_allocation() should only be called at a safepoint"); + assert(Thread::current()->is_VM_thread(), + "satisfy_failed_allocation() should only be called by the VM thread"); + + *succeeded = true; + // Let's attempt the allocation first. + HeapWord* result = attempt_allocation_at_safepoint(word_size, + false /* expect_null_cur_alloc_region */); + if (result != NULL) { + assert(*succeeded, "sanity"); + return result; + } // In a G1 heap, we're supposed to keep allocation from failing by // incremental pauses. Therefore, at least for now, we'll favor // expansion over collection. (This might change in the future if we can // do something smarter than full collection to satisfy a failed alloc.) - result = expand_and_allocate(word_size); if (result != NULL) { - assert(is_in(result), "result not in heap"); + assert(*succeeded, "sanity"); return result; } - // OK, I guess we have to try collection. - - do_collection(false, false, word_size); - - result = attempt_allocation(word_size, /*permit_collection_pause*/false); + // Expansion didn't work, we'll try to do a Full GC. + bool gc_succeeded = do_collection(false, /* explicit_gc */ + false, /* clear_all_soft_refs */ + word_size); + if (!gc_succeeded) { + *succeeded = false; + return NULL; + } + // Retry the allocation + result = attempt_allocation_at_safepoint(word_size, + true /* expect_null_cur_alloc_region */); if (result != NULL) { - assert(is_in(result), "result not in heap"); + assert(*succeeded, "sanity"); return result; } - // Try collecting soft references. - do_collection(false, true, word_size); - result = attempt_allocation(word_size, /*permit_collection_pause*/false); + // Then, try a Full GC that will collect all soft references. + gc_succeeded = do_collection(false, /* explicit_gc */ + true, /* clear_all_soft_refs */ + word_size); + if (!gc_succeeded) { + *succeeded = false; + return NULL; + } + + // Retry the allocation once more + result = attempt_allocation_at_safepoint(word_size, + true /* expect_null_cur_alloc_region */); if (result != NULL) { - assert(is_in(result), "result not in heap"); + assert(*succeeded, "sanity"); return result; } assert(!collector_policy()->should_clear_all_soft_refs(), - "Flag should have been handled and cleared prior to this point"); + "Flag should have been handled and cleared prior to this point"); // What else? We might try synchronous finalization later. If the total // space available is large enough for the allocation, then a more // complete compaction phase than we've tried so far might be // appropriate. + assert(*succeeded, "sanity"); return NULL; } @@ -1224,14 +1581,20 @@ G1CollectedHeap::satisfy_failed_allocation(size_t word_size) { // allocated block, or else "NULL". HeapWord* G1CollectedHeap::expand_and_allocate(size_t word_size) { + assert(SafepointSynchronize::is_at_safepoint(), + "expand_and_allocate() should only be called at a safepoint"); + assert(Thread::current()->is_VM_thread(), + "expand_and_allocate() should only be called by the VM thread"); + size_t expand_bytes = word_size * HeapWordSize; if (expand_bytes < MinHeapDeltaBytes) { expand_bytes = MinHeapDeltaBytes; } expand(expand_bytes); assert(regions_accounted_for(), "Region leakage!"); - HeapWord* result = attempt_allocation(word_size, false /* permit_collection_pause */); - return result; + + return attempt_allocation_at_safepoint(word_size, + true /* expect_null_cur_alloc_region */); } size_t G1CollectedHeap::free_region_if_totally_empty(HeapRegion* hr) { @@ -1842,21 +2205,25 @@ void G1CollectedHeap::collect(GCCause::Cause cause) { unsigned int full_gc_count_before; { MutexLocker ml(Heap_lock); + + // Don't want to do a GC until cleanup is completed. This + // limitation will be removed in the near future when the + // operation of the free region list is revamped as part of + // CR 6977804. + wait_for_cleanup_complete(); + // Read the GC count while holding the Heap_lock gc_count_before = SharedHeap::heap()->total_collections(); full_gc_count_before = SharedHeap::heap()->total_full_collections(); - - // Don't want to do a GC until cleanup is completed. - wait_for_cleanup_complete(); - - // We give up heap lock; VMThread::execute gets it back below } if (should_do_concurrent_full_gc(cause)) { // Schedule an initial-mark evacuation pause that will start a - // concurrent cycle. + // concurrent cycle. We're setting word_size to 0 which means that + // we are not requesting a post-GC allocation. VM_G1IncCollectionPause op(gc_count_before, - true, /* should_initiate_conc_mark */ + 0, /* word_size */ + true, /* should_initiate_conc_mark */ g1_policy()->max_pause_time_ms(), cause); VMThread::execute(&op); @@ -1864,8 +2231,10 @@ void G1CollectedHeap::collect(GCCause::Cause cause) { if (cause == GCCause::_gc_locker DEBUG_ONLY(|| cause == GCCause::_scavenge_alot)) { - // Schedule a standard evacuation pause. + // Schedule a standard evacuation pause. We're setting word_size + // to 0 which means that we are not requesting a post-GC allocation. VM_G1IncCollectionPause op(gc_count_before, + 0, /* word_size */ false, /* should_initiate_conc_mark */ g1_policy()->max_pause_time_ms(), cause); @@ -2221,14 +2590,6 @@ size_t G1CollectedHeap::unsafe_max_tlab_alloc(Thread* ignored) const { } } -HeapWord* G1CollectedHeap::allocate_new_tlab(size_t word_size) { - assert(!isHumongous(word_size), - err_msg("a TLAB should not be of humongous size, " - "word_size = "SIZE_FORMAT, word_size)); - bool dummy; - return G1CollectedHeap::mem_allocate(word_size, false, true, &dummy); -} - bool G1CollectedHeap::allocs_are_zero_filled() { return false; } @@ -2633,27 +2994,26 @@ void G1CollectedHeap::gc_epilogue(bool full /* Ignored */) { // always_do_update_barrier = true; } -void G1CollectedHeap::do_collection_pause() { - assert(Heap_lock->owned_by_self(), "we assume we'reholding the Heap_lock"); - - // Read the GC count while holding the Heap_lock - // we need to do this _before_ wait_for_cleanup_complete(), to - // ensure that we do not give up the heap lock and potentially - // pick up the wrong count - unsigned int gc_count_before = SharedHeap::heap()->total_collections(); - - // Don't want to do a GC pause while cleanup is being completed! - wait_for_cleanup_complete(); - +HeapWord* G1CollectedHeap::do_collection_pause(size_t word_size, + unsigned int gc_count_before, + bool* succeeded) { + assert_heap_not_locked_and_not_at_safepoint(); g1_policy()->record_stop_world_start(); - { - MutexUnlocker mu(Heap_lock); // give up heap lock, execute gets it back - VM_G1IncCollectionPause op(gc_count_before, - false, /* should_initiate_conc_mark */ - g1_policy()->max_pause_time_ms(), - GCCause::_g1_inc_collection_pause); - VMThread::execute(&op); - } + VM_G1IncCollectionPause op(gc_count_before, + word_size, + false, /* should_initiate_conc_mark */ + g1_policy()->max_pause_time_ms(), + GCCause::_g1_inc_collection_pause); + VMThread::execute(&op); + + HeapWord* result = op.result(); + bool ret_succeeded = op.prologue_succeeded() && op.pause_succeeded(); + assert(result == NULL || ret_succeeded, + "the result should be NULL if the VM did not succeed"); + *succeeded = ret_succeeded; + + assert_heap_not_locked(); + return result; } void @@ -2797,10 +3157,10 @@ void G1CollectedHeap::reset_taskqueue_stats() { } #endif // TASKQUEUE_STATS -void +bool G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { if (GC_locker::check_active_before_gc()) { - return; // GC is disabled (e.g. JNI GetXXXCritical operation) + return false; } if (PrintHeapAtGC) { @@ -3068,6 +3428,8 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { (total_collections() % G1SummarizeRSetStatsPeriod == 0)) { g1_rem_set()->print_summary_info(); } + + return true; } size_t G1CollectedHeap::desired_plab_sz(GCAllocPurpose purpose) @@ -3361,19 +3723,6 @@ void G1CollectedHeap::finalize_for_evac_failure() { // *** Sequential G1 Evacuation -HeapWord* G1CollectedHeap::allocate_during_gc(GCAllocPurpose purpose, size_t word_size) { - HeapRegion* alloc_region = _gc_alloc_regions[purpose]; - // let the caller handle alloc failure - if (alloc_region == NULL) return NULL; - assert(isHumongous(word_size) || !alloc_region->isHumongous(), - "Either the object is humongous or the region isn't"); - HeapWord* block = alloc_region->allocate(word_size); - if (block == NULL) { - block = allocate_during_gc_slow(purpose, alloc_region, false, word_size); - } - return block; -} - class G1IsAliveClosure: public BoolObjectClosure { G1CollectedHeap* _g1; public: @@ -4625,12 +4974,6 @@ void G1CollectedHeap::cleanUpCardTable() { #endif } -void G1CollectedHeap::do_collection_pause_if_appropriate(size_t word_size) { - if (g1_policy()->should_do_collection_pause(word_size)) { - do_collection_pause(); - } -} - void G1CollectedHeap::free_collection_set(HeapRegion* cs_head) { double young_time_ms = 0.0; double non_young_time_ms = 0.0; @@ -4789,6 +5132,7 @@ void G1CollectedHeap::set_unclean_regions_coming_locked(bool b) { } void G1CollectedHeap::wait_for_cleanup_complete() { + assert_not_at_safepoint(); MutexLockerEx x(Cleanup_mon); wait_for_cleanup_complete_locked(); } @@ -5093,13 +5437,6 @@ size_t G1CollectedHeap::count_free_regions_list() { return n + m; } -bool G1CollectedHeap::should_set_young_locked() { - assert(heap_lock_held_for_gc(), - "the heap lock should already be held by or for this thread"); - return (g1_policy()->in_young_gc_mode() && - g1_policy()->should_add_next_region_to_young_list()); -} - void G1CollectedHeap::set_region_short_lived_locked(HeapRegion* hr) { assert(heap_lock_held_for_gc(), "the heap lock should already be held by or for this thread"); diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index 84e846b309d..791f4bb756a 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -290,6 +290,63 @@ private: // started is maintained in _total_full_collections in CollectedHeap. volatile unsigned int _full_collections_completed; + // These are macros so that, if the assert fires, we get the correct + // line number, file, etc. + +#define heap_locking_asserts_err_msg(__extra_message) \ + err_msg("%s : Heap_lock %slocked, %sat a safepoint", \ + (__extra_message), \ + (!Heap_lock->owned_by_self()) ? "NOT " : "", \ + (!SafepointSynchronize::is_at_safepoint()) ? "NOT " : "") + +#define assert_heap_locked() \ + do { \ + assert(Heap_lock->owned_by_self(), \ + heap_locking_asserts_err_msg("should be holding the Heap_lock")); \ + } while (0) + +#define assert_heap_locked_or_at_safepoint() \ + do { \ + assert(Heap_lock->owned_by_self() || \ + SafepointSynchronize::is_at_safepoint(), \ + heap_locking_asserts_err_msg("should be holding the Heap_lock or " \ + "should be at a safepoint")); \ + } while (0) + +#define assert_heap_locked_and_not_at_safepoint() \ + do { \ + assert(Heap_lock->owned_by_self() && \ + !SafepointSynchronize::is_at_safepoint(), \ + heap_locking_asserts_err_msg("should be holding the Heap_lock and " \ + "should not be at a safepoint")); \ + } while (0) + +#define assert_heap_not_locked() \ + do { \ + assert(!Heap_lock->owned_by_self(), \ + heap_locking_asserts_err_msg("should not be holding the Heap_lock")); \ + } while (0) + +#define assert_heap_not_locked_and_not_at_safepoint() \ + do { \ + assert(!Heap_lock->owned_by_self() && \ + !SafepointSynchronize::is_at_safepoint(), \ + heap_locking_asserts_err_msg("should not be holding the Heap_lock and " \ + "should not be at a safepoint")); \ + } while (0) + +#define assert_at_safepoint() \ + do { \ + assert(SafepointSynchronize::is_at_safepoint(), \ + heap_locking_asserts_err_msg("should be at a safepoint")); \ + } while (0) + +#define assert_not_at_safepoint() \ + do { \ + assert(!SafepointSynchronize::is_at_safepoint(), \ + heap_locking_asserts_err_msg("should not be at a safepoint")); \ + } while (0) + protected: // Returns "true" iff none of the gc alloc regions have any allocations @@ -329,31 +386,162 @@ protected: // Attempt to allocate an object of the given (very large) "word_size". // Returns "NULL" on failure. - virtual HeapWord* humongousObjAllocate(size_t word_size); + virtual HeapWord* humongous_obj_allocate(size_t word_size); - // If possible, allocate a block of the given word_size, else return "NULL". - // Returning NULL will trigger GC or heap expansion. - // These two methods have rather awkward pre- and - // post-conditions. If they are called outside a safepoint, then - // they assume that the caller is holding the heap lock. Upon return - // they release the heap lock, if they are returning a non-NULL - // value. attempt_allocation_slow() also dirties the cards of a - // newly-allocated young region after it releases the heap - // lock. This change in interface was the neatest way to achieve - // this card dirtying without affecting mem_allocate(), which is a - // more frequently called method. We tried two or three different - // approaches, but they were even more hacky. - HeapWord* attempt_allocation(size_t word_size, - bool permit_collection_pause = true); + // The following two methods, allocate_new_tlab() and + // mem_allocate(), are the two main entry points from the runtime + // into the G1's allocation routines. They have the following + // assumptions: + // + // * They should both be called outside safepoints. + // + // * They should both be called without holding the Heap_lock. + // + // * All allocation requests for new TLABs should go to + // allocate_new_tlab(). + // + // * All non-TLAB allocation requests should go to mem_allocate() + // and mem_allocate() should never be called with is_tlab == true. + // + // * If the GC locker is active we currently stall until we can + // allocate a new young region. This will be changed in the + // near future (see CR 6994056). + // + // * If either call cannot satisfy the allocation request using the + // current allocating region, they will try to get a new one. If + // this fails, they will attempt to do an evacuation pause and + // retry the allocation. + // + // * If all allocation attempts fail, even after trying to schedule + // an evacuation pause, allocate_new_tlab() will return NULL, + // whereas mem_allocate() will attempt a heap expansion and/or + // schedule a Full GC. + // + // * We do not allow humongous-sized TLABs. So, allocate_new_tlab + // should never be called with word_size being humongous. All + // humongous allocation requests should go to mem_allocate() which + // will satisfy them with a special path. - HeapWord* attempt_allocation_slow(size_t word_size, - bool permit_collection_pause = true); + virtual HeapWord* allocate_new_tlab(size_t word_size); + + virtual HeapWord* mem_allocate(size_t word_size, + bool is_noref, + bool is_tlab, /* expected to be false */ + bool* gc_overhead_limit_was_exceeded); + + // The following methods, allocate_from_cur_allocation_region(), + // attempt_allocation(), replace_cur_alloc_region_and_allocate(), + // attempt_allocation_slow(), and attempt_allocation_humongous() + // have very awkward pre- and post-conditions with respect to + // locking: + // + // If they are called outside a safepoint they assume the caller + // holds the Heap_lock when it calls them. However, on exit they + // will release the Heap_lock if they return a non-NULL result, but + // keep holding the Heap_lock if they return a NULL result. The + // reason for this is that we need to dirty the cards that span + // allocated blocks on young regions to avoid having to take the + // slow path of the write barrier (for performance reasons we don't + // update RSets for references whose source is a young region, so we + // don't need to look at dirty cards on young regions). But, doing + // this card dirtying while holding the Heap_lock can be a + // scalability bottleneck, especially given that some allocation + // requests might be of non-trivial size (and the larger the region + // size is, the fewer allocations requests will be considered + // humongous, as the humongous size limit is a fraction of the + // region size). So, when one of these calls succeeds in allocating + // a block it does the card dirtying after it releases the Heap_lock + // which is why it will return without holding it. + // + // The above assymetry is the reason why locking / unlocking is done + // explicitly (i.e., with Heap_lock->lock() and + // Heap_lock->unlocked()) instead of using MutexLocker and + // MutexUnlocker objects. The latter would ensure that the lock is + // unlocked / re-locked at every possible exit out of the basic + // block. However, we only want that action to happen in selected + // places. + // + // Further, if the above methods are called during a safepoint, then + // naturally there's no assumption about the Heap_lock being held or + // there's no attempt to unlock it. The parameter at_safepoint + // indicates whether the call is made during a safepoint or not (as + // an optimization, to avoid reading the global flag with + // SafepointSynchronize::is_at_safepoint()). + // + // The methods share these parameters: + // + // * word_size : the size of the allocation request in words + // * at_safepoint : whether the call is done at a safepoint; this + // also determines whether a GC is permitted + // (at_safepoint == false) or not (at_safepoint == true) + // * do_dirtying : whether the method should dirty the allocated + // block before returning + // + // They all return either the address of the block, if they + // successfully manage to allocate it, or NULL. + + // It tries to satisfy an allocation request out of the current + // allocating region, which is passed as a parameter. It assumes + // that the caller has checked that the current allocating region is + // not NULL. Given that the caller has to check the current + // allocating region for at least NULL, it might as well pass it as + // the first parameter so that the method doesn't have to read it + // from the _cur_alloc_region field again. + inline HeapWord* allocate_from_cur_alloc_region(HeapRegion* cur_alloc_region, + size_t word_size); + + // It attempts to allocate out of the current alloc region. If that + // fails, it retires the current alloc region (if there is one), + // tries to get a new one and retries the allocation. + inline HeapWord* attempt_allocation(size_t word_size); + + // It assumes that the current alloc region has been retired and + // tries to allocate a new one. If it's successful, it performs + // the allocation out of the new current alloc region and updates + // _cur_alloc_region. + HeapWord* replace_cur_alloc_region_and_allocate(size_t word_size, + bool at_safepoint, + bool do_dirtying); + + // The slow path when we are unable to allocate a new current alloc + // region to satisfy an allocation request (i.e., when + // attempt_allocation() fails). It will try to do an evacuation + // pause, which might stall due to the GC locker, and retry the + // allocation attempt when appropriate. + HeapWord* attempt_allocation_slow(size_t word_size); + + // The method that tries to satisfy a humongous allocation + // request. If it cannot satisfy it it will try to do an evacuation + // pause to perhaps reclaim enough space to be able to satisfy the + // allocation request afterwards. + HeapWord* attempt_allocation_humongous(size_t word_size, + bool at_safepoint); + + // It does the common work when we are retiring the current alloc region. + inline void retire_cur_alloc_region_common(HeapRegion* cur_alloc_region); + + // It retires the current alloc region, which is passed as a + // parameter (since, typically, the caller is already holding on to + // it). It sets _cur_alloc_region to NULL. + void retire_cur_alloc_region(HeapRegion* cur_alloc_region); + + // It attempts to do an allocation immediately before or after an + // evacuation pause and can only be called by the VM thread. It has + // slightly different assumptions that the ones before (i.e., + // assumes that the current alloc region has been retired). + HeapWord* attempt_allocation_at_safepoint(size_t word_size, + bool expect_null_cur_alloc_region); + + // It dirties the cards that cover the block so that so that the post + // write barrier never queues anything when updating objects on this + // block. It is assumed (and in fact we assert) that the block + // belongs to a young region. + inline void dirty_young_block(HeapWord* start, size_t word_size); // Allocate blocks during garbage collection. Will ensure an // allocation region, either by picking one or expanding the // heap, and then allocate a block of the given size. The block // may not be a humongous - it must fit into a single heap region. - HeapWord* allocate_during_gc(GCAllocPurpose purpose, size_t word_size); HeapWord* par_allocate_during_gc(GCAllocPurpose purpose, size_t word_size); HeapWord* allocate_during_gc_slow(GCAllocPurpose purpose, @@ -370,12 +558,14 @@ protected: void retire_alloc_region(HeapRegion* alloc_region, bool par); // - if explicit_gc is true, the GC is for a System.gc() or a heap - // inspection request and should collect the entire heap - // - if clear_all_soft_refs is true, all soft references are cleared - // during the GC + // inspection request and should collect the entire heap + // - if clear_all_soft_refs is true, all soft references should be + // cleared during the GC // - if explicit_gc is false, word_size describes the allocation that - // the GC should attempt (at least) to satisfy - void do_collection(bool explicit_gc, + // the GC should attempt (at least) to satisfy + // - it returns false if it is unable to do the collection due to the + // GC locker being active, true otherwise + bool do_collection(bool explicit_gc, bool clear_all_soft_refs, size_t word_size); @@ -391,13 +581,13 @@ protected: // Callback from VM_G1CollectForAllocation operation. // This function does everything necessary/possible to satisfy a // failed allocation request (including collection, expansion, etc.) - HeapWord* satisfy_failed_allocation(size_t word_size); + HeapWord* satisfy_failed_allocation(size_t word_size, bool* succeeded); // Attempting to expand the heap sufficiently // to support an allocation of the given "word_size". If // successful, perform the allocation and return the address of the // allocated block, or else "NULL". - virtual HeapWord* expand_and_allocate(size_t word_size); + HeapWord* expand_and_allocate(size_t word_size); public: // Expand the garbage-first heap by at least the given size (in bytes!). @@ -478,21 +668,27 @@ protected: void reset_taskqueue_stats(); #endif // TASKQUEUE_STATS - // Do an incremental collection: identify a collection set, and evacuate - // its live objects elsewhere. - virtual void do_collection_pause(); + // Schedule the VM operation that will do an evacuation pause to + // satisfy an allocation request of word_size. *succeeded will + // return whether the VM operation was successful (it did do an + // evacuation pause) or not (another thread beat us to it or the GC + // locker was active). Given that we should not be holding the + // Heap_lock when we enter this method, we will pass the + // gc_count_before (i.e., total_collections()) as a parameter since + // it has to be read while holding the Heap_lock. Currently, both + // methods that call do_collection_pause() release the Heap_lock + // before the call, so it's easy to read gc_count_before just before. + HeapWord* do_collection_pause(size_t word_size, + unsigned int gc_count_before, + bool* succeeded); // The guts of the incremental collection pause, executed by the vm - // thread. - virtual void do_collection_pause_at_safepoint(double target_pause_time_ms); + // thread. It returns false if it is unable to do the collection due + // to the GC locker being active, true otherwise + bool do_collection_pause_at_safepoint(double target_pause_time_ms); // Actually do the work of evacuating the collection set. - virtual void evacuate_collection_set(); - - // If this is an appropriate right time, do a collection pause. - // The "word_size" argument, if non-zero, indicates the size of an - // allocation request that is prompting this query. - void do_collection_pause_if_appropriate(size_t word_size); + void evacuate_collection_set(); // The g1 remembered set of the heap. G1RemSet* _g1_rem_set; @@ -762,11 +958,6 @@ public: #endif // PRODUCT // These virtual functions do the actual allocation. - virtual HeapWord* mem_allocate(size_t word_size, - bool is_noref, - bool is_tlab, - bool* gc_overhead_limit_was_exceeded); - // Some heaps may offer a contiguous region for shared non-blocking // allocation, via inlined code (by exporting the address of the top and // end fields defining the extent of the contiguous allocation region.) @@ -1046,7 +1237,6 @@ public: virtual bool supports_tlab_allocation() const; virtual size_t tlab_capacity(Thread* thr) const; virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; - virtual HeapWord* allocate_new_tlab(size_t word_size); // Can a compiler initialize a new object without store barriers? // This permission only extends from the creation of a new object @@ -1186,7 +1376,6 @@ public: static G1CollectedHeap* heap(); void empty_young_list(); - bool should_set_young_locked(); void set_region_short_lived_locked(HeapRegion* hr); // add appropriate methods for any other surv rate groups @@ -1339,8 +1528,6 @@ public: protected: size_t _max_heap_capacity; -// debug_only(static void check_for_valid_allocation_state();) - public: // Temporary: call to mark things unimplemented for the G1 heap (e.g., // MemoryService). In productization, we can make this assert false diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp index 1cc1ada578c..fc23db566d9 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp @@ -27,6 +27,7 @@ #include "gc_implementation/g1/concurrentMark.hpp" #include "gc_implementation/g1/g1CollectedHeap.hpp" +#include "gc_implementation/g1/g1CollectorPolicy.hpp" #include "gc_implementation/g1/heapRegionSeq.hpp" #include "utilities/taskqueue.hpp" @@ -58,37 +59,114 @@ inline bool G1CollectedHeap::obj_in_cs(oop obj) { return r != NULL && r->in_collection_set(); } -inline HeapWord* G1CollectedHeap::attempt_allocation(size_t word_size, - bool permit_collection_pause) { - HeapWord* res = NULL; +// See the comment in the .hpp file about the locking protocol and +// assumptions of this method (and other related ones). +inline HeapWord* +G1CollectedHeap::allocate_from_cur_alloc_region(HeapRegion* cur_alloc_region, + size_t word_size) { + assert_heap_locked_and_not_at_safepoint(); + assert(cur_alloc_region != NULL, "pre-condition of the method"); + assert(cur_alloc_region == _cur_alloc_region, "pre-condition of the method"); + assert(cur_alloc_region->is_young(), + "we only support young current alloc regions"); + assert(!isHumongous(word_size), "allocate_from_cur_alloc_region() " + "should not be used for humongous allocations"); + assert(!cur_alloc_region->isHumongous(), "Catch a regression of this bug."); - assert( SafepointSynchronize::is_at_safepoint() || - Heap_lock->owned_by_self(), "pre-condition of the call" ); + assert(!cur_alloc_region->is_empty(), + err_msg("region ["PTR_FORMAT","PTR_FORMAT"] should not be empty", + cur_alloc_region->bottom(), cur_alloc_region->end())); + // This allocate method does BOT updates and we don't need them in + // the young generation. This will be fixed in the near future by + // CR 6994297. + HeapWord* result = cur_alloc_region->allocate(word_size); + if (result != NULL) { + assert(is_in(result), "result should be in the heap"); + Heap_lock->unlock(); - // All humongous allocation requests should go through the slow path in - // attempt_allocation_slow(). - if (!isHumongous(word_size) && _cur_alloc_region != NULL) { - // If this allocation causes a region to become non empty, - // then we need to update our free_regions count. - - if (_cur_alloc_region->is_empty()) { - res = _cur_alloc_region->allocate(word_size); - if (res != NULL) - _free_regions--; - } else { - res = _cur_alloc_region->allocate(word_size); - } - - if (res != NULL) { - if (!SafepointSynchronize::is_at_safepoint()) { - assert( Heap_lock->owned_by_self(), "invariant" ); - Heap_lock->unlock(); - } - return res; - } + // Do the dirtying after we release the Heap_lock. + dirty_young_block(result, word_size); + return result; } - // attempt_allocation_slow will also unlock the heap lock when appropriate. - return attempt_allocation_slow(word_size, permit_collection_pause); + + assert_heap_locked(); + return NULL; +} + +// See the comment in the .hpp file about the locking protocol and +// assumptions of this method (and other related ones). +inline HeapWord* +G1CollectedHeap::attempt_allocation(size_t word_size) { + assert_heap_locked_and_not_at_safepoint(); + assert(!isHumongous(word_size), "attempt_allocation() should not be called " + "for humongous allocation requests"); + + HeapRegion* cur_alloc_region = _cur_alloc_region; + if (cur_alloc_region != NULL) { + HeapWord* result = allocate_from_cur_alloc_region(cur_alloc_region, + word_size); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + + assert_heap_locked(); + + // Since we couldn't successfully allocate into it, retire the + // current alloc region. + retire_cur_alloc_region(cur_alloc_region); + } + + // Try to get a new region and allocate out of it + HeapWord* result = replace_cur_alloc_region_and_allocate(word_size, + false, /* at safepoint */ + true /* do_dirtying */); + if (result != NULL) { + assert_heap_not_locked(); + return result; + } + + assert_heap_locked(); + return NULL; +} + +inline void +G1CollectedHeap::retire_cur_alloc_region_common(HeapRegion* cur_alloc_region) { + assert_heap_locked_or_at_safepoint(); + assert(cur_alloc_region != NULL && cur_alloc_region == _cur_alloc_region, + "pre-condition of the call"); + assert(cur_alloc_region->is_young(), + "we only support young current alloc regions"); + + // The region is guaranteed to be young + g1_policy()->add_region_to_incremental_cset_lhs(cur_alloc_region); + _summary_bytes_used += cur_alloc_region->used(); + _cur_alloc_region = NULL; +} + +// It dirties the cards that cover the block so that so that the post +// write barrier never queues anything when updating objects on this +// block. It is assumed (and in fact we assert) that the block +// belongs to a young region. +inline void +G1CollectedHeap::dirty_young_block(HeapWord* start, size_t word_size) { + assert_heap_not_locked(); + + // Assign the containing region to containing_hr so that we don't + // have to keep calling heap_region_containing_raw() in the + // asserts below. + DEBUG_ONLY(HeapRegion* containing_hr = heap_region_containing_raw(start);) + assert(containing_hr != NULL && start != NULL && word_size > 0, + "pre-condition"); + assert(containing_hr->is_in(start), "it should contain start"); + assert(containing_hr->is_young(), "it should be young"); + assert(!containing_hr->isHumongous(), "it should not be humongous"); + + HeapWord* end = start + word_size; + assert(containing_hr->is_in(end - 1), "it should also contain end - 1"); + + MemRegion mr(start, end); + ((CardTableModRefBS*)_g1h->barrier_set())->dirty(mr); } inline RefToScanQueue* G1CollectedHeap::task_queue(int i) const { diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp index 52b0411c21a..04289852003 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @@ -458,8 +458,8 @@ void G1CollectorPolicy::calculate_young_list_min_length() { double now_sec = os::elapsedTime(); double when_ms = _mmu_tracker->when_max_gc_sec(now_sec) * 1000.0; double alloc_rate_ms = predict_alloc_rate_ms(); - int min_regions = (int) ceil(alloc_rate_ms * when_ms); - int current_region_num = (int) _g1->young_list()->length(); + size_t min_regions = (size_t) ceil(alloc_rate_ms * when_ms); + size_t current_region_num = _g1->young_list()->length(); _young_list_min_length = min_regions + current_region_num; } } @@ -473,9 +473,12 @@ void G1CollectorPolicy::calculate_young_list_target_length() { _young_list_target_length = _young_list_fixed_length; else _young_list_target_length = _young_list_fixed_length / 2; - - _young_list_target_length = MAX2(_young_list_target_length, (size_t)1); } + + // Make sure we allow the application to allocate at least one + // region before we need to do a collection again. + size_t min_length = _g1->young_list()->length() + 1; + _young_list_target_length = MAX2(_young_list_target_length, min_length); calculate_survivors_policy(); } @@ -568,7 +571,7 @@ void G1CollectorPolicy::calculate_young_list_target_length(size_t rs_lengths) { // we should have at least one region in the target young length _young_list_target_length = - MAX2((size_t) 1, final_young_length + _recorded_survivor_regions); + final_young_length + _recorded_survivor_regions; // let's keep an eye of how long we spend on this calculation // right now, I assume that we'll print it when we need it; we @@ -617,8 +620,7 @@ void G1CollectorPolicy::calculate_young_list_target_length(size_t rs_lengths) { _young_list_min_length); #endif // TRACE_CALC_YOUNG_LENGTH // we'll do the pause as soon as possible by choosing the minimum - _young_list_target_length = - MAX2(_young_list_min_length, (size_t) 1); + _young_list_target_length = _young_list_min_length; } _rs_lengths_prediction = rs_lengths; @@ -801,7 +803,7 @@ void G1CollectorPolicy::record_full_collection_end() { _survivor_surv_rate_group->reset(); calculate_young_list_min_length(); calculate_young_list_target_length(); - } +} void G1CollectorPolicy::record_before_bytes(size_t bytes) { _bytes_in_to_space_before_gc += bytes; @@ -824,9 +826,9 @@ void G1CollectorPolicy::record_collection_pause_start(double start_time_sec, gclog_or_tty->print(" (%s)", full_young_gcs() ? "young" : "partial"); } - assert(_g1->used_regions() == _g1->recalculate_used_regions(), - "sanity"); - assert(_g1->used() == _g1->recalculate_used(), "sanity"); + assert(_g1->used() == _g1->recalculate_used(), + err_msg("sanity, used: "SIZE_FORMAT" recalculate_used: "SIZE_FORMAT, + _g1->used(), _g1->recalculate_used())); double s_w_t_ms = (start_time_sec - _stop_world_start) * 1000.0; _all_stop_world_times_ms->add(s_w_t_ms); @@ -2266,24 +2268,13 @@ void G1CollectorPolicy::print_yg_surv_rate_info() const { #endif // PRODUCT } -bool -G1CollectorPolicy::should_add_next_region_to_young_list() { - assert(in_young_gc_mode(), "should be in young GC mode"); - bool ret; - size_t young_list_length = _g1->young_list()->length(); - size_t young_list_max_length = _young_list_target_length; - if (G1FixedEdenSize) { - young_list_max_length -= _max_survivor_regions; - } - if (young_list_length < young_list_max_length) { - ret = true; +void +G1CollectorPolicy::update_region_num(bool young) { + if (young) { ++_region_num_young; } else { - ret = false; ++_region_num_tenured; } - - return ret; } #ifndef PRODUCT @@ -2327,32 +2318,6 @@ void G1CollectorPolicy::calculate_survivors_policy() } } -bool -G1CollectorPolicy_BestRegionsFirst::should_do_collection_pause(size_t - word_size) { - assert(_g1->regions_accounted_for(), "Region leakage!"); - double max_pause_time_ms = _mmu_tracker->max_gc_time() * 1000.0; - - size_t young_list_length = _g1->young_list()->length(); - size_t young_list_max_length = _young_list_target_length; - if (G1FixedEdenSize) { - young_list_max_length -= _max_survivor_regions; - } - bool reached_target_length = young_list_length >= young_list_max_length; - - if (in_young_gc_mode()) { - if (reached_target_length) { - assert( young_list_length > 0 && _g1->young_list()->length() > 0, - "invariant" ); - return true; - } - } else { - guarantee( false, "should not reach here" ); - } - - return false; -} - #ifndef PRODUCT class HRSortIndexIsOKClosure: public HeapRegionClosure { CollectionSetChooser* _chooser; diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp index 7e7111e88af..b6d643e4bbd 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @@ -993,11 +993,6 @@ public: void record_before_bytes(size_t bytes); void record_after_bytes(size_t bytes); - // Returns "true" if this is a good time to do a collection pause. - // The "word_size" argument, if non-zero, indicates the size of an - // allocation request that is prompting this query. - virtual bool should_do_collection_pause(size_t word_size) = 0; - // Choose a new collection set. Marks the chosen regions as being // "in_collection_set", and links them together. The head and number of // the collection set are available via access methods. @@ -1116,7 +1111,16 @@ public: // do that for any other surv rate groups } - bool should_add_next_region_to_young_list(); + bool is_young_list_full() { + size_t young_list_length = _g1->young_list()->length(); + size_t young_list_max_length = _young_list_target_length; + if (G1FixedEdenSize) { + young_list_max_length -= _max_survivor_regions; + } + + return young_list_length >= young_list_max_length; + } + void update_region_num(bool young); bool in_young_gc_mode() { return _in_young_gc_mode; @@ -1270,7 +1274,6 @@ public: _collectionSetChooser = new CollectionSetChooser(); } void record_collection_pause_end(); - bool should_do_collection_pause(size_t word_size); // This is not needed any more, after the CSet choosing code was // changed to use the pause prediction work. But let's leave the // hook in just in case. diff --git a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp index d11f7fa60b6..1ceeead58ff 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @@ -27,13 +27,22 @@ #include "gc_implementation/g1/g1CollectorPolicy.hpp" #include "gc_implementation/g1/vm_operations_g1.hpp" #include "gc_implementation/shared/isGCActiveMark.hpp" +#include "gc_implementation/g1/vm_operations_g1.hpp" #include "runtime/interfaceSupport.hpp" +VM_G1CollectForAllocation::VM_G1CollectForAllocation( + unsigned int gc_count_before, + size_t word_size) + : VM_G1OperationWithAllocRequest(gc_count_before, word_size) { + guarantee(word_size > 0, "an allocation should always be requested"); +} + void VM_G1CollectForAllocation::doit() { JvmtiGCForAllocationMarker jgcm; G1CollectedHeap* g1h = G1CollectedHeap::heap(); - _res = g1h->satisfy_failed_allocation(_size); - assert(g1h->is_in_or_null(_res), "result not in heap"); + _result = g1h->satisfy_failed_allocation(_word_size, &_pause_succeeded); + assert(_result == NULL || _pause_succeeded, + "if we get back a result, the pause should have succeeded"); } void VM_G1CollectFull::doit() { @@ -43,6 +52,25 @@ void VM_G1CollectFull::doit() { g1h->do_full_collection(false /* clear_all_soft_refs */); } +VM_G1IncCollectionPause::VM_G1IncCollectionPause( + unsigned int gc_count_before, + size_t word_size, + bool should_initiate_conc_mark, + double target_pause_time_ms, + GCCause::Cause gc_cause) + : VM_G1OperationWithAllocRequest(gc_count_before, word_size), + _should_initiate_conc_mark(should_initiate_conc_mark), + _target_pause_time_ms(target_pause_time_ms), + _full_collections_completed_before(0) { + guarantee(target_pause_time_ms > 0.0, + err_msg("target_pause_time_ms = %1.6lf should be positive", + target_pause_time_ms)); + guarantee(word_size == 0 || gc_cause == GCCause::_g1_inc_collection_pause, + "we can only request an allocation if the GC cause is for " + "an incremental GC pause"); + _gc_cause = gc_cause; +} + void VM_G1IncCollectionPause::doit() { JvmtiGCForAllocationMarker jgcm; G1CollectedHeap* g1h = G1CollectedHeap::heap(); @@ -51,6 +79,18 @@ void VM_G1IncCollectionPause::doit() { (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent)), "only a GC locker or a System.gc() induced GC should start a cycle"); + if (_word_size > 0) { + // An allocation has been requested. So, try to do that first. + _result = g1h->attempt_allocation_at_safepoint(_word_size, + false /* expect_null_cur_alloc_region */); + if (_result != NULL) { + // If we can successfully allocate before we actually do the + // pause then we will consider this pause successful. + _pause_succeeded = true; + return; + } + } + GCCauseSetter x(g1h, _gc_cause); if (_should_initiate_conc_mark) { // It's safer to read full_collections_completed() here, given @@ -63,7 +103,16 @@ void VM_G1IncCollectionPause::doit() { // will do so if one is not already in progress. bool res = g1h->g1_policy()->force_initial_mark_if_outside_cycle(); } - g1h->do_collection_pause_at_safepoint(_target_pause_time_ms); + + _pause_succeeded = + g1h->do_collection_pause_at_safepoint(_target_pause_time_ms); + if (_pause_succeeded && _word_size > 0) { + // An allocation had been requested. + _result = g1h->attempt_allocation_at_safepoint(_word_size, + true /* expect_null_cur_alloc_region */); + } else { + assert(_result == NULL, "invariant"); + } } void VM_G1IncCollectionPause::doit_epilogue() { diff --git a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp index c55c252be7d..1fc31d51dc4 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp @@ -31,19 +31,33 @@ // VM_GC_Operation: // - VM_CGC_Operation // - VM_G1CollectFull -// - VM_G1CollectForAllocation -// - VM_G1IncCollectionPause -// - VM_G1PopRegionCollectionPause +// - VM_G1OperationWithAllocRequest +// - VM_G1CollectForAllocation +// - VM_G1IncCollectionPause + +class VM_G1OperationWithAllocRequest: public VM_GC_Operation { +protected: + size_t _word_size; + HeapWord* _result; + bool _pause_succeeded; + +public: + VM_G1OperationWithAllocRequest(unsigned int gc_count_before, + size_t word_size) + : VM_GC_Operation(gc_count_before), + _word_size(word_size), _result(NULL), _pause_succeeded(false) { } + HeapWord* result() { return _result; } + bool pause_succeeded() { return _pause_succeeded; } +}; class VM_G1CollectFull: public VM_GC_Operation { - public: +public: VM_G1CollectFull(unsigned int gc_count_before, unsigned int full_gc_count_before, GCCause::Cause cause) : VM_GC_Operation(gc_count_before, full_gc_count_before) { _gc_cause = cause; } - ~VM_G1CollectFull() {} virtual VMOp_Type type() const { return VMOp_G1CollectFull; } virtual void doit(); virtual const char* name() const { @@ -51,45 +65,28 @@ class VM_G1CollectFull: public VM_GC_Operation { } }; -class VM_G1CollectForAllocation: public VM_GC_Operation { - private: - HeapWord* _res; - size_t _size; // size of object to be allocated - public: - VM_G1CollectForAllocation(size_t size, int gc_count_before) - : VM_GC_Operation(gc_count_before) { - _size = size; - _res = NULL; - } - ~VM_G1CollectForAllocation() {} +class VM_G1CollectForAllocation: public VM_G1OperationWithAllocRequest { +public: + VM_G1CollectForAllocation(unsigned int gc_count_before, + size_t word_size); virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; } virtual void doit(); virtual const char* name() const { return "garbage-first collection to satisfy allocation"; } - HeapWord* result() { return _res; } }; -class VM_G1IncCollectionPause: public VM_GC_Operation { +class VM_G1IncCollectionPause: public VM_G1OperationWithAllocRequest { private: - bool _should_initiate_conc_mark; - double _target_pause_time_ms; + bool _should_initiate_conc_mark; + double _target_pause_time_ms; unsigned int _full_collections_completed_before; public: VM_G1IncCollectionPause(unsigned int gc_count_before, + size_t word_size, bool should_initiate_conc_mark, double target_pause_time_ms, - GCCause::Cause cause) - : VM_GC_Operation(gc_count_before), - _full_collections_completed_before(0), - _should_initiate_conc_mark(should_initiate_conc_mark), - _target_pause_time_ms(target_pause_time_ms) { - guarantee(target_pause_time_ms > 0.0, - err_msg("target_pause_time_ms = %1.6lf should be positive", - target_pause_time_ms)); - - _gc_cause = cause; - } + GCCause::Cause gc_cause); virtual VMOp_Type type() const { return VMOp_G1IncCollectionPause; } virtual void doit(); virtual void doit_epilogue(); @@ -103,14 +100,9 @@ public: class VM_CGC_Operation: public VM_Operation { VoidClosure* _cl; const char* _printGCMessage; - public: - VM_CGC_Operation(VoidClosure* cl, const char *printGCMsg) : - _cl(cl), - _printGCMessage(printGCMsg) - {} - - ~VM_CGC_Operation() {} - +public: + VM_CGC_Operation(VoidClosure* cl, const char *printGCMsg) + : _cl(cl), _printGCMessage(printGCMsg) { } virtual VMOp_Type type() const { return VMOp_CGC_Operation; } virtual void doit(); virtual bool doit_prologue(); From c66d80c2d50a92457980e1a830c666e8af2e04e0 Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Wed, 1 Sep 2010 09:36:38 -0700 Subject: [PATCH 004/722] 6981436: Variable gets hidden if Defs-javadoc is included Reviewed-by: ohair --- jdk/make/common/shared/Defs-javadoc.gmk | 2 +- jdk/make/docs/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/make/common/shared/Defs-javadoc.gmk b/jdk/make/common/shared/Defs-javadoc.gmk index 83b3b4aa706..a5ffe8e285e 100644 --- a/jdk/make/common/shared/Defs-javadoc.gmk +++ b/jdk/make/common/shared/Defs-javadoc.gmk @@ -45,7 +45,7 @@ JNLP_FIRST_COPYRIGHT_YEAR = 1998 PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007 # Oracle name -COMPANY_NAME = Oracle and/or its affiliates +FULL_COMPANY_NAME = Oracle and/or its affiliates # Copyright address COMPANY_ADDRESS = 500 Oracle Parkway
Redwood Shores, CA 94065 USA. diff --git a/jdk/make/docs/Makefile b/jdk/make/docs/Makefile index a2aaccb130f..960c99947f3 100644 --- a/jdk/make/docs/Makefile +++ b/jdk/make/docs/Makefile @@ -57,7 +57,7 @@ JLS3_URL = http://java.sun.com/docs/books/jls/ # Common Java trademark line JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \ -$(COMPANY_NAME) in the US and other countries. +$(FULL_COMPANY_NAME) in the US and other countries. # # Definitions for imported components From 2d875cdd6fa26bbca19e15ec5c3378ac8804a4f5 Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Fri, 3 Sep 2010 20:19:45 -0700 Subject: [PATCH 005/722] 6978977: Productivity: use ant for java part of build Reviewed-by: mduigou, herrick, ohair, ngthomas --- .hgignore | 1 + make/deploy-rules.gmk | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.hgignore b/.hgignore index 0092bd4ff5a..2d339f9988c 100644 --- a/.hgignore +++ b/.hgignore @@ -1,3 +1,4 @@ ^build/ ^dist/ /nbproject/private/ +^webrev diff --git a/make/deploy-rules.gmk b/make/deploy-rules.gmk index 3aa6e16d982..988c7d0921b 100644 --- a/make/deploy-rules.gmk +++ b/make/deploy-rules.gmk @@ -41,7 +41,7 @@ else IMAGES_TARGET = images endif -DEPLOY_BUILD_TARGETS = sanity javaws-all plugin-all +DEPLOY_BUILD_TARGETS = sanity deploy # Only build 7-Zip LZMA file compression if it is available # Enable 7-Zip LZMA file (de)compression for Java Kernel if it is available ifeq ($(ARCH_DATA_MODEL), 32) From dc9d72b5b1aaafed1f9f08742e323c0839083179 Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Tue, 7 Sep 2010 11:24:28 -0700 Subject: [PATCH 006/722] 6982774: HOTSPOT_IMPORT_PATH detection does not work as expected Reviewed-by: herrick, ohair --- jdk/make/common/shared/Defs.gmk | 60 ++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/jdk/make/common/shared/Defs.gmk b/jdk/make/common/shared/Defs.gmk index ed32779c8c2..48ed6cc5313 100644 --- a/jdk/make/common/shared/Defs.gmk +++ b/jdk/make/common/shared/Defs.gmk @@ -341,7 +341,33 @@ dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)") include $(_PRIVATE_DEFS_FILE) endif +# OUTPUTDIR: Location of all output for the build +ifdef ALT_OUTPUTDIR + OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR)) + # Assumes this is absolute (checks later) + ABS_OUTPUTDIR:=$(OUTPUTDIR) +else + ifndef _OUTPUTDIR + # Default: Get "build" parent directory, which should always exist + ifndef BUILD_PARENT_DIRECTORY + BUILD_PARENT_DIRECTORY=$(BUILDDIR)/.. + endif + ifdef OPENJDK + _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX) + else + _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH) + endif + _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) + endif + OUTPUTDIR:=$(_OUTPUTDIR) +endif +# Check for spaces and null value +OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR) +OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR) + # Get platform specific settings +# NB: OUTPUTDIR must be defined. Otherwise hotspot import detection will not work correctly +# On other hand this must be included early as it provides platform specific defines such as FullPath include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk # Components @@ -478,32 +504,6 @@ endif CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE) CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE) -# OUTPUTDIR: Location of all output for the build -ifdef ALT_OUTPUTDIR - OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR)) - # Assumes this is absolute (checks later) - ABS_OUTPUTDIR:=$(OUTPUTDIR) -else - ifndef _OUTPUTDIR - # Default: Get "build" parent directory, which should always exist - ifndef BUILD_PARENT_DIRECTORY - BUILD_PARENT_DIRECTORY=$(BUILDDIR)/.. - endif - ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY)) - ifdef OPENJDK - _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX) - else - _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH) - endif - _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) - ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) - endif - OUTPUTDIR:=$(_OUTPUTDIR) -endif -# Check for spaces and null value -OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR) -OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR) - # # When signing the JCE framework and provider, we could be using built # bits on a read-only filesystem. If so, this test will fail and crash @@ -519,7 +519,13 @@ endif # Define absolute path if needed and check for spaces and null value ifndef ABS_OUTPUTDIR - ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR)) + ifdef _OUTPUTDIRNAME + #Could not define this at the same time as _OUTPUTDIRNAME as FullPath is not defined at that point + ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY)) + ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME) + else + ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR)) + endif endif ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR) ABS_OUTPUTDIR:=$(call AltCheckValue,ABS_OUTPUTDIR) From 08c9310254c65f48d614572783c964b853da93e1 Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Tue, 7 Sep 2010 11:28:28 -0700 Subject: [PATCH 007/722] 6982499: ant detection is fragile on windows. especially using cygwin Reviewed-by: ohair --- jdk/make/common/shared/Defs.gmk | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/jdk/make/common/shared/Defs.gmk b/jdk/make/common/shared/Defs.gmk index 48ed6cc5313..3d4cf62115b 100644 --- a/jdk/make/common/shared/Defs.gmk +++ b/jdk/make/common/shared/Defs.gmk @@ -578,10 +578,23 @@ ifeq ($(PLATFORM), windows) ANT_HOME := $(call DirExists,$(JDK_DEVTOOLS_DIR)/share/ant/latest,,) endif endif + +# There are few problems with ant we need to workaround: +# 1) ant is using temporary directory java.io.tmpdir +# However, this directory is not unique enough and two separate ant processes +# can easily end up using the exact same temp directory. This may lead to weird build failures +# To workaround this we will define tmp dir explicitly +# 2) ant attempts to detect JDK location based on java.exe location +# This is fragile as developer may have JRE first on the PATH. +# To workaround this we will specify JAVA_HOME explicitly + +ANT_TMPDIR = $(ABS_OUTPUTDIR)/tmp +ANT_WORKAROUNDS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)' JAVA_HOME='$(BOOTDIR)' + ifeq ($(ANT_HOME),) - ANT = ant + ANT = $(ANT_WORKAROUNDS) ant else - ANT = $(ANT_HOME)/bin/ant + ANT = $(ANT_WORKAROUNDS) $(ANT_HOME)/bin/ant endif ifdef ALT_COPYRIGHT_YEAR From 28e56b89705aa94ab76cf804634de83ebdfee9c5 Mon Sep 17 00:00:00 2001 From: Jon Masamitsu Date: Mon, 20 Sep 2010 14:38:38 -0700 Subject: [PATCH 008/722] 6984287: Regularize how GC parallel workers are specified Associate number of GC workers with the workgang as opposed to the task. Reviewed-by: johnc, ysr --- .../cmsCollectorPolicy.cpp | 8 +- .../compactibleFreeListSpace.cpp | 14 +- .../concurrentMarkSweepGeneration.cpp | 139 ++++++++------ .../concurrentMarkSweepGeneration.hpp | 6 +- .../gc_implementation/g1/concurrentMark.cpp | 31 ++-- .../gc_implementation/g1/g1CollectedHeap.cpp | 17 +- .../gc_implementation/g1/g1CollectedHeap.hpp | 5 +- .../g1/g1CollectorPolicy.cpp | 23 +-- .../vm/gc_implementation/g1/g1RemSet.cpp | 2 +- .../parNew/parCardTableModRefBS.cpp | 4 +- .../parNew/parNewGeneration.cpp | 4 + .../parNew/parNewGeneration.hpp | 2 + .../parallelScavenge/pcTasks.hpp | 6 +- .../parallelScavenge/psParallelCompact.cpp | 2 +- .../share/vm/gc_interface/collectedHeap.cpp | 6 +- .../share/vm/gc_interface/collectedHeap.hpp | 16 ++ hotspot/src/share/vm/includeDB_core | 1 + .../src/share/vm/memory/genCollectedHeap.cpp | 2 +- .../src/share/vm/memory/genCollectedHeap.hpp | 3 +- .../share/vm/memory/referenceProcessor.cpp | 170 +++++++++++++----- .../share/vm/memory/referenceProcessor.hpp | 11 +- hotspot/src/share/vm/memory/sharedHeap.cpp | 12 +- hotspot/src/share/vm/memory/sharedHeap.hpp | 7 +- hotspot/src/share/vm/utilities/taskqueue.cpp | 7 + hotspot/src/share/vm/utilities/taskqueue.hpp | 10 ++ hotspot/src/share/vm/utilities/workgroup.cpp | 40 ++++- hotspot/src/share/vm/utilities/workgroup.hpp | 78 +++++++- .../share/vm/utilities/yieldingWorkgroup.cpp | 46 ++--- .../share/vm/utilities/yieldingWorkgroup.hpp | 48 ++--- 29 files changed, 504 insertions(+), 216 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp index 78c9dc11103..96388d07be9 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ void ConcurrentMarkSweepPolicy::initialize_generations() { if (_generations == NULL) vm_exit_during_initialization("Unable to allocate gen spec"); - if (UseParNewGC && ParallelGCThreads > 0) { + if (ParNewGeneration::in_use()) { if (UseAdaptiveSizePolicy) { _generations[0] = new GenerationSpec(Generation::ASParNew, _initial_gen0_size, _max_gen0_size); @@ -79,7 +79,7 @@ void ConcurrentMarkSweepPolicy::initialize_size_policy(size_t init_eden_size, void ConcurrentMarkSweepPolicy::initialize_gc_policy_counters() { // initialize the policy counters - 2 collectors, 3 generations - if (UseParNewGC && ParallelGCThreads > 0) { + if (ParNewGeneration::in_use()) { _gc_policy_counters = new GCPolicyCounters("ParNew:CMS", 2, 3); } else { @@ -102,7 +102,7 @@ void ASConcurrentMarkSweepPolicy::initialize_gc_policy_counters() { assert(size_policy() != NULL, "A size policy is required"); // initialize the policy counters - 2 collectors, 3 generations - if (UseParNewGC && ParallelGCThreads > 0) { + if (ParNewGeneration::in_use()) { _gc_policy_counters = new CMSGCAdaptivePolicyCounters("ParNew:CMS", 2, 3, size_policy()); } diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp index 7c1d13de3f8..847b56d0b2d 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -124,7 +124,8 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, checkFreeListConsistency(); // Initialize locks for parallel case. - if (ParallelGCThreads > 0) { + + if (CollectedHeap::use_parallel_gc_threads()) { for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) { _indexedFreeListParLocks[i] = new Mutex(Mutex::leaf - 1, // == ExpandHeap_lock - 1 "a freelist par lock", @@ -1071,7 +1072,8 @@ bool CompactibleFreeListSpace::block_is_obj(const HeapWord* p) const { // at address below "p" in finding the object that contains "p" // and those objects (if garbage) may have been modified to hold // live range information. - // assert(ParallelGCThreads > 0 || _bt.block_start(p) == p, "Should be a block boundary"); + // assert(CollectedHeap::use_parallel_gc_threads() || _bt.block_start(p) == p, + // "Should be a block boundary"); if (FreeChunk::indicatesFreeChunk(p)) return false; klassOop k = oop(p)->klass_or_null(); if (k != NULL) { @@ -2932,7 +2934,9 @@ initialize_sequential_subtasks_for_rescan(int n_threads) { "n_tasks calculation incorrect"); SequentialSubTasksDone* pst = conc_par_seq_tasks(); assert(!pst->valid(), "Clobbering existing data?"); - pst->set_par_threads(n_threads); + // Sets the condition for completion of the subtask (how many threads + // need to finish in order to be done). + pst->set_n_threads(n_threads); pst->set_n_tasks((int)n_tasks); } @@ -2972,6 +2976,8 @@ initialize_sequential_subtasks_for_marking(int n_threads, "n_tasks calculation incorrect"); SequentialSubTasksDone* pst = conc_par_seq_tasks(); assert(!pst->valid(), "Clobbering existing data?"); - pst->set_par_threads(n_threads); + // Sets the condition for completion of the subtask (how many threads + // need to finish in order to be done). + pst->set_n_threads(n_threads); pst->set_n_tasks((int)n_tasks); } diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index aab22dacf17..3d1c4c1e5b2 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -195,7 +195,7 @@ ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration( "Offset of FreeChunk::_prev within FreeChunk must match" " that of OopDesc::_klass within OopDesc"); ) - if (ParallelGCThreads > 0) { + if (CollectedHeap::use_parallel_gc_threads()) { typedef CMSParGCThreadState* CMSParGCThreadStatePtr; _par_gc_thread_states = NEW_C_HEAP_ARRAY(CMSParGCThreadStatePtr, ParallelGCThreads); @@ -616,7 +616,7 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen, } // Support for multi-threaded concurrent phases - if (ParallelGCThreads > 0 && CMSConcurrentMTEnabled) { + if (CollectedHeap::use_parallel_gc_threads() && CMSConcurrentMTEnabled) { if (FLAG_IS_DEFAULT(ConcGCThreads)) { // just for now FLAG_SET_DEFAULT(ConcGCThreads, (ParallelGCThreads + 3)/4); @@ -628,6 +628,8 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen, warning("GC/CMS: _conc_workers allocation failure: " "forcing -CMSConcurrentMTEnabled"); CMSConcurrentMTEnabled = false; + } else { + _conc_workers->initialize_workers(); } } else { CMSConcurrentMTEnabled = false; @@ -936,7 +938,7 @@ void ConcurrentMarkSweepGeneration::reset_after_compaction() { // along with all the other pointers into the heap but // compaction is expected to be a rare event with // a heap using cms so don't do it without seeing the need. - if (ParallelGCThreads > 0) { + if (CollectedHeap::use_parallel_gc_threads()) { for (uint i = 0; i < ParallelGCThreads; i++) { _par_gc_thread_states[i]->promo.reset(); } @@ -2630,7 +2632,8 @@ void CMSCollector::gc_prologue(bool full) { // Should call gc_prologue_work() for all cms gens we are responsible for bool registerClosure = _collectorState >= Marking && _collectorState < Sweeping; - ModUnionClosure* muc = ParallelGCThreads > 0 ? &_modUnionClosurePar + ModUnionClosure* muc = CollectedHeap::use_parallel_gc_threads() ? + &_modUnionClosurePar : &_modUnionClosure; _cmsGen->gc_prologue_work(full, registerClosure, muc); _permGen->gc_prologue_work(full, registerClosure, muc); @@ -2731,7 +2734,7 @@ void ConcurrentMarkSweepGeneration::gc_epilogue(bool full) { collector()->gc_epilogue(full); // Also reset promotion tracking in par gc thread states. - if (ParallelGCThreads > 0) { + if (CollectedHeap::use_parallel_gc_threads()) { for (uint i = 0; i < ParallelGCThreads; i++) { _par_gc_thread_states[i]->promo.stopTrackingPromotions(i); } @@ -3731,7 +3734,6 @@ class CMSConcMarkingTerminator: public ParallelTaskTerminator { // MT Concurrent Marking Task class CMSConcMarkingTask: public YieldingFlexibleGangTask { CMSCollector* _collector; - YieldingFlexibleWorkGang* _workers; // the whole gang int _n_workers; // requested/desired # workers bool _asynch; bool _result; @@ -3751,21 +3753,19 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { CMSConcMarkingTask(CMSCollector* collector, CompactibleFreeListSpace* cms_space, CompactibleFreeListSpace* perm_space, - bool asynch, int n_workers, + bool asynch, YieldingFlexibleWorkGang* workers, OopTaskQueueSet* task_queues): YieldingFlexibleGangTask("Concurrent marking done multi-threaded"), _collector(collector), _cms_space(cms_space), _perm_space(perm_space), - _asynch(asynch), _n_workers(n_workers), _result(true), - _workers(workers), _task_queues(task_queues), - _term(n_workers, task_queues, _collector, asynch), + _asynch(asynch), _n_workers(0), _result(true), + _task_queues(task_queues), + _term(_n_workers, task_queues, _collector, asynch), _bit_map_lock(collector->bitMapLock()) { - assert(n_workers <= workers->total_workers(), - "Else termination won't work correctly today"); // XXX FIX ME! - _requested_size = n_workers; + _requested_size = _n_workers; _term.set_task(this); assert(_cms_space->bottom() < _perm_space->bottom(), "Finger incorrectly initialized below"); @@ -3781,6 +3781,10 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { CMSConcMarkingTerminator* terminator() { return &_term; } + virtual void set_for_termination(int active_workers) { + terminator()->reset_for_reuse(active_workers); + } + void work(int i); virtual void coordinator_yield(); // stuff done by coordinator @@ -4220,9 +4224,12 @@ bool CMSCollector::do_marking_mt(bool asynch) { CompactibleFreeListSpace* cms_space = _cmsGen->cmsSpace(); CompactibleFreeListSpace* perm_space = _permGen->cmsSpace(); - CMSConcMarkingTask tsk(this, cms_space, perm_space, - asynch, num_workers /* number requested XXX */, - conc_workers(), task_queues()); + CMSConcMarkingTask tsk(this, + cms_space, + perm_space, + asynch, + conc_workers(), + task_queues()); // Since the actual number of workers we get may be different // from the number we requested above, do we need to do anything different @@ -4326,6 +4333,10 @@ void CMSCollector::preclean() { verify_overflow_empty(); _abort_preclean = false; if (CMSPrecleaningEnabled) { + // Precleaning is currently not MT but the reference processor + // may be set for MT. Disable it temporarily here. + ReferenceProcessor* rp = ref_processor(); + ReferenceProcessorMTProcMutator z(rp, false); _eden_chunk_index = 0; size_t used = get_eden_used(); size_t capacity = get_eden_capacity(); @@ -4918,7 +4929,7 @@ void CMSCollector::checkpointRootsFinalWork(bool asynch, // dirtied since the first checkpoint in this GC cycle and prior to // the most recent young generation GC, minus those cleaned up by the // concurrent precleaning. - if (CMSParallelRemarkEnabled && ParallelGCThreads > 0) { + if (CMSParallelRemarkEnabled && CollectedHeap::use_parallel_gc_threads()) { TraceTime t("Rescan (parallel) ", PrintGCDetails, false, gclog_or_tty); do_remark_parallel(); } else { @@ -5012,7 +5023,6 @@ void CMSCollector::checkpointRootsFinalWork(bool asynch, // Parallel remark task class CMSParRemarkTask: public AbstractGangTask { CMSCollector* _collector; - WorkGang* _workers; int _n_workers; CompactibleFreeListSpace* _cms_space; CompactibleFreeListSpace* _perm_space; @@ -5025,21 +5035,21 @@ class CMSParRemarkTask: public AbstractGangTask { CMSParRemarkTask(CMSCollector* collector, CompactibleFreeListSpace* cms_space, CompactibleFreeListSpace* perm_space, - int n_workers, WorkGang* workers, + int n_workers, FlexibleWorkGang* workers, OopTaskQueueSet* task_queues): AbstractGangTask("Rescan roots and grey objects in parallel"), _collector(collector), _cms_space(cms_space), _perm_space(perm_space), _n_workers(n_workers), - _workers(workers), _task_queues(task_queues), - _term(workers->total_workers(), task_queues) { } + _term(n_workers, task_queues) { } OopTaskQueueSet* task_queues() { return _task_queues; } OopTaskQueue* work_queue(int i) { return task_queues()->queue(i); } ParallelTaskTerminator* terminator() { return &_term; } + int n_workers() { return _n_workers; } void work(int i); @@ -5057,6 +5067,11 @@ class CMSParRemarkTask: public AbstractGangTask { void do_work_steal(int i, Par_MarkRefsIntoAndScanClosure* cl, int* seed); }; +// work_queue(i) is passed to the closure +// Par_MarkRefsIntoAndScanClosure. The "i" parameter +// also is passed to do_dirty_card_rescan_tasks() and to +// do_work_steal() to select the i-th task_queue. + void CMSParRemarkTask::work(int i) { elapsedTimer _timer; ResourceMark rm; @@ -5128,6 +5143,7 @@ void CMSParRemarkTask::work(int i) { // Do the rescan tasks for each of the two spaces // (cms_space and perm_space) in turn. + // "i" is passed to select the "i-th" task_queue do_dirty_card_rescan_tasks(_cms_space, i, &par_mrias_cl); do_dirty_card_rescan_tasks(_perm_space, i, &par_mrias_cl); _timer.stop(); @@ -5150,6 +5166,7 @@ void CMSParRemarkTask::work(int i) { } } +// Note that parameter "i" is not used. void CMSParRemarkTask::do_young_space_rescan(int i, Par_MarkRefsIntoAndScanClosure* cl, ContiguousSpace* space, @@ -5309,8 +5326,13 @@ CMSParRemarkTask::do_work_steal(int i, Par_MarkRefsIntoAndScanClosure* cl, size_t num_from_overflow_list = MIN2((size_t)(work_q->max_elems() - work_q->size())/4, (size_t)ParGCDesiredObjsFromOverflowList); // Now check if there's any work in the overflow list + // Passing ParallelGCThreads as the third parameter, no_of_gc_threads, + // only affects the number of attempts made to get work from the + // overflow list and does not affect the number of workers. Just + // pass ParallelGCThreads so this behavior is unchanged. if (_collector->par_take_from_overflow_list(num_from_overflow_list, - work_q)) { + work_q, + ParallelGCThreads)) { // found something in global overflow list; // not yet ready to go stealing work from others. // We'd like to assert(work_q->size() != 0, ...) @@ -5367,11 +5389,12 @@ void CMSCollector::reset_survivor_plab_arrays() { // Merge the per-thread plab arrays into the global survivor chunk // array which will provide the partitioning of the survivor space // for CMS rescan. -void CMSCollector::merge_survivor_plab_arrays(ContiguousSpace* surv) { +void CMSCollector::merge_survivor_plab_arrays(ContiguousSpace* surv, + int no_of_gc_threads) { assert(_survivor_plab_array != NULL, "Error"); assert(_survivor_chunk_array != NULL, "Error"); assert(_collectorState == FinalMarking, "Error"); - for (uint j = 0; j < ParallelGCThreads; j++) { + for (int j = 0; j < no_of_gc_threads; j++) { _cursor[j] = 0; } HeapWord* top = surv->top(); @@ -5379,7 +5402,7 @@ void CMSCollector::merge_survivor_plab_arrays(ContiguousSpace* surv) { for (i = 0; i < _survivor_chunk_capacity; i++) { // all sca entries HeapWord* min_val = top; // Higher than any PLAB address uint min_tid = 0; // position of min_val this round - for (uint j = 0; j < ParallelGCThreads; j++) { + for (int j = 0; j < no_of_gc_threads; j++) { ChunkArray* cur_sca = &_survivor_plab_array[j]; if (_cursor[j] == cur_sca->end()) { continue; @@ -5413,7 +5436,7 @@ void CMSCollector::merge_survivor_plab_arrays(ContiguousSpace* surv) { // Verify that we used up all the recorded entries #ifdef ASSERT size_t total = 0; - for (uint j = 0; j < ParallelGCThreads; j++) { + for (int j = 0; j < no_of_gc_threads; j++) { assert(_cursor[j] == _survivor_plab_array[j].end(), "Ctl pt invariant"); total += _cursor[j]; } @@ -5448,13 +5471,15 @@ initialize_sequential_subtasks_for_young_gen_rescan(int n_threads) { // Each valid entry in [0, _eden_chunk_index) represents a task. size_t n_tasks = _eden_chunk_index + 1; assert(n_tasks == 1 || _eden_chunk_array != NULL, "Error"); - pst->set_par_threads(n_threads); + // Sets the condition for completion of the subtask (how many threads + // need to finish in order to be done). + pst->set_n_threads(n_threads); pst->set_n_tasks((int)n_tasks); } // Merge the survivor plab arrays into _survivor_chunk_array if (_survivor_plab_array != NULL) { - merge_survivor_plab_arrays(dng->from()); + merge_survivor_plab_arrays(dng->from(), n_threads); } else { assert(_survivor_chunk_index == 0, "Error"); } @@ -5463,7 +5488,9 @@ initialize_sequential_subtasks_for_young_gen_rescan(int n_threads) { { SequentialSubTasksDone* pst = dng->to()->par_seq_tasks(); assert(!pst->valid(), "Clobbering existing data?"); - pst->set_par_threads(n_threads); + // Sets the condition for completion of the subtask (how many threads + // need to finish in order to be done). + pst->set_n_threads(n_threads); pst->set_n_tasks(1); assert(pst->valid(), "Error"); } @@ -5474,7 +5501,9 @@ initialize_sequential_subtasks_for_young_gen_rescan(int n_threads) { assert(!pst->valid(), "Clobbering existing data?"); size_t n_tasks = _survivor_chunk_index + 1; assert(n_tasks == 1 || _survivor_chunk_array != NULL, "Error"); - pst->set_par_threads(n_threads); + // Sets the condition for completion of the subtask (how many threads + // need to finish in order to be done). + pst->set_n_threads(n_threads); pst->set_n_tasks((int)n_tasks); assert(pst->valid(), "Error"); } @@ -5483,7 +5512,7 @@ initialize_sequential_subtasks_for_young_gen_rescan(int n_threads) { // Parallel version of remark void CMSCollector::do_remark_parallel() { GenCollectedHeap* gch = GenCollectedHeap::heap(); - WorkGang* workers = gch->workers(); + FlexibleWorkGang* workers = gch->workers(); assert(workers != NULL, "Need parallel worker threads."); int n_workers = workers->total_workers(); CompactibleFreeListSpace* cms_space = _cmsGen->cmsSpace(); @@ -5636,13 +5665,11 @@ void CMSCollector::do_remark_non_parallel() { //////////////////////////////////////////////////////// // Parallel Reference Processing Task Proxy Class //////////////////////////////////////////////////////// -class CMSRefProcTaskProxy: public AbstractGangTask { +class CMSRefProcTaskProxy: public AbstractGangTaskWOopQueues { typedef AbstractRefProcTaskExecutor::ProcessTask ProcessTask; CMSCollector* _collector; CMSBitMap* _mark_bit_map; const MemRegion _span; - OopTaskQueueSet* _task_queues; - ParallelTaskTerminator _term; ProcessTask& _task; public: @@ -5650,24 +5677,21 @@ public: CMSCollector* collector, const MemRegion& span, CMSBitMap* mark_bit_map, - int total_workers, + AbstractWorkGang* workers, OopTaskQueueSet* task_queues): - AbstractGangTask("Process referents by policy in parallel"), + AbstractGangTaskWOopQueues("Process referents by policy in parallel", + task_queues), _task(task), - _collector(collector), _span(span), _mark_bit_map(mark_bit_map), - _task_queues(task_queues), - _term(total_workers, task_queues) + _collector(collector), _span(span), _mark_bit_map(mark_bit_map) { assert(_collector->_span.equals(_span) && !_span.is_empty(), "Inconsistency in _span"); } - OopTaskQueueSet* task_queues() { return _task_queues; } + OopTaskQueueSet* task_queues() { return queues(); } OopTaskQueue* work_queue(int i) { return task_queues()->queue(i); } - ParallelTaskTerminator* terminator() { return &_term; } - void do_work_steal(int i, CMSParDrainMarkingStackClosure* drain, CMSParKeepAliveClosure* keep_alive, @@ -5739,8 +5763,13 @@ void CMSRefProcTaskProxy::do_work_steal(int i, size_t num_from_overflow_list = MIN2((size_t)(work_q->max_elems() - work_q->size())/4, (size_t)ParGCDesiredObjsFromOverflowList); // Now check if there's any work in the overflow list + // Passing ParallelGCThreads as the third parameter, no_of_gc_threads, + // only affects the number of attempts made to get work from the + // overflow list and does not affect the number of workers. Just + // pass ParallelGCThreads so this behavior is unchanged. if (_collector->par_take_from_overflow_list(num_from_overflow_list, - work_q)) { + work_q, + ParallelGCThreads)) { // Found something in global overflow list; // not yet ready to go stealing work from others. // We'd like to assert(work_q->size() != 0, ...) @@ -5773,13 +5802,12 @@ void CMSRefProcTaskProxy::do_work_steal(int i, void CMSRefProcTaskExecutor::execute(ProcessTask& task) { GenCollectedHeap* gch = GenCollectedHeap::heap(); - WorkGang* workers = gch->workers(); + FlexibleWorkGang* workers = gch->workers(); assert(workers != NULL, "Need parallel worker threads."); - int n_workers = workers->total_workers(); CMSRefProcTaskProxy rp_task(task, &_collector, _collector.ref_processor()->span(), _collector.markBitMap(), - n_workers, _collector.task_queues()); + workers, _collector.task_queues()); workers->run_task(&rp_task); } @@ -5787,7 +5815,7 @@ void CMSRefProcTaskExecutor::execute(EnqueueTask& task) { GenCollectedHeap* gch = GenCollectedHeap::heap(); - WorkGang* workers = gch->workers(); + FlexibleWorkGang* workers = gch->workers(); assert(workers != NULL, "Need parallel worker threads."); CMSRefEnqueueTaskProxy enq_task(task); workers->run_task(&enq_task); @@ -5814,6 +5842,14 @@ void CMSCollector::refProcessingWork(bool asynch, bool clear_all_soft_refs) { { TraceTime t("weak refs processing", PrintGCDetails, false, gclog_or_tty); if (rp->processing_is_mt()) { + // Set the degree of MT here. If the discovery is done MT, there + // may have been a different number of threads doing the discovery + // and a different number of discovered lists may have Ref objects. + // That is OK as long as the Reference lists are balanced (see + // balance_all_queues() and balance_queues()). + + + rp->set_mt_degree(ParallelGCThreads); CMSRefProcTaskExecutor task_executor(*this); rp->process_discovered_references(&_is_alive_closure, &cmsKeepAliveClosure, @@ -5874,6 +5910,7 @@ void CMSCollector::refProcessingWork(bool asynch, bool clear_all_soft_refs) { rp->set_enqueuing_is_done(true); if (rp->processing_is_mt()) { + rp->balance_all_queues(); CMSRefProcTaskExecutor task_executor(*this); rp->enqueue_discovered_references(&task_executor); } else { @@ -8708,7 +8745,8 @@ bool CMSCollector::take_from_overflow_list(size_t num, CMSMarkStack* stack) { // similar changes might be needed. // CR 6797058 has been filed to consolidate the common code. bool CMSCollector::par_take_from_overflow_list(size_t num, - OopTaskQueue* work_q) { + OopTaskQueue* work_q, + int no_of_gc_threads) { assert(work_q->size() == 0, "First empty local work queue"); assert(num < work_q->max_elems(), "Can't bite more than we can chew"); if (_overflow_list == NULL) { @@ -8717,7 +8755,9 @@ bool CMSCollector::par_take_from_overflow_list(size_t num, // Grab the entire list; we'll put back a suffix oop prefix = (oop)Atomic::xchg_ptr(BUSY, &_overflow_list); Thread* tid = Thread::current(); - size_t CMSOverflowSpinCount = (size_t)ParallelGCThreads; + // Before "no_of_gc_threads" was introduced CMSOverflowSpinCount was + // set to ParallelGCThreads. + size_t CMSOverflowSpinCount = (size_t) no_of_gc_threads; // was ParallelGCThreads; size_t sleep_time_millis = MAX2((size_t)1, num/100); // If the list is busy, we spin for a short while, // sleeping between attempts to get the list. @@ -9256,4 +9296,3 @@ TraceCMSMemoryManagerStats::TraceCMSMemoryManagerStats(): TraceMemoryManagerStat true /* recordGCEndTime */, true /* countCollection */ ); } - diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp index 3302d78a906..222faab301c 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp @@ -729,7 +729,9 @@ class CMSCollector: public CHeapObj { // Support for marking stack overflow handling bool take_from_overflow_list(size_t num, CMSMarkStack* to_stack); - bool par_take_from_overflow_list(size_t num, OopTaskQueue* to_work_q); + bool par_take_from_overflow_list(size_t num, + OopTaskQueue* to_work_q, + int no_of_gc_threads); void push_on_overflow_list(oop p); void par_push_on_overflow_list(oop p); // the following is, obviously, not, in general, "MT-stable" @@ -768,7 +770,7 @@ class CMSCollector: public CHeapObj { void abortable_preclean(); // Preclean while looking for possible abort void initialize_sequential_subtasks_for_young_gen_rescan(int i); // Helper function for above; merge-sorts the per-thread plab samples - void merge_survivor_plab_arrays(ContiguousSpace* surv); + void merge_survivor_plab_arrays(ContiguousSpace* surv, int no_of_gc_threads); // Resets (i.e. clears) the per-thread plab sample vectors void reset_survivor_plab_arrays(); diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp index 4dd197ebd27..a1f79d50b79 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -583,10 +583,13 @@ ConcurrentMark::ConcurrentMark(ReservedSpace rs, #endif guarantee(parallel_marking_threads() > 0, "peace of mind"); - _parallel_workers = new WorkGang("G1 Parallel Marking Threads", - (int) parallel_marking_threads(), false, true); - if (_parallel_workers == NULL) + _parallel_workers = new FlexibleWorkGang("G1 Parallel Marking Threads", + (int) _parallel_marking_threads, false, true); + if (_parallel_workers == NULL) { vm_exit_during_initialization("Failed necessary allocation."); + } else { + _parallel_workers->initialize_workers(); + } } // so that the call below can read a sensible value @@ -1451,7 +1454,7 @@ public: _bm, _g1h->concurrent_mark(), _region_bm, _card_bm); calccl.no_yield(); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { _g1h->heap_region_par_iterate_chunked(&calccl, i, HeapRegion::FinalCountClaimValue); } else { @@ -1531,7 +1534,7 @@ public: G1NoteEndOfConcMarkClosure g1_note_end(_g1h, &_par_cleanup_thread_state[i]->list, i); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { _g1h->heap_region_par_iterate_chunked(&g1_note_end, i, HeapRegion::NoteEndClaimValue); } else { @@ -1575,7 +1578,7 @@ public: {} void work(int i) { - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { _g1rs->scrub_par(_region_bm, _card_bm, i, HeapRegion::ScrubRemSetClaimValue); } else { @@ -1647,7 +1650,7 @@ void ConcurrentMark::cleanup() { // Do counting once more with the world stopped for good measure. G1ParFinalCountTask g1_par_count_task(g1h, nextMarkBitMap(), &_region_bm, &_card_bm); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { assert(g1h->check_heap_region_claim_values( HeapRegion::InitialClaimValue), "sanity check"); @@ -1695,7 +1698,7 @@ void ConcurrentMark::cleanup() { // Note end of marking in all heap regions. double note_end_start = os::elapsedTime(); G1ParNoteEndTask g1_par_note_end_task(g1h, _par_cleanup_thread_state); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { int n_workers = g1h->workers()->total_workers(); g1h->set_par_threads(n_workers); g1h->workers()->run_task(&g1_par_note_end_task); @@ -1720,7 +1723,7 @@ void ConcurrentMark::cleanup() { if (G1ScrubRemSets) { double rs_scrub_start = os::elapsedTime(); G1ParScrubRemSetTask g1_par_scrub_rs_task(g1h, &_region_bm, &_card_bm); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { int n_workers = g1h->workers()->total_workers(); g1h->set_par_threads(n_workers); g1h->workers()->run_task(&g1_par_scrub_rs_task); @@ -1934,7 +1937,7 @@ void ConcurrentMark::checkpointRootsFinalWork() { g1h->ensure_parsability(false); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { G1CollectedHeap::StrongRootsScope srs(g1h); // this is remark, so we'll use up all available threads int active_workers = ParallelGCThreads; @@ -3369,14 +3372,14 @@ void CMTask::drain_satb_buffers() { CMObjectClosure oc(this); SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set(); - if (ParallelGCThreads > 0) + if (G1CollectedHeap::use_parallel_gc_threads()) satb_mq_set.set_par_closure(_task_id, &oc); else satb_mq_set.set_closure(&oc); // This keeps claiming and applying the closure to completed buffers // until we run out of buffers or we need to abort. - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { while (!has_aborted() && satb_mq_set.par_apply_closure_to_completed_buffer(_task_id)) { if (_cm->verbose_medium()) @@ -3396,7 +3399,7 @@ void CMTask::drain_satb_buffers() { if (!concurrent() && !has_aborted()) { // We should only do this during remark. - if (ParallelGCThreads > 0) + if (G1CollectedHeap::use_parallel_gc_threads()) satb_mq_set.par_iterate_closure_all_threads(_task_id); else satb_mq_set.iterate_closure_all_threads(); @@ -3408,7 +3411,7 @@ void CMTask::drain_satb_buffers() { concurrent() || satb_mq_set.completed_buffers_num() == 0, "invariant"); - if (ParallelGCThreads > 0) + if (G1CollectedHeap::use_parallel_gc_threads()) satb_mq_set.set_par_closure(_task_id, NULL); else satb_mq_set.set_closure(NULL); diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index 07425538987..d4d58c3f13d 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -961,7 +961,8 @@ void G1CollectedHeap::do_collection(bool explicit_gc, } // Rebuild remembered sets of all regions. - if (ParallelGCThreads > 0) { + + if (G1CollectedHeap::use_parallel_gc_threads()) { ParRebuildRSTask rebuild_rs_task(this); assert(check_heap_region_claim_values( HeapRegion::InitialClaimValue), "sanity check"); @@ -1960,7 +1961,7 @@ G1CollectedHeap::heap_region_par_iterate_chunked(HeapRegionClosure* cl, int worker, jint claim_value) { const size_t regions = n_regions(); - const size_t worker_num = (ParallelGCThreads > 0 ? ParallelGCThreads : 1); + const size_t worker_num = (G1CollectedHeap::use_parallel_gc_threads() ? ParallelGCThreads : 1); // try to spread out the starting points of the workers const size_t start_index = regions / worker_num * (size_t) worker; @@ -2527,7 +2528,7 @@ void G1CollectedHeap::print_on_extended(outputStream* st) const { } void G1CollectedHeap::print_gc_threads_on(outputStream* st) const { - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { workers()->print_worker_threads_on(st); } @@ -2543,7 +2544,7 @@ void G1CollectedHeap::print_gc_threads_on(outputStream* st) const { } void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const { - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { workers()->threads_do(tc); } tc->do_thread(_cmThread); @@ -3083,7 +3084,7 @@ void G1CollectedHeap::set_gc_alloc_region(int purpose, HeapRegion* r) { if (r != NULL) { r_used = r->used(); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { // need to take the lock to guard against two threads calling // get_gc_alloc_region concurrently (very unlikely but...) MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag); @@ -4182,6 +4183,8 @@ public: // *** Common G1 Evacuation Stuff +// This method is run in a GC worker. + void G1CollectedHeap:: g1_process_strong_roots(bool collecting_perm_gen, @@ -4259,7 +4262,7 @@ public: }; void G1CollectedHeap::save_marks() { - if (ParallelGCThreads == 0) { + if (!CollectedHeap::use_parallel_gc_threads()) { SaveMarksClosure sm; heap_region_iterate(&sm); } @@ -4284,7 +4287,7 @@ void G1CollectedHeap::evacuate_collection_set() { assert(dirty_card_queue_set().completed_buffers_num() == 0, "Should be empty"); double start_par = os::elapsedTime(); - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { // The individual threads will set their evac-failure closures. StrongRootsScope srs(this); if (ParallelGCVerbose) G1ParScanThreadState::print_termination_stats_hdr(); diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index a342d698d3b..f6f07660de8 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -656,6 +656,9 @@ protected: bool _unclean_regions_coming; public: + + SubTasksDone* process_strong_tasks() { return _process_strong_tasks; } + void set_refine_cte_cl_concurrency(bool concurrent); RefToScanQueue *task_queue(int i) const; @@ -684,7 +687,7 @@ public: void set_par_threads(int t) { SharedHeap::set_par_threads(t); - _process_strong_tasks->set_par_threads(t); + _process_strong_tasks->set_n_threads(t); } virtual CollectedHeap::Name kind() const { diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp index 4f8e5d1520a..896dba17e03 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @@ -72,7 +72,10 @@ static double non_young_other_cost_per_region_ms_defaults[] = { // G1CollectorPolicy::G1CollectorPolicy() : - _parallel_gc_threads((ParallelGCThreads > 0) ? ParallelGCThreads : 1), + _parallel_gc_threads(G1CollectedHeap::use_parallel_gc_threads() + ? ParallelGCThreads : 1), + + _n_pauses(0), _recent_CH_strong_roots_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), _recent_G1_strong_roots_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), @@ -1073,7 +1076,7 @@ void G1CollectorPolicy::print_stats (int level, } double G1CollectorPolicy::avg_value (double* data) { - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { double ret = 0.0; for (uint i = 0; i < ParallelGCThreads; ++i) ret += data[i]; @@ -1084,7 +1087,7 @@ double G1CollectorPolicy::avg_value (double* data) { } double G1CollectorPolicy::max_value (double* data) { - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { double ret = data[0]; for (uint i = 1; i < ParallelGCThreads; ++i) if (data[i] > ret) @@ -1096,7 +1099,7 @@ double G1CollectorPolicy::max_value (double* data) { } double G1CollectorPolicy::sum_of_values (double* data) { - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { double sum = 0.0; for (uint i = 0; i < ParallelGCThreads; i++) sum += data[i]; @@ -1110,7 +1113,7 @@ double G1CollectorPolicy::max_sum (double* data1, double* data2) { double ret = data1[0] + data2[0]; - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { for (uint i = 1; i < ParallelGCThreads; ++i) { double data = data1[i] + data2[i]; if (data > ret) @@ -1126,7 +1129,7 @@ double G1CollectorPolicy::max_sum (double* data1, void G1CollectorPolicy::record_collection_pause_end() { double end_time_sec = os::elapsedTime(); double elapsed_ms = _last_pause_time_ms; - bool parallel = ParallelGCThreads > 0; + bool parallel = G1CollectedHeap::use_parallel_gc_threads(); double evac_ms = (end_time_sec - _cur_G1_strong_roots_end_sec) * 1000.0; size_t rs_size = _cur_collection_pause_used_regions_at_start - collection_set_size(); @@ -1941,7 +1944,7 @@ G1CollectorPolicy::recent_avg_survival_fraction_work(TruncatedSeq* surviving, // Further, we're now always doing parallel collection. But I'm still // leaving this here as a placeholder for a more precise assertion later. // (DLD, 10/05.) - assert((true || ParallelGCThreads > 0) || + assert((true || G1CollectedHeap::use_parallel_gc_threads()) || _g1->evacuation_failed() || recent_survival_rate <= 1.0, "Or bad frac"); return recent_survival_rate; @@ -1961,7 +1964,7 @@ G1CollectorPolicy::last_survival_fraction_work(TruncatedSeq* surviving, // Further, we're now always doing parallel collection. But I'm still // leaving this here as a placeholder for a more precise assertion later. // (DLD, 10/05.) - assert((true || ParallelGCThreads > 0) || + assert((true || G1CollectedHeap::use_parallel_gc_threads()) || last_survival_rate <= 1.0, "Or bad frac"); return last_survival_rate; } else { @@ -2121,7 +2124,7 @@ void G1CollectorPolicy::check_other_times(int level, } void G1CollectorPolicy::print_summary(PauseSummary* summary) const { - bool parallel = ParallelGCThreads > 0; + bool parallel = G1CollectedHeap::use_parallel_gc_threads(); MainBodySummary* body_summary = summary->main_body_summary(); if (summary->get_total_seq()->num() > 0) { print_summary_sd(0, "Evacuation Pauses", summary->get_total_seq()); @@ -2559,7 +2562,7 @@ record_concurrent_mark_cleanup_end(size_t freed_bytes, gclog_or_tty->print_cr(" clear marked regions + work1: %8.3f ms.", (clear_marked_end - start)*1000.0); } - if (ParallelGCThreads > 0) { + if (G1CollectedHeap::use_parallel_gc_threads()) { const size_t OverpartitionFactor = 4; const size_t MinWorkUnit = 8; const size_t WorkUnit = diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp index 19ec341f980..6c79abcf8ba 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp @@ -523,7 +523,7 @@ prepare_for_oops_into_collection_set_do() { assert(!_traversal_in_progress, "Invariant between iterations."); set_traversal(true); if (ParallelGCThreads > 0) { - _seq_task->set_par_threads((int)n_workers()); + _seq_task->set_n_threads((int)n_workers()); } guarantee( _cards_scanned == NULL, "invariant" ); _cards_scanned = NEW_C_HEAP_ARRAY(size_t, n_workers()); diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp index 740bef3a801..77e6a757d46 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2010 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,7 @@ void CardTableModRefBS::par_non_clean_card_iterate_work(Space* sp, MemRegion mr, int n_strides = n_threads * StridesPerThread; SequentialSubTasksDone* pst = sp->par_seq_tasks(); - pst->set_par_threads(n_threads); + pst->set_n_threads(n_threads); pst->set_n_tasks(n_strides); int stride = 0; diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp index e31e2854664..f24236ae603 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @@ -1533,3 +1533,7 @@ void ParNewGeneration::ref_processor_init() const char* ParNewGeneration::name() const { return "par new generation"; } + +bool ParNewGeneration::in_use() { + return UseParNewGC && ParallelGCThreads > 0; +} diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp index a3090ebf452..338042c32b4 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp @@ -350,6 +350,8 @@ class ParNewGeneration: public DefNewGeneration { delete _task_queues; } + static bool in_use(); + virtual void ref_processor_init(); virtual Generation::Name kind() { return Generation::ParNew; } virtual const char* name() const; diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp index 1d67062f8c4..3bc4f1b6f94 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -242,7 +242,11 @@ class UpdateDensePrefixTask : public GCTask { // class DrainStacksCompactionTask : public GCTask { + uint _stack_index; + uint stack_index() { return _stack_index; } public: + DrainStacksCompactionTask(uint stack_index) : GCTask(), + _stack_index(stack_index) {}; char* name() { return (char *)"drain-region-task"; } virtual void do_it(GCTaskManager* manager, uint which); }; diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp index ac7b23575bb..77a5c76b057 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @@ -2449,7 +2449,7 @@ void PSParallelCompact::enqueue_region_draining_tasks(GCTaskQueue* q, const unsigned int task_count = MAX2(parallel_gc_threads, 1U); for (unsigned int j = 0; j < task_count; j++) { - q->enqueue(new DrainStacksCompactionTask()); + q->enqueue(new DrainStacksCompactionTask(j)); } // Find all regions that are available (can be filled immediately) and diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.cpp b/hotspot/src/share/vm/gc_interface/collectedHeap.cpp index 6fd9f0228c8..ad13d8bb4d5 100644 --- a/hotspot/src/share/vm/gc_interface/collectedHeap.cpp +++ b/hotspot/src/share/vm/gc_interface/collectedHeap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,9 @@ size_t CollectedHeap::_filler_array_max_size = 0; // Memory state functions. -CollectedHeap::CollectedHeap() + +CollectedHeap::CollectedHeap() : _n_par_threads(0) + { const size_t max_len = size_t(arrayOopDesc::max_array_length(T_INT)); const size_t elements_per_word = HeapWordSize / sizeof(jint); diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp index c30989af6ce..c737eb1da66 100644 --- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp +++ b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp @@ -59,6 +59,8 @@ class CollectedHeap : public CHeapObj { MemRegion _reserved; BarrierSet* _barrier_set; bool _is_gc_active; + int _n_par_threads; + unsigned int _total_collections; // ... started unsigned int _total_full_collections; // ... started NOT_PRODUCT(volatile size_t _promotion_failure_alot_count;) @@ -293,6 +295,12 @@ class CollectedHeap : public CHeapObj { } GCCause::Cause gc_cause() { return _gc_cause; } + // Number of threads currently working on GC tasks. + int n_par_threads() { return _n_par_threads; } + + // May be overridden to set additional parallelism. + virtual void set_par_threads(int t) { _n_par_threads = t; }; + // Preload classes into the shared portion of the heap, and then dump // that data to a file so that it can be loaded directly by another // VM (then terminate). @@ -606,6 +614,14 @@ class CollectedHeap : public CHeapObj { return (CIFireOOMAt > 1 && _fire_out_of_memory_count >= CIFireOOMAt); } #endif + + public: + // This is a convenience method that is used in cases where + // the actual number of GC worker threads is not pertinent but + // only whether there more than 0. Use of this method helps + // reduce the occurrence of ParallelGCThreads to uses where the + // actual number may be germane. + static bool use_parallel_gc_threads() { return ParallelGCThreads > 0; } }; // Class to set and reset the GC cause for a CollectedHeap. diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index 07c40dc394d..479b819d967 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -4721,6 +4721,7 @@ workgroup.cpp allocation.inline.hpp workgroup.cpp os.hpp workgroup.cpp workgroup.hpp +workgroup.hpp taskqueue.hpp workgroup.hpp thread_.inline.hpp xmlstream.cpp allocation.hpp diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.cpp b/hotspot/src/share/vm/memory/genCollectedHeap.cpp index 0f7d2dc738d..c2b8dcb3fab 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp @@ -676,7 +676,7 @@ HeapWord* GenCollectedHeap::satisfy_failed_allocation(size_t size, bool is_tlab) void GenCollectedHeap::set_par_threads(int t) { SharedHeap::set_par_threads(t); - _gen_process_strong_tasks->set_par_threads(t); + _gen_process_strong_tasks->set_n_threads(t); } class AssertIsPermClosure: public OopClosure { diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.hpp b/hotspot/src/share/vm/memory/genCollectedHeap.hpp index 13d68c98ea3..75266a2d9a9 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.hpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,6 +74,7 @@ public: // Data structure for claiming the (potentially) parallel tasks in // (gen-specific) strong roots processing. SubTasksDone* _gen_process_strong_tasks; + SubTasksDone* gen_process_strong_tasks() { return _gen_process_strong_tasks; } // In block contents verification, the number of header words to skip NOT_PRODUCT(static size_t _skip_header_HeapWords;) diff --git a/hotspot/src/share/vm/memory/referenceProcessor.cpp b/hotspot/src/share/vm/memory/referenceProcessor.cpp index dc451161d22..6e58f6af3f9 100644 --- a/hotspot/src/share/vm/memory/referenceProcessor.cpp +++ b/hotspot/src/share/vm/memory/referenceProcessor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,16 +137,17 @@ ReferenceProcessor::ReferenceProcessor(MemRegion span, _discovery_is_atomic = atomic_discovery; _discovery_is_mt = mt_discovery; _num_q = mt_degree; - _discoveredSoftRefs = NEW_C_HEAP_ARRAY(DiscoveredList, _num_q * subclasses_of_ref); + _max_num_q = mt_degree; + _discoveredSoftRefs = NEW_C_HEAP_ARRAY(DiscoveredList, _max_num_q * subclasses_of_ref); if (_discoveredSoftRefs == NULL) { vm_exit_during_initialization("Could not allocated RefProc Array"); } - _discoveredWeakRefs = &_discoveredSoftRefs[_num_q]; - _discoveredFinalRefs = &_discoveredWeakRefs[_num_q]; - _discoveredPhantomRefs = &_discoveredFinalRefs[_num_q]; + _discoveredWeakRefs = &_discoveredSoftRefs[_max_num_q]; + _discoveredFinalRefs = &_discoveredWeakRefs[_max_num_q]; + _discoveredPhantomRefs = &_discoveredFinalRefs[_max_num_q]; assert(sentinel_ref() != NULL, "_sentinelRef is NULL"); // Initialized all entries to _sentinelRef - for (int i = 0; i < _num_q * subclasses_of_ref; i++) { + for (int i = 0; i < _max_num_q * subclasses_of_ref; i++) { _discoveredSoftRefs[i].set_head(sentinel_ref()); _discoveredSoftRefs[i].set_length(0); } @@ -159,7 +160,7 @@ ReferenceProcessor::ReferenceProcessor(MemRegion span, #ifndef PRODUCT void ReferenceProcessor::verify_no_references_recorded() { guarantee(!_discovering_refs, "Discovering refs?"); - for (int i = 0; i < _num_q * subclasses_of_ref; i++) { + for (int i = 0; i < _max_num_q * subclasses_of_ref; i++) { guarantee(_discoveredSoftRefs[i].empty(), "Found non-empty discovered list"); } @@ -167,7 +168,11 @@ void ReferenceProcessor::verify_no_references_recorded() { #endif void ReferenceProcessor::weak_oops_do(OopClosure* f) { - for (int i = 0; i < _num_q * subclasses_of_ref; i++) { + // Should this instead be + // for (int i = 0; i < subclasses_of_ref; i++_ { + // for (int j = 0; j < _num_q; j++) { + // int index = i * _max_num_q + j; + for (int i = 0; i < _max_num_q * subclasses_of_ref; i++) { if (UseCompressedOops) { f->do_oop((narrowOop*)_discoveredSoftRefs[i].adr_head()); } else { @@ -395,7 +400,15 @@ public: assert(work_id < (unsigned int)_ref_processor.num_q(), "Index out-of-bounds"); // Simplest first cut: static partitioning. int index = work_id; - for (int j = 0; j < subclasses_of_ref; j++, index += _n_queues) { + // The increment on "index" must correspond to the maximum number of queues + // (n_queues) with which that ReferenceProcessor was created. That + // is because of the "clever" way the discovered references lists were + // allocated and are indexed into. That number is ParallelGCThreads + // currently. Assert that. + assert(_n_queues == (int) ParallelGCThreads, "Different number not expected"); + for (int j = 0; + j < subclasses_of_ref; + j++, index += _n_queues) { _ref_processor.enqueue_discovered_reflist( _refs_lists[index], _pending_list_addr); _refs_lists[index].set_head(_sentinel_ref); @@ -410,11 +423,11 @@ void ReferenceProcessor::enqueue_discovered_reflists(HeapWord* pending_list_addr if (_processing_is_mt && task_executor != NULL) { // Parallel code RefProcEnqueueTask tsk(*this, _discoveredSoftRefs, - pending_list_addr, sentinel_ref(), _num_q); + pending_list_addr, sentinel_ref(), _max_num_q); task_executor->execute(tsk); } else { // Serial code: call the parent class's implementation - for (int i = 0; i < _num_q * subclasses_of_ref; i++) { + for (int i = 0; i < _max_num_q * subclasses_of_ref; i++) { enqueue_discovered_reflist(_discoveredSoftRefs[i], pending_list_addr); _discoveredSoftRefs[i].set_head(sentinel_ref()); _discoveredSoftRefs[i].set_length(0); @@ -614,8 +627,9 @@ ReferenceProcessor::process_phase1(DiscoveredList& refs_list, complete_gc->do_void(); NOT_PRODUCT( if (PrintGCDetails && TraceReferenceGC) { - gclog_or_tty->print(" Dropped %d dead Refs out of %d " - "discovered Refs by policy ", iter.removed(), iter.processed()); + gclog_or_tty->print_cr(" Dropped %d dead Refs out of %d " + "discovered Refs by policy list " INTPTR_FORMAT, + iter.removed(), iter.processed(), (address)refs_list.head()); } ) } @@ -651,8 +665,9 @@ ReferenceProcessor::pp2_work(DiscoveredList& refs_list, } NOT_PRODUCT( if (PrintGCDetails && TraceReferenceGC) { - gclog_or_tty->print(" Dropped %d active Refs out of %d " - "Refs in discovered list ", iter.removed(), iter.processed()); + gclog_or_tty->print_cr(" Dropped %d active Refs out of %d " + "Refs in discovered list " INTPTR_FORMAT, + iter.removed(), iter.processed(), (address)refs_list.head()); } ) } @@ -689,8 +704,9 @@ ReferenceProcessor::pp2_work_concurrent_discovery(DiscoveredList& refs_list, complete_gc->do_void(); NOT_PRODUCT( if (PrintGCDetails && TraceReferenceGC) { - gclog_or_tty->print(" Dropped %d active Refs out of %d " - "Refs in discovered list ", iter.removed(), iter.processed()); + gclog_or_tty->print_cr(" Dropped %d active Refs out of %d " + "Refs in discovered list " INTPTR_FORMAT, + iter.removed(), iter.processed(), (address)refs_list.head()); } ) } @@ -704,6 +720,7 @@ ReferenceProcessor::process_phase3(DiscoveredList& refs_list, BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete_gc) { + ResourceMark rm; DiscoveredListIterator iter(refs_list, keep_alive, is_alive); while (iter.has_next()) { iter.update_discovered(); @@ -743,8 +760,8 @@ ReferenceProcessor::abandon_partial_discovered_list(DiscoveredList& refs_list) { void ReferenceProcessor::abandon_partial_discovery() { // loop over the lists - for (int i = 0; i < _num_q * subclasses_of_ref; i++) { - if (TraceReferenceGC && PrintGCDetails && ((i % _num_q) == 0)) { + for (int i = 0; i < _max_num_q * subclasses_of_ref; i++) { + if (TraceReferenceGC && PrintGCDetails && ((i % _max_num_q) == 0)) { gclog_or_tty->print_cr( "\nAbandoning %s discovered list", list_name(i)); @@ -766,7 +783,9 @@ public: OopClosure& keep_alive, VoidClosure& complete_gc) { - _ref_processor.process_phase1(_refs_lists[i], _policy, + Thread* thr = Thread::current(); + int refs_list_index = ((WorkerThread*)thr)->id(); + _ref_processor.process_phase1(_refs_lists[refs_list_index], _policy, &is_alive, &keep_alive, &complete_gc); } private: @@ -802,6 +821,11 @@ public: OopClosure& keep_alive, VoidClosure& complete_gc) { + // Don't use "refs_list_index" calculated in this way because + // balance_queues() has moved the Ref's into the first n queues. + // Thread* thr = Thread::current(); + // int refs_list_index = ((WorkerThread*)thr)->id(); + // _ref_processor.process_phase3(_refs_lists[refs_list_index], _clear_referent, _ref_processor.process_phase3(_refs_lists[i], _clear_referent, &is_alive, &keep_alive, &complete_gc); } @@ -810,23 +834,47 @@ private: }; // Balances reference queues. +// Move entries from all queues[0, 1, ..., _max_num_q-1] to +// queues[0, 1, ..., _num_q-1] because only the first _num_q +// corresponding to the active workers will be processed. void ReferenceProcessor::balance_queues(DiscoveredList ref_lists[]) { // calculate total length size_t total_refs = 0; - for (int i = 0; i < _num_q; ++i) { + if (TraceReferenceGC && PrintGCDetails) { + gclog_or_tty->print_cr("\nBalance ref_lists "); + } + + for (int i = 0; i < _max_num_q; ++i) { total_refs += ref_lists[i].length(); + if (TraceReferenceGC && PrintGCDetails) { + gclog_or_tty->print("%d ", ref_lists[i].length()); + } + } + if (TraceReferenceGC && PrintGCDetails) { + gclog_or_tty->print_cr(" = %d", total_refs); } size_t avg_refs = total_refs / _num_q + 1; int to_idx = 0; - for (int from_idx = 0; from_idx < _num_q; from_idx++) { - while (ref_lists[from_idx].length() > avg_refs) { + for (int from_idx = 0; from_idx < _max_num_q; from_idx++) { + bool move_all = false; + if (from_idx >= _num_q) { + move_all = ref_lists[from_idx].length() > 0; + } + while ((ref_lists[from_idx].length() > avg_refs) || + move_all) { assert(to_idx < _num_q, "Sanity Check!"); if (ref_lists[to_idx].length() < avg_refs) { // move superfluous refs - size_t refs_to_move = - MIN2(ref_lists[from_idx].length() - avg_refs, - avg_refs - ref_lists[to_idx].length()); + size_t refs_to_move; + // Move all the Ref's if the from queue will not be processed. + if (move_all) { + refs_to_move = MIN2(ref_lists[from_idx].length(), + avg_refs - ref_lists[to_idx].length()); + } else { + refs_to_move = MIN2(ref_lists[from_idx].length() - avg_refs, + avg_refs - ref_lists[to_idx].length()); + } oop move_head = ref_lists[from_idx].head(); oop move_tail = move_head; oop new_head = move_head; @@ -840,11 +888,35 @@ void ReferenceProcessor::balance_queues(DiscoveredList ref_lists[]) ref_lists[to_idx].inc_length(refs_to_move); ref_lists[from_idx].set_head(new_head); ref_lists[from_idx].dec_length(refs_to_move); + if (ref_lists[from_idx].length() == 0) { + break; + } } else { - ++to_idx; + to_idx = (to_idx + 1) % _num_q; } } } +#ifdef ASSERT + size_t balanced_total_refs = 0; + for (int i = 0; i < _max_num_q; ++i) { + balanced_total_refs += ref_lists[i].length(); + if (TraceReferenceGC && PrintGCDetails) { + gclog_or_tty->print("%d ", ref_lists[i].length()); + } + } + if (TraceReferenceGC && PrintGCDetails) { + gclog_or_tty->print_cr(" = %d", balanced_total_refs); + gclog_or_tty->flush(); + } + assert(total_refs == balanced_total_refs, "Balancing was incomplete"); +#endif +} + +void ReferenceProcessor::balance_all_queues() { + balance_queues(_discoveredSoftRefs); + balance_queues(_discoveredWeakRefs); + balance_queues(_discoveredFinalRefs); + balance_queues(_discoveredPhantomRefs); } void @@ -857,8 +929,17 @@ ReferenceProcessor::process_discovered_reflist( VoidClosure* complete_gc, AbstractRefProcTaskExecutor* task_executor) { - bool mt = task_executor != NULL && _processing_is_mt; - if (mt && ParallelRefProcBalancingEnabled) { + bool mt_processing = task_executor != NULL && _processing_is_mt; + // If discovery used MT and a dynamic number of GC threads, then + // the queues must be balanced for correctness if fewer than the + // maximum number of queues were used. The number of queue used + // during discovery may be different than the number to be used + // for processing so don't depend of _num_q < _max_num_q as part + // of the test. + bool must_balance = _discovery_is_mt; + + if ((mt_processing && ParallelRefProcBalancingEnabled) || + must_balance) { balance_queues(refs_lists); } if (PrintReferenceGC && PrintGCDetails) { @@ -875,7 +956,7 @@ ReferenceProcessor::process_discovered_reflist( // policy reasons. Keep alive the transitive closure of all // such referents. if (policy != NULL) { - if (mt) { + if (mt_processing) { RefProcPhase1Task phase1(*this, refs_lists, policy, true /*marks_oops_alive*/); task_executor->execute(phase1); } else { @@ -891,7 +972,7 @@ ReferenceProcessor::process_discovered_reflist( // Phase 2: // . Traverse the list and remove any refs whose referents are alive. - if (mt) { + if (mt_processing) { RefProcPhase2Task phase2(*this, refs_lists, !discovery_is_atomic() /*marks_oops_alive*/); task_executor->execute(phase2); } else { @@ -902,7 +983,7 @@ ReferenceProcessor::process_discovered_reflist( // Phase 3: // . Traverse the list and process referents as appropriate. - if (mt) { + if (mt_processing) { RefProcPhase3Task phase3(*this, refs_lists, clear_referent, true /*marks_oops_alive*/); task_executor->execute(phase3); } else { @@ -915,7 +996,11 @@ ReferenceProcessor::process_discovered_reflist( void ReferenceProcessor::clean_up_discovered_references() { // loop over the lists - for (int i = 0; i < _num_q * subclasses_of_ref; i++) { + // Should this instead be + // for (int i = 0; i < subclasses_of_ref; i++_ { + // for (int j = 0; j < _num_q; j++) { + // int index = i * _max_num_q + j; + for (int i = 0; i < _max_num_q * subclasses_of_ref; i++) { if (TraceReferenceGC && PrintGCDetails && ((i % _num_q) == 0)) { gclog_or_tty->print_cr( "\nScrubbing %s discovered list of Null referents", @@ -976,7 +1061,7 @@ inline DiscoveredList* ReferenceProcessor::get_discovered_list(ReferenceType rt) id = next_id(); } } - assert(0 <= id && id < _num_q, "Id is out-of-bounds (call Freud?)"); + assert(0 <= id && id < _max_num_q, "Id is out-of-bounds (call Freud?)"); // Get the discovered queue to which we will add DiscoveredList* list = NULL; @@ -1001,6 +1086,10 @@ inline DiscoveredList* ReferenceProcessor::get_discovered_list(ReferenceType rt) default: ShouldNotReachHere(); } + if (TraceReferenceGC && PrintGCDetails) { + gclog_or_tty->print_cr("Thread %d gets list " INTPTR_FORMAT, + id, list); + } return list; } @@ -1243,7 +1332,7 @@ void ReferenceProcessor::preclean_discovered_references( { TraceTime tt("Preclean SoftReferences", PrintGCDetails && PrintReferenceGC, false, gclog_or_tty); - for (int i = 0; i < _num_q; i++) { + for (int i = 0; i < _max_num_q; i++) { if (yield->should_return()) { return; } @@ -1340,15 +1429,16 @@ ReferenceProcessor::preclean_discovered_reflist(DiscoveredList& refs_list, NOT_PRODUCT( if (PrintGCDetails && PrintReferenceGC) { - gclog_or_tty->print(" Dropped %d Refs out of %d " - "Refs in discovered list ", iter.removed(), iter.processed()); + gclog_or_tty->print_cr(" Dropped %d Refs out of %d " + "Refs in discovered list " INTPTR_FORMAT, + iter.removed(), iter.processed(), (address)refs_list.head()); } ) } const char* ReferenceProcessor::list_name(int i) { - assert(i >= 0 && i <= _num_q * subclasses_of_ref, "Out of bounds index"); - int j = i / _num_q; + assert(i >= 0 && i <= _max_num_q * subclasses_of_ref, "Out of bounds index"); + int j = i / _max_num_q; switch (j) { case 0: return "SoftRef"; case 1: return "WeakRef"; @@ -1372,7 +1462,7 @@ void ReferenceProcessor::verify() { #ifndef PRODUCT void ReferenceProcessor::clear_discovered_references() { guarantee(!_discovering_refs, "Discovering refs?"); - for (int i = 0; i < _num_q * subclasses_of_ref; i++) { + for (int i = 0; i < _max_num_q * subclasses_of_ref; i++) { oop obj = _discoveredSoftRefs[i].head(); while (obj != sentinel_ref()) { oop next = java_lang_ref_Reference::discovered(obj); diff --git a/hotspot/src/share/vm/memory/referenceProcessor.hpp b/hotspot/src/share/vm/memory/referenceProcessor.hpp index c9966e438bd..cf43df76e28 100644 --- a/hotspot/src/share/vm/memory/referenceProcessor.hpp +++ b/hotspot/src/share/vm/memory/referenceProcessor.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -85,8 +85,10 @@ class ReferenceProcessor : public CHeapObj { // The discovered ref lists themselves - // The MT'ness degree of the queues below + // The active MT'ness degree of the queues below int _num_q; + // The maximum MT'ness degree of the queues below + int _max_num_q; // Arrays of lists of oops, one per thread DiscoveredList* _discoveredSoftRefs; DiscoveredList* _discoveredWeakRefs; @@ -95,6 +97,7 @@ class ReferenceProcessor : public CHeapObj { public: int num_q() { return _num_q; } + void set_mt_degree(int v) { _num_q = v; } DiscoveredList* discovered_soft_refs() { return _discoveredSoftRefs; } static oop sentinel_ref() { return _sentinelRef; } static oop* adr_sentinel_ref() { return &_sentinelRef; } @@ -244,6 +247,7 @@ class ReferenceProcessor : public CHeapObj { _bs(NULL), _is_alive_non_header(NULL), _num_q(0), + _max_num_q(0), _processing_is_mt(false), _next_id(0) {} @@ -312,6 +316,9 @@ class ReferenceProcessor : public CHeapObj { void weak_oops_do(OopClosure* f); // weak roots static void oops_do(OopClosure* f); // strong root(s) + // Balance each of the discovered lists. + void balance_all_queues(); + // Discover a Reference object, using appropriate discovery criteria bool discover_reference(oop obj, ReferenceType rt); diff --git a/hotspot/src/share/vm/memory/sharedHeap.cpp b/hotspot/src/share/vm/memory/sharedHeap.cpp index 7bf88f1767f..bf6bb8a8f0b 100644 --- a/hotspot/src/share/vm/memory/sharedHeap.cpp +++ b/hotspot/src/share/vm/memory/sharedHeap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,7 +50,8 @@ SharedHeap::SharedHeap(CollectorPolicy* policy_) : _perm_gen(NULL), _rem_set(NULL), _strong_roots_parity(0), _process_strong_tasks(new SubTasksDone(SH_PS_NumElements)), - _workers(NULL), _n_par_threads(0) + _n_par_threads(0), + _workers(NULL) { if (_process_strong_tasks == NULL || !_process_strong_tasks->valid()) { vm_exit_during_initialization("Failed necessary allocation."); @@ -60,11 +61,13 @@ SharedHeap::SharedHeap(CollectorPolicy* policy_) : (UseConcMarkSweepGC && CMSParallelRemarkEnabled) || UseG1GC) && ParallelGCThreads > 0) { - _workers = new WorkGang("Parallel GC Threads", ParallelGCThreads, + _workers = new FlexibleWorkGang("Parallel GC Threads", ParallelGCThreads, /* are_GC_task_threads */true, /* are_ConcurrentGC_threads */false); if (_workers == NULL) { vm_exit_during_initialization("Failed necessary allocation."); + } else { + _workers->initialize_workers(); } } } @@ -77,8 +80,9 @@ bool SharedHeap::heap_lock_held_for_gc() { } void SharedHeap::set_par_threads(int t) { + assert(t == 0 || !UseSerialGC, "Cannot have parallel threads"); _n_par_threads = t; - _process_strong_tasks->set_par_threads(t); + _process_strong_tasks->set_n_threads(t); } class AssertIsPermClosure: public OopClosure { diff --git a/hotspot/src/share/vm/memory/sharedHeap.hpp b/hotspot/src/share/vm/memory/sharedHeap.hpp index 87f32fbc82d..9e74b2cd479 100644 --- a/hotspot/src/share/vm/memory/sharedHeap.hpp +++ b/hotspot/src/share/vm/memory/sharedHeap.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,7 @@ class OopsInGenClosure; class ObjectClosure; class SubTasksDone; class WorkGang; +class FlexibleWorkGang; class CollectorPolicy; class KlassHandle; @@ -74,7 +75,7 @@ protected: int _strong_roots_parity; // If we're doing parallel GC, use this gang of threads. - WorkGang* _workers; + FlexibleWorkGang* _workers; // Number of parallel threads currently working on GC tasks. // O indicates use sequential code; 1 means use parallel code even with @@ -189,7 +190,7 @@ public: SO_CodeCache = 0x10 }; - WorkGang* workers() const { return _workers; } + FlexibleWorkGang* workers() const { return _workers; } // Sets the number of parallel threads that will be doing tasks // (such as process strong roots) subsequently. diff --git a/hotspot/src/share/vm/utilities/taskqueue.cpp b/hotspot/src/share/vm/utilities/taskqueue.cpp index 2492b90d1d8..18602211474 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.cpp +++ b/hotspot/src/share/vm/utilities/taskqueue.cpp @@ -144,6 +144,7 @@ void ParallelTaskTerminator::sleep(uint millis) { bool ParallelTaskTerminator::offer_termination(TerminatorTerminator* terminator) { + assert(_n_threads > 0, "Initialization is incorrect"); assert(_offered_termination < _n_threads, "Invariant"); Atomic::inc(&_offered_termination); @@ -255,3 +256,9 @@ bool ObjArrayTask::is_valid() const { _index < objArrayOop(_obj)->length(); } #endif // ASSERT + +void ParallelTaskTerminator::reset_for_reuse(int n_threads) { + reset_for_reuse(); + _n_threads = n_threads; +} + diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp index 1bd1ae72309..c0d5497e833 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.hpp +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp @@ -305,6 +305,12 @@ bool GenericTaskQueue::push_slow(E t, uint dirty_n_elems) { return false; } +// pop_local_slow() is done by the owning thread and is trying to +// get the last task in the queue. It will compete with pop_global() +// that will be used by other threads. The tag age is incremented +// whenever the queue goes empty which it will do here if this thread +// gets the last task or in pop_global() if the queue wraps (top == 0 +// and pop_global() succeeds, see pop_global()). template bool GenericTaskQueue::pop_local_slow(uint localBot, Age oldAge) { // This queue was observed to contain exactly one element; either this @@ -637,6 +643,9 @@ public: // in an MT-safe manner, once the previous round of use of // the terminator is finished. void reset_for_reuse(); + // Same as above but the number of parallel threads is set to the + // given number. + void reset_for_reuse(int n_threads); #ifdef TRACESPINNING static uint total_yields() { return _total_yields; } @@ -782,3 +791,4 @@ typedef GenericTaskQueueSet OopStarTaskQueueSet; typedef OverflowTaskQueue RegionTaskQueue; typedef GenericTaskQueueSet RegionTaskQueueSet; + diff --git a/hotspot/src/share/vm/utilities/workgroup.cpp b/hotspot/src/share/vm/utilities/workgroup.cpp index 9d2d797cedd..6abab723fe1 100644 --- a/hotspot/src/share/vm/utilities/workgroup.cpp +++ b/hotspot/src/share/vm/utilities/workgroup.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,28 +53,52 @@ WorkGang::WorkGang(const char* name, int workers, bool are_GC_task_threads, bool are_ConcurrentGC_threads) : - AbstractWorkGang(name, are_GC_task_threads, are_ConcurrentGC_threads) -{ + AbstractWorkGang(name, are_GC_task_threads, are_ConcurrentGC_threads) { // Save arguments. _total_workers = workers; +} + +GangWorker* WorkGang::allocate_worker(int which) { + GangWorker* new_worker = new GangWorker(this, which); + return new_worker; +} + +// The current implementation will exit if the allocation +// of any worker fails. Still, return a boolean so that +// a future implementation can possibly do a partial +// initialization of the workers and report such to the +// caller. +bool WorkGang::initialize_workers() { if (TraceWorkGang) { - tty->print_cr("Constructing work gang %s with %d threads", name, workers); + tty->print_cr("Constructing work gang %s with %d threads", + name(), + total_workers()); } - _gang_workers = NEW_C_HEAP_ARRAY(GangWorker*, workers); + _gang_workers = NEW_C_HEAP_ARRAY(GangWorker*, total_workers()); if (gang_workers() == NULL) { vm_exit_out_of_memory(0, "Cannot create GangWorker array."); + return false; + } + os::ThreadType worker_type; + if (are_ConcurrentGC_threads()) { + worker_type = os::cgc_thread; + } else { + worker_type = os::pgc_thread; } for (int worker = 0; worker < total_workers(); worker += 1) { - GangWorker* new_worker = new GangWorker(this, worker); + GangWorker* new_worker = allocate_worker(worker); assert(new_worker != NULL, "Failed to allocate GangWorker"); _gang_workers[worker] = new_worker; - if (new_worker == NULL || !os::create_thread(new_worker, os::pgc_thread)) + if (new_worker == NULL || !os::create_thread(new_worker, worker_type)) { vm_exit_out_of_memory(0, "Cannot create worker GC thread. Out of system resources."); + return false; + } if (!DisableStartThread) { os::start_thread(new_worker); } } + return true; } AbstractWorkGang::~AbstractWorkGang() { @@ -383,7 +407,7 @@ bool SubTasksDone::valid() { return _tasks != NULL; } -void SubTasksDone::set_par_threads(int t) { +void SubTasksDone::set_n_threads(int t) { #ifdef ASSERT assert(_claimed == 0 || _threads_completed == _n_threads, "should not be called while tasks are being processed!"); diff --git a/hotspot/src/share/vm/utilities/workgroup.hpp b/hotspot/src/share/vm/utilities/workgroup.hpp index 411c6da576f..089f668245d 100644 --- a/hotspot/src/share/vm/utilities/workgroup.hpp +++ b/hotspot/src/share/vm/utilities/workgroup.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ class GangWorker; class YieldingFlexibleGangWorker; class YieldingFlexibleGangTask; class WorkData; +class AbstractWorkGang; // An abstract task to be worked on by a gang. // You subclass this to supply your own work() method @@ -38,6 +39,13 @@ public: // The argument tells you which member of the gang you are. virtual void work(int i) = 0; + // This method configures the task for proper termination. + // Some tasks do not have any requirements on termination + // and may inherit this method that does nothing. Some + // tasks do some coordination on termination and override + // this method to implement that coordination. + virtual void set_for_termination(int active_workers) {}; + // Debugging accessor for the name. const char* name() const PRODUCT_RETURN_(return NULL;); int counter() { return _counter; } @@ -64,6 +72,18 @@ protected: virtual ~AbstractGangTask() { } }; +class AbstractGangTaskWOopQueues : public AbstractGangTask { + OopTaskQueueSet* _queues; + ParallelTaskTerminator _terminator; + public: + AbstractGangTaskWOopQueues(const char* name, OopTaskQueueSet* queues) : + AbstractGangTask(name), _queues(queues), _terminator(0, _queues) {} + ParallelTaskTerminator* terminator() { return &_terminator; } + virtual void set_for_termination(int active_workers) { + terminator()->reset_for_reuse(active_workers); + } + OopTaskQueueSet* queues() { return _queues; } +}; // Class AbstractWorkGang: // An abstract class representing a gang of workers. @@ -114,6 +134,9 @@ public: int total_workers() const { return _total_workers; } + virtual int active_workers() const { + return _total_workers; + } bool terminate() const { return _terminate; } @@ -199,6 +222,13 @@ public: bool are_GC_task_threads, bool are_ConcurrentGC_threads); // Run a task, returns when the task is done (or terminated). virtual void run_task(AbstractGangTask* task); + void run_task(AbstractGangTask* task, uint no_of_parallel_workers); + // Allocate a worker and return a pointer to it. + virtual GangWorker* allocate_worker(int which); + // Initialize workers in the gang. Return true if initialization + // succeeded. The type of the worker can be overridden in a derived + // class with the appropriate implementation of allocate_worker(). + bool initialize_workers(); }; // Class GangWorker: @@ -226,6 +256,34 @@ public: AbstractWorkGang* gang() const { return _gang; } }; +class FlexibleWorkGang: public WorkGang { + protected: + int _active_workers; + public: + // Constructor and destructor. + FlexibleWorkGang(const char* name, int workers, + bool are_GC_task_threads, + bool are_ConcurrentGC_threads) : + WorkGang(name, workers, are_GC_task_threads, are_ConcurrentGC_threads) { + _active_workers = ParallelGCThreads; + }; + // Accessors for fields + virtual int active_workers() const { return _active_workers; } + void set_active_workers(int v) { _active_workers = v; } +}; + +// Work gangs in garbage collectors: 2009-06-10 +// +// SharedHeap - work gang for stop-the-world parallel collection. +// Used by +// ParNewGeneration +// CMSParRemarkTask +// CMSRefProcTaskExecutor +// G1CollectedHeap +// G1ParFinalCountTask +// ConcurrentMark +// CMSCollector + // A class that acts as a synchronisation barrier. Workers enter // the barrier and must wait until all other workers have entered // before any of them may leave. @@ -271,7 +329,7 @@ class SubTasksDone: public CHeapObj { int _n_threads; jint _threads_completed; #ifdef ASSERT - jint _claimed; + volatile jint _claimed; #endif // Set all tasks to unclaimed. @@ -286,9 +344,10 @@ public: // True iff the object is in a valid state. bool valid(); - // Set the number of parallel threads doing the tasks to "t". Can only + // Get/set the number of parallel threads doing the tasks to "t". Can only // be called before tasks start or after they are complete. - void set_par_threads(int t); + int n_threads() { return _n_threads; } + void set_n_threads(int t); // Returns "false" if the task "t" is unclaimed, and ensures that task is // claimed. The task "t" is required to be within the range of "this". @@ -315,13 +374,17 @@ class SequentialSubTasksDone : public StackObj { protected: jint _n_tasks; // Total number of tasks available. jint _n_claimed; // Number of tasks claimed. + // _n_threads is used to determine when a sub task is done. + // See comments on SubTasksDone::_n_threads jint _n_threads; // Total number of parallel threads. jint _n_completed; // Number of completed threads. void clear(); public: - SequentialSubTasksDone() { clear(); } + SequentialSubTasksDone() { + clear(); + } ~SequentialSubTasksDone() {} // True iff the object is in a valid state. @@ -330,11 +393,12 @@ public: // number of tasks jint n_tasks() const { return _n_tasks; } - // Set the number of parallel threads doing the tasks to t. + // Get/set the number of parallel threads doing the tasks to t. // Should be called before the task starts but it is safe // to call this once a task is running provided that all // threads agree on the number of threads. - void set_par_threads(int t) { _n_threads = t; } + int n_threads() { return _n_threads; } + void set_n_threads(int t) { _n_threads = t; } // Set the number of tasks to be claimed to t. As above, // should be called before the tasks start but it is safe diff --git a/hotspot/src/share/vm/utilities/yieldingWorkgroup.cpp b/hotspot/src/share/vm/utilities/yieldingWorkgroup.cpp index 779b4c49881..7b323ac57b5 100644 --- a/hotspot/src/share/vm/utilities/yieldingWorkgroup.cpp +++ b/hotspot/src/share/vm/utilities/yieldingWorkgroup.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,29 +32,13 @@ class WorkData; YieldingFlexibleWorkGang::YieldingFlexibleWorkGang( const char* name, int workers, bool are_GC_task_threads) : - AbstractWorkGang(name, are_GC_task_threads, false) { - // Save arguments. - _total_workers = workers; - assert(_total_workers > 0, "Must have more than 1 worker"); + FlexibleWorkGang(name, workers, are_GC_task_threads, false), + _yielded_workers(0) {} - _yielded_workers = 0; - - if (TraceWorkGang) { - tty->print_cr("Constructing work gang %s with %d threads", name, workers); - } - _gang_workers = NEW_C_HEAP_ARRAY(GangWorker*, workers); - assert(gang_workers() != NULL, "Failed to allocate gang workers"); - for (int worker = 0; worker < total_workers(); worker += 1) { - YieldingFlexibleGangWorker* new_worker = - new YieldingFlexibleGangWorker(this, worker); - assert(new_worker != NULL, "Failed to allocate YieldingFlexibleGangWorker"); - _gang_workers[worker] = new_worker; - if (new_worker == NULL || !os::create_thread(new_worker, os::pgc_thread)) - vm_exit_out_of_memory(0, "Cannot create worker GC thread. Out of system resources."); - if (!DisableStartThread) { - os::start_thread(new_worker); - } - } +GangWorker* YieldingFlexibleWorkGang::allocate_worker(int which) { + YieldingFlexibleGangWorker* new_member = + new YieldingFlexibleGangWorker(this, which); + return (YieldingFlexibleGangWorker*) new_member; } // Run a task; returns when the task is done, or the workers yield, @@ -142,6 +126,7 @@ void YieldingFlexibleWorkGang::start_task(YieldingFlexibleGangTask* new_task) { _active_workers = total_workers(); } new_task->set_actual_size(_active_workers); + new_task->set_for_termination(_active_workers); assert(_started_workers == 0, "Tabula rasa non"); assert(_finished_workers == 0, "Tabula rasa non"); @@ -161,22 +146,22 @@ void YieldingFlexibleWorkGang::wait_for_gang() { for (Status status = yielding_task()->status(); status != COMPLETED && status != YIELDED && status != ABORTED; status = yielding_task()->status()) { - assert(started_workers() <= active_workers(), "invariant"); - assert(finished_workers() <= active_workers(), "invariant"); - assert(yielded_workers() <= active_workers(), "invariant"); + assert(started_workers() <= total_workers(), "invariant"); + assert(finished_workers() <= total_workers(), "invariant"); + assert(yielded_workers() <= total_workers(), "invariant"); monitor()->wait(Mutex::_no_safepoint_check_flag); } switch (yielding_task()->status()) { case COMPLETED: case ABORTED: { - assert(finished_workers() == active_workers(), "Inconsistent status"); + assert(finished_workers() == total_workers(), "Inconsistent status"); assert(yielded_workers() == 0, "Invariant"); reset(); // for next task; gang<->task binding released break; } case YIELDED: { assert(yielded_workers() > 0, "Invariant"); - assert(yielded_workers() + finished_workers() == active_workers(), + assert(yielded_workers() + finished_workers() == total_workers(), "Inconsistent counts"); break; } @@ -208,7 +193,6 @@ void YieldingFlexibleWorkGang::continue_task( void YieldingFlexibleWorkGang::reset() { _started_workers = 0; _finished_workers = 0; - _active_workers = 0; yielding_task()->set_gang(NULL); _task = NULL; // unbind gang from task } @@ -216,7 +200,7 @@ void YieldingFlexibleWorkGang::reset() { void YieldingFlexibleWorkGang::yield() { assert(task() != NULL, "Inconsistency; should have task binding"); MutexLockerEx ml(monitor(), Mutex::_no_safepoint_check_flag); - assert(yielded_workers() < active_workers(), "Consistency check"); + assert(yielded_workers() < total_workers(), "Consistency check"); if (yielding_task()->status() == ABORTING) { // Do not yield; we need to abort as soon as possible // XXX NOTE: This can cause a performance pathology in the @@ -227,7 +211,7 @@ void YieldingFlexibleWorkGang::yield() { // us to return at each potential yield point. return; } - if (++_yielded_workers + finished_workers() == active_workers()) { + if (++_yielded_workers + finished_workers() == total_workers()) { yielding_task()->set_status(YIELDED); monitor()->notify_all(); } else { diff --git a/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp b/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp index b4f3bd44592..174b429364d 100644 --- a/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp +++ b/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,6 +54,25 @@ protected: // Override from parent class virtual void loop(); }; +class FlexibleGangTask: public AbstractGangTask { + int _actual_size; // size of gang obtained +protected: + int _requested_size; // size of gang requested +public: + FlexibleGangTask(const char* name): AbstractGangTask(name), + _requested_size(0) {} + + // The abstract work method. + // The argument tells you which member of the gang you are. + virtual void work(int i) = 0; + + int requested_size() const { return _requested_size; } + int actual_size() const { return _actual_size; } + + void set_requested_size(int sz) { _requested_size = sz; } + void set_actual_size(int sz) { _actual_size = sz; } +}; + // An abstract task to be worked on by a flexible work gang, // and where the workers will periodically yield, usually // in response to some condition that is signalled by means @@ -70,19 +89,15 @@ protected: // Override from parent class // maximum) in response to task requests at certain points. // The last part (the flexible part) has not yet been fully // fleshed out and is a work in progress. -class YieldingFlexibleGangTask: public AbstractGangTask { +class YieldingFlexibleGangTask: public FlexibleGangTask { Status _status; YieldingFlexibleWorkGang* _gang; - int _actual_size; // size of gang obtained protected: - int _requested_size; // size of gang requested - // Constructor and desctructor: only construct subclasses. - YieldingFlexibleGangTask(const char* name): AbstractGangTask(name), + YieldingFlexibleGangTask(const char* name): FlexibleGangTask(name), _status(INACTIVE), - _gang(NULL), - _requested_size(0) { } + _gang(NULL) { } virtual ~YieldingFlexibleGangTask() { } @@ -126,20 +141,13 @@ public: bool completed() const { return _status == COMPLETED; } bool aborted() const { return _status == ABORTED; } bool active() const { return _status == ACTIVE; } - - int requested_size() const { return _requested_size; } - int actual_size() const { return _actual_size; } - - void set_requested_size(int sz) { _requested_size = sz; } - void set_actual_size(int sz) { _actual_size = sz; } }; - // Class YieldingWorkGang: A subclass of WorkGang. // In particular, a YieldingWorkGang is made up of // YieldingGangWorkers, and provides infrastructure // supporting yielding to the "GangOverseer", // being the thread that orchestrates the WorkGang via run_task(). -class YieldingFlexibleWorkGang: public AbstractWorkGang { +class YieldingFlexibleWorkGang: public FlexibleWorkGang { // Here's the public interface to this class. public: // Constructor and destructor. @@ -151,6 +159,9 @@ public: "Incorrect cast"); return (YieldingFlexibleGangTask*)task(); } + // Allocate a worker and return a pointer to it. + GangWorker* allocate_worker(int which); + // Run a task; returns when the task is done, or the workers yield, // or the task is aborted, or the work gang is terminated via stop(). // A task that has been yielded can be continued via this same interface @@ -180,10 +191,6 @@ public: void abort(); private: - // The currently active workers in this gang. - // This is a number that is dynamically adjusted by - // the run_task() method at each subsequent invocation, - // using data in the YieldingFlexibleGangTask. int _active_workers; int _yielded_workers; void wait_for_gang(); @@ -194,6 +201,7 @@ public: return _active_workers; } + // Accessors for fields int yielded_workers() const { return _yielded_workers; } From 79fbcf5d0335c0c8045cd4591d6be71d549003f0 Mon Sep 17 00:00:00 2001 From: John Coomes Date: Wed, 8 Sep 2010 16:10:51 -0700 Subject: [PATCH 009/722] 6983296: build sanity checks for jdk7 should require SS12u1 Reviewed-by: ohair --- hotspot/make/solaris/makefiles/sparcWorks.make | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hotspot/make/solaris/makefiles/sparcWorks.make b/hotspot/make/solaris/makefiles/sparcWorks.make index 34b279b7266..8e13e44063d 100644 --- a/hotspot/make/solaris/makefiles/sparcWorks.make +++ b/hotspot/make/solaris/makefiles/sparcWorks.make @@ -51,9 +51,9 @@ ifeq ($(JRE_RELEASE_VER),1.6.0) VALIDATED_COMPILER_REVS := 5.8 VALIDATED_C_COMPILER_REVS := 5.8 else - # Validated compilers for JDK7 are SS12 (5.9) or SS12 update 1 (5.10) - VALIDATED_COMPILER_REVS := 5.9 5.10 - VALIDATED_C_COMPILER_REVS := 5.9 5.10 + # Validated compiler for JDK7 is SS12 update 1 + patches (5.10) + VALIDATED_COMPILER_REVS := 5.10 + VALIDATED_C_COMPILER_REVS := 5.10 endif # Warning messages about not using the above validated versions From c7b608b1ed26d5d798965dcd08754e11799dfcb1 Mon Sep 17 00:00:00 2001 From: John R Rose Date: Wed, 8 Sep 2010 18:40:11 -0700 Subject: [PATCH 010/722] 6964498: JSR 292 invokedynamic sites need local bootstrap methods Add JVM_CONSTANT_InvokeDynamic records to constant pool to determine per-instruction BSMs; add MethodHandleProvider. Reviewed-by: twisti --- .../classes/java/dyn/BootstrapMethod.java | 82 ++++++++ jdk/src/share/classes/java/dyn/CallSite.java | 116 ++++++----- .../classes/java/dyn/ConstantCallSite.java | 43 ++++ .../share/classes/java/dyn/InvokeDynamic.java | 31 ++- .../java/dyn/InvokeDynamicBootstrapError.java | 6 +- jdk/src/share/classes/java/dyn/Linkage.java | 30 +-- .../classes/java/dyn/LinkagePermission.java | 15 +- .../share/classes/java/dyn/MethodHandle.java | 32 ++- .../java/dyn/MethodHandleProvider.java | 80 ++++++++ .../share/classes/java/dyn/package-info.java | 192 ++++++++++++++++-- .../share/classes/sun/dyn/CallSiteImpl.java | 25 ++- jdk/test/java/dyn/MethodHandlesTest.java | 3 +- 12 files changed, 507 insertions(+), 148 deletions(-) create mode 100644 jdk/src/share/classes/java/dyn/BootstrapMethod.java create mode 100644 jdk/src/share/classes/java/dyn/ConstantCallSite.java create mode 100644 jdk/src/share/classes/java/dyn/MethodHandleProvider.java diff --git a/jdk/src/share/classes/java/dyn/BootstrapMethod.java b/jdk/src/share/classes/java/dyn/BootstrapMethod.java new file mode 100644 index 00000000000..a5c41b4854b --- /dev/null +++ b/jdk/src/share/classes/java/dyn/BootstrapMethod.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.dyn; + +import java.lang.annotation.*; + +/** + * Annotation on InvokeDynamic method calls which requests the JVM to use a specific + * bootstrap method + * to link the call. This annotation is not retained as such in the class file, + * but is transformed into a constant-pool entry for the invokedynamic instruction which + * specifies the desired bootstrap method. + *

+ * If only the value is given, it must name a subclass of {@link CallSite} + * with a constructor which accepts a class, string, and method type. + * If the value and name are both given, there must be + * a static method in the given class of the given name which accepts a class, string, + * and method type, and returns a reference coercible to {@link CallSite}. + *

+ * This annotation can be placed either on the return type of a single {@link InvokeDynamic} + * call (see examples) or else it can be placed on an enclosing class or method, where it + * determines a default bootstrap method for any {@link InvokeDynamic} calls which are not + * specifically annotated with a bootstrap method. + * Every {@link InvokeDynamic} call must be given a bootstrap method. + *

+ * Examples: +

+@BootstrapMethod(value=MyLanguageRuntime.class, name="bootstrapDynamic")
+String x = (String) InvokeDynamic.greet();
+//BSM => MyLanguageRuntime.bootstrapDynamic(Here.class, "greet", methodType(String.class))
+@BootstrapMethod(MyCallSite.class)
+void example() throws Throwable {
+    InvokeDynamic.greet();
+    //BSM => new MyCallSite(Here.class, "greet", methodType(void.class))
+}
+
+ *

+ */ +@Target({ElementType.TYPE_USE, + // For defaulting every indy site within a class or method; cf. @SuppressWarnings: + ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR + }) +@Retention(RetentionPolicy.SOURCE) +public @interface BootstrapMethod { + /** The class containing the bootstrap method. */ + Class value(); + + /** The name of the bootstrap method. + * If this is the empty string, an instance of the bootstrap class is created, + * and a constructor is invoked. + * Otherwise, there must be a static method of the required name. + */ + String name() default ""; // empty string denotes a constructor with 'new' + + /** The argument types of the bootstrap method, as passed out by the JVM. + * There is usually no reason to override the default. + */ + Class[] arguments() default {Class.class, String.class, MethodType.class}; +} diff --git a/jdk/src/share/classes/java/dyn/CallSite.java b/jdk/src/share/classes/java/dyn/CallSite.java index b8335774851..c3b7962911f 100644 --- a/jdk/src/share/classes/java/dyn/CallSite.java +++ b/jdk/src/share/classes/java/dyn/CallSite.java @@ -25,56 +25,26 @@ package java.dyn; -import sun.dyn.Access; -import sun.dyn.MemberName; -import sun.dyn.CallSiteImpl; +import sun.dyn.*; +import java.util.Collection; /** - * A {@code CallSite} reifies an {@code invokedynamic} instruction from bytecode, - * and controls its linkage. - * Every linked {@code CallSite} object corresponds to a distinct instance - * of the {@code invokedynamic} instruction, and vice versa. + * A {@code CallSite} is a holder for a variable {@link MethodHandle}, + * which is called its {@code target}. + * Every call to a {@code CallSite} is delegated to the site's current target. *

- * Every linked {@code CallSite} object has one state variable, - * a {@link MethodHandle} reference called the {@code target}. - * This reference is never null. Though it can change its value - * successive values must always have exactly the {@link MethodType method type} - * called for by the bytecodes of the associated {@code invokedynamic} instruction + * A call site is initially created in an unlinked state, + * which is distinguished by a null target variable. + * Before the call site may be invoked (and before certain other + * operations are attempted), the call site must be linked to + * a non-null target. *

- * It is the responsibility of each class's - * {@link Linkage#registerBootstrapMethod(Class, MethodHandle) bootstrap method} - * to produce call sites which have been pre-linked to an initial target method. - * The required {@link MethodType type} for the target method is a parameter - * to each bootstrap method call. - *

- * The bootstrap method may elect to produce call sites of a - * language-specific subclass of {@code CallSite}. In such a case, - * the subclass may claim responsibility for initializing its target to - * a non-null value, by overriding {@link #initialTarget}. - *

- * An {@code invokedynamic} instruction which has not yet been executed - * is said to be unlinked. When an unlinked call site is executed, - * the containing class's bootstrap method is called to manufacture a call site, - * for the instruction. If the bootstrap method does not assign a non-null - * value to the new call site's target variable, the method {@link #initialTarget} - * is called to produce the new call site's first target method. - *

- * A freshly-created {@code CallSite} object is not yet in a linked state. - * An unlinked {@code CallSite} object reports null for its {@code callerClass}. - * When the JVM receives a {@code CallSite} object from a bootstrap method, - * it first ensures that its target is non-null and of the correct type. - * The JVM then links the {@code CallSite} object to the call site instruction, - * enabling the {@code callerClass} to return the class in which the instruction occurs. - *

- * Next, the JVM links the instruction to the {@code CallSite}, at which point - * any further execution of the {@code invokedynamic} instruction implicitly - * invokes the current target of the {@code CallSite} object. - * After this two-way linkage, both the instruction and the {@code CallSite} - * object are said to be linked. - *

- * This state of linkage continues until the method containing the - * dynamic call site is garbage collected, or the dynamic call site - * is invalidated by an explicit request. + * A call site may be relinked by changing its target. + * The new target must be non-null and must have the same + * {@linkplain MethodHandle#type() type} + * as the previous target. + * Thus, though a call site can be relinked to a series of + * successive targets, it cannot change its type. *

* Linkage happens once in the lifetime of any given {@code CallSite} object. * Because of call site invalidation, this linkage can be repeated for @@ -87,6 +57,10 @@ import sun.dyn.CallSiteImpl; * Here is a sample use of call sites and bootstrap methods which links every * dynamic call site to print its arguments:


+@BootstrapMethod(value=PrintArgsDemo.class, name="bootstrapDynamic")
+static void test() throws Throwable {
+    InvokeDynamic.baz("baz arg", 2, 3.14);
+}
 private static void printArgs(Object... args) {
   System.out.println(java.util.Arrays.deepToString(args));
 }
@@ -96,17 +70,16 @@ static {
   Class thisClass = lookup.lookupClass();  // (who am I?)
   printArgs = lookup.findStatic(thisClass,
       "printArgs", MethodType.methodType(void.class, Object[].class));
-  Linkage.registerBootstrapMethod("bootstrapDynamic");
 }
 private static CallSite bootstrapDynamic(Class caller, String name, MethodType type) {
   // ignore caller and name, but match the type:
   return new CallSite(MethodHandles.collectArguments(printArgs, type));
 }
 
- * @see Linkage#registerBootstrapMethod(java.lang.Class, java.dyn.MethodHandle) * @author John Rose, JSR 292 EG */ public class CallSite + implements MethodHandleProvider { private static final Access IMPL_TOKEN = Access.getToken(); @@ -209,6 +182,7 @@ public class CallSite * {@code InvokeDynamicBootstrapError}, which in turn causes the * linkage of the {@code invokedynamic} instruction to terminate * abnormally. + * @deprecated transitional form defined in EDR but removed in PFD */ protected MethodHandle initialTarget(Class callerClass, String name, MethodType type) { throw new InvokeDynamicBootstrapError("target must be initialized before call site is linked: "+name+type); @@ -278,16 +252,40 @@ public class CallSite */ @Override public String toString() { - StringBuilder buf = new StringBuilder("CallSite#"); - buf.append(hashCode()); - if (!isLinked()) - buf.append("[unlinked]"); - else - buf.append("[") - .append("from ").append(vmmethod.getDeclaringClass().getName()) - .append(" : ").append(getTarget().type()) - .append(" => ").append(getTarget()) - .append("]"); - return buf.toString(); + return "CallSite"+(target == null ? "" : target.type()); } + + /** + * PROVISIONAL API, WORK IN PROGRESS: + * Produce a method handle equivalent to an invokedynamic instruction + * which has been linked to this call site. + *

If this call site is a {@link ConstantCallSite}, this method + * simply returns the call site's target, since that will not change. + *

Otherwise, this method is equivalent to the following code: + *

+     * MethodHandle getTarget, invoker, result;
+     * getTarget = MethodHandles.lookup().bind(this, "getTarget", MethodType.methodType(MethodHandle.class));
+     * invoker = MethodHandles.exactInvoker(this.type());
+     * result = MethodHandles.foldArguments(invoker, getTarget)
+     * 
+ * @return a method handle which always invokes this call site's current target + */ + public final MethodHandle dynamicInvoker() { + if (this instanceof ConstantCallSite) + return getTarget(); // will not change dynamically + MethodHandle getCSTarget = GET_TARGET; + if (getCSTarget == null) + GET_TARGET = getCSTarget = MethodHandles.Lookup.IMPL_LOOKUP. + findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); + MethodHandle getTarget = MethodHandleImpl.bindReceiver(IMPL_TOKEN, getCSTarget, this); + MethodHandle invoker = MethodHandles.exactInvoker(this.type()); + return MethodHandles.foldArguments(invoker, getTarget); + } + private static MethodHandle GET_TARGET = null; // link this lazily, not eagerly + + /** Implementation of {@link MethodHandleProvider} which returns {@code this.dynamicInvoker()}. */ + public final MethodHandle asMethodHandle() { return dynamicInvoker(); } + + /** Implementation of {@link MethodHandleProvider}, which returns {@code this.dynamicInvoker().asType(type)}. */ + public final MethodHandle asMethodHandle(MethodType type) { return dynamicInvoker().asType(type); } } diff --git a/jdk/src/share/classes/java/dyn/ConstantCallSite.java b/jdk/src/share/classes/java/dyn/ConstantCallSite.java new file mode 100644 index 00000000000..e03fa8d3368 --- /dev/null +++ b/jdk/src/share/classes/java/dyn/ConstantCallSite.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.dyn; + +/** + * A {@code ConstantCallSite} is a {@link CallSite} whose target is permanent, and can never be changed. + * The only way to relink an {@code invokedynamic} instruction bound to a {@code ConstantCallSite} is + * to invalidate the instruction as a whole. + * @author John Rose, JSR 292 EG + */ +public class ConstantCallSite extends CallSite { + /** Create a call site with a permanent target. */ + public ConstantCallSite(MethodHandle target) { + super(target); + } + /** Throw an {@link IllegalArgumentException}, because this kind of call site cannot change its target. */ + @Override public final void setTarget(MethodHandle ignore) { + throw new IllegalArgumentException("ConstantCallSite"); + } +} diff --git a/jdk/src/share/classes/java/dyn/InvokeDynamic.java b/jdk/src/share/classes/java/dyn/InvokeDynamic.java index 021e75a1ea7..4406363a990 100644 --- a/jdk/src/share/classes/java/dyn/InvokeDynamic.java +++ b/jdk/src/share/classes/java/dyn/InvokeDynamic.java @@ -35,7 +35,7 @@ package java.dyn; * The target method is a property of the reified {@linkplain CallSite call site object} * which is linked to each active {@code invokedynamic} instruction. * The call site object is initially produced by a - * {@linkplain java.dyn.Linkage#registerBootstrapMethod(Class, MethodHandle) bootstrap method} + * {@linkplain BootstrapMethod bootstrap method} * associated with the class whose bytecodes include the dynamic call site. *

* The type {@code InvokeDynamic} has no particular meaning as a @@ -45,22 +45,31 @@ package java.dyn; * It may be imported for ease of use. *

* Here are some examples: - *

- * Object x; String s; int i;
- * x = InvokeDynamic.greet("world"); // greet(Ljava/lang/String;)Ljava/lang/Object;
- * s = InvokeDynamic.<String>hail(x); // hail(Ljava/lang/Object;)Ljava/lang/String;
- * InvokeDynamic.<void>cogito(); // cogito()V
- * i = InvokeDynamic.<int>#"op:+"(2, 3); // "op:+"(II)I
- * 
+

+@BootstrapMethod(value=Here.class, name="bootstrapDynamic")
+static void example() throws Throwable {
+    Object x; String s; int i;
+    x = InvokeDynamic.greet("world"); // greet(Ljava/lang/String;)Ljava/lang/Object;
+    s = (String) InvokeDynamic.hail(x); // hail(Ljava/lang/Object;)Ljava/lang/String;
+    InvokeDynamic.cogito(); // cogito()V
+    i = (int) InvokeDynamic.#"op:+"(2, 3); // "op:+"(II)I
+}
+static MethodHandle bootstrapDynamic(Class caller, String name, MethodType type) { ... }
+
* Each of the above calls generates a single invokedynamic instruction * with the name-and-type descriptors indicated in the comments. + *

* The argument types are taken directly from the actual arguments, - * while the return type is taken from the type parameter. - * (This type parameter may be a primtive, and it defaults to {@code Object}.) + * while the return type corresponds to the target of the assignment. + * (Currently, the return type must be given as a false type parameter. + * This type parameter is an irregular use of the generic type syntax, + * and is likely to change in favor of a convention based on target typing.) + *

* The final example uses a special syntax for uttering non-Java names. * Any name legal to the JVM may be given between the double quotes. + *

* None of these calls is complete without a bootstrap method, - * which must be registered by the static initializer of the enclosing class. + * which must be declared for the enclosing class or method. * @author John Rose, JSR 292 EG */ @MethodHandle.PolymorphicSignature diff --git a/jdk/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java b/jdk/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java index 83ebcd464b4..be1bc8a5970 100644 --- a/jdk/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java +++ b/jdk/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java @@ -28,15 +28,11 @@ package java.dyn; /** * Thrown to indicate that an {@code invokedynamic} instruction has * failed to find its - * {@linkplain Linkage#registerBootstrapMethod(Class, MethodHandle) bootstrap method}, + * {@linkplain BootstrapMethod bootstrap method}, * or the bootstrap method has * failed to provide a * {@linkplain CallSite} call site with a non-null {@linkplain MethodHandle target} * of the correct {@linkplain MethodType method type}. - *

- * The bootstrap method must have been declared during a class's initialization - * by a call to one of the overloadings of - * {@link Linkage#registerBootstrapMethod registerBootstrapMethod}. * * @author John Rose, JSR 292 EG */ diff --git a/jdk/src/share/classes/java/dyn/Linkage.java b/jdk/src/share/classes/java/dyn/Linkage.java index d65ae41c31c..98eedbbabfb 100644 --- a/jdk/src/share/classes/java/dyn/Linkage.java +++ b/jdk/src/share/classes/java/dyn/Linkage.java @@ -25,7 +25,6 @@ package java.dyn; -import java.lang.annotation.Annotation; import java.dyn.MethodHandles.Lookup; import java.util.WeakHashMap; import sun.dyn.Access; @@ -56,11 +55,7 @@ public class Linkage { *

  • the class containing the {@code invokedynamic} instruction, for which the bootstrap method was registered *
  • the name of the method being invoked (a {@link String}) *
  • the type of the method being invoked (a {@link MethodType}) - *
  • TBD optionally, an unordered array of {@link Annotation}s attached to the call site - * (Until this feature is implemented, this will always receive an empty array.) * - * (TBD: The final argument type may be missing from the method handle's type. - * Additional arguments may be added in the future.) * The bootstrap method acts as a factory method which accepts the given arguments * and returns a {@code CallSite} object (possibly of a subclass of {@code CallSite}). *

    @@ -86,6 +81,7 @@ public class Linkage { * or is already running in another thread * @exception SecurityException if there is a security manager installed, * and a {@link LinkagePermission} check fails for "registerBootstrapMethod" + * @deprecated Use @{@link BootstrapMethod} annotations instead */ public static void registerBootstrapMethod(Class callerClass, MethodHandle bootstrapMethod) { @@ -97,14 +93,9 @@ public class Linkage { static private void checkBSM(MethodHandle mh) { if (mh == null) throw newIllegalArgumentException("null bootstrap method"); - if (mh.type() == BOOTSTRAP_METHOD_TYPE_2) - // For now, always pass an empty array for the Annotations argument - mh = MethodHandles.insertArguments(mh, BOOTSTRAP_METHOD_TYPE_2.parameterCount()-1, - (Object)NO_ANNOTATIONS); if (mh.type() == BOOTSTRAP_METHOD_TYPE) return; throw new WrongMethodTypeException(mh.toString()); } - static private final Annotation[] NO_ANNOTATIONS = { }; /** * PROVISIONAL API, WORK IN PROGRESS: @@ -115,6 +106,7 @@ public class Linkage { * @throws NoSuchMethodException if there is no such method * @throws IllegalStateException if the caller class's static initializer * has already run, or is already running in another thread + * @deprecated Use @{@link BootstrapMethod} annotations instead */ public static void registerBootstrapMethod(Class runtime, String name) { @@ -131,6 +123,7 @@ public class Linkage { * @throws IllegalArgumentException if there is no such method * @throws IllegalStateException if the caller class's static initializer * has already run, or is already running in another thread + * @deprecated Use @{@link BootstrapMethod} annotations instead */ public static void registerBootstrapMethod(String name) { @@ -142,18 +135,10 @@ public class Linkage { void registerBootstrapMethodLookup(Class callerClass, Class runtime, String name) { Lookup lookup = new Lookup(IMPL_TOKEN, callerClass); MethodHandle bootstrapMethod; - // Try both types. TBD try { - bootstrapMethod = lookup.findStatic(runtime, name, BOOTSTRAP_METHOD_TYPE_2); + bootstrapMethod = lookup.findStatic(runtime, name, BOOTSTRAP_METHOD_TYPE); } catch (NoAccessException ex) { - bootstrapMethod = null; - } - if (bootstrapMethod == null) { - try { - bootstrapMethod = lookup.findStatic(runtime, name, BOOTSTRAP_METHOD_TYPE); - } catch (NoAccessException ex) { - throw new IllegalArgumentException("no such bootstrap method in "+runtime+": "+name, ex); - } + throw new IllegalArgumentException("no such bootstrap method in "+runtime+": "+name, ex); } checkBSM(bootstrapMethod); MethodHandleImpl.registerBootstrap(IMPL_TOKEN, callerClass, bootstrapMethod); @@ -172,6 +157,7 @@ public class Linkage { * and the immediate caller of this method is not in the same * package as the caller class * and a {@link LinkagePermission} check fails for "getBootstrapMethod" + * @deprecated */ public static MethodHandle getBootstrapMethod(Class callerClass) { @@ -188,10 +174,6 @@ public class Linkage { public static final MethodType BOOTSTRAP_METHOD_TYPE = MethodType.methodType(CallSite.class, Class.class, String.class, MethodType.class); - static final MethodType BOOTSTRAP_METHOD_TYPE_2 - = MethodType.methodType(CallSite.class, - Class.class, String.class, MethodType.class, - Annotation[].class); /** * PROVISIONAL API, WORK IN PROGRESS: diff --git a/jdk/src/share/classes/java/dyn/LinkagePermission.java b/jdk/src/share/classes/java/dyn/LinkagePermission.java index 4478d959853..9f1c35e85e0 100644 --- a/jdk/src/share/classes/java/dyn/LinkagePermission.java +++ b/jdk/src/share/classes/java/dyn/LinkagePermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import java.util.Hashtable; import java.util.StringTokenizer; /** + * PROVISIONAL API, WORK IN PROGRESS: * This class is for managing runtime permission checking for * operations performed by methods in the {@link Linkage} class. * Like a {@link RuntimePermission}, on which it is modeled, @@ -52,13 +53,6 @@ import java.util.StringTokenizer; * * * - * registerBootstrapMethod.{class name} - * Specifying a bootstrap method for {@code invokedynamic} instructions within a class of the given name - * An attacker could attempt to attach a bootstrap method to a class which - * has just been loaded, thus gaining control of its {@code invokedynamic} calls. - * - * - * * invalidateAll * Force the relinking of invokedynamic call sites everywhere. * This could allow an attacker to slow down the system, @@ -73,8 +67,9 @@ import java.util.StringTokenizer; * See {@code invalidateAll}. * * + *

    ISSUE: Is this still needed? * - * @see java.security.RuntimePermission + * @see java.lang.RuntimePermission * @see java.lang.SecurityManager * * @author John Rose, JSR 292 EG @@ -84,7 +79,7 @@ public final class LinkagePermission extends BasicPermission { /** * Create a new LinkagePermission with the given name. * The name is the symbolic name of the LinkagePermission, such as - * "registerBootstrapMethod", "invalidateCallerClass.*", etc. An asterisk + * "invalidateCallerClass.*", etc. An asterisk * may appear at the end of the name, following a ".", or by itself, to * signify a wildcard match. * diff --git a/jdk/src/share/classes/java/dyn/MethodHandle.java b/jdk/src/share/classes/java/dyn/MethodHandle.java index 20387ca6859..4904e975306 100644 --- a/jdk/src/share/classes/java/dyn/MethodHandle.java +++ b/jdk/src/share/classes/java/dyn/MethodHandle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,11 +36,13 @@ import static sun.dyn.MemberName.newIllegalArgumentException; // utility /** * A method handle is a typed, directly executable reference to a method, * constructor, field, or similar low-level operation, with optional - * conversion or substitution of arguments or return values. + * transformations of arguments or return values. + * (These transformations include conversion, insertion, deletion, + * substitution. See the methods of this class and of {@link MethodHandles}.) *

    * Method handles are strongly typed according to signature. * They are not distinguished by method name or enclosing class. - * A method handle must be invoked under a signature which exactly matches + * A method handle must be invoked under a signature which matches * the method handle's own {@link MethodType method type}. *

    * Every method handle confesses its type via the {@code type} accessor. @@ -174,9 +176,10 @@ assert(i == 3); * merely a documentation convention. These type parameters do * not play a role in type-checking method handle invocations. *

    - * Note: Like classes and strings, method handles that correspond directly - * to fields and methods can be represented directly as constants to be - * loaded by {@code ldc} bytecodes. + * Like classes and strings, method handles that correspond to accessible + * fields, methods, and constructors can be represented directly + * in a class file's constant pool as constants to be loaded by {@code ldc} bytecodes. + * Loading such a constant causes the component classes of its type to be loaded as necessary. * * @see MethodType * @see MethodHandles @@ -186,6 +189,7 @@ public abstract class MethodHandle // Note: This is an implementation inheritance hack, and will be removed // with a JVM change which moves the required hidden state onto this class. extends MethodHandleImpl + implements MethodHandleProvider { private static Access IMPL_TOKEN = Access.getToken(); @@ -197,7 +201,7 @@ public abstract class MethodHandle * those methods which are signature polymorphic. */ @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD,java.lang.annotation.ElementType.TYPE}) - @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) + @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @interface PolymorphicSignature { } private MethodType type; @@ -274,10 +278,14 @@ public abstract class MethodHandle * and performing simple conversions for arguments and return types. * The signature at the call site of {@code invokeGeneric} must * have the same arity as this method handle's {@code type}. - * The same conversions are allowed on arguments or return values as are supported by - * by {@link MethodHandles#convertArguments}. + *

    * If the call site signature exactly matches this method handle's {@code type}, * the call proceeds as if by {@link #invokeExact}. + *

    + * Otherwise, the call proceeds as if this method handle were first + * adjusted by calling {@link #asType} to adjust this method handle + * to the required type, and then the call proceeds as if by + * {@link #invokeExact} on the adjusted method handle. */ public final native @PolymorphicSignature R invokeGeneric(A... args) throws Throwable; @@ -538,4 +546,10 @@ public abstract class MethodHandle public final MethodHandle bindTo(Object x) { return MethodHandles.insertArguments(this, 0, x); } + + /** Implementation of {@link MethodHandleProvider}, which returns {@code this}. */ + public final MethodHandle asMethodHandle() { return this; } + + /** Implementation of {@link MethodHandleProvider}, which returns {@code this.asType(type)}. */ + public final MethodHandle asMethodHandle(MethodType type) { return this.asType(type); } } diff --git a/jdk/src/share/classes/java/dyn/MethodHandleProvider.java b/jdk/src/share/classes/java/dyn/MethodHandleProvider.java new file mode 100644 index 00000000000..365b605469e --- /dev/null +++ b/jdk/src/share/classes/java/dyn/MethodHandleProvider.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.dyn; + +/** + * An interface for an object to provide a target {@linkplain MethodHandle method handle} to a {@code invokedynamic} instruction. + * There are many function-like objects in various Java APIs. + * This interface provides a standard way for such function-like objects to be bound + * to a dynamic call site, by providing a view of their behavior in the form of a low-level method handle. + *

    + * The type {@link MethodHandle} is a concrete class whose implementation + * hierarchy (if any) may be tightly coupled to the underlying JVM implementation. + * It cannot also serve as a base type for user-defined functional APIs. + * For this reason, {@code MethodHandle} cannot be subclassed to add new + * behavior to method handles. But this interface can be used to provide + * a link between a user-defined function and the {@code invokedynamic} + * instruction and the method handle API. + */ +public interface MethodHandleProvider { + /** Produce a method handle which will serve as a behavioral proxy for the current object. + * The type and invocation behavior of the proxy method handle are user-defined, + * and should have some relation to the intended meaning of the original object itself. + *

    + * The current object may have a changeable behavior. + * For example, {@link CallSite} has a {@code setTarget} method which changes its invocation. + * In such a case, it is incorrect for {@code asMethodHandle} to return + * a method handle whose behavior may diverge from that of the current object. + * Rather, the returned method handle must stably and permanently access + * the behavior of the current object, even if that behavior is changeable. + *

    + * The reference identity of the proxy method handle is not guaranteed to + * have any particular relation to the reference identity of the object. + * In particular, several objects with the same intended meaning could + * share a common method handle, or the same object could return different + * method handles at different times. In the latter case, the different + * method handles should have the same type and invocation behavior, + * and be usable from any thread at any time. + * In particular, if a MethodHandleProvider is bound to an invokedynamic + * call site, the proxy method handle extracted at the time of binding + * will be used for an unlimited time, until the call site is rebound. + *

    + * The type {@link MethodHandle} itself implements {@code MethodHandleProvider}, and + * for this method simply returns {@code this}. + */ + public MethodHandle asMethodHandle(); + + /** Produce a method handle of a given type which will serve as a behavioral proxy for the current object. + * As for the no-argument version {@link #asMethodHandle()}, the invocation behavior of the + * proxy method handle is user-defined. But the type must be the given type, + * or else a {@link WrongMethodTypeException} must be thrown. + *

    + * If the current object somehow represents a variadic or overloaded behavior, + * the method handle returned for a given type might represent only a subset of + * the current object's repertoire of behaviors, which correspond to that type. + */ + public MethodHandle asMethodHandle(MethodType type) throws WrongMethodTypeException; +} diff --git a/jdk/src/share/classes/java/dyn/package-info.java b/jdk/src/share/classes/java/dyn/package-info.java index 7a285b75d22..37555be14b4 100644 --- a/jdk/src/share/classes/java/dyn/package-info.java +++ b/jdk/src/share/classes/java/dyn/package-info.java @@ -40,20 +40,18 @@ * The JVM links any such call (regardless of signature) to a dynamically * typed method handle invocation. In the case of {@code invokeGeneric}, * argument and return value conversions are applied. + *

  • * - *
  • In source code, the class {@link java.dyn.InvokeDynamic} appears to accept + *
  • In source code, the class {@link java.dyn.InvokeDynamic InvokeDynamic} appears to accept * any static method invocation, of any name and any signature. * But instead of emitting * an {@code invokestatic} instruction for such a call, the Java compiler emits * an {@code invokedynamic} instruction with the given name and signature. - * - *
  • When the JVM links an {@code invokedynamic} instruction, it calls the - * {@linkplain java.dyn.Linkage#registerBootstrapMethod(Class, MethodHandle) bootstrap method} - * of the containing class to obtain a {@linkplain java.dyn.CallSite call site} object through which - * the call site will link its target {@linkplain java.dyn.MethodHandle method handle}. + *
  • * *
  • The JVM bytecode format supports immediate constants of - * the classes {@link java.dyn.MethodHandle} and {@link java.dyn.MethodType}. + * the classes {@link java.dyn.MethodHandle MethodHandle} and {@link java.dyn.MethodType MethodType}. + *
  • * * *

    Corresponding JVM bytecode format changes

    @@ -65,18 +63,50 @@ * The first byte is the opcode 186 (hexadecimal {@code BA}). * The next two bytes are a constant pool index (in the same format as for the other {@code invoke} instructions). * The final two bytes are reserved for future use and required to be zero. - * The constant pool reference is to a entry with tag {@code CONSTANT_NameAndType} - * (decimal 12). It is thus not a method reference of any sort, but merely - * the method name, argument types, and return type of the dynamic call site. - * (TBD: The EG is discussing the possibility of a special constant pool entry type, - * so that other information may be added, such as a per-instruction bootstrap - * method and/or annotations.) + * The constant pool reference of an {@code invokedynamic} instruction is to a entry + * with tag {@code CONSTANT_InvokeDynamic} (decimal 17). See below for its format. + * The entry specifies the bootstrap method (a {@link java.dyn.MethodHandle MethodHandle} constant), + * the dynamic invocation name, and the argument types and return type of the call. + *

    + * Each instance of an {@code invokedynamic} instruction is called a dynamic call site. + * Multiple instances of an {@code invokedynamic} instruction can share a single + * {@code CONSTANT_InvokeDynamic} entry. + * In any case, distinct call sites always have distinct linkage state. + *

    + * Moreover, for the purpose of distinguishing dynamic call sites, + * the JVM is allowed (but not required) to make internal copies + * of {@code invokedynamic} instructions, each one + * constituting a separate dynamic call site with its own linkage state. + * Such copying, if it occurs, cannot be observed except indirectly via + * execution of bootstrap methods and target methods. + *

    + * A dynamic call site is originally in an unlinked state. In this state, there is + * no target method for the call site to invoke. + * A dynamic call site is linked by means of a bootstrap method, + * as described below. + *

    + * (Historic Note: Some older JVMs may allow the index of a {@code CONSTANT_NameAndType} + * instead of a {@code CONSTANT_InvokeDynamic}. In earlier, obsolete versions of this API, the + * bootstrap method was specified dynamically, in a per-class basis, during class initialization.) + * + *

    constant pool entries for {@code invokedynamic} instructions

    + * If a constant pool entry has the tag {@code CONSTANT_InvokeDynamic} (decimal 17), + * it must contain exactly four more bytes. + * The first two bytes after the tag must be an index to a {@code CONSTANT_MethodHandle} + * entry, and the second two bytes must be an index to a {@code CONSTANT_NameAndType}. + * The first index specifies a bootstrap method used by the associated dynamic call sites. + * The second index specifies the method name, argument types, and return type of the dynamic call site. + * The structure of such an entry is therefore analogous to a {@code CONSTANT_Methodref}, + * except that the {@code CONSTANT_Class} reference in a {@code CONSTANT_Methodref} entry + * is replaced by a bootstrap method reference. * *

    constant pool entries for {@code MethodType}s

    * If a constant pool entry has the tag {@code CONSTANT_MethodType} (decimal 16), - * it must contain exactly two more bytes, which are an index to a {@code CONSTANT_Utf8} - * entry which represents a method type signature. The JVM will ensure that on first - * execution of an {@code ldc} instruction for this entry, a {@link java.dyn.MethodType} + * it must contain exactly two more bytes, which must be an index to a {@code CONSTANT_Utf8} + * entry which represents a method type signature. + *

    + * The JVM will ensure that on first + * execution of an {@code ldc} instruction for this entry, a {@link java.dyn.MethodType MethodType} * will be created which represents the signature. * Any classes mentioned in the {@code MethodType} will be loaded if necessary, * but not initialized. @@ -86,12 +116,15 @@ *

    constant pool entries for {@code MethodHandle}s

    * If a constant pool entry has the tag {@code CONSTANT_MethodHandle} (decimal 15), * it must contain exactly three more bytes. The first byte after the tag is a subtag - * value in the range 1 through 9, and the last two are an index to a + * value which must be in the range 1 through 9, and the last two must be an index to a * {@code CONSTANT_Fieldref}, {@code CONSTANT_Methodref}, or * {@code CONSTANT_InterfaceMethodref} entry which represents a field or method * for which a method handle is to be created. + * Furthermore, the subtag value and the type of the constant index value + * must agree according to the table below. + *

    * The JVM will ensure that on first execution of an {@code ldc} instruction - * for this entry, a {@link java.dyn.MethodHandle} will be created which represents + * for this entry, a {@link java.dyn.MethodHandle MethodHandle} will be created which represents * the field or method reference, according to the specific mode implied by the subtag. *

    * As with {@code CONSTANT_Class} and {@code CONSTANT_MethodType} constants, @@ -126,6 +159,129 @@ * Method handles for subtags {@code REF_getStatic}, {@code REF_putStatic}, and {@code REF_invokeStatic} * may force class initialization on their first invocation, just like the corresponding bytecodes. * + *

    Bootstrap Methods

    + * Before the JVM can execute a dynamic call site (an {@code invokedynamic} instruction), + * the call site must first be linked. + * Linking is accomplished by calling a bootstrap method + * which is given the static information content of the call site, + * and which must produce a {@link java.dyn.MethodHandle method handle} + * that gives the behavior of the call site. + *

    + * Each {@code invokedynamic} instruction statically specifies its own + * bootstrap method as a constant pool reference. + * The constant pool reference also specifies the call site's name and type signature, + * just like {@code invokevirtual} and the other invoke instructions. + *

    + * Linking starts with resolving the constant pool entry for the + * bootstrap method, and resolving a {@link java.dyn.MethodType MethodType} object for + * the type signature of the dynamic call site. + * This resolution process may trigger class loading. + * It may therefore throw an error if a class fails to load. + * This error becomes the abnormal termination of the dynamic + * call site execution. + * Linkage does not trigger class initialization. + *

    + * Next, the bootstrap method call is started, with four values being stacked: + *

      + *
    • a {@code MethodHandle}, the resolved bootstrap method itself
    • + *
    • a {@code Class}, the caller class in which dynamic call site occurs
    • + *
    • a {@code String}, the method name mentioned in the call site
    • + *
    • a {@code MethodType}, the resolved type signature of the call
    • + *
    + * The method handle is then applied to the other values as if by + * {@linkplain java.dyn.MethodHandle#invokeGeneric the invokeGeneric method}. + * The returned result must be a {@link java.dyn.CallSite CallSite}, a {@link java.dyn.MethodHandle MethodHandle}, + * or another {@link java.dyn.MethodHandleProvider MethodHandleProvider} value. + * The method {@linkplain java.dyn.MethodHandleProvider#asMethodHandle asMethodHandle} + * is then called on the returned value. The result of that second + * call is the {@code MethodHandle} which becomes the + * permanent binding for the dynamic call site. + * That method handle's type must be exactly equal to the type + * derived from the dynamic call site signature and passed to + * the bootstrap method. + *

    + * After resolution, the linkage process may fail in a variety of ways. + * All failures are reported by an {@link java.dyn.InvokeDynamicBootstrapError InvokeDynamicBootstrapError}, + * which is thrown as the abnormal termination of the dynamic call + * site execution. + * The following circumstances will cause this: + *

      + *
    • the bootstrap method invocation completes abnormally
    • + *
    • the result from the bootstrap invocation is not a reference to + * an object of type {@link java.dyn.MethodHandleProvider MethodHandleProvider}
    • + *
    • the call to {@code asMethodHandle} completes abnormally
    • + *
    • the call to {@code asMethodHandle} fails to return a reference to + * an object of type {@link java.dyn.MethodHandle MethodHandle}
    • + *
    • the method handle produced by {@code asMethodHandle} does not have + * the expected {@code MethodType}
    • + *
    + *

    timing of linkage

    + * A dynamic call site is linked just before its first execution. + * The bootstrap method call implementing the linkage occurs within + * a thread that is attempting a first execution. + *

    + * If there are several such threads, the JVM picks one thread + * and runs the bootstrap method while the others wait for the + * invocation to terminate normally or abnormally. + *

    + * After a bootstrap method is called and a method handle target + * successfully extracted, the JVM attempts to link the instruction + * being executed to the target method handle. + * This may fail if there has been intervening linkage + * or invalidation event for the same instruction. + * If such a failure occurs, the dynamic call site must be + * re-executed from the beginning, either re-linking it + * (if it has been invalidated) or invoking the target + * (if it the instruction has been linked by some other means). + *

    + * If the instruction is linked successfully, the target method + * handle is invoked to complete the instruction execution. + * The state of linkage continues until the method containing the + * dynamic call site is garbage collected, or the dynamic call site + * is invalidated by an explicit request, + * such as {@link java.dyn.Linkage#invalidateCallerClass Linkage.invalidateCallerClass}. + *

    + * In an application which requires dynamic call sites with individually + * mutable behaviors, their bootstrap methods should produce distinct + * {@link java.dyn.CallSite CallSite} objects, one for each linkage request. + *

    + * If a class containing {@code invokedynamic} instructions + * is {@linkplain java.dyn.Linkage#invalidateCallerClass(Class) invalidated}, + * subsequent execution of those {@code invokedynamic} instructions + * will require linking. + * It is as if they had never been executed in the first place. + * (However, invalidation does not cause constant pool entries to be + * resolved a second time.) + *

    + * Invalidation events and bootstrap method calls for a particular + * dynamic call site are globally ordered relative to each other. + * When an invokedynamic instruction is invalidated, if there is + * simultaneously a bootstrap method invocation in process + * (in the same thread or a different thread), the result + * eventually returned must not be used to link the call site. + * Put another way, when a call site is invalidated, its + * subsequent linkage (if any) must be performed by a bootstrap method + * call initiated after the invalidation occurred. + *

    + * If several threads simultaneously execute a bootstrap method for a single dynamic + * call site, the JVM must choose one target object and installs it visibly to + * all threads. Any other bootstrap method calls are allowed to complete, but their + * results are ignored, and their dynamic call site invocations proceed with the originally + * chosen target object. + *

    + * The JVM is free to duplicate dynamic call sites. + * This means that, even if a class contains just one {@code invokedynamic} + * instruction, its bootstrap method may be executed several times, + * once for each duplicate. Thus, bootstrap method code should not + * assume an exclusive one-to-one correspondence between particular occurrences + * of {@code invokedynamic} bytecodes in class files and linkage events. + *

    + * In principle, each individual execution of an {@code invokedynamic} + * instruction could be deemed (by a conforming implementation) to be a separate + * duplicate, requiring its own execution of the bootstrap method. + * However, implementations are expected to perform code duplication + * (if at all) in order to improve performance, not make it worse. + * * @author John Rose, JSR 292 EG */ diff --git a/jdk/src/share/classes/sun/dyn/CallSiteImpl.java b/jdk/src/share/classes/sun/dyn/CallSiteImpl.java index 2e02e74ebd0..90d004b6b1a 100644 --- a/jdk/src/share/classes/sun/dyn/CallSiteImpl.java +++ b/jdk/src/share/classes/sun/dyn/CallSiteImpl.java @@ -49,18 +49,21 @@ public class CallSiteImpl { } CallSite site; try { - if (bootstrapMethod.type().parameterCount() == 3) - site = bootstrapMethod.invokeExact(caller, name, type); - else if (bootstrapMethod.type().parameterCount() == 4) - site = bootstrapMethod.invokeExact(caller, name, type, - !(info instanceof java.lang.annotation.Annotation[]) ? null - : (java.lang.annotation.Annotation[]) info); + Object binding; + if (false) // switch when invokeGeneric works + binding = bootstrapMethod.invokeGeneric(caller, name, type); else - throw new InternalError("bad BSM: "+bootstrapMethod); - if (!(site instanceof CallSite)) - throw new InvokeDynamicBootstrapError("class bootstrap method failed to create a call site: "+caller); - PRIVATE_INITIALIZE_CALL_SITE.invokeExact(site, - name, type, + binding = bootstrapMethod.invokeVarargs(new Object[]{ caller, name, type }); + //System.out.println("BSM for "+name+type+" => "+binding); + if (binding instanceof CallSite) { + site = (CallSite) binding; + } else if (binding instanceof MethodHandleProvider) { + MethodHandle target = ((MethodHandleProvider) binding).asMethodHandle(); + site = new ConstantCallSite(target); + } else { + throw new ClassCastException("bootstrap method failed to produce a MethodHandle or CallSite"); + } + PRIVATE_INITIALIZE_CALL_SITE.invokeExact(site, name, type, callerMethod, callerBCI); assert(site.getTarget() != null); assert(site.getTarget().type().equals(type)); diff --git a/jdk/test/java/dyn/MethodHandlesTest.java b/jdk/test/java/dyn/MethodHandlesTest.java index 3b33cef0e01..a4c2ec88023 100644 --- a/jdk/test/java/dyn/MethodHandlesTest.java +++ b/jdk/test/java/dyn/MethodHandlesTest.java @@ -1327,7 +1327,8 @@ public class MethodHandlesTest { MethodHandle result = MethodHandles.spreadArguments(target2, newType); Object[] returnValue; if (pos == 0) { - returnValue = (Object[]) result.invokeExact(args); + Object rawRetVal = result.invokeExact(args); + returnValue = (Object[]) rawRetVal; } else { Object[] args1 = Arrays.copyOfRange(args, 0, pos+1); args1[pos] = Arrays.copyOfRange(args, pos, args.length); From 6fbfeff4e2091dcabf40c6beb80b7317796ab446 Mon Sep 17 00:00:00 2001 From: John R Rose Date: Wed, 8 Sep 2010 18:40:23 -0700 Subject: [PATCH 011/722] 6980096: JSR 292 reflective lookup should throw checked exceptions Make NoAccessException be a checked exception. Also remove JavaMethodHandle. Reviewed-by: twisti --- jdk/src/share/classes/java/dyn/CallSite.java | 16 ++- .../share/classes/java/dyn/MethodHandles.java | 95 ++++++++----- .../share/classes/java/dyn/MethodType.java | 36 +++-- .../classes/java/dyn/NoAccessException.java | 2 +- .../classes/sun/dyn/BoundMethodHandle.java | 51 ------- .../share/classes/sun/dyn/CallSiteImpl.java | 10 +- .../share/classes/sun/dyn/FilterGeneric.java | 10 +- .../classes/sun/dyn/FilterOneArgument.java | 17 ++- .../share/classes/sun/dyn/FromGeneric.java | 12 +- jdk/src/share/classes/sun/dyn/Invokers.java | 12 +- .../{java => sun}/dyn/JavaMethodHandle.java | 69 +--------- jdk/src/share/classes/sun/dyn/MemberName.java | 7 +- .../classes/sun/dyn/MethodHandleImpl.java | 39 +++--- .../classes/sun/dyn/MethodHandleNatives.java | 34 +++-- .../share/classes/sun/dyn/SpreadGeneric.java | 6 +- jdk/src/share/classes/sun/dyn/ToGeneric.java | 6 +- .../sun/dyn/util/ValueConversions.java | 46 +++++-- jdk/test/java/dyn/JavaDocExamples.java | 128 ++++++++++++++++++ jdk/test/java/dyn/MethodHandlesTest.java | 57 +++++--- 19 files changed, 379 insertions(+), 274 deletions(-) rename jdk/src/share/classes/{java => sun}/dyn/JavaMethodHandle.java (71%) create mode 100644 jdk/test/java/dyn/JavaDocExamples.java diff --git a/jdk/src/share/classes/java/dyn/CallSite.java b/jdk/src/share/classes/java/dyn/CallSite.java index c3b7962911f..7c4ed52ea68 100644 --- a/jdk/src/share/classes/java/dyn/CallSite.java +++ b/jdk/src/share/classes/java/dyn/CallSite.java @@ -273,15 +273,19 @@ public class CallSite public final MethodHandle dynamicInvoker() { if (this instanceof ConstantCallSite) return getTarget(); // will not change dynamically - MethodHandle getCSTarget = GET_TARGET; - if (getCSTarget == null) - GET_TARGET = getCSTarget = MethodHandles.Lookup.IMPL_LOOKUP. - findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); - MethodHandle getTarget = MethodHandleImpl.bindReceiver(IMPL_TOKEN, getCSTarget, this); + MethodHandle getTarget = MethodHandleImpl.bindReceiver(IMPL_TOKEN, GET_TARGET, this); MethodHandle invoker = MethodHandles.exactInvoker(this.type()); return MethodHandles.foldArguments(invoker, getTarget); } - private static MethodHandle GET_TARGET = null; // link this lazily, not eagerly + private static final MethodHandle GET_TARGET; + static { + try { + GET_TARGET = MethodHandles.Lookup.IMPL_LOOKUP. + findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); + } catch (NoAccessException ignore) { + throw new InternalError(); + } + } /** Implementation of {@link MethodHandleProvider} which returns {@code this.dynamicInvoker()}. */ public final MethodHandle asMethodHandle() { return dynamicInvoker(); } diff --git a/jdk/src/share/classes/java/dyn/MethodHandles.java b/jdk/src/share/classes/java/dyn/MethodHandles.java index ac35f88e143..957d1c18af6 100644 --- a/jdk/src/share/classes/java/dyn/MethodHandles.java +++ b/jdk/src/share/classes/java/dyn/MethodHandles.java @@ -81,6 +81,14 @@ public class MethodHandles { * Return a {@link Lookup lookup object} which is trusted minimally. * It can only be used to create method handles to * publicly accessible fields and methods. + *

    + * As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class} + * of this lookup object will be {@link java.lang.Object}. + *

    + * The lookup class can be changed to any other class {@code C} using an expression of the form + * {@linkplain Lookup#in publicLookup().in(C.class)}. + * Since all classes have equal access to public names, + * such a change would confer no new access rights. */ public static Lookup publicLookup() { return Lookup.PUBLIC_LOOKUP; @@ -90,9 +98,10 @@ public class MethodHandles { * A lookup object is a factory for creating method handles, * when the creation requires access checking. * Method handles do not perform - * access checks when they are called; this is a major difference + * access checks when they are called, but rather when they are created. + * (This is a major difference * from reflective {@link Method}, which performs access checking - * against every caller, on every call. + * against every caller, on every call.) * Therefore, method handle access * restrictions must be enforced when a method handle is created. * The caller class against which those restrictions are enforced @@ -107,7 +116,7 @@ public class MethodHandles { * It may then use this factory to create method handles on * all of its methods, including private ones. * It may also delegate the lookup (e.g., to a metaobject protocol) - * by passing the {@code Lookup} object to other code. + * by passing the lookup object to other code. * If this other code creates method handles, they will be access * checked against the original lookup class, and not with any higher * privileges. @@ -125,23 +134,28 @@ public class MethodHandles { * It can also fail if a security manager is installed and refuses * access. In any of these cases, an exception will be * thrown from the attempted lookup. + *

    * In general, the conditions under which a method handle may be * created for a method {@code M} are exactly as restrictive as the conditions * under which the lookup class could have compiled a call to {@code M}. - * At least some of these error conditions are likely to be - * represented by checked exceptions in the final version of this API. + * This rule is applied even if the Java compiler might have created + * an wrapper method to access a private method of another class + * in the same top-level declaration. + * For example, a lookup object created for a nested class {@code C.D} + * can access private members within other related classes such as + * {@code C}, {@code C.D.E}, or {@code C.B}. */ public static final class Lookup { /** The class on behalf of whom the lookup is being performed. */ private final Class lookupClass; - /** The allowed sorts of members which may be looked up (public, etc.), with STRICT for package. */ + /** The allowed sorts of members which may be looked up (public, etc.), with STATIC for package. */ private final int allowedModes; private static final int PUBLIC = Modifier.PUBLIC, - PACKAGE = Modifier.STRICT, + PACKAGE = Modifier.STATIC, PROTECTED = Modifier.PROTECTED, PRIVATE = Modifier.PRIVATE, ALL_MODES = (PUBLIC | PACKAGE | PROTECTED | PRIVATE), @@ -155,8 +169,10 @@ public class MethodHandles { /** Which class is performing the lookup? It is this class against * which checks are performed for visibility and access permissions. *

    - * This value is null if and only if this lookup was produced - * by {@link MethodHandles#publicLookup}. + * The class implies a maximum level of access permission, + * but the permissions may be additionally limited by the bitmask + * {@link #lookupModes}, which controls whether non-public members + * can be accessed. */ public Class lookupClass() { return lookupClass; @@ -168,10 +184,15 @@ public class MethodHandles { } /** Which types of members can this lookup object produce? - * The result is a bit-mask of the modifier bits PUBLIC, PROTECTED, PRIVATE, and STRICT. - * The modifier bit STRICT stands in for the (non-existent) package protection mode. + * The result is a bit-mask of the {@link Modifier} bits + * {@linkplain Modifier#PUBLIC PUBLIC (0x01)}, + * {@linkplain Modifier#PROTECTED PROTECTED (0x02)}, + * {@linkplain Modifier#PRIVATE PRIVATE (0x04)}, + * and {@linkplain Modifier#STATIC STATIC (0x08)}. + * The modifier bit {@code STATIC} stands in for the package protection mode, + * which does not have an explicit modifier bit. */ - int lookupModes() { + public int lookupModes() { return allowedModes & ALL_MODES; } @@ -621,32 +642,32 @@ public class MethodHandles { /// Helper methods, all package-private. - MemberName resolveOrFail(Class refc, String name, Class type, boolean isStatic) { + MemberName resolveOrFail(Class refc, String name, Class type, boolean isStatic) throws NoAccessException { checkSymbolicClass(refc); // do this before attempting to resolve int mods = (isStatic ? Modifier.STATIC : 0); return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), true, lookupClassOrNull()); } - MemberName resolveOrFail(Class refc, String name, MethodType type, boolean isStatic) { + MemberName resolveOrFail(Class refc, String name, MethodType type, boolean isStatic) throws NoAccessException { checkSymbolicClass(refc); // do this before attempting to resolve int mods = (isStatic ? Modifier.STATIC : 0); return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), true, lookupClassOrNull()); } MemberName resolveOrFail(Class refc, String name, MethodType type, boolean isStatic, - boolean searchSupers, Class specialCaller) { + boolean searchSupers, Class specialCaller) throws NoAccessException { checkSymbolicClass(refc); // do this before attempting to resolve int mods = (isStatic ? Modifier.STATIC : 0); return IMPL_NAMES.resolveOrFail(new MemberName(refc, name, type, mods), searchSupers, specialCaller); } - void checkSymbolicClass(Class refc) { + void checkSymbolicClass(Class refc) throws NoAccessException { Class caller = lookupClassOrNull(); if (caller != null && !VerifyAccess.isClassAccessible(refc, caller)) throw newNoAccessException("symbolic reference class is not public", new MemberName(refc), caller); } - void checkMethod(Class refc, MemberName m, boolean wantStatic) { + void checkMethod(Class refc, MemberName m, boolean wantStatic) throws NoAccessException { String message; if (m.isConstructor()) message = "expected a method, not a constructor"; @@ -659,7 +680,7 @@ public class MethodHandles { throw newNoAccessException(message, m, lookupClass()); } - void checkAccess(Class refc, MemberName m) { + void checkAccess(Class refc, MemberName m) throws NoAccessException { int allowedModes = this.allowedModes; if (allowedModes == TRUSTED) return; int mods = m.getModifiers(); @@ -695,14 +716,14 @@ public class MethodHandles { return "member is private to package"; } - void checkSpecialCaller(Class specialCaller) { + void checkSpecialCaller(Class specialCaller) throws NoAccessException { if (allowedModes == TRUSTED) return; if (!VerifyAccess.isSamePackageMember(specialCaller, lookupClass())) throw newNoAccessException("no private access for invokespecial", new MemberName(specialCaller), lookupClass()); } - MethodHandle restrictProtectedReceiver(MemberName method, MethodHandle mh) { + MethodHandle restrictProtectedReceiver(MemberName method, MethodHandle mh) throws NoAccessException { // The accessing class only has the right to use a protected member // on itself or a subclass. Enforce that restriction, from JVMS 5.4.4, etc. if (!method.isProtected() || method.isStatic() @@ -712,7 +733,7 @@ public class MethodHandles { else return restrictReceiver(method, mh, lookupClass()); } - MethodHandle restrictReceiver(MemberName method, MethodHandle mh, Class caller) { + MethodHandle restrictReceiver(MemberName method, MethodHandle mh, Class caller) throws NoAccessException { assert(!method.isStatic()); Class defc = method.getDeclaringClass(); // receiver type of mh is too wide if (defc.isInterface() || !defc.isAssignableFrom(caller)) { @@ -898,11 +919,16 @@ public class MethodHandles { * @return a method handle which always invokes the call site's target */ public static - MethodHandle dynamicInvoker(CallSite site) { + MethodHandle dynamicInvoker(CallSite site) throws NoAccessException { MethodHandle getCSTarget = GET_TARGET; - if (getCSTarget == null) - GET_TARGET = getCSTarget = Lookup.IMPL_LOOKUP. - findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); + if (getCSTarget == null) { + try { + GET_TARGET = getCSTarget = Lookup.IMPL_LOOKUP. + findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class)); + } catch (NoAccessException ex) { + throw new InternalError(); + } + } MethodHandle getTarget = MethodHandleImpl.bindReceiver(IMPL_TOKEN, getCSTarget, site); MethodHandle invoker = exactInvoker(site.type()); return foldArguments(invoker, getTarget); @@ -1260,17 +1286,20 @@ public class MethodHandles { *

    * Example: *

    -     *   MethodHandle cat = MethodHandles.lookup().
    -     *     findVirtual(String.class, "concat", String.class, String.class);
    -     *   System.out.println(cat.<String>invokeExact("x", "y")); // xy
    +     *   import static java.dyn.MethodHandles.*;
    +     *   import static java.dyn.MethodType.*;
    +     *   ...
    +     *   MethodHandle cat = lookup().findVirtual(String.class,
    +     *     "concat", methodType(String.class, String.class));
    +     *   System.out.println((String) cat.invokeExact("x", "y")); // xy
          *   MethodHandle d0 = dropArguments(cat, 0, String.class);
    -     *   System.out.println(d0.<String>invokeExact("x", "y", "z")); // xy
    +     *   System.out.println((String) d0.invokeExact("x", "y", "z")); // yz
          *   MethodHandle d1 = dropArguments(cat, 1, String.class);
    -     *   System.out.println(d1.<String>invokeExact("x", "y", "z")); // xz
    +     *   System.out.println((String) d1.invokeExact("x", "y", "z")); // xz
          *   MethodHandle d2 = dropArguments(cat, 2, String.class);
    -     *   System.out.println(d2.<String>invokeExact("x", "y", "z")); // yz
    -     *   MethodHandle d12 = dropArguments(cat, 1, String.class, String.class);
    -     *   System.out.println(d12.<String>invokeExact("w", "x", "y", "z")); // wz
    +     *   System.out.println((String) d2.invokeExact("x", "y", "z")); // xy
    +     *   MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
    +     *   System.out.println((String) d12.invokeExact("x", 12, true, "z")); // xz
          * 
    * @param target the method handle to invoke after the argument is dropped * @param valueTypes the type(s) of the argument to drop diff --git a/jdk/src/share/classes/java/dyn/MethodType.java b/jdk/src/share/classes/java/dyn/MethodType.java index c9001bd25a6..e7e948bdb7e 100644 --- a/jdk/src/share/classes/java/dyn/MethodType.java +++ b/jdk/src/share/classes/java/dyn/MethodType.java @@ -40,24 +40,37 @@ import static sun.dyn.MemberName.newIllegalArgumentException; * returned by a method handle, or the arguments and return type passed * and expected by a method handle caller. Method types must be properly * matched between a method handle and all its callers, - * and the JVM's operations enforce this matching at all times. + * and the JVM's operations enforce this matching at, specifically + * during calls to {@link MethodHandle#invokeExact} + * and {@link MethodHandle#invokeGeneric}, and during execution + * of {@code invokedynamic} instructions. *

    * The structure is a return type accompanied by any number of parameter types. - * The types (primitive, void, and reference) are represented by Class objects. + * The types (primitive, {@code void}, and reference) are represented by {@link Class} objects. + * (For ease of exposition, we treat {@code void} as if it were a type. + * In fact, it denotes the absence of a return type.) *

    - * All instances of MethodType are immutable. + * All instances of {@code MethodType} are immutable. * Two instances are completely interchangeable if they compare equal. * Equality depends on pairwise correspondence of the return and parameter types and on nothing else. *

    * This type can be created only by factory methods. * All factory methods may cache values, though caching is not guaranteed. *

    - * Note: Like classes and strings, method types can be represented directly - * as constants to be loaded by {@code ldc} bytecodes. + * {@code MethodType} objects are sometimes derived from bytecode instructions + * such as {@code invokedynamic}, specifically from the type descriptor strings associated + * with the instructions in a class file's constant pool. + * When this occurs, any classes named in the descriptor strings must be loaded. + * (But they need not be initialized.) + * This loading may occur at any time before the {@code MethodType} object is first derived. + *

    + * Like classes and strings, method types can be represented directly + * in a class file's constant pool as constants to be loaded by {@code ldc} bytecodes. + * Loading such a constant causes its component classes to be loaded as necessary. * @author John Rose, JSR 292 EG */ public final -class MethodType { +class MethodType implements java.lang.reflect.Type { private final Class rtype; private final Class[] ptypes; private MethodTypeForm form; // erased form, plus cached data about primitives @@ -636,11 +649,11 @@ class MethodType { /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}. * Find or create an instance of the given method type. - * Any class or interface name embedded in the signature string + * Any class or interface name embedded in the descriptor string * will be resolved by calling {@link ClassLoader#loadClass(java.lang.String)} * on the given loader (or if it is null, on the system class loader). *

    - * Note that it is possible to build method types which cannot be + * Note that it is possible to encounter method types which cannot be * constructed by this method, because their component types are * not all reachable from a common class loader. *

    @@ -662,8 +675,11 @@ class MethodType { } /** - * Create a bytecode signature representation of the type. - * Note that this is not a strict inverse of + * Create a bytecode descriptor representation of the method type. + *

    + * Note that this is not a strict inverse of {@link #fromMethodDescriptorString}. + * Two distinct classes which share a common name but have different class loaders + * will appear identical when viewed within descriptor strings. *

    * This method is included for the benfit of applications that must * generate bytecodes that process method handles and invokedynamic. diff --git a/jdk/src/share/classes/java/dyn/NoAccessException.java b/jdk/src/share/classes/java/dyn/NoAccessException.java index 5e76f6a4aae..d8a18625401 100644 --- a/jdk/src/share/classes/java/dyn/NoAccessException.java +++ b/jdk/src/share/classes/java/dyn/NoAccessException.java @@ -36,7 +36,7 @@ package java.dyn; * at the time of creation. * @author John Rose, JSR 292 EG */ -public class NoAccessException extends RuntimeException { +public class NoAccessException extends ReflectiveOperationException { /** * Constructs a {@code NoAccessException} with no detail message. */ diff --git a/jdk/src/share/classes/sun/dyn/BoundMethodHandle.java b/jdk/src/share/classes/sun/dyn/BoundMethodHandle.java index 5152187229e..f2ae32efbc9 100644 --- a/jdk/src/share/classes/sun/dyn/BoundMethodHandle.java +++ b/jdk/src/share/classes/sun/dyn/BoundMethodHandle.java @@ -48,8 +48,6 @@ public class BoundMethodHandle extends MethodHandle { private static final MemberName.Factory IMPL_NAMES = MemberName.getFactory(IMPL_TOKEN); // Constructors in this class *must* be package scoped or private. - // Exception: JavaMethodHandle constructors are protected. - // (The link between JMH and BMH is temporary.) /** Bind a direct MH to its receiver (or first ref. argument). * The JVM will pre-dispatch the MH if it is not already static. @@ -122,55 +120,6 @@ public class BoundMethodHandle extends MethodHandle { assert(this instanceof JavaMethodHandle); } - /** Initialize the current object as a Java method handle. - */ - protected BoundMethodHandle(String entryPointName, MethodType type, boolean matchArity) { - super(Access.TOKEN, null); - MethodHandle entryPoint - = findJavaMethodHandleEntryPoint(this.getClass(), - entryPointName, type, matchArity); - MethodHandleImpl.initType(this, entryPoint.type().dropParameterTypes(0, 1)); - this.argument = this; // kludge; get rid of - this.vmargslot = this.type().parameterSlotDepth(0); - initTarget(entryPoint, 0); - assert(this instanceof JavaMethodHandle); - } - - private static - MethodHandle findJavaMethodHandleEntryPoint(Class caller, - String name, - MethodType type, - boolean matchArity) { - if (matchArity) type.getClass(); // elicit NPE - List methods = IMPL_NAMES.getMethods(caller, true, name, null, caller); - MethodType foundType = null; - MemberName foundMethod = null; - for (MemberName method : methods) { - if (method.getDeclaringClass() == MethodHandle.class) - continue; // ignore methods inherited from MH class itself - MethodType mtype = method.getMethodType(); - if (type != null && type.parameterCount() != mtype.parameterCount()) - continue; - else if (foundType == null) - foundType = mtype; - else if (foundType != mtype) - throw newIllegalArgumentException("more than one method named "+name+" in "+caller.getName()); - // discard overrides - if (foundMethod == null) - foundMethod = method; - else if (foundMethod.getDeclaringClass().isAssignableFrom(method.getDeclaringClass())) - foundMethod = method; - } - if (foundMethod == null) - throw newIllegalArgumentException("no method named "+name+" in "+caller.getName()); - MethodHandle entryPoint = MethodHandleImpl.findMethod(IMPL_TOKEN, foundMethod, true, caller); - if (type != null) { - MethodType epType = type.insertParameterTypes(0, entryPoint.type().parameterType(0)); - entryPoint = MethodHandles.convertArguments(entryPoint, epType); - } - return entryPoint; - } - /** Make sure the given {@code argument} can be used as {@code argnum}-th * parameter of the given method handle {@code mh}, which must be a reference. *

    diff --git a/jdk/src/share/classes/sun/dyn/CallSiteImpl.java b/jdk/src/share/classes/sun/dyn/CallSiteImpl.java index 90d004b6b1a..f7c2d7099a7 100644 --- a/jdk/src/share/classes/sun/dyn/CallSiteImpl.java +++ b/jdk/src/share/classes/sun/dyn/CallSiteImpl.java @@ -26,6 +26,7 @@ package sun.dyn; import java.dyn.*; +import static sun.dyn.MemberName.uncaughtException; /** * Parts of CallSite known to the JVM. @@ -80,11 +81,18 @@ public class CallSiteImpl { // This method is private in CallSite because it touches private fields in CallSite. // These private fields (vmmethod, vmindex) are specific to the JVM. - private static final MethodHandle PRIVATE_INITIALIZE_CALL_SITE = + private static final MethodHandle PRIVATE_INITIALIZE_CALL_SITE; + static { + try { + PRIVATE_INITIALIZE_CALL_SITE = MethodHandleImpl.IMPL_LOOKUP.findVirtual(CallSite.class, "initializeFromJVM", MethodType.methodType(void.class, String.class, MethodType.class, MemberName.class, int.class)); + } catch (NoAccessException ex) { + throw uncaughtException(ex); + } + } public static void setCallSiteTarget(Access token, CallSite site, MethodHandle target) { Access.check(token); diff --git a/jdk/src/share/classes/sun/dyn/FilterGeneric.java b/jdk/src/share/classes/sun/dyn/FilterGeneric.java index 21540e6647e..1e7b594dd93 100644 --- a/jdk/src/share/classes/sun/dyn/FilterGeneric.java +++ b/jdk/src/share/classes/sun/dyn/FilterGeneric.java @@ -25,12 +25,8 @@ package sun.dyn; -import java.dyn.JavaMethodHandle; -import java.dyn.MethodHandle; -import java.dyn.MethodType; -import java.dyn.NoAccessException; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; +import java.dyn.*; +import java.lang.reflect.*; import static sun.dyn.MemberName.newIllegalArgumentException; /** @@ -119,7 +115,7 @@ class FilterGeneric { static MethodHandle make(Kind kind, int pos, MethodHandle filter, MethodHandle target) { FilterGeneric fgen = of(kind, pos, filter.type(), target.type()); - return fgen.makeInstance(kind, pos, filter, target); + return fgen.makeInstance(kind, pos, filter, target).asMethodHandle(); } /** Return the adapter information for this target and filter type. */ diff --git a/jdk/src/share/classes/sun/dyn/FilterOneArgument.java b/jdk/src/share/classes/sun/dyn/FilterOneArgument.java index 354694f49a4..cc8ecf66d19 100644 --- a/jdk/src/share/classes/sun/dyn/FilterOneArgument.java +++ b/jdk/src/share/classes/sun/dyn/FilterOneArgument.java @@ -25,9 +25,8 @@ package sun.dyn; -import java.dyn.JavaMethodHandle; -import java.dyn.MethodHandle; -import java.dyn.MethodType; +import java.dyn.*; +import static sun.dyn.MemberName.uncaughtException; /** * Unary function composition, useful for many small plumbing jobs. @@ -51,8 +50,16 @@ public class FilterOneArgument extends JavaMethodHandle { return target.invokeExact(filteredArgument); } - private static final MethodHandle INVOKE = - MethodHandleImpl.IMPL_LOOKUP.findVirtual(FilterOneArgument.class, "invoke", MethodType.genericMethodType(1)); + private static final MethodHandle INVOKE; + static { + try { + INVOKE = + MethodHandleImpl.IMPL_LOOKUP.findVirtual(FilterOneArgument.class, "invoke", + MethodType.genericMethodType(1)); + } catch (NoAccessException ex) { + throw uncaughtException(ex); + } + } protected FilterOneArgument(MethodHandle filter, MethodHandle target) { super(INVOKE); diff --git a/jdk/src/share/classes/sun/dyn/FromGeneric.java b/jdk/src/share/classes/sun/dyn/FromGeneric.java index f4a1969f8ff..24f40c0c1ac 100644 --- a/jdk/src/share/classes/sun/dyn/FromGeneric.java +++ b/jdk/src/share/classes/sun/dyn/FromGeneric.java @@ -25,15 +25,9 @@ package sun.dyn; -import java.dyn.JavaMethodHandle; -import java.dyn.MethodHandle; -import java.dyn.MethodHandles; -import java.dyn.MethodType; -import java.dyn.NoAccessException; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import sun.dyn.util.ValueConversions; -import sun.dyn.util.Wrapper; +import java.dyn.*; +import java.lang.reflect.*; +import sun.dyn.util.*; /** * Adapters which mediate between incoming calls which are generic diff --git a/jdk/src/share/classes/sun/dyn/Invokers.java b/jdk/src/share/classes/sun/dyn/Invokers.java index 6af2ac6b171..b3d2823d024 100644 --- a/jdk/src/share/classes/sun/dyn/Invokers.java +++ b/jdk/src/share/classes/sun/dyn/Invokers.java @@ -25,10 +25,7 @@ package sun.dyn; -import java.dyn.MethodHandle; -import java.dyn.MethodHandles; -import java.dyn.MethodType; - +import java.dyn.*; /** * Construction and caching of often-used invokers. @@ -63,8 +60,11 @@ public class Invokers { public MethodHandle exactInvoker() { MethodHandle invoker = exactInvoker; if (invoker != null) return invoker; - invoker = MethodHandleImpl.IMPL_LOOKUP.findVirtual(MethodHandle.class, "invoke", targetType); - if (invoker == null) throw new InternalError("JVM cannot find invoker for "+targetType); + try { + invoker = MethodHandleImpl.IMPL_LOOKUP.findVirtual(MethodHandle.class, "invoke", targetType); + } catch (NoAccessException ex) { + throw new InternalError("JVM cannot find invoker for "+targetType); + } assert(invokerType(targetType) == invoker.type()); exactInvoker = invoker; return invoker; diff --git a/jdk/src/share/classes/java/dyn/JavaMethodHandle.java b/jdk/src/share/classes/sun/dyn/JavaMethodHandle.java similarity index 71% rename from jdk/src/share/classes/java/dyn/JavaMethodHandle.java rename to jdk/src/share/classes/sun/dyn/JavaMethodHandle.java index d8cd87a5ed5..2ce44d1d89e 100644 --- a/jdk/src/share/classes/java/dyn/JavaMethodHandle.java +++ b/jdk/src/share/classes/sun/dyn/JavaMethodHandle.java @@ -23,8 +23,9 @@ * questions. */ -package java.dyn; +package sun.dyn; +import java.dyn.*; import sun.dyn.Access; /** @@ -168,70 +169,4 @@ public abstract class JavaMethodHandle protected JavaMethodHandle(MethodHandle entryPoint) { super(entryPoint); } - - /** - * Create a method handle whose entry point is a non-static method - * visible in the exact (most specific) class of - * the newly constructed object. - *

    - * The method is specified by name and type, as if via this expression: - * {@code MethodHandles.lookup().findVirtual(this.getClass(), name, type)}. - * The class defining the method might be an anonymous inner class. - *

    - * The method handle type of {@code this} (i.e, the fully constructed object) - * will be the given method handle type. - * A call to {@code this} will invoke the selected method. - * The receiver argument will be bound to {@code this} on every method - * handle invocation. - *

    - * Rationale: - * Although this constructor may seem to be a mere luxury, - * it is not subsumed by the more general constructor which - * takes any {@code MethodHandle} as the entry point argument. - * In order to convert an entry point name to a method handle, - * the self-class of the object is required (in order to do - * the lookup). The self-class, in turn, is generally not - * available at the time of the constructor invocation, - * due to the rules of Java and the JVM verifier. - * One cannot call {@code this.getClass()}, because - * the value of {@code this} is inaccessible at the point - * of the constructor call. (Changing this would require - * change to the Java language, verifiers, and compilers.) - * In particular, this constructor allows {@code JavaMethodHandle}s - * to be created in combination with the anonymous inner class syntax. - * @param entryPointName the name of the entry point method - * @param type (optional) the desired type of the method handle - */ - protected JavaMethodHandle(String entryPointName, MethodType type) { - super(entryPointName, type, true); - - } - - /** - * Create a method handle whose entry point is a non-static method - * visible in the exact (most specific) class of - * the newly constructed object. - *

    - * The method is specified only by name. - * There must be exactly one method of that name visible in the object class, - * either inherited or locally declared. - * (That is, the method must not be overloaded.) - *

    - * The method handle type of {@code this} (i.e, the fully constructed object) - * will be the same as the type of the selected non-static method. - * The receiver argument will be bound to {@code this} on every method - * handle invocation. - *

    ISSUE: This signature wildcarding feature does not correspond to - * any MethodHandles.Lookup API element. Can we eliminate it? - * Alternatively, it is useful for naming non-overloaded methods. - * Shall we make type arguments optional in the Lookup methods, - * throwing an error in cases of ambiguity? - *

    - * For this method's rationale, see the documentation - * for {@link #JavaMethodHandle(String,MethodType)}. - * @param entryPointName the name of the entry point method - */ - protected JavaMethodHandle(String entryPointName) { - super(entryPointName, (MethodType) null, false); - } } diff --git a/jdk/src/share/classes/sun/dyn/MemberName.java b/jdk/src/share/classes/sun/dyn/MemberName.java index db21f2b4121..f45d1603ebf 100644 --- a/jdk/src/share/classes/sun/dyn/MemberName.java +++ b/jdk/src/share/classes/sun/dyn/MemberName.java @@ -521,6 +521,11 @@ public final class MemberName implements Member, Cloneable { if (lookupClass != null) message += ", from " + lookupClass.getName(); return new NoAccessException(message); } + public static Error uncaughtException(Exception ex) { + Error err = new InternalError("uncaught exception"); + err.initCause(ex); + return err; + } /** Actually making a query requires an access check. */ public static Factory getFactory(Access token) { @@ -641,7 +646,7 @@ public final class MemberName implements Member, Cloneable { * If lookup fails or access is not permitted, a {@linkplain NoAccessException} is thrown. * Otherwise a fresh copy of the given member is returned, with modifier bits filled in. */ - public MemberName resolveOrFail(MemberName m, boolean searchSupers, Class lookupClass) { + public MemberName resolveOrFail(MemberName m, boolean searchSupers, Class lookupClass) throws NoAccessException { MemberName result = resolveOrNull(m, searchSupers, lookupClass); if (result != null) return result; diff --git a/jdk/src/share/classes/sun/dyn/MethodHandleImpl.java b/jdk/src/share/classes/sun/dyn/MethodHandleImpl.java index 25dc470d061..caa96b90d69 100644 --- a/jdk/src/share/classes/sun/dyn/MethodHandleImpl.java +++ b/jdk/src/share/classes/sun/dyn/MethodHandleImpl.java @@ -25,11 +25,8 @@ package sun.dyn; -import java.dyn.JavaMethodHandle; -import java.dyn.MethodHandle; -import java.dyn.MethodHandles; +import java.dyn.*; import java.dyn.MethodHandles.Lookup; -import java.dyn.MethodType; import java.util.logging.Level; import java.util.logging.Logger; import sun.dyn.util.VerifyType; @@ -46,6 +43,7 @@ import sun.dyn.util.Wrapper; import sun.misc.Unsafe; import static sun.dyn.MemberName.newIllegalArgumentException; import static sun.dyn.MemberName.newNoAccessException; +import static sun.dyn.MemberName.uncaughtException; /** * Base class for method handles, containing JVM-specific fields and logic. @@ -173,7 +171,7 @@ public abstract class MethodHandleImpl { */ public static MethodHandle findMethod(Access token, MemberName method, - boolean doDispatch, Class lookupClass) { + boolean doDispatch, Class lookupClass) throws NoAccessException { Access.check(token); // only trusted calls MethodType mtype = method.getMethodType(); if (!method.isStatic()) { @@ -320,7 +318,7 @@ public abstract class MethodHandleImpl { try { VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(AllocateObject.class, "invoke_V", MethodType.genericMethodType(0, true)); } catch (NoAccessException ex) { - throw new InternalError(""); + throw uncaughtException(ex); } } // Corresponding generic constructor types: @@ -416,9 +414,7 @@ public abstract class MethodHandleImpl { f = c.getDeclaredField(field.getName()); return unsafe.staticFieldBase(f); } catch (Exception ee) { - Error e = new InternalError(); - e.initCause(ee); - throw e; + throw uncaughtException(ee); } } @@ -473,10 +469,8 @@ public abstract class MethodHandleImpl { MethodHandle mh; try { mh = IMPL_LOOKUP.findVirtual(FieldAccessor.class, name, type); - } catch (NoAccessException ee) { - Error e = new InternalError("name,type="+name+type); - e.initCause(ee); - throw e; + } catch (NoAccessException ex) { + throw uncaughtException(ex); } if (evclass != vclass || (!isStatic && ecclass != cclass)) { MethodType strongType = FieldAccessor.ftype(cclass, vclass, isSetter, isStatic); @@ -543,10 +537,8 @@ public abstract class MethodHandleImpl { MethodHandle mh; try { mh = IMPL_LOOKUP.findStatic(FieldAccessor.class, name, type); - } catch (NoAccessException ee) { - Error e = new InternalError("name,type="+name+type); - e.initCause(ee); - throw e; + } catch (NoAccessException ex) { + throw uncaughtException(ex); } if (caclass != null) { MethodType strongType = FieldAccessor.atype(caclass, isSetter); @@ -1031,7 +1023,7 @@ public abstract class MethodHandleImpl { try { VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(GuardWithTest.class, "invoke_V", MethodType.genericMethodType(0, true)); } catch (NoAccessException ex) { - throw new InternalError(""); + throw uncaughtException(ex); } } } @@ -1167,7 +1159,7 @@ public abstract class MethodHandleImpl { try { VARARGS_INVOKE = IMPL_LOOKUP.findVirtual(GuardWithCatch.class, "invoke_V", MethodType.genericMethodType(0, true)); } catch (NoAccessException ex) { - throw new InternalError(""); + throw uncaughtException(ex); } } } @@ -1207,9 +1199,16 @@ public abstract class MethodHandleImpl { return AdapterMethodHandle.makeRetypeRaw(token, type, THROW_EXCEPTION); } - static final MethodHandle THROW_EXCEPTION + static final MethodHandle THROW_EXCEPTION; + static { + try { + THROW_EXCEPTION = IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "throwException", MethodType.methodType(Empty.class, Throwable.class)); + } catch (NoAccessException ex) { + throw new RuntimeException(ex); + } + } static Empty throwException(T t) throws T { throw t; } public static String getNameString(Access token, MethodHandle target) { diff --git a/jdk/src/share/classes/sun/dyn/MethodHandleNatives.java b/jdk/src/share/classes/sun/dyn/MethodHandleNatives.java index 84470c8a870..47a9a2d3de1 100644 --- a/jdk/src/share/classes/sun/dyn/MethodHandleNatives.java +++ b/jdk/src/share/classes/sun/dyn/MethodHandleNatives.java @@ -25,9 +25,7 @@ package sun.dyn; -import java.dyn.CallSite; -import java.dyn.MethodHandle; -import java.dyn.MethodType; +import java.dyn.*; import java.dyn.MethodHandles.Lookup; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Field; @@ -324,18 +322,24 @@ class MethodHandleNatives { */ static MethodHandle linkMethodHandleConstant(Class callerClass, int refKind, Class defc, String name, Object type) { - Lookup lookup = IMPL_LOOKUP.in(callerClass); - switch (refKind) { - case REF_getField: return lookup.findGetter( defc, name, (Class) type ); - case REF_getStatic: return lookup.findStaticGetter( defc, name, (Class) type ); - case REF_putField: return lookup.findSetter( defc, name, (Class) type ); - case REF_putStatic: return lookup.findStaticSetter( defc, name, (Class) type ); - case REF_invokeVirtual: return lookup.findVirtual( defc, name, (MethodType) type ); - case REF_invokeStatic: return lookup.findStatic( defc, name, (MethodType) type ); - case REF_invokeSpecial: return lookup.findSpecial( defc, name, (MethodType) type, callerClass ); - case REF_newInvokeSpecial: return lookup.findConstructor( defc, (MethodType) type ); - case REF_invokeInterface: return lookup.findVirtual( defc, name, (MethodType) type ); + try { + Lookup lookup = IMPL_LOOKUP.in(callerClass); + switch (refKind) { + case REF_getField: return lookup.findGetter( defc, name, (Class) type ); + case REF_getStatic: return lookup.findStaticGetter( defc, name, (Class) type ); + case REF_putField: return lookup.findSetter( defc, name, (Class) type ); + case REF_putStatic: return lookup.findStaticSetter( defc, name, (Class) type ); + case REF_invokeVirtual: return lookup.findVirtual( defc, name, (MethodType) type ); + case REF_invokeStatic: return lookup.findStatic( defc, name, (MethodType) type ); + case REF_invokeSpecial: return lookup.findSpecial( defc, name, (MethodType) type, callerClass ); + case REF_newInvokeSpecial: return lookup.findConstructor( defc, (MethodType) type ); + case REF_invokeInterface: return lookup.findVirtual( defc, name, (MethodType) type ); + } + throw new IllegalArgumentException("bad MethodHandle constant "+name+" : "+type); + } catch (NoAccessException ex) { + Error err = new IncompatibleClassChangeError(); + err.initCause(ex); + throw err; } - throw new IllegalArgumentException("bad MethodHandle constant "+name+" : "+type); } } diff --git a/jdk/src/share/classes/sun/dyn/SpreadGeneric.java b/jdk/src/share/classes/sun/dyn/SpreadGeneric.java index e88611c3f2f..2b12b067666 100644 --- a/jdk/src/share/classes/sun/dyn/SpreadGeneric.java +++ b/jdk/src/share/classes/sun/dyn/SpreadGeneric.java @@ -25,11 +25,7 @@ package sun.dyn; -import java.dyn.JavaMethodHandle; -import java.dyn.MethodHandle; -import java.dyn.MethodHandles; -import java.dyn.MethodType; -import java.dyn.NoAccessException; +import java.dyn.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; diff --git a/jdk/src/share/classes/sun/dyn/ToGeneric.java b/jdk/src/share/classes/sun/dyn/ToGeneric.java index eaaa89bfa9b..65acc6f65b0 100644 --- a/jdk/src/share/classes/sun/dyn/ToGeneric.java +++ b/jdk/src/share/classes/sun/dyn/ToGeneric.java @@ -25,11 +25,7 @@ package sun.dyn; -import java.dyn.JavaMethodHandle; -import java.dyn.MethodHandle; -import java.dyn.MethodHandles; -import java.dyn.MethodType; -import java.dyn.NoAccessException; +import java.dyn.*; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import sun.dyn.util.ValueConversions; diff --git a/jdk/src/share/classes/sun/dyn/util/ValueConversions.java b/jdk/src/share/classes/sun/dyn/util/ValueConversions.java index 90180c6e794..f5ee5cb81fd 100644 --- a/jdk/src/share/classes/sun/dyn/util/ValueConversions.java +++ b/jdk/src/share/classes/sun/dyn/util/ValueConversions.java @@ -34,6 +34,7 @@ import java.util.List; import sun.dyn.Access; import sun.dyn.AdapterMethodHandle; import sun.dyn.MethodHandleImpl; +import static sun.dyn.MemberName.uncaughtException; public class ValueConversions { private static final Access IMPL_TOKEN = Access.getToken(); @@ -148,11 +149,16 @@ public class ValueConversions { // look up the method String name = "unbox" + wrap.simpleName() + (raw ? "Raw" : ""); MethodType type = unboxType(wrap, raw); - if (!exact) - // actually, type is wrong; the Java method takes Object - mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type.erase()); - else + if (!exact) { + try { + // actually, type is wrong; the Java method takes Object + mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type.erase()); + } catch (NoAccessException ex) { + mh = null; + } + } else { mh = retype(type, unbox(wrap, !exact, raw)); + } if (mh != null) { cache.put(wrap, mh); return mh; @@ -280,10 +286,15 @@ public class ValueConversions { // look up the method String name = "box" + wrap.simpleName() + (raw ? "Raw" : ""); MethodType type = boxType(wrap, raw); - if (exact) - mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type); - else + if (exact) { + try { + mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type); + } catch (NoAccessException ex) { + mh = null; + } + } else { mh = retype(type.erase(), box(wrap, !exact, raw)); + } if (mh != null) { cache.put(wrap, mh); return mh; @@ -394,10 +405,15 @@ public class ValueConversions { // look up the method String name = "reboxRaw" + wrap.simpleName(); MethodType type = reboxType(wrap); - if (exact) - mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type); - else + if (exact) { + try { + mh = IMPL_LOOKUP.findStatic(ValueConversions.class, name, type); + } catch (NoAccessException ex) { + mh = null; + } + } else { mh = retype(IDENTITY.type(), rebox(wrap, !exact)); + } if (mh != null) { cache.put(wrap, mh); return mh; @@ -474,7 +490,11 @@ public class ValueConversions { mh = EMPTY; break; case INT: case LONG: case FLOAT: case DOUBLE: - mh = IMPL_LOOKUP.findStatic(ValueConversions.class, "zero"+wrap.simpleName(), type); + try { + mh = IMPL_LOOKUP.findStatic(ValueConversions.class, "zero"+wrap.simpleName(), type); + } catch (NoAccessException ex) { + mh = null; + } break; } if (mh != null) { @@ -549,8 +569,8 @@ public class ValueConversions { ZERO_OBJECT = IMPL_LOOKUP.findStatic(ValueConversions.class, "zeroObject", zeroObjectType); IGNORE = IMPL_LOOKUP.findStatic(ValueConversions.class, "ignore", ignoreType); EMPTY = IMPL_LOOKUP.findStatic(ValueConversions.class, "empty", ignoreType.dropParameterTypes(0, 1)); - } catch (RuntimeException ex) { - throw ex; + } catch (Exception ex) { + throw uncaughtException(ex); } } diff --git a/jdk/test/java/dyn/JavaDocExamples.java b/jdk/test/java/dyn/JavaDocExamples.java new file mode 100644 index 00000000000..db5a5ef2a21 --- /dev/null +++ b/jdk/test/java/dyn/JavaDocExamples.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @summary example code used in javadoc for java.dyn API + * @compile -XDallowTransitionalJSR292=no JavaDocExamples.java + * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.dyn.JavaDocExamples + */ + +/* +---- To run outside jtreg: +$ $JAVA7X_HOME/bin/javac -cp $JUNIT4_JAR -d /tmp/Classes \ + $DAVINCI/sources/jdk/test/java/dyn/JavaDocExamples.java +$ $JAVA7X_HOME/bin/java -cp $JUNIT4_JAR:/tmp/Classes \ + -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles \ + -Dtest.java.dyn.JavaDocExamples.verbosity=1 \ + test.java.dyn.JavaDocExamples +---- +*/ + +package test.java.dyn; + +import java.dyn.*; +import static java.dyn.MethodHandles.*; +import static java.dyn.MethodType.*; + +import java.lang.reflect.*; +import java.util.*; + +import org.junit.*; +import static org.junit.Assert.*; +import static org.junit.Assume.*; + + +/** + * @author jrose + */ +public class JavaDocExamples { + /** Wrapper for running the JUnit tests in this module. + * Put JUnit on the classpath! + */ + public static void main(String... ignore) { + org.junit.runner.JUnitCore.runClasses(JavaDocExamples.class); + } + // How much output? + static int verbosity = Integer.getInteger("test.java.dyn.JavaDocExamples.verbosity", 0); + +{} +static final private Lookup LOOKUP = lookup(); +// static final private MethodHandle CONCAT_1 = LOOKUP.findVirtual(String.class, +// "concat", methodType(String.class, String.class)); +// static final private MethodHandle HASHCODE_1 = LOOKUP.findVirtual(Object.class, +// "hashCode", methodType(int.class)); + +// form required if NoAccessException is intercepted: +static final private MethodHandle CONCAT_2, HASHCODE_2; +static { + try { + CONCAT_2 = LOOKUP.findVirtual(String.class, + "concat", methodType(String.class, String.class)); + HASHCODE_2 = LOOKUP.findVirtual(Object.class, + "hashCode", methodType(int.class)); + } catch (NoAccessException ex) { + throw new RuntimeException(ex); + } +} +{} + + @Test public void testFindVirtual() throws Throwable { +{} +MethodHandle CONCAT_3 = LOOKUP.findVirtual(String.class, + "concat", methodType(String.class, String.class)); +MethodHandle HASHCODE_3 = LOOKUP.findVirtual(Object.class, + "hashCode", methodType(int.class)); +//assertEquals("xy", (String) CONCAT_1.invokeExact("x", "y")); +assertEquals("xy", (String) CONCAT_2.invokeExact("x", "y")); +assertEquals("xy", (String) CONCAT_3.invokeExact("x", "y")); +//assertEquals("xy".hashCode(), (int) HASHCODE_1.invokeExact((Object)"xy")); +assertEquals("xy".hashCode(), (int) HASHCODE_2.invokeExact((Object)"xy")); +assertEquals("xy".hashCode(), (int) HASHCODE_3.invokeExact((Object)"xy")); +{} + } + @Test public void testDropArguments() throws Throwable { + {{ +{} /// JAVADOC +MethodHandle cat = lookup().findVirtual(String.class, + "concat", methodType(String.class, String.class)); +cat = cat.asType(methodType(Object.class, String.class, String.class)); /*(String)*/ +assertEquals("xy", /*(String)*/ cat.invokeExact("x", "y")); +MethodHandle d0 = dropArguments(cat, 0, String.class); +assertEquals("yz", /*(String)*/ d0.invokeExact("x", "y", "z")); +MethodHandle d1 = dropArguments(cat, 1, String.class); +assertEquals("xz", /*(String)*/ d1.invokeExact("x", "y", "z")); +MethodHandle d2 = dropArguments(cat, 2, String.class); +assertEquals("xy", /*(String)*/ d2.invokeExact("x", "y", "z")); +MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class); +assertEquals("xz", /*(String)*/ d12.invokeExact("x", 12, true, "z")); + }} + } + + static void assertEquals(Object exp, Object act) { + if (verbosity > 0) + System.out.println("result: "+act); + Assert.assertEquals(exp, act); + } +} diff --git a/jdk/test/java/dyn/MethodHandlesTest.java b/jdk/test/java/dyn/MethodHandlesTest.java index a4c2ec88023..734b1323ff6 100644 --- a/jdk/test/java/dyn/MethodHandlesTest.java +++ b/jdk/test/java/dyn/MethodHandlesTest.java @@ -449,7 +449,7 @@ public class MethodHandlesTest { countTest(positive); MethodType type = MethodType.methodType(ret, params); MethodHandle target = null; - RuntimeException noAccess = null; + Exception noAccess = null; try { if (verbosity >= 4) System.out.println("lookup via "+lookup+" of "+defc+" "+name+type); target = lookup.findStatic(defc, name, type); @@ -513,7 +513,7 @@ public class MethodHandlesTest { String methodName = name.substring(1 + name.indexOf('/')); // foo/bar => foo MethodType type = MethodType.methodType(ret, params); MethodHandle target = null; - RuntimeException noAccess = null; + Exception noAccess = null; try { if (verbosity >= 4) System.out.println("lookup via "+lookup+" of "+defc+" "+name+type); target = lookup.findVirtual(defc, methodName, type); @@ -567,7 +567,7 @@ public class MethodHandlesTest { countTest(positive); MethodType type = MethodType.methodType(ret, params); MethodHandle target = null; - RuntimeException noAccess = null; + Exception noAccess = null; try { if (verbosity >= 4) System.out.println("lookup via "+lookup+" of "+defc+" "+name+type); target = lookup.findSpecial(defc, name, type, specialCaller); @@ -623,7 +623,7 @@ public class MethodHandlesTest { MethodType type = MethodType.methodType(ret, params); Object receiver = randomArg(defc); MethodHandle target = null; - RuntimeException noAccess = null; + Exception noAccess = null; try { if (verbosity >= 4) System.out.println("lookup via "+lookup+" of "+defc+" "+name+type); target = lookup.bind(receiver, methodName, type); @@ -688,7 +688,7 @@ public class MethodHandlesTest { MethodType type = MethodType.methodType(ret, params); Method rmethod = null; MethodHandle target = null; - RuntimeException noAccess = null; + Exception noAccess = null; try { rmethod = defc.getDeclaredMethod(name, params); } catch (NoSuchMethodException ex) { @@ -1088,7 +1088,11 @@ public class MethodHandlesTest { if (rtype != Object.class) pfx = rtype.getSimpleName().substring(0, 1).toLowerCase(); String name = pfx+"id"; - return PRIVATE.findStatic(Callee.class, name, type); + try { + return PRIVATE.findStatic(Callee.class, name, type); + } catch (Exception ex) { + throw new RuntimeException(ex); + } } } @@ -1818,8 +1822,13 @@ public class MethodHandlesTest { testCastFailure("unbox/return", 11000); } - static class Surprise extends JavaMethodHandle { - Surprise() { super("value"); } + static class Surprise implements MethodHandleProvider { + public MethodHandle asMethodHandle() { + return VALUE.bindTo(this); + } + public MethodHandle asMethodHandle(MethodType type) { + return asMethodHandle().asType(type); + } Object value(Object x) { trace("value", x); if (boo != null) return boo; @@ -1834,22 +1843,32 @@ public class MethodHandlesTest { static Object refIdentity(Object x) { trace("ref.x", x); return x; } static Integer boxIdentity(Integer x) { trace("box.x", x); return x; } static int intIdentity(int x) { trace("int.x", x); return x; } - static MethodHandle REF_IDENTITY = PRIVATE.findStatic( - Surprise.class, "refIdentity", - MethodType.methodType(Object.class, Object.class)); - static MethodHandle BOX_IDENTITY = PRIVATE.findStatic( - Surprise.class, "boxIdentity", - MethodType.methodType(Integer.class, Integer.class)); - static MethodHandle INT_IDENTITY = PRIVATE.findStatic( - Surprise.class, "intIdentity", - MethodType.methodType(int.class, int.class)); + static MethodHandle VALUE, REF_IDENTITY, BOX_IDENTITY, INT_IDENTITY; + static { + try { + VALUE = PRIVATE.findVirtual( + Surprise.class, "value", + MethodType.methodType(Object.class, Object.class)); + REF_IDENTITY = PRIVATE.findStatic( + Surprise.class, "refIdentity", + MethodType.methodType(Object.class, Object.class)); + BOX_IDENTITY = PRIVATE.findStatic( + Surprise.class, "boxIdentity", + MethodType.methodType(Integer.class, Integer.class)); + INT_IDENTITY = PRIVATE.findStatic( + Surprise.class, "intIdentity", + MethodType.methodType(int.class, int.class)); + } catch (Exception ex) { + throw new RuntimeException(ex); + } + } } void testCastFailure(String mode, int okCount) throws Throwable { countTest(false); if (verbosity > 2) System.out.println("mode="+mode); Surprise boo = new Surprise(); - MethodHandle identity = Surprise.REF_IDENTITY, surprise = boo; + MethodHandle identity = Surprise.REF_IDENTITY, surprise0 = boo.asMethodHandle(), surprise = surprise0; if (mode.endsWith("/return")) { if (mode.equals("unbox/return")) { // fail on return to ((Integer)surprise).intValue @@ -1875,7 +1894,7 @@ public class MethodHandlesTest { identity = MethodHandles.filterArguments(callee, identity); } } - assertNotSame(mode, surprise, boo); + assertNotSame(mode, surprise, surprise0); identity = MethodHandles.convertArguments(identity, MethodType.genericMethodType(1)); surprise = MethodHandles.convertArguments(surprise, MethodType.genericMethodType(1)); Object x = 42; From 45c90a843eb996f1753b76c8462066a52e419cd5 Mon Sep 17 00:00:00 2001 From: John R Rose Date: Wed, 8 Sep 2010 18:40:34 -0700 Subject: [PATCH 012/722] 6953246: JSR 292 should support SAM conversion Conversion function MethodHandles.asInstance; initial slow implementation based on Proxy. Reviewed-by: twisti --- .../share/classes/java/dyn/MethodHandles.java | 108 ++++++++++++++++- jdk/test/java/dyn/MethodHandlesTest.java | 109 +++++++++++++++++- 2 files changed, 212 insertions(+), 5 deletions(-) diff --git a/jdk/src/share/classes/java/dyn/MethodHandles.java b/jdk/src/share/classes/java/dyn/MethodHandles.java index 957d1c18af6..b6e83338340 100644 --- a/jdk/src/share/classes/java/dyn/MethodHandles.java +++ b/jdk/src/share/classes/java/dyn/MethodHandles.java @@ -25,15 +25,12 @@ package java.dyn; -import java.lang.reflect.Constructor; +import java.lang.reflect.*; import sun.dyn.Access; import sun.dyn.MemberName; import sun.dyn.MethodHandleImpl; import sun.dyn.util.VerifyAccess; import sun.dyn.util.Wrapper; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.util.List; import java.util.ArrayList; import java.util.Arrays; @@ -1591,4 +1588,107 @@ public class MethodHandles { MethodHandle throwException(Class returnType, Class exType) { return MethodHandleImpl.throwException(IMPL_TOKEN, MethodType.methodType(returnType, exType)); } + + /** + * Produce a wrapper instance of the given "SAM" type which redirects its calls to the given method handle. + * A SAM type is a type which declares a single abstract method. + * Additionally, it must have either no constructor (as an interface) + * or have a public or protected constructor of zero arguments (as a class). + *

    + * The resulting instance of the required SAM type will respond to + * invocation of the SAM type's single abstract method by calling + * the given {@code target} on the incoming arguments, + * and returning or throwing whatever the {@code target} + * returns or throws. The invocation will be as if by + * {@code target.invokeExact}. + *

    + * The method handle may throw an undeclared exception, + * which means any checked exception (or other checked throwable) + * not declared by the SAM type's single abstract method. + * If this happens, the throwable will be wrapped in an instance + * of {@link UndeclaredThrowableException} and thrown in that + * wrapped form. + *

    + * The wrapper instance is guaranteed to be of a non-public + * implementation class C in a package containing no classes + * or methods except system-defined classes and methods. + * The implementation class C will have no public supertypes + * or public methods beyond the following: + *

      + *
    • the SAM type itself and any methods in the SAM type + *
    • the supertypes of the SAM type (if any) and their methods + *
    • {@link Object} and its methods + *
    • {@link MethodHandleProvider} and its methods + *
    + *

    + * No stable mapping is promised between the SAM type and + * the implementation class C. Over time, several implementation + * classes might be used for the same SAM type. + *

    + * This method is not guaranteed to return a distinct + * wrapper object for each separate call. If the JVM is able + * to prove that a wrapper has already been created for a given + * method handle, or for another method handle with the + * same behavior, the JVM may return that wrapper in place of + * a new wrapper. + * @param target the method handle to invoke from the wrapper + * @param samType the desired type of the wrapper, a SAM type + * @return a correctly-typed wrapper for the given {@code target} + * @throws IllegalArgumentException if the {@code target} throws + * an undeclared exception + */ + // ISSUE: Should we delegate equals/hashCode to the targets? + // Not useful unless there is a stable equals/hashCode behavior + // for MethodHandle, and for MethodHandleProvider.asMethodHandle. + public static + T asInstance(MethodHandle target, Class samType) { + // POC implementation only; violates the above contract several ways + final Method sam = getSamMethod(samType); + if (sam == null) + throw new IllegalArgumentException("not a SAM type: "+samType.getName()); + MethodType samMT = MethodType.methodType(sam.getReturnType(), sam.getParameterTypes()); + if (!samMT.equals(target.type())) + throw new IllegalArgumentException("wrong method type"); + final MethodHandle mh = target; + return samType.cast(Proxy.newProxyInstance( + samType.getClassLoader(), + new Class[]{ samType, MethodHandleProvider.class }, + new InvocationHandler() { + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if (method.getDeclaringClass() == MethodHandleProvider.class) { + return method.invoke(mh, args); + } + assert method.equals(sam) : method; + return mh.invokeVarargs(args); + } + })); + } + + private static + Method getSamMethod(Class samType) { + Method sam = null; + for (Method m : samType.getMethods()) { + int mod = m.getModifiers(); + if (Modifier.isAbstract(mod)) { + if (sam != null) + return null; // too many abstract methods + sam = m; + } + } + if (!samType.isInterface() && getSamConstructor(samType) == null) + return null; // wrong kind of constructor + return sam; + } + + private static + Constructor getSamConstructor(Class samType) { + for (Constructor c : samType.getDeclaredConstructors()) { + if (c.getParameterTypes().length == 0) { + int mod = c.getModifiers(); + if (Modifier.isPublic(mod) || Modifier.isProtected(mod)) + return c; + } + } + return null; + } } diff --git a/jdk/test/java/dyn/MethodHandlesTest.java b/jdk/test/java/dyn/MethodHandlesTest.java index 734b1323ff6..62b0c903269 100644 --- a/jdk/test/java/dyn/MethodHandlesTest.java +++ b/jdk/test/java/dyn/MethodHandlesTest.java @@ -265,6 +265,12 @@ public class MethodHandlesTest { // wrap = Wrapper.forWrapperType(dst); // if (wrap != Wrapper.OBJECT) // return wrap.wrap(nextArg++); + if (param.isInterface()) { + for (Class c : param.getClasses()) { + if (param.isAssignableFrom(c) && !c.isInterface()) + { param = c; break; } + } + } if (param.isInterface() || param.isAssignableFrom(String.class)) return "#"+nextArg(); else @@ -380,7 +386,7 @@ public class MethodHandlesTest { } public static interface IntExample { public void v0(); - static class Impl implements IntExample { + public static class Impl implements IntExample { public void v0() { called("Int/v0", this); } final String name; public Impl() { name = "Impl#"+nextArg(); } @@ -1956,6 +1962,107 @@ public class MethodHandlesTest { mh.invokeVarargs(args); assertCalled(name, args); } + + static void runForRunnable() { + called("runForRunnable"); + } + private interface Fooable { + Object foo(Fooable x, Object y); + // this is for randomArg: + public class Impl implements Fooable { + public Object foo(Fooable x, Object y) { + throw new RuntimeException("do not call"); + } + final String name; + public Impl() { name = "Fooable#"+nextArg(); } + @Override public String toString() { return name; } + } + } + static Object fooForFooable(Fooable x, Object y) { + return called("fooForFooable", x, y); + } + private static class MyCheckedException extends Exception { + } + private interface WillThrow { + void willThrow() throws MyCheckedException; + } + + @Test + public void testAsInstance() throws Throwable { + if (CAN_SKIP_WORKING) return; + Lookup lookup = MethodHandles.lookup(); + { + MethodType mt = MethodType.methodType(void.class); + MethodHandle mh = lookup.findStatic(MethodHandlesTest.class, "runForRunnable", mt); + Runnable proxy = MethodHandles.asInstance(mh, Runnable.class); + proxy.run(); + assertCalled("runForRunnable"); + } + { + MethodType mt = MethodType.methodType(Object.class, Fooable.class, Object.class); + MethodHandle mh = lookup.findStatic(MethodHandlesTest.class, "fooForFooable", mt); + Fooable proxy = MethodHandles.asInstance(mh, Fooable.class); + Object[] args = randomArgs(mt.parameterArray()); + Object result = proxy.foo((Fooable) args[0], args[1]); + assertCalled("fooForFooable", args); + assertEquals(result, logEntry("fooForFooable", args)); + } + for (Throwable ex : new Throwable[] { new NullPointerException("ok"), + new InternalError("ok"), + new Throwable("fail"), + new Exception("fail"), + new MyCheckedException() + }) { + MethodHandle mh = MethodHandles.throwException(void.class, Throwable.class); + mh = MethodHandles.insertArguments(mh, 0, ex); + WillThrow proxy = MethodHandles.asInstance(mh, WillThrow.class); + try { + proxy.willThrow(); + System.out.println("Failed to throw: "+ex); + assertTrue(false); + } catch (Throwable ex1) { + if (verbosity > 2) { + System.out.println("throw "+ex); + System.out.println("catch "+(ex == ex1 ? "UNWRAPPED" : ex1)); + } + if (ex instanceof RuntimeException || + ex instanceof Error) { + assertSame("must pass unchecked exception out without wrapping", ex, ex1); + } else if (ex instanceof MyCheckedException) { + assertSame("must pass declared exception out without wrapping", ex, ex1); + } else { + assertNotSame("must pass undeclared checked exception with wrapping", ex, ex1); + UndeclaredThrowableException utex = (UndeclaredThrowableException) ex1; + assertSame(ex, utex.getCause()); + } + } + } + // Test error checking: + MethodHandle genericMH = ValueConversions.varargsArray(0); + genericMH = MethodHandles.convertArguments(genericMH, genericMH.type().generic()); + for (Class sam : new Class[] { Runnable.class, + Fooable.class, + Iterable.class }) { + try { + // Must throw, because none of these guys has generic type. + MethodHandles.asInstance(genericMH, sam); + System.out.println("Failed to throw"); + assertTrue(false); + } catch (IllegalArgumentException ex) { + } + } + for (Class nonSAM : new Class[] { Object.class, + String.class, + CharSequence.class, + Example.class }) { + try { + MethodHandles.asInstance(ValueConversions.varargsArray(0), nonSAM); + System.out.println("Failed to throw"); + assertTrue(false); + } catch (IllegalArgumentException ex) { + } + } + } } // Local abbreviated copy of sun.dyn.util.ValueConversions class ValueConversions { From 82088e1e2b68609fab689f8cc8b7c664d4b6921c Mon Sep 17 00:00:00 2001 From: John R Rose Date: Tue, 14 Sep 2010 01:42:03 -0700 Subject: [PATCH 013/722] 6982752: dynamic languages need to decorate types with runtime information Add ClassValue Reviewed-by: twisti --- .../share/classes/java/dyn/ClassValue.java | 173 ++++++++++++++++++ jdk/test/java/dyn/ClassValueTest.java | 164 +++++++++++++++++ 2 files changed, 337 insertions(+) create mode 100644 jdk/src/share/classes/java/dyn/ClassValue.java create mode 100644 jdk/test/java/dyn/ClassValueTest.java diff --git a/jdk/src/share/classes/java/dyn/ClassValue.java b/jdk/src/share/classes/java/dyn/ClassValue.java new file mode 100644 index 00000000000..325d55e0742 --- /dev/null +++ b/jdk/src/share/classes/java/dyn/ClassValue.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.dyn; + +import java.util.WeakHashMap; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +/** + * Lazily associate a computed value with (potentially) every class. + * @author John Rose, JSR 292 EG + */ +public abstract class ClassValue { + /** + * Compute the given class's derived value for this {@code ClassValue}. + *

    + * This method will be invoked within the first thread that accesses + * the value with the {@link #get}. + *

    + * Normally, this method is invoked at most once per class, + * but it may be invoked again in case of subsequent invocations + * of {@link #remove} followed by {@link #get}. + * + * @return the computed value for this thread-local + */ + protected abstract T computeValue(Class type); + + /** + * Creates a new class value. + */ + protected ClassValue() { + } + + /** + * Returns the value for the given class. + * If no value has yet been computed, it is obtained by + * by an invocation of the {@link #computeValue} method. + *

    + * The actual installation of the value on the class + * is performed while the class's synchronization lock + * is held. At that point, if racing threads have + * computed values, one is chosen, and returned to + * all the racing threads. + * + * @return the current thread's value of this thread-local + */ + public T get(Class type) { + ClassValueMap map = getMap(type); + if (map != null) { + Object x = map.get(this); + if (x != null) { + return (T) map.unmaskNull(x); + } + } + return setComputedValue(type); + } + + /** + * Removes the associated value for the given class. + * If this value is subsequently {@linkplain #get read} for the same class, + * its value will be reinitialized by invoking its {@link #computeValue} method. + * This may result in an additional invocation of the + * {@code computeValue} method for the given class. + */ + public void remove(Class type) { + ClassValueMap map = getMap(type); + if (map != null) { + synchronized (map) { + map.remove(this); + } + } + } + + /// Implementation... + + /** The hash code for this type is based on the identity of the object, + * and is well-dispersed for power-of-two tables. + */ + public final int hashCode() { return hashCode; } + private final int hashCode = HASH_CODES.getAndAdd(0x61c88647); + private static final AtomicInteger HASH_CODES = new AtomicInteger(); + + private static final AtomicInteger STORE_BARRIER = new AtomicInteger(); + + /** Slow path for {@link #get}. */ + private T setComputedValue(Class type) { + ClassValueMap map = getMap(type); + if (map == null) { + map = initializeMap(type); + } + T value = computeValue(type); + STORE_BARRIER.lazySet(0); + // All stores pending from computeValue are completed. + synchronized (map) { + // Warm up the table with a null entry. + map.preInitializeEntry(this); + } + // All stores pending from table expansion are completed. + synchronized (map) { + value = (T) map.initializeEntry(this, value); + // One might fear a possible race condition here + // if the code for map.put has flushed the write + // to map.table[*] before the writes to the Map.Entry + // are done. This is not possible, since we have + // warmed up the table with an empty entry. + } + return value; + } + + // Replace this map by a per-class slot. + private static final WeakHashMap, ClassValueMap> ROOT + = new WeakHashMap, ClassValueMap>(); + + private static ClassValueMap getMap(Class type) { + return ROOT.get(type); + } + + private static ClassValueMap initializeMap(Class type) { + synchronized (ClassValue.class) { + ClassValueMap map = ROOT.get(type); + if (map == null) + ROOT.put(type, map = new ClassValueMap()); + return map; + } + } + + static class ClassValueMap extends WeakHashMap { + /** Make sure this table contains an Entry for the given key, even if it is empty. */ + void preInitializeEntry(ClassValue key) { + if (!this.containsKey(key)) + this.put(key, null); + } + /** Make sure this table contains a non-empty Entry for the given key. */ + Object initializeEntry(ClassValue key, Object value) { + Object prior = this.get(key); + if (prior != null) { + return unmaskNull(prior); + } + this.put(key, maskNull(value)); + return value; + } + + Object maskNull(Object x) { + return x == null ? this : x; + } + Object unmaskNull(Object x) { + return x == this ? null : x; + } + } +} diff --git a/jdk/test/java/dyn/ClassValueTest.java b/jdk/test/java/dyn/ClassValueTest.java new file mode 100644 index 00000000000..cf7bcff82d6 --- /dev/null +++ b/jdk/test/java/dyn/ClassValueTest.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @summary tests for class-specific values + * @compile ClassValueTest.java + * @run junit/othervm test.java.dyn.ClassValueTest + */ + +/* + Manually: + $ $JAVA7X_HOME/bin/javac -d foo -cp $JUNIT4_JAR test/java/dyn/ClassValueTest.java + $ $JAVA7X_HOME/bin/java -cp foo:$JUNIT4_JAR org.junit.runner.JUnitCore test.java.dyn.ClassValueTest + Output: .testAdd => 1000 : Integer + */ + +package test.java.dyn; + +import java.util.*; + +import java.dyn.*; + +import org.junit.*; +import static org.junit.Assert.*; + +/** + * @author jrose + */ +public class ClassValueTest { + static String nameForCV1(Class type) { + return "CV1:" + type.getName(); + } + static int countForCV1; + static final ClassValue CV1 = new ClassValue() { + protected String computeValue(Class type) { + countForCV1++; + return nameForCV1(type); + } + }; + + static final Class[] CLASSES = { + String.class, + Integer.class, + int.class, + boolean[].class, + char[][].class, + ClassValueTest.class + }; + + @Test + public void testGet() { + countForCV1 = 0; + for (Class c : CLASSES) { + assertEquals(nameForCV1(c), CV1.get(c)); + } + assertEquals(CLASSES.length, countForCV1); + for (Class c : CLASSES) { + assertEquals(nameForCV1(c), CV1.get(c)); + } + assertEquals(CLASSES.length, countForCV1); + } + + @Test + public void testRemove() { + for (Class c : CLASSES) { + CV1.get(c); + } + countForCV1 = 0; + int REMCOUNT = 3; + for (int i = 0; i < REMCOUNT; i++) { + CV1.remove(CLASSES[i]); + } + assertEquals(0, countForCV1); // no change + for (Class c : CLASSES) { + assertEquals(nameForCV1(c), CV1.get(c)); + } + assertEquals(REMCOUNT, countForCV1); + } + + static String nameForCVN(Class type, int n) { + return "CV[" + n + "]" + type.getName(); + } + static int countForCVN; + static class CVN extends ClassValue { + final int n; + CVN(int n) { this.n = n; } + protected String computeValue(Class type) { + countForCVN++; + return nameForCVN(type, n); + } + }; + + @Test + public void testGetMany() { + int CVN_COUNT1 = 100, CVN_COUNT2 = 100; + CVN cvns[] = new CVN[CVN_COUNT1 * CVN_COUNT2]; + for (int n = 0; n < cvns.length; n++) { + cvns[n] = new CVN(n); + } + countForCVN = 0; + for (int pass = 0; pass <= 2; pass++) { + for (int i1 = 0; i1 < CVN_COUNT1; i1++) { + eachClass: + for (Class c : CLASSES) { + for (int i2 = 0; i2 < CVN_COUNT2; i2++) { + int n = i1*CVN_COUNT2 + i2; + assertEquals(0, countForCVN); + assertEquals(nameForCVN(c, n), cvns[n].get(c)); + cvns[n].get(c); //get it again + //System.out.println("getting "+n+":"+cvns[n].get(c)); + boolean doremove = (((i1 + i2) & 3) == 0); + switch (pass) { + case 0: + assertEquals(1, countForCVN); + break; + case 1: + // remove on middle pass + assertEquals(0, countForCVN); + if (doremove) { + //System.out.println("removing "+n+":"+cvns[n].get(c)); + cvns[n].remove(c); + assertEquals(0, countForCVN); + } + break; + case 2: + assertEquals(doremove ? 1 : 0, countForCVN); + break; + } + countForCVN = 0; + if (i1 > i2 && i1 < i2+5) continue eachClass; // leave diagonal gap + } + } + } + } + assertEquals(countForCVN, 0); + for (int n = 0; n < cvns.length; n++) { + for (Class c : CLASSES) { + assertEquals(nameForCVN(c, n), cvns[n].get(c)); + } + } + } +} From 2e4e2602d7f9ca1ea6415e3053ff7637289e95bc Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Wed, 15 Sep 2010 20:25:37 -0700 Subject: [PATCH 014/722] 6984979: OptimizeFill misses some cases with an odd memory graph Reviewed-by: kvn --- hotspot/src/share/vm/opto/loopTransform.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp index 2c115b12838..bb1587762ea 100644 --- a/hotspot/src/share/vm/opto/loopTransform.cpp +++ b/hotspot/src/share/vm/opto/loopTransform.cpp @@ -2447,6 +2447,13 @@ bool PhaseIdealLoop::match_fill_loop(IdealLoopTree* lpt, Node*& store, Node*& st msg_node = store->in(MemNode::Address); } + if (msg == NULL && + (!store->in(MemNode::Memory)->is_Phi() || + store->in(MemNode::Memory)->in(LoopNode::LoopBackControl) != store)) { + msg = "store memory isn't proper phi"; + msg_node = store->in(MemNode::Memory); + } + // Make sure there is an appropriate fill routine BasicType t = store->as_Mem()->memory_type(); const char* fill_name; @@ -2570,7 +2577,7 @@ bool PhaseIdealLoop::match_fill_loop(IdealLoopTree* lpt, Node*& store, Node*& st Node* n = lpt->_body.at(i); // These values can be replaced with other nodes if they are used // outside the loop. - if (n == store || n == head->loopexit() || n == head->incr()) continue; + if (n == store || n == head->loopexit() || n == head->incr() || n == store->in(MemNode::Memory)) continue; for (SimpleDUIterator iter(n); iter.has_next(); iter.next()) { Node* use = iter.get(); if (!lpt->_body.contains(use)) { @@ -2715,6 +2722,10 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) { // Redirect the old control and memory edges that are outside the loop. Node* exit = head->loopexit()->proj_out(0); + // Sometimes the memory phi of the head is used as the outgoing + // state of the loop. It's safe in this case to replace it with the + // result_mem. + _igvn.replace_node(store->in(MemNode::Memory), result_mem); _igvn.replace_node(exit, result_ctrl); _igvn.replace_node(store, result_mem); // Any uses the increment outside of the loop become the loop limit. From 0f3151171826f03dc6644900f66438bee6042593 Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Tue, 21 Sep 2010 13:38:35 -0700 Subject: [PATCH 015/722] 6986270: guarantee(*bcp != Bytecodes::_monitorenter || exec_mode != Deoptimization::Unpack_exception) fails Propagate the compiler type of the deopting method to vframeArrayElement::unpack_on_stack() Reviewed-by: jrose, never --- hotspot/src/share/vm/runtime/deoptimization.cpp | 4 ++++ hotspot/src/share/vm/runtime/thread.cpp | 1 + hotspot/src/share/vm/runtime/thread.hpp | 5 ++++- hotspot/src/share/vm/runtime/vframeArray.cpp | 8 +++++--- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp index 2cc90961799..4dd9e97059c 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -124,6 +124,9 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread RegisterMap dummy_map(thread, false); // Now get the deoptee with a valid map frame deoptee = stub_frame.sender(&map); + // Set the deoptee nmethod + assert(thread->deopt_nmethod() == NULL, "Pending deopt!"); + thread->set_deopt_nmethod(deoptee.cb()->as_nmethod_or_null()); // Create a growable array of VFrames where each VFrame represents an inlined // Java frame. This storage is allocated with the usual system arena. @@ -445,6 +448,7 @@ void Deoptimization::cleanup_deopt_info(JavaThread *thread, delete thread->deopt_mark(); thread->set_deopt_mark(NULL); + thread->set_deopt_nmethod(NULL); if (JvmtiExport::can_pop_frame()) { diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 00e5e991efc..b8ba9638436 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1183,6 +1183,7 @@ void JavaThread::initialize() { set_vframe_array_last(NULL); set_deferred_locals(NULL); set_deopt_mark(NULL); + set_deopt_nmethod(NULL); clear_must_deopt_id(); set_monitor_chunks(NULL); set_next(NULL); diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp index 61237f41323..6af2b7aa42d 100644 --- a/hotspot/src/share/vm/runtime/thread.hpp +++ b/hotspot/src/share/vm/runtime/thread.hpp @@ -680,7 +680,7 @@ class JavaThread: public Thread { intptr_t* _must_deopt_id; // id of frame that needs to be deopted once we // transition out of native - + nmethod* _deopt_nmethod; // nmethod that is currently being deoptimized vframeArray* _vframe_array_head; // Holds the heap of the active vframeArrays vframeArray* _vframe_array_last; // Holds last vFrameArray we popped // Because deoptimization is lazy we must save jvmti requests to set locals @@ -1098,6 +1098,9 @@ class JavaThread: public Thread { void set_must_deopt_id(intptr_t* id) { _must_deopt_id = id; } void clear_must_deopt_id() { _must_deopt_id = NULL; } + void set_deopt_nmethod(nmethod* nm) { _deopt_nmethod = nm; } + nmethod* deopt_nmethod() { return _deopt_nmethod; } + methodOop callee_target() const { return _callee_target; } void set_callee_target (methodOop x) { _callee_target = x; } diff --git a/hotspot/src/share/vm/runtime/vframeArray.cpp b/hotspot/src/share/vm/runtime/vframeArray.cpp index 88edd39d424..a103acf819b 100644 --- a/hotspot/src/share/vm/runtime/vframeArray.cpp +++ b/hotspot/src/share/vm/runtime/vframeArray.cpp @@ -179,9 +179,11 @@ void vframeArrayElement::unpack_on_stack(int callee_parameters, // in which case bcp should point to the monitorenter since it is within the exception's range. assert(*bcp != Bytecodes::_monitorenter || is_top_frame, "a _monitorenter must be a top frame"); - // TIERED Must know the compiler of the deoptee QQQ - COMPILER2_PRESENT(guarantee(*bcp != Bytecodes::_monitorenter || exec_mode != Deoptimization::Unpack_exception, - "shouldn't get exception during monitorenter");) + assert(thread->deopt_nmethod() != NULL, "nmethod should be known"); + guarantee(!(thread->deopt_nmethod()->is_compiled_by_c2() && + *bcp == Bytecodes::_monitorenter && + exec_mode == Deoptimization::Unpack_exception), + "shouldn't get exception during monitorenter"); int popframe_preserved_args_size_in_bytes = 0; int popframe_preserved_args_size_in_words = 0; From f4b4eae617bb2356265fcbd91853bd274cbfde51 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Wed, 22 Sep 2010 13:01:12 -0700 Subject: [PATCH 016/722] 6982537: Crash in Node*step_through_mergemem Reviewed-by: kvn --- hotspot/src/share/vm/opto/escape.cpp | 25 +++++++++++++------------ hotspot/src/share/vm/opto/memnode.cpp | 11 ++++++----- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/hotspot/src/share/vm/opto/escape.cpp b/hotspot/src/share/vm/opto/escape.cpp index cc7239cdd87..e1811fa3a29 100644 --- a/hotspot/src/share/vm/opto/escape.cpp +++ b/hotspot/src/share/vm/opto/escape.cpp @@ -706,14 +706,15 @@ PhiNode *ConnectionGraph::split_memory_phi(PhiNode *orig_phi, int alias_idx, Gro // // The next methods are derived from methods in MemNode. // -static Node *step_through_mergemem(MergeMemNode *mmem, int alias_idx, const TypeOopPtr *tinst) { +static Node *step_through_mergemem(MergeMemNode *mmem, int alias_idx, const TypeOopPtr *toop) { Node *mem = mmem; - // TypeInstPtr::NOTNULL+any is an OOP with unknown offset - generally + // TypeOopPtr::NOTNULL+any is an OOP with unknown offset - generally // means an array I have not precisely typed yet. Do not do any // alias stuff with it any time soon. - if( tinst->base() != Type::AnyPtr && - !(tinst->klass()->is_java_lang_Object() && - tinst->offset() == Type::OffsetBot) ) { + if( toop->base() != Type::AnyPtr && + !(toop->klass() != NULL && + toop->klass()->is_java_lang_Object() && + toop->offset() == Type::OffsetBot) ) { mem = mmem->memory_at(alias_idx); // Update input if it is progress over what we have now } @@ -803,8 +804,8 @@ Node* ConnectionGraph::find_inst_mem(Node *orig_mem, int alias_idx, GrowableArra if (orig_mem == NULL) return orig_mem; Compile* C = phase->C; - const TypeOopPtr *tinst = C->get_adr_type(alias_idx)->isa_oopptr(); - bool is_instance = (tinst != NULL) && tinst->is_known_instance(); + const TypeOopPtr *toop = C->get_adr_type(alias_idx)->isa_oopptr(); + bool is_instance = (toop != NULL) && toop->is_known_instance(); Node *start_mem = C->start()->proj_out(TypeFunc::Memory); Node *prev = NULL; Node *result = orig_mem; @@ -827,18 +828,18 @@ Node* ConnectionGraph::find_inst_mem(Node *orig_mem, int alias_idx, GrowableArra // skip over a call which does not affect this memory slice if (result->is_Proj() && result->as_Proj()->_con == TypeFunc::Memory) { Node *proj_in = result->in(0); - if (proj_in->is_Allocate() && proj_in->_idx == (uint)tinst->instance_id()) { + if (proj_in->is_Allocate() && proj_in->_idx == (uint)toop->instance_id()) { break; // hit one of our sentinels } else if (proj_in->is_Call()) { CallNode *call = proj_in->as_Call(); - if (!call->may_modify(tinst, phase)) { + if (!call->may_modify(toop, phase)) { result = call->in(TypeFunc::Memory); } } else if (proj_in->is_Initialize()) { AllocateNode* alloc = proj_in->as_Initialize()->allocation(); // Stop if this is the initialization for the object instance which // which contains this memory slice, otherwise skip over it. - if (alloc == NULL || alloc->_idx != (uint)tinst->instance_id()) { + if (alloc == NULL || alloc->_idx != (uint)toop->instance_id()) { result = proj_in->in(TypeFunc::Memory); } } else if (proj_in->is_MemBar()) { @@ -846,7 +847,7 @@ Node* ConnectionGraph::find_inst_mem(Node *orig_mem, int alias_idx, GrowableArra } } else if (result->is_MergeMem()) { MergeMemNode *mmem = result->as_MergeMem(); - result = step_through_mergemem(mmem, alias_idx, tinst); + result = step_through_mergemem(mmem, alias_idx, toop); if (result == mmem->base_memory()) { // Didn't find instance memory, search through general slice recursively. result = mmem->memory_at(C->get_general_index(alias_idx)); @@ -866,7 +867,7 @@ Node* ConnectionGraph::find_inst_mem(Node *orig_mem, int alias_idx, GrowableArra break; } } else if (result->is_ClearArray()) { - if (!ClearArrayNode::step_through(&result, (uint)tinst->instance_id(), phase)) { + if (!ClearArrayNode::step_through(&result, (uint)toop->instance_id(), phase)) { // Can not bypass initialization of the instance // we are looking for. break; diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp index 9297e4e224c..9d8cb72e26e 100644 --- a/hotspot/src/share/vm/opto/memnode.cpp +++ b/hotspot/src/share/vm/opto/memnode.cpp @@ -193,14 +193,15 @@ static Node *step_through_mergemem(PhaseGVN *phase, MergeMemNode *mmem, const T } } #endif - // TypeInstPtr::NOTNULL+any is an OOP with unknown offset - generally + // TypeOopPtr::NOTNULL+any is an OOP with unknown offset - generally // means an array I have not precisely typed yet. Do not do any // alias stuff with it any time soon. - const TypeOopPtr *tinst = tp->isa_oopptr(); + const TypeOopPtr *toop = tp->isa_oopptr(); if( tp->base() != Type::AnyPtr && - !(tinst && - tinst->klass()->is_java_lang_Object() && - tinst->offset() == Type::OffsetBot) ) { + !(toop && + toop->klass() != NULL && + toop->klass()->is_java_lang_Object() && + toop->offset() == Type::OffsetBot) ) { // compress paths and change unreachable cycles to TOP // If not, we can update the input infinitely along a MergeMem cycle // Equivalent code in PhiNode::Ideal From 16efe7ce5c93d87ab0c3a87c37f4cfb70b714814 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Wed, 22 Sep 2010 21:10:46 -0700 Subject: [PATCH 017/722] 6972540: sun/nio/ch/SocketChannelImpl compilation crashed when executing CompileTheWorld Reviewed-by: kvn --- hotspot/src/share/vm/c1/c1_LIR.cpp | 1 + hotspot/src/share/vm/c1/c1_LIR.hpp | 40 +++++++++++++++++++-- hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 2 -- hotspot/src/share/vm/c1/c1_LinearScan.cpp | 6 ++++ 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp index 3b04fc45dc5..8a53cd5c39d 100644 --- a/hotspot/src/share/vm/c1/c1_LIR.cpp +++ b/hotspot/src/share/vm/c1/c1_LIR.cpp @@ -211,6 +211,7 @@ void LIR_OprDesc::validate_type() const { case T_BYTE: case T_SHORT: case T_INT: + case T_ADDRESS: case T_OBJECT: case T_ARRAY: assert((kind_field() == cpu_register || kind_field() == stack_value) && diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp index 44393aa8fb3..b6076e8421b 100644 --- a/hotspot/src/share/vm/c1/c1_LIR.hpp +++ b/hotspot/src/share/vm/c1/c1_LIR.hpp @@ -280,7 +280,7 @@ class LIR_OprDesc: public CompilationResourceObj { , int_type = 1 << type_shift , long_type = 2 << type_shift , object_type = 3 << type_shift - , pointer_type = 4 << type_shift + , address_type = 4 << type_shift , float_type = 5 << type_shift , double_type = 6 << type_shift }; @@ -303,6 +303,7 @@ class LIR_OprDesc: public CompilationResourceObj { case T_BYTE: case T_SHORT: case T_INT: + case T_ADDRESS: case T_OBJECT: case T_ARRAY: return single_size; @@ -456,6 +457,7 @@ inline LIR_OprDesc::OprType as_OprType(BasicType type) { case T_DOUBLE: return LIR_OprDesc::double_type; case T_OBJECT: case T_ARRAY: return LIR_OprDesc::object_type; + case T_ADDRESS: return LIR_OprDesc::address_type; case T_ILLEGAL: // fall through default: ShouldNotReachHere(); return LIR_OprDesc::unknown_type; } @@ -468,6 +470,7 @@ inline BasicType as_BasicType(LIR_OprDesc::OprType t) { case LIR_OprDesc::float_type: return T_FLOAT; case LIR_OprDesc::double_type: return T_DOUBLE; case LIR_OprDesc::object_type: return T_OBJECT; + case LIR_OprDesc::address_type: return T_ADDRESS; case LIR_OprDesc::unknown_type: // fall through default: ShouldNotReachHere(); return T_ILLEGAL; } @@ -550,8 +553,24 @@ class LIR_OprFact: public AllStatic { static LIR_Opr illegalOpr; - static LIR_Opr single_cpu(int reg) { return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | LIR_OprDesc::int_type | LIR_OprDesc::cpu_register | LIR_OprDesc::single_size); } - static LIR_Opr single_cpu_oop(int reg) { return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | LIR_OprDesc::object_type | LIR_OprDesc::cpu_register | LIR_OprDesc::single_size); } + static LIR_Opr single_cpu(int reg) { + return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | + LIR_OprDesc::int_type | + LIR_OprDesc::cpu_register | + LIR_OprDesc::single_size); + } + static LIR_Opr single_cpu_oop(int reg) { + return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | + LIR_OprDesc::object_type | + LIR_OprDesc::cpu_register | + LIR_OprDesc::single_size); + } + static LIR_Opr single_cpu_address(int reg) { + return (LIR_Opr)(intptr_t)((reg << LIR_OprDesc::reg1_shift) | + LIR_OprDesc::address_type | + LIR_OprDesc::cpu_register | + LIR_OprDesc::single_size); + } static LIR_Opr double_cpu(int reg1, int reg2) { LP64_ONLY(assert(reg1 == reg2, "must be identical")); return (LIR_Opr)(intptr_t)((reg1 << LIR_OprDesc::reg1_shift) | @@ -633,6 +652,14 @@ class LIR_OprFact: public AllStatic { LIR_OprDesc::virtual_mask); break; + case T_ADDRESS: + res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) | + LIR_OprDesc::address_type | + LIR_OprDesc::cpu_register | + LIR_OprDesc::single_size | + LIR_OprDesc::virtual_mask); + break; + case T_LONG: res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) | LIR_OprDesc::long_type | @@ -721,6 +748,13 @@ class LIR_OprFact: public AllStatic { LIR_OprDesc::single_size); break; + case T_ADDRESS: + res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) | + LIR_OprDesc::address_type | + LIR_OprDesc::stack_value | + LIR_OprDesc::single_size); + break; + case T_LONG: res = (LIR_Opr)(intptr_t)((index << LIR_OprDesc::data_shift) | LIR_OprDesc::long_type | diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp index e519cfcfb1d..41356516d79 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp @@ -936,7 +936,6 @@ LIR_Opr LIRGenerator::new_register(BasicType type) { } } _virtual_register_number += 1; - if (type == T_ADDRESS) type = T_INT; return LIR_OprFact::virtual_register(vreg, type); } @@ -2829,4 +2828,3 @@ LIR_Opr LIRGenerator::call_runtime(BasicTypeArray* signature, LIRItemList* args, } return result; } - diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp index b5adb2db479..1b99ef83539 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp @@ -2018,6 +2018,12 @@ LIR_Opr LinearScan::calc_operand_for_interval(const Interval* interval) { return LIR_OprFact::single_cpu_oop(assigned_reg); } + case T_ADDRESS: { + assert(assigned_reg >= pd_first_cpu_reg && assigned_reg <= pd_last_cpu_reg, "no cpu register"); + assert(interval->assigned_regHi() == any_reg, "must not have hi register"); + return LIR_OprFact::single_cpu_address(assigned_reg); + } + #ifdef __SOFTFP__ case T_FLOAT: // fall through #endif // __SOFTFP__ From bce771e0fee9035d41637643eb230226a2e8fd16 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Wed, 22 Sep 2010 23:51:03 -0700 Subject: [PATCH 018/722] 6986028: assert(_base == Int) failed: Not an Int in CmpINode::sub Reviewed-by: kvn, twisti --- hotspot/src/share/vm/opto/stringopts.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hotspot/src/share/vm/opto/stringopts.cpp b/hotspot/src/share/vm/opto/stringopts.cpp index 2584652a027..29df07f46b1 100644 --- a/hotspot/src/share/vm/opto/stringopts.cpp +++ b/hotspot/src/share/vm/opto/stringopts.cpp @@ -75,8 +75,7 @@ class StringConcat : public ResourceObj { for (SimpleDUIterator i(endprojs.resproj); i.has_next(); i.next()) { CallStaticJavaNode *use = i.get()->isa_CallStaticJava(); if (use != NULL && use->method() != NULL && - use->method()->holder() == C->env()->String_klass() && - use->method()->name() == ciSymbol::object_initializer_name() && + use->method()->intrinsic_id() == vmIntrinsics::_String_String && use->in(TypeFunc::Parms + 1) == endprojs.resproj) { // Found useless new String(sb.toString()) so reuse the newly allocated String // when creating the result instead of allocating a new one. @@ -394,7 +393,9 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) { Node* constructor = NULL; for (SimpleDUIterator i(result); i.has_next(); i.next()) { CallStaticJavaNode *use = i.get()->isa_CallStaticJava(); - if (use != NULL && use->method() != NULL && + if (use != NULL && + use->method() != NULL && + !use->method()->is_static() && use->method()->name() == ciSymbol::object_initializer_name() && use->method()->holder() == m->holder()) { // Matched the constructor. @@ -444,7 +445,8 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) { } } else if (cnode->method() == NULL) { break; - } else if (cnode->method()->holder() == m->holder() && + } else if (!cnode->method()->is_static() && + cnode->method()->holder() == m->holder() && cnode->method()->name() == ciSymbol::append_name() && (cnode->method()->signature()->as_symbol() == string_sig || cnode->method()->signature()->as_symbol() == char_sig || @@ -459,8 +461,7 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) { if (arg->is_Proj() && arg->in(0)->is_CallStaticJava()) { CallStaticJavaNode* csj = arg->in(0)->as_CallStaticJava(); if (csj->method() != NULL && - csj->method()->holder() == C->env()->Integer_klass() && - csj->method()->name() == ciSymbol::toString_name()) { + csj->method()->intrinsic_id() == vmIntrinsics::_Integer_toString) { sc->add_control(csj); sc->push_int(csj->in(TypeFunc::Parms)); continue; @@ -537,9 +538,8 @@ PhaseStringOpts::PhaseStringOpts(PhaseGVN* gvn, Unique_Node_List*): if (arg->is_Proj() && arg->in(0)->is_CallStaticJava()) { CallStaticJavaNode* csj = arg->in(0)->as_CallStaticJava(); if (csj->method() != NULL && - (csj->method()->holder() == C->env()->StringBuffer_klass() || - csj->method()->holder() == C->env()->StringBuilder_klass()) && - csj->method()->name() == ciSymbol::toString_name()) { + (csj->method()->intrinsic_id() == vmIntrinsics::_StringBuilder_toString || + csj->method()->intrinsic_id() == vmIntrinsics::_StringBuffer_toString)) { for (int o = 0; o < concats.length(); o++) { if (c == o) continue; StringConcat* other = concats.at(o); From 79847991ad3d8e061c6f1245a0199ebe09ab19db Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Fri, 24 Sep 2010 03:51:43 -0700 Subject: [PATCH 019/722] 6986944: JSR 292 assert(caller_nm->is_method_handle_return(caller_frame.pc())) failed: must be MH call site Reviewed-by: never, kvn --- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp | 2 +- hotspot/src/share/vm/ci/ciMethod.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp index e8cd888cd71..2343fbf2fc0 100644 --- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp @@ -346,7 +346,7 @@ void trace_method_handle_stub(const char* adaptername, if (stack_dump_count > 64) stack_dump_count = 48; for (i = 0; i < stack_dump_count; i += 4) { printf(" dump at SP[%d] "INTPTR_FORMAT": "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT"\n", - i, &entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]); + i, (intptr_t) &entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]); } print_method_handle(mh); } diff --git a/hotspot/src/share/vm/ci/ciMethod.cpp b/hotspot/src/share/vm/ci/ciMethod.cpp index 5b09d03a1e5..7190af55e85 100644 --- a/hotspot/src/share/vm/ci/ciMethod.cpp +++ b/hotspot/src/share/vm/ci/ciMethod.cpp @@ -735,7 +735,11 @@ int ciMethod::scale_count(int count, float prof_factor) { // Return true if the method is an instance of one of the two // signature-polymorphic MethodHandle methods, invokeExact or invokeGeneric. bool ciMethod::is_method_handle_invoke() const { - if (!is_loaded()) return false; + if (!is_loaded()) { + bool flag = (holder()->name() == ciSymbol::java_dyn_MethodHandle() && + methodOopDesc::is_method_handle_invoke_name(name()->sid())); + return flag; + } VM_ENTRY_MARK; return get_methodOop()->is_method_handle_invoke(); } From d7169cc13eaaff3bb9c00b6c1f45d0c776b83097 Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Fri, 24 Sep 2010 22:42:14 -0700 Subject: [PATCH 020/722] 6891766: Vulnerabilities in use of reflection in CORBA Reviewed-by: hawtin --- .../sun/corba/se/impl/io/IIOPInputStream.java | 2721 ----------------- .../corba/se/impl/io/ValueHandlerImpl.java | 188 +- .../corba/se/impl/orb/PrefixParserAction.java | 4 +- .../corba/se/impl/orbutil/ObjectUtility.java | 639 +--- .../SocketOrChannelAcceptorImpl.java | 21 +- .../corba/se/spi/orb/OperationFactory.java | 7 +- .../sun/corba/se/spi/orb/ParserImplBase.java | 4 +- 7 files changed, 149 insertions(+), 3435 deletions(-) delete mode 100644 corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java diff --git a/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java b/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java deleted file mode 100644 index 73ef8386006..00000000000 --- a/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java +++ /dev/null @@ -1,2721 +0,0 @@ -/* - * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * Licensed Materials - Property of IBM - * RMI-IIOP v1.0 - * Copyright IBM Corp. 1998 1999 All Rights Reserved - * - */ - -package com.sun.corba.se.impl.io; - -import java.io.InputStream; -import java.io.IOException; -import java.io.StreamCorruptedException; -import java.io.ObjectInputValidation; -import java.io.NotActiveException; -import java.io.InvalidObjectException; -import java.io.InvalidClassException; -import java.io.DataInputStream; -import java.io.OptionalDataException; -import java.io.WriteAbortedException; -import java.io.Externalizable; -import java.io.EOFException; -import java.lang.reflect.*; -import java.util.Vector; -import java.util.Stack; -import java.util.Hashtable; -import java.util.Enumeration; - -import sun.corba.Bridge ; - -import java.security.AccessController ; -import java.security.PrivilegedAction ; - -import com.sun.corba.se.impl.io.ObjectStreamClass; -import com.sun.corba.se.impl.util.Utility; - -import org.omg.CORBA.portable.ValueInputStream; - -import org.omg.CORBA.ValueMember; -import org.omg.CORBA.SystemException; -import org.omg.CORBA.TCKind; -import org.omg.CORBA.ORB; -import org.omg.CORBA.CompletionStatus; -import org.omg.CORBA.portable.IndirectionException; -import org.omg.CORBA.MARSHAL; -import org.omg.CORBA.TypeCode; - -import com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription; -import com.sun.org.omg.SendingContext.CodeBase; - -import javax.rmi.PortableRemoteObject; -import javax.rmi.CORBA.Util; -import javax.rmi.CORBA.ValueHandler; - -import java.security.*; -import java.util.*; - -import com.sun.corba.se.impl.orbutil.ObjectUtility ; -import com.sun.corba.se.impl.logging.OMGSystemException ; -import com.sun.corba.se.impl.logging.UtilSystemException ; - -import com.sun.corba.se.spi.logging.CORBALogDomains ; - -/** - * IIOPInputStream is used by the ValueHandlerImpl to handle Java serialization - * input semantics. - * - * @author Stephen Lewallen - * @since JDK1.1.6 - */ - -public class IIOPInputStream - extends com.sun.corba.se.impl.io.InputStreamHook -{ - private static Bridge bridge = - (Bridge)AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - return Bridge.get() ; - } - } - ) ; - - private static OMGSystemException omgWrapper = OMGSystemException.get( - CORBALogDomains.RPC_ENCODING ) ; - private static UtilSystemException utilWrapper = UtilSystemException.get( - CORBALogDomains.RPC_ENCODING ) ; - - // Necessary to pass the appropriate fields into the - // defaultReadObjectDelegate method (which takes no - // parameters since it's called from - // java.io.ObjectInpuStream defaultReadObject() - // which we can't change). - // - // This is only used in the case where the fields had - // to be obtained remotely because of a serializable - // version difference. Set in inputObjectUsingFVD. - // Part of serialization evolution fixes for Ladybird, - // bug 4365188. - private ValueMember defaultReadObjectFVDMembers[] = null; - - private org.omg.CORBA_2_3.portable.InputStream orbStream; - - private CodeBase cbSender; - - private ValueHandlerImpl vhandler; //d4365188 - - private Object currentObject = null; - - private ObjectStreamClass currentClassDesc = null; - - private Class currentClass = null; - - private int recursionDepth = 0; - - private int simpleReadDepth = 0; - - // The ActiveRecursionManager replaces the old RecursionManager which - // used to record how many recursions were made, and resolve them after - // an object was completely deserialized. - // - // That created problems (as in bug 4414154) because when custom - // unmarshaling in readObject, there can be recursive references - // to one of the objects currently being unmarshaled, and the - // passive recursion system failed. - ActiveRecursionManager activeRecursionMgr = new ActiveRecursionManager(); - - private IOException abortIOException = null; - - /* Remember the first exception that stopped this stream. */ - private ClassNotFoundException abortClassNotFoundException = null; - - /* Vector of validation callback objects - * The vector is created as needed. The vector is maintained in - * order of highest (first) priority to lowest - */ - private Vector callbacks; - - // Serialization machinery fields - /* Arrays used to keep track of classes and ObjectStreamClasses - * as they are being merged; used in inputObject. - * spClass is the stack pointer for both. */ - ObjectStreamClass[] classdesc; - Class[] classes; - int spClass; - - private static final String kEmptyStr = ""; - - // TCKind TypeCodes used in FVD inputClassFields - //public static final TypeCode kRemoteTypeCode = new TypeCodeImpl(TCKind._tk_objref); - //public static final TypeCode kValueTypeCode = new TypeCodeImpl(TCKind._tk_value); - // removed TypeCodeImpl dependency - public static final TypeCode kRemoteTypeCode = ORB.init().get_primitive_tc(TCKind.tk_objref); - public static final TypeCode kValueTypeCode = ORB.init().get_primitive_tc(TCKind.tk_value); - - // TESTING CODE - useFVDOnly should be made final before FCS in order to - // optimize out the check. - private static final boolean useFVDOnly = false; - - private byte streamFormatVersion; - - // Since java.io.OptionalDataException's constructors are - // package private, but we need to throw it in some special - // cases, we try to do it by reflection. - private static final Constructor OPT_DATA_EXCEPTION_CTOR; - - private Object[] readObjectArgList = { this } ; - - static { - OPT_DATA_EXCEPTION_CTOR = getOptDataExceptionCtor(); - } - - // Grab the OptionalDataException boolean ctor and make - // it accessible. Note that any exceptions - // will be wrapped in ExceptionInInitializerErrors. - private static Constructor getOptDataExceptionCtor() { - - try { - - Constructor result = - - (Constructor) AccessController.doPrivileged( - new PrivilegedExceptionAction() { - public java.lang.Object run() - throws NoSuchMethodException, - SecurityException { - - Constructor boolCtor - = OptionalDataException.class.getDeclaredConstructor( - new Class[] { - Boolean.TYPE }); - - boolCtor.setAccessible(true); - - return boolCtor; - }}); - - if (result == null) - // XXX I18N, logging needed. - throw new Error("Unable to find OptionalDataException constructor"); - - return result; - - } catch (Exception ex) { - // XXX I18N, logging needed. - throw new ExceptionInInitializerError(ex); - } - } - - // Create a new OptionalDataException with the EOF marker - // set to true. See handleOptionalDataMarshalException. - private OptionalDataException createOptionalDataException() { - try { - OptionalDataException result - = (OptionalDataException) - OPT_DATA_EXCEPTION_CTOR.newInstance(new Object[] { - Boolean.TRUE }); - - if (result == null) - // XXX I18N, logging needed. - throw new Error("Created null OptionalDataException"); - - return result; - - } catch (Exception ex) { - // XXX I18N, logging needed. - throw new Error("Couldn't create OptionalDataException", ex); - } - } - - // Return the stream format version currently being used - // to deserialize an object - protected byte getStreamFormatVersion() { - return streamFormatVersion; - } - - // At the beginning of data sent by a writeObject or - // writeExternal method there is a byte telling the - // reader the stream format version. - private void readFormatVersion() throws IOException { - - streamFormatVersion = orbStream.read_octet(); - - if (streamFormatVersion < 1 || - streamFormatVersion > vhandler.getMaximumStreamFormatVersion()) { - SystemException sysex = omgWrapper.unsupportedFormatVersion( - CompletionStatus.COMPLETED_MAYBE); - // XXX I18N? Logging for IOException? - IOException result = new IOException("Unsupported format version: " - + streamFormatVersion); - result.initCause( sysex ) ; - throw result ; - } - - if (streamFormatVersion == 2) { - if (!(orbStream instanceof ValueInputStream)) { - SystemException sysex = omgWrapper.notAValueinputstream( - CompletionStatus.COMPLETED_MAYBE); - // XXX I18N? Logging for IOException? - IOException result = new IOException("Not a ValueInputStream"); - result.initCause( sysex ) ; - throw result; - } - } - } - - public static void setTestFVDFlag(boolean val){ - // useFVDOnly = val; - } - - /** - * Dummy constructor; passes upper stream a dummy stream; - **/ - public IIOPInputStream() - throws java.io.IOException { - super(); - resetStream(); - } - - public final void setOrbStream(org.omg.CORBA_2_3.portable.InputStream os) { - orbStream = os; - } - - public final org.omg.CORBA_2_3.portable.InputStream getOrbStream() { - return orbStream; - } - - //added setSender and getSender - public final void setSender(CodeBase cb) { - cbSender = cb; - } - - public final CodeBase getSender() { - return cbSender; - } - - // 4365188 this is added to enable backward compatability w/ wrong - // rep-ids - public final void setValueHandler(ValueHandler vh) { - vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; - } - - public final ValueHandler getValueHandler() { - return (javax.rmi.CORBA.ValueHandler) vhandler; - } - - public final void increaseRecursionDepth(){ - recursionDepth++; - } - - public final int decreaseRecursionDepth(){ - return --recursionDepth; - } - - /** - * Override the actions of the final method "readObject()" - * in ObjectInputStream. - * @since JDK1.1.6 - * - * Read an object from the ObjectInputStream. - * The class of the object, the signature of the class, and the values - * of the non-transient and non-static fields of the class and all - * of its supertypes are read. Default deserializing for a class can be - * overriden using the writeObject and readObject methods. - * Objects referenced by this object are read transitively so - * that a complete equivalent graph of objects is reconstructed by readObject.

    - * - * The root object is completly restored when all of its fields - * and the objects it references are completely restored. At this - * point the object validation callbacks are executed in order - * based on their registered priorities. The callbacks are - * registered by objects (in the readObject special methods) - * as they are individually restored. - * - * Exceptions are thrown for problems with the InputStream and for classes - * that should not be deserialized. All exceptions are fatal to the - * InputStream and leave it in an indeterminate state; it is up to the caller - * to ignore or recover the stream state. - * @exception java.lang.ClassNotFoundException Class of a serialized object - * cannot be found. - * @exception InvalidClassException Something is wrong with a class used by - * serialization. - * @exception StreamCorruptedException Control information in the - * stream is inconsistent. - * @exception OptionalDataException Primitive data was found in the - * stream instead of objects. - * @exception IOException Any of the usual Input/Output related exceptions. - * @since JDK1.1 - */ - public final Object readObjectDelegate() throws IOException - { - try { - - readObjectState.readData(this); - - return orbStream.read_abstract_interface(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, true); - throw marshalException; - } catch(IndirectionException cdrie) - { - // The CDR stream had never seen the given offset before, - // so check the recursion manager (it will throw an - // IOException if it doesn't have a reference, either). - return activeRecursionMgr.getObject(cdrie.offset); - } - } - - final Object simpleReadObject(Class clz, - String repositoryID, - com.sun.org.omg.SendingContext.CodeBase sender, - int offset) - /* throws OptionalDataException, ClassNotFoundException, IOException */ - { - - /* Save the current state and get ready to read an object. */ - Object prevObject = currentObject; - ObjectStreamClass prevClassDesc = currentClassDesc; - Class prevClass = currentClass; - byte oldStreamFormatVersion = streamFormatVersion; - - simpleReadDepth++; // Entering - Object obj = null; - - /* - * Check for reset, handle it before reading an object. - */ - try { - // d4365188: backward compatability - if (vhandler.useFullValueDescription(clz, repositoryID)) { - obj = inputObjectUsingFVD(clz, repositoryID, sender, offset); - } else { - obj = inputObject(clz, repositoryID, sender, offset); - } - - obj = currentClassDesc.readResolve(obj); - } - catch(ClassNotFoundException cnfe) - { - bridge.throwException( cnfe ) ; - return null; - } - catch(IOException ioe) - { - // System.out.println("CLZ = " + clz + "; " + ioe.toString()); - bridge.throwException(ioe) ; - return null; - } - finally { - simpleReadDepth --; - currentObject = prevObject; - currentClassDesc = prevClassDesc; - currentClass = prevClass; - streamFormatVersion = oldStreamFormatVersion; - } - - - /* Check for thrown exceptions and re-throw them, clearing them if - * this is the last recursive call . - */ - IOException exIOE = abortIOException; - if (simpleReadDepth == 0) - abortIOException = null; - if (exIOE != null){ - bridge.throwException( exIOE ) ; - return null; - } - - - ClassNotFoundException exCNF = abortClassNotFoundException; - if (simpleReadDepth == 0) - abortClassNotFoundException = null; - if (exCNF != null) { - bridge.throwException( exCNF ) ; - return null; - } - - return obj; - } - - public final void simpleSkipObject(String repositoryID, - com.sun.org.omg.SendingContext.CodeBase sender) - /* throws OptionalDataException, ClassNotFoundException, IOException */ - { - - /* Save the current state and get ready to read an object. */ - Object prevObject = currentObject; - ObjectStreamClass prevClassDesc = currentClassDesc; - Class prevClass = currentClass; - byte oldStreamFormatVersion = streamFormatVersion; - - simpleReadDepth++; // Entering - Object obj = null; - - /* - * Check for reset, handle it before reading an object. - */ - try { - skipObjectUsingFVD(repositoryID, sender); - } - catch(ClassNotFoundException cnfe) - { - bridge.throwException( cnfe ) ; - return; - } - catch(IOException ioe) - { - bridge.throwException( ioe ) ; - return; - } - finally { - simpleReadDepth --; - streamFormatVersion = oldStreamFormatVersion; - currentObject = prevObject; - currentClassDesc = prevClassDesc; - currentClass = prevClass; - } - - - /* Check for thrown exceptions and re-throw them, clearing them if - * this is the last recursive call . - */ - IOException exIOE = abortIOException; - if (simpleReadDepth == 0) - abortIOException = null; - if (exIOE != null){ - bridge.throwException( exIOE ) ; - return; - } - - - ClassNotFoundException exCNF = abortClassNotFoundException; - if (simpleReadDepth == 0) - abortClassNotFoundException = null; - if (exCNF != null) { - bridge.throwException( exCNF ) ; - return; - } - - return; - } - ///////////////// - - /** - * This method is called by trusted subclasses of ObjectOutputStream - * that constructed ObjectOutputStream using the - * protected no-arg constructor. The subclass is expected to provide - * an override method with the modifier "final". - * - * @return the Object read from the stream. - * - * @see #ObjectInputStream() - * @see #readObject - * @since JDK 1.2 - */ - protected final Object readObjectOverride() - throws OptionalDataException, ClassNotFoundException, IOException - { - return readObjectDelegate(); - } - - /** - * Override the actions of the final method "defaultReadObject()" - * in ObjectInputStream. - * @since JDK1.1.6 - * - * Read the non-static and non-transient fields of the current class - * from this stream. This may only be called from the readObject method - * of the class being deserialized. It will throw the NotActiveException - * if it is called otherwise. - * - * @exception java.lang.ClassNotFoundException if the class of a serialized - * object could not be found. - * @exception IOException if an I/O error occurs. - * @exception NotActiveException if the stream is not currently reading - * objects. - * @since JDK1.1 - */ - public final void defaultReadObjectDelegate() - /* throws IOException, ClassNotFoundException, NotActiveException */ - { - try { - if (currentObject == null || currentClassDesc == null) - // XXX I18N, logging needed. - throw new NotActiveException("defaultReadObjectDelegate"); - - // The array will be null unless fields were retrieved - // remotely because of a serializable version difference. - // Bug fix for 4365188. See the definition of - // defaultReadObjectFVDMembers for more information. - if (defaultReadObjectFVDMembers != null && - defaultReadObjectFVDMembers.length > 0) { - - // WARNING: Be very careful! What if some of - // these fields actually have to do this, too? - // This works because the defaultReadObjectFVDMembers - // reference is passed to inputClassFields, but - // there is no guarantee that - // defaultReadObjectFVDMembers will point to the - // same array after calling inputClassFields. - - // Use the remote fields to unmarshal. - inputClassFields(currentObject, - currentClass, - currentClassDesc, - defaultReadObjectFVDMembers, - cbSender); - - } else { - - // Use the local fields to unmarshal. - ObjectStreamField[] fields = - currentClassDesc.getFieldsNoCopy(); - if (fields.length > 0) { - inputClassFields(currentObject, currentClass, fields, cbSender); - } - } - } - catch(NotActiveException nae) - { - bridge.throwException( nae ) ; - } - catch(IOException ioe) - { - bridge.throwException( ioe ) ; - } - catch(ClassNotFoundException cnfe) - { - bridge.throwException( cnfe ) ; - } - - } - - /** - * Override the actions of the final method "enableResolveObject()" - * in ObjectInputStream. - * @since JDK1.1.6 - * - * Enable the stream to allow objects read from the stream to be replaced. - * If the stream is a trusted class it is allowed to enable replacment. - * Trusted classes are those classes with a classLoader equals null.

    - * - * When enabled the resolveObject method is called for every object - * being deserialized. - * - * @exception SecurityException The classloader of this stream object is non-null. - * @since JDK1.1 - */ - public final boolean enableResolveObjectDelegate(boolean enable) - /* throws SecurityException */ - { - return false; - } - - // The following three methods allow the implementing orbStream - // to provide mark/reset behavior as defined in java.io.InputStream. - - public final void mark(int readAheadLimit) { - orbStream.mark(readAheadLimit); - } - - public final boolean markSupported() { - return orbStream.markSupported(); - } - - public final void reset() throws IOException { - try { - orbStream.reset(); - } catch (Error e) { - IOException err = new IOException(e.getMessage()); - err.initCause(e) ; - throw err ; - } - } - - public final int available() throws IOException{ - return 0; // unreliable - } - - public final void close() throws IOException{ - // no op - } - - public final int read() throws IOException{ - try{ - readObjectState.readData(this); - - return (orbStream.read_octet() << 0) & 0x000000FF; - } catch (MARSHAL marshalException) { - if (marshalException.minor - == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1) { - setState(IN_READ_OBJECT_NO_MORE_OPT_DATA); - return -1; - } - - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e) ; - throw exc ; - } - } - - public final int read(byte data[], int offset, int length) throws IOException{ - try{ - readObjectState.readData(this); - - orbStream.read_octet_array(data, offset, length); - return length; - } catch (MARSHAL marshalException) { - if (marshalException.minor - == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1) { - setState(IN_READ_OBJECT_NO_MORE_OPT_DATA); - return -1; - } - - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e) ; - throw exc ; - } - - } - - public final boolean readBoolean() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_boolean(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final byte readByte() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_octet(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final char readChar() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_wchar(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final double readDouble() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_double(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final float readFloat() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_float(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final void readFully(byte data[]) throws IOException{ -// d11623 : implement readFully, required for serializing some core classes - - readFully(data, 0, data.length); - } - - public final void readFully(byte data[], int offset, int size) throws IOException{ -// d11623 : implement readFully, required for serializing some core classes - try{ - readObjectState.readData(this); - - orbStream.read_octet_array(data, offset, size); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final int readInt() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_long(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final String readLine() throws IOException{ - // XXX I18N, logging needed. - throw new IOException("Method readLine not supported"); - } - - public final long readLong() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_longlong(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final short readShort() throws IOException{ - try{ - readObjectState.readData(this); - - return orbStream.read_short(); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - protected final void readStreamHeader() throws IOException, StreamCorruptedException{ - // no op - } - - public final int readUnsignedByte() throws IOException{ - try{ - readObjectState.readData(this); - - return (orbStream.read_octet() << 0) & 0x000000FF; - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - public final int readUnsignedShort() throws IOException{ - try{ - readObjectState.readData(this); - - return (orbStream.read_ushort() << 0) & 0x0000FFFF; - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - /** - * Helper method for correcting the Kestrel bug 4367783 (dealing - * with larger than 8-bit chars). The old behavior is preserved - * in orbutil.IIOPInputStream_1_3 in order to interoperate with - * our legacy ORBs. - */ - protected String internalReadUTF(org.omg.CORBA.portable.InputStream stream) - { - return stream.read_wstring(); - } - - public final String readUTF() throws IOException{ - try{ - readObjectState.readData(this); - - return internalReadUTF(orbStream); - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e); - throw exc ; - } - } - - // If the ORB stream detects an incompatibility between what's - // on the wire and what our Serializable's readObject wants, - // it throws a MARSHAL exception with a specific minor code. - // This is rethrown to the readObject as an OptionalDataException. - // So far in RMI-IIOP, this process isn't specific enough to - // tell the readObject how much data is available, so we always - // set the OptionalDataException's EOF marker to true. - private void handleOptionalDataMarshalException(MARSHAL marshalException, - boolean objectRead) - throws IOException { - - // Java Object Serialization spec 3.4: "If the readObject method - // of the class attempts to read more data than is present in the - // optional part of the stream for this class, the stream will - // return -1 for bytewise reads, throw an EOFException for - // primitive data reads, or throw an OptionalDataException - // with the eof field set to true for object reads." - if (marshalException.minor - == OMGSystemException.RMIIIOP_OPTIONAL_DATA_INCOMPATIBLE1) { - - IOException result; - - if (!objectRead) - result = new EOFException("No more optional data"); - else - result = createOptionalDataException(); - - result.initCause(marshalException); - - setState(IN_READ_OBJECT_NO_MORE_OPT_DATA); - - throw result; - } - } - - public final synchronized void registerValidation(ObjectInputValidation obj, - int prio) - throws NotActiveException, InvalidObjectException{ - // XXX I18N, logging needed. - throw new Error("Method registerValidation not supported"); - } - - protected final Class resolveClass(ObjectStreamClass v) - throws IOException, ClassNotFoundException{ - // XXX I18N, logging needed. - throw new IOException("Method resolveClass not supported"); - } - - protected final Object resolveObject(Object obj) throws IOException{ - // XXX I18N, logging needed. - throw new IOException("Method resolveObject not supported"); - } - - public final int skipBytes(int len) throws IOException{ - try{ - readObjectState.readData(this); - - byte buf[] = new byte[len]; - orbStream.read_octet_array(buf, 0, len); - return len; - } catch (MARSHAL marshalException) { - handleOptionalDataMarshalException(marshalException, false); - - throw marshalException; - } catch(Error e) { - IOException exc = new IOException(e.getMessage()); - exc.initCause(e) ; - throw exc ; - } - } - - private Object inputObject(Class clz, - String repositoryID, - com.sun.org.omg.SendingContext.CodeBase sender, - int offset) - throws IOException, ClassNotFoundException - { - - /* - * Get the descriptor and then class of the incoming object. - */ - - currentClassDesc = ObjectStreamClass.lookup(clz); - currentClass = currentClassDesc.forClass(); - //currentClassDesc.setClass(currentClass); - if (currentClass == null) - // XXX I18N, logging needed. - throw new ClassNotFoundException(currentClassDesc.getName()); - - try { - /* If Externalizable, - * Create an instance and tell it to read its data. - * else, - * Handle it as a serializable class. - */ - if (currentClassDesc.isExternalizable()) { - try { - currentObject = (currentClass == null) ? - null : currentClassDesc.newInstance(); - if (currentObject != null) { - - // Store this object and its beginning position - // since there might be indirections to it while - // it's been unmarshalled. - activeRecursionMgr.addObject(offset, currentObject); - - // Read format version - readFormatVersion(); - - Externalizable ext = (Externalizable)currentObject; - ext.readExternal(this); - } - } catch (InvocationTargetException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InvocationTargetException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (UnsupportedOperationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "UnsupportedOperationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (InstantiationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InstantiationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } - } // end : if (currentClassDesc.isExternalizable()) - else { - /* Count number of classes and descriptors we might have - * to work on. - */ - - ObjectStreamClass currdesc = currentClassDesc; - Class currclass = currentClass; - - int spBase = spClass; // current top of stack - - /* The object's classes should be processed from supertype to subtype - * Push all the clases of the current object onto a stack. - * Note that only the serializable classes are represented - * in the descriptor list. - * - * Handle versioning where one or more supertypes of - * have been inserted or removed. The stack will - * contain pairs of descriptors and the corresponding - * class. If the object has a class that did not occur in - * the original the descriptor will be null. If the - * original object had a descriptor for a class not - * present in the local hierarchy of the object the class will be - * null. - * - */ - - /* - * This is your basic diff pattern, made simpler - * because reordering is not allowed. - */ - // sun.4296963 ibm.11861 - // d11861 we should stop when we find the highest serializable class - // We need this so that when we allocate the new object below, we - // can call the constructor of the non-serializable superclass. - // Note that in the JRMP variant of this code the - // ObjectStreamClass.lookup() method handles this, but we've put - // this fix here rather than change lookup because the new behaviour - // is needed in other cases. - - for (currdesc = currentClassDesc, currclass = currentClass; - currdesc != null && currdesc.isSerializable(); /*sun.4296963 ibm.11861*/ - currdesc = currdesc.getSuperclass()) { - - /* - * Search the classes to see if the class of this - * descriptor appears further up the hierarchy. Until - * it's found assume its an inserted class. If it's - * not found, its the descriptor's class that has been - * removed. - */ - Class cc = currdesc.forClass(); - Class cl; - for (cl = currclass; cl != null; cl = cl.getSuperclass()) { - if (cc == cl) { - // found a superclass that matches this descriptor - break; - } else { - /* Ignore a class that doesn't match. No - * action is needed since it is already - * initialized. - */ - } - } // end : for (cl = currclass; cl != null; cl = cl.getSuperclass()) - /* Test if there is room for this new entry. - * If not, double the size of the arrays and copy the contents. - */ - spClass++; - if (spClass >= classes.length) { - int newlen = classes.length * 2; - Class[] newclasses = new Class[newlen]; - ObjectStreamClass[] newclassdesc = new ObjectStreamClass[newlen]; - - System.arraycopy(classes, 0, - newclasses, 0, - classes.length); - System.arraycopy(classdesc, 0, - newclassdesc, 0, - classes.length); - - classes = newclasses; - classdesc = newclassdesc; - } - - if (cl == null) { - /* Class not found corresponding to this descriptor. - * Pop off all the extra classes pushed. - * Push the descriptor and a null class. - */ - classdesc[spClass] = currdesc; - classes[spClass] = null; - } else { - /* Current class descriptor matches current class. - * Some classes may have been inserted. - * Record the match and advance the class, continue - * with the next descriptor. - */ - classdesc[spClass] = currdesc; - classes[spClass] = cl; - currclass = cl.getSuperclass(); - } - } // end : for (currdesc = currentClassDesc, currclass = currentClass; - - /* Allocate a new object. The object is only constructed - * above the highest serializable class and is set to - * default values for all more specialized classes. - */ - try { - currentObject = (currentClass == null) ? - null : currentClassDesc.newInstance() ; - - // Store this object and its beginning position - // since there might be indirections to it while - // it's been unmarshalled. - activeRecursionMgr.addObject(offset, currentObject); - } catch (InvocationTargetException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InvocationTargetException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (UnsupportedOperationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "UnsupportedOperationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (InstantiationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InstantiationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } - - /* - * For all the pushed descriptors and classes. - * if the class has its own writeObject and readObject methods - * call the readObject method - * else - * invoke the defaultReadObject method - */ - try { - for (spClass = spClass; spClass > spBase; spClass--) { - /* - * Set current descriptor and corresponding class - */ - currentClassDesc = classdesc[spClass]; - currentClass = classes[spClass]; - if (classes[spClass] != null) { - /* Read the data from the stream described by the - * descriptor and store into the matching class. - */ - - ReadObjectState oldState = readObjectState; - setState(DEFAULT_STATE); - - try { - - // Changed since invokeObjectReader no longer does this. - if (currentClassDesc.hasWriteObject()) { - - // Read format version - readFormatVersion(); - - // Read defaultWriteObject indicator - boolean calledDefaultWriteObject = readBoolean(); - - readObjectState.beginUnmarshalCustomValue(this, - calledDefaultWriteObject, - (currentClassDesc.readObjectMethod - != null)); - } else { - if (currentClassDesc.hasReadObject()) - setState(IN_READ_OBJECT_REMOTE_NOT_CUSTOM_MARSHALED); - } - - if (!invokeObjectReader(currentClassDesc, currentObject, currentClass) || - readObjectState == IN_READ_OBJECT_DEFAULTS_SENT) { - - // Error case of no readObject and didn't call - // defaultWriteObject handled in default state - - ObjectStreamField[] fields = - currentClassDesc.getFieldsNoCopy(); - if (fields.length > 0) { - inputClassFields(currentObject, currentClass, fields, sender); - } - } - - if (currentClassDesc.hasWriteObject()) - readObjectState.endUnmarshalCustomValue(this); - - } finally { - setState(oldState); - } - - } else { - - // _REVISIT_ : Can we ever get here? - /* No local class for this descriptor, - * Skip over the data for this class. - * like defaultReadObject with a null currentObject. - * The code will read the values but discard them. - */ - ObjectStreamField[] fields = - currentClassDesc.getFieldsNoCopy(); - if (fields.length > 0) { - inputClassFields(null, currentClass, fields, sender); - } - - } - - } - } finally { - // Make sure we exit at the same stack level as when we started. - spClass = spBase; - } - } - } finally { - // We've completed deserializing this object. Any - // future indirections will be handled correctly at the - // CDR level. The ActiveRecursionManager only deals with - // objects currently being deserialized. - activeRecursionMgr.removeObject(offset); - } - - return currentObject; - } - - // This retrieves a vector of FVD's for the hierarchy of serializable classes stemming from - // repositoryID. It is assumed that the sender will not provide base_value id's for non-serializable - // classes! - private Vector getOrderedDescriptions(String repositoryID, - com.sun.org.omg.SendingContext.CodeBase sender) { - Vector descs = new Vector(); - - if (sender == null) { - return descs; - } - - FullValueDescription aFVD = sender.meta(repositoryID); - while (aFVD != null) { - descs.insertElementAt(aFVD, 0); - if ((aFVD.base_value != null) && !kEmptyStr.equals(aFVD.base_value)) { - aFVD = sender.meta(aFVD.base_value); - } - else return descs; - } - - return descs; - } - - /** - * This input method uses FullValueDescriptions retrieved from the sender's runtime to - * read in the data. This method is capable of throwing out data not applicable to client's fields. - * This method handles instances where the reader has a class not sent by the sender, the sender sent - * a class not present on the reader, and/or the reader's class does not match the sender's class. - * - * NOTE : If the local description indicates custom marshaling and the remote type's FVD also - * indicates custom marsahling than the local type is used to read the data off the wire. However, - * if either says custom while the other does not, a MARSHAL error is thrown. Externalizable is - * a form of custom marshaling. - * - */ - private Object inputObjectUsingFVD(Class clz, - String repositoryID, - com.sun.org.omg.SendingContext.CodeBase sender, - int offset) - throws IOException, ClassNotFoundException - { - int spBase = spClass; // current top of stack - try{ - - /* - * Get the descriptor and then class of the incoming object. - */ - - ObjectStreamClass currdesc = currentClassDesc = ObjectStreamClass.lookup(clz); - Class currclass = currentClass = clz; - - /* If Externalizable, - * Create an instance and tell it to read its data. - * else, - * Handle it as a serializable class. - */ - if (currentClassDesc.isExternalizable()) { - try { - currentObject = (currentClass == null) ? - null : currentClassDesc.newInstance(); - if (currentObject != null) { - // Store this object and its beginning position - // since there might be indirections to it while - // it's been unmarshalled. - activeRecursionMgr.addObject(offset, currentObject); - - // Read format version - readFormatVersion(); - - Externalizable ext = (Externalizable)currentObject; - ext.readExternal(this); - } - } catch (InvocationTargetException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InvocationTargetException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (UnsupportedOperationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "UnsupportedOperationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (InstantiationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InstantiationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } - } else { - /* - * This is your basic diff pattern, made simpler - * because reordering is not allowed. - */ - for (currdesc = currentClassDesc, currclass = currentClass; - currdesc != null && currdesc.isSerializable(); /*sun.4296963 ibm.11861*/ - - currdesc = currdesc.getSuperclass()) { - - /* - * Search the classes to see if the class of this - * descriptor appears further up the hierarchy. Until - * it's found assume its an inserted class. If it's - * not found, its the descriptor's class that has been - * removed. - */ - Class cc = currdesc.forClass(); - Class cl; - for (cl = currclass; cl != null; cl = cl.getSuperclass()) { - if (cc == cl) { - // found a superclass that matches this descriptor - break; - } else { - /* Ignore a class that doesn't match. No - * action is needed since it is already - * initialized. - */ - } - } // end : for (cl = currclass; cl != null; cl = cl.getSuperclass()) - /* Test if there is room for this new entry. - * If not, double the size of the arrays and copy the contents. - */ - spClass++; - if (spClass >= classes.length) { - int newlen = classes.length * 2; - Class[] newclasses = new Class[newlen]; - ObjectStreamClass[] newclassdesc = new ObjectStreamClass[newlen]; - - System.arraycopy(classes, 0, - newclasses, 0, - classes.length); - System.arraycopy(classdesc, 0, - newclassdesc, 0, - classes.length); - - classes = newclasses; - classdesc = newclassdesc; - } - - if (cl == null) { - /* Class not found corresponding to this descriptor. - * Pop off all the extra classes pushed. - * Push the descriptor and a null class. - */ - classdesc[spClass] = currdesc; - classes[spClass] = null; - } else { - /* Current class descriptor matches current class. - * Some classes may have been inserted. - * Record the match and advance the class, continue - * with the next descriptor. - */ - classdesc[spClass] = currdesc; - classes[spClass] = cl; - currclass = cl.getSuperclass(); - } - } // end : for (currdesc = currentClassDesc, currclass = currentClass; - - /* Allocate a new object. - */ - try { - currentObject = (currentClass == null) ? - null : currentClassDesc.newInstance(); - - // Store this object and its beginning position - // since there might be indirections to it while - // it's been unmarshalled. - activeRecursionMgr.addObject(offset, currentObject); - } catch (InvocationTargetException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InvocationTargetException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (UnsupportedOperationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "UnsupportedOperationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } catch (InstantiationException e) { - InvalidClassException exc = new InvalidClassException( - currentClass.getName(), - "InstantiationException accessing no-arg constructor"); - exc.initCause( e ) ; - throw exc ; - } - - Enumeration fvdsList = getOrderedDescriptions(repositoryID, sender).elements(); - - while((fvdsList.hasMoreElements()) && (spClass > spBase)) { - FullValueDescription fvd = (FullValueDescription)fvdsList.nextElement(); - // d4365188: backward compatability - String repIDForFVD = vhandler.getClassName(fvd.id); - String repIDForClass = vhandler.getClassName(vhandler.getRMIRepositoryID(currentClass)); - - while ((spClass > spBase) && - (!repIDForFVD.equals(repIDForClass))) { - int pos = findNextClass(repIDForFVD, classes, spClass, spBase); - if (pos != -1) { - spClass = pos; - currclass = currentClass = classes[spClass]; - repIDForClass = vhandler.getClassName(vhandler.getRMIRepositoryID(currentClass)); - } - else { // Read and throw away one level of the fvdslist - - // This seems to mean that the sender had a superclass that - // we don't have - - if (fvd.is_custom) { - - readFormatVersion(); - boolean calledDefaultWriteObject = readBoolean(); - - if (calledDefaultWriteObject) - inputClassFields(null, null, null, fvd.members, sender); - - if (getStreamFormatVersion() == 2) { - - ((ValueInputStream)getOrbStream()).start_value(); - ((ValueInputStream)getOrbStream()).end_value(); - } - - // WARNING: If stream format version is 1 and there's - // optional data, we'll get some form of exception down - // the line or data corruption. - - } else { - - inputClassFields(null, currentClass, null, fvd.members, sender); - } - - if (fvdsList.hasMoreElements()){ - fvd = (FullValueDescription)fvdsList.nextElement(); - repIDForFVD = vhandler.getClassName(fvd.id); - } - else return currentObject; - } - } - - currdesc = currentClassDesc = ObjectStreamClass.lookup(currentClass); - - if (!repIDForClass.equals("java.lang.Object")) { - - // If the sender used custom marshaling, then it should have put - // the two bytes on the wire indicating stream format version - // and whether or not the writeObject method called - // defaultWriteObject/writeFields. - - ReadObjectState oldState = readObjectState; - setState(DEFAULT_STATE); - - try { - - if (fvd.is_custom) { - - // Read format version - readFormatVersion(); - - // Read defaultWriteObject indicator - boolean calledDefaultWriteObject = readBoolean(); - - readObjectState.beginUnmarshalCustomValue(this, - calledDefaultWriteObject, - (currentClassDesc.readObjectMethod - != null)); - } - - boolean usedReadObject = false; - - // Always use readObject if it exists, and fall back to default - // unmarshaling if it doesn't. - try { - - if (!fvd.is_custom && currentClassDesc.hasReadObject()) - setState(IN_READ_OBJECT_REMOTE_NOT_CUSTOM_MARSHALED); - - // See the definition of defaultReadObjectFVDMembers - // for more information. This concerns making sure - // we use the remote FVD's members in defaultReadObject. - defaultReadObjectFVDMembers = fvd.members; - usedReadObject = invokeObjectReader(currentClassDesc, - currentObject, - currentClass); - - } finally { - defaultReadObjectFVDMembers = null; - } - - // Note that the !usedReadObject !calledDefaultWriteObject - // case is handled by the beginUnmarshalCustomValue method - // of the default state - if (!usedReadObject || readObjectState == IN_READ_OBJECT_DEFAULTS_SENT) - inputClassFields(currentObject, currentClass, currdesc, fvd.members, sender); - - if (fvd.is_custom) - readObjectState.endUnmarshalCustomValue(this); - - } finally { - setState(oldState); - } - - currclass = currentClass = classes[--spClass]; - - } else { - - // The remaining hierarchy of the local class does not match the sender's FVD. - // So, use remaining FVDs to read data off wire. If any remaining FVDs indicate - // custom marshaling, throw MARSHAL error. - inputClassFields(null, currentClass, null, fvd.members, sender); - - while (fvdsList.hasMoreElements()){ - fvd = (FullValueDescription)fvdsList.nextElement(); - - if (fvd.is_custom) - skipCustomUsingFVD(fvd.members, sender); - else - inputClassFields(null, currentClass, null, fvd.members, sender); - } - - } - - } // end : while(fvdsList.hasMoreElements()) - while (fvdsList.hasMoreElements()){ - - FullValueDescription fvd = (FullValueDescription)fvdsList.nextElement(); - if (fvd.is_custom) - skipCustomUsingFVD(fvd.members, sender); - else - throwAwayData(fvd.members, sender); - } - } - - return currentObject; - } - finally { - // Make sure we exit at the same stack level as when we started. - spClass = spBase; - - // We've completed deserializing this object. Any - // future indirections will be handled correctly at the - // CDR level. The ActiveRecursionManager only deals with - // objects currently being deserialized. - activeRecursionMgr.removeObject(offset); - } - - } - - /** - * This input method uses FullValueDescriptions retrieved from the sender's runtime to - * read in the data. This method is capable of throwing out data not applicable to client's fields. - * - * NOTE : If the local description indicates custom marshaling and the remote type's FVD also - * indicates custom marsahling than the local type is used to read the data off the wire. However, - * if either says custom while the other does not, a MARSHAL error is thrown. Externalizable is - * a form of custom marshaling. - * - */ - private Object skipObjectUsingFVD(String repositoryID, - com.sun.org.omg.SendingContext.CodeBase sender) - throws IOException, ClassNotFoundException - { - - Enumeration fvdsList = getOrderedDescriptions(repositoryID, sender).elements(); - - while(fvdsList.hasMoreElements()) { - FullValueDescription fvd = (FullValueDescription)fvdsList.nextElement(); - String repIDForFVD = vhandler.getClassName(fvd.id); - - if (!repIDForFVD.equals("java.lang.Object")) { - if (fvd.is_custom) { - - readFormatVersion(); - - boolean calledDefaultWriteObject = readBoolean(); - - if (calledDefaultWriteObject) - inputClassFields(null, null, null, fvd.members, sender); - - if (getStreamFormatVersion() == 2) { - - ((ValueInputStream)getOrbStream()).start_value(); - ((ValueInputStream)getOrbStream()).end_value(); - } - - // WARNING: If stream format version is 1 and there's - // optional data, we'll get some form of exception down - // the line. - - } else { - // Use default marshaling - inputClassFields(null, null, null, fvd.members, sender); - } - } - - } // end : while(fvdsList.hasMoreElements()) - return null; - - } - - /////////////////// - - private int findNextClass(String classname, Class classes[], int _spClass, int _spBase){ - - for (int i = _spClass; i > _spBase; i--){ - if (classname.equals(classes[i].getName())) { - return i; - } - } - - return -1; - } - - /* - * Invoke the readObject method if present. Assumes that in the case of custom - * marshaling, the format version and defaultWriteObject indicator were already - * removed. - */ - private boolean invokeObjectReader(ObjectStreamClass osc, Object obj, Class aclass) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException - { - if (osc.readObjectMethod == null) { - return false; - } - - try { - osc.readObjectMethod.invoke( obj, readObjectArgList ) ; - return true; - } catch (InvocationTargetException e) { - Throwable t = e.getTargetException(); - if (t instanceof ClassNotFoundException) - throw (ClassNotFoundException)t; - else if (t instanceof IOException) - throw (IOException)t; - else if (t instanceof RuntimeException) - throw (RuntimeException) t; - else if (t instanceof Error) - throw (Error) t; - else - // XXX I18N, logging needed. - throw new Error("internal error"); - } catch (IllegalAccessException e) { - return false; - } - } - - /* - * Reset the stream to be just like it was after the constructor. - */ - private void resetStream() throws IOException { - - if (classes == null) - classes = new Class[20]; - else { - for (int i = 0; i < classes.length; i++) - classes[i] = null; - } - if (classdesc == null) - classdesc = new ObjectStreamClass[20]; - else { - for (int i = 0; i < classdesc.length; i++) - classdesc[i] = null; - } - spClass = 0; - - if (callbacks != null) - callbacks.setSize(0); // discard any pending callbacks - } - - /** - * Factored out of inputClassFields This reads a primitive value and sets it - * in the field of o described by the ObjectStreamField field. - * - * Note that reflection cannot be used here, because reflection cannot be used - * to set final fields. - */ - private void inputPrimitiveField(Object o, Class cl, ObjectStreamField field) - throws InvalidClassException, IOException { - - try { - switch (field.getTypeCode()) { - case 'B': - byte byteValue = orbStream.read_octet(); - bridge.putByte( o, field.getFieldID(), byteValue ) ; - //reflective code: field.getField().setByte( o, byteValue ) ; - break; - case 'Z': - boolean booleanValue = orbStream.read_boolean(); - bridge.putBoolean( o, field.getFieldID(), booleanValue ) ; - //reflective code: field.getField().setBoolean( o, booleanValue ) ; - break; - case 'C': - char charValue = orbStream.read_wchar(); - bridge.putChar( o, field.getFieldID(), charValue ) ; - //reflective code: field.getField().setChar( o, charValue ) ; - break; - case 'S': - short shortValue = orbStream.read_short(); - bridge.putShort( o, field.getFieldID(), shortValue ) ; - //reflective code: field.getField().setShort( o, shortValue ) ; - break; - case 'I': - int intValue = orbStream.read_long(); - bridge.putInt( o, field.getFieldID(), intValue ) ; - //reflective code: field.getField().setInt( o, intValue ) ; - break; - case 'J': - long longValue = orbStream.read_longlong(); - bridge.putLong( o, field.getFieldID(), longValue ) ; - //reflective code: field.getField().setLong( o, longValue ) ; - break; - case 'F' : - float floatValue = orbStream.read_float(); - bridge.putFloat( o, field.getFieldID(), floatValue ) ; - //reflective code: field.getField().setFloat( o, floatValue ) ; - break; - case 'D' : - double doubleValue = orbStream.read_double(); - bridge.putDouble( o, field.getFieldID(), doubleValue ) ; - //reflective code: field.getField().setDouble( o, doubleValue ) ; - break; - default: - // XXX I18N, logging needed. - throw new InvalidClassException(cl.getName()); - } - } catch (IllegalArgumentException e) { - /* This case should never happen. If the field types - are not the same, InvalidClassException is raised when - matching the local class to the serialized ObjectStreamClass. */ - ClassCastException cce = new ClassCastException("Assigning instance of class " + - field.getType().getName() + - " to field " + - currentClassDesc.getName() + '#' + - field.getField().getName()); - cce.initCause( e ) ; - throw cce ; - } - } - - private Object inputObjectField(org.omg.CORBA.ValueMember field, - com.sun.org.omg.SendingContext.CodeBase sender) - throws IndirectionException, ClassNotFoundException, IOException, - StreamCorruptedException { - - Object objectValue = null; - Class type = null; - String id = field.id; - - try { - type = vhandler.getClassFromType(id); - } catch(ClassNotFoundException cnfe) { - // Make sure type = null - type = null; - } - - String signature = null; - if (type != null) - signature = ValueUtility.getSignature(field); - - if (signature != null && (signature.equals("Ljava/lang/Object;") || - signature.equals("Ljava/io/Serializable;") || - signature.equals("Ljava/io/Externalizable;"))) { - objectValue = javax.rmi.CORBA.Util.readAny(orbStream); - } else { - // Decide what method call to make based on the type. If - // it is a type for which we need to load a stub, convert - // the type to the correct stub type. - // - // NOTE : Since FullValueDescription does not allow us - // to ask whether something is an interface we do not - // have the ability to optimize this check. - - int callType = ValueHandlerImpl.kValueType; - - if (!vhandler.isSequence(id)) { - - if (field.type.kind().value() == kRemoteTypeCode.kind().value()) { - - // RMI Object reference... - callType = ValueHandlerImpl.kRemoteType; - - } else { - - // REVISIT. If we don't have the local class, - // we should probably verify that it's an RMI type, - // query the remote FVD, and use is_abstract. - // Our FVD seems to get NullPointerExceptions for any - // non-RMI types. - - // This uses the local class in the same way as - // inputObjectField(ObjectStreamField) does. REVISIT - // inputObjectField(ObjectStreamField)'s loadStubClass - // logic. Assumption is that the given type cannot - // evolve to become a CORBA abstract interface or - // a RMI abstract interface. - - if (type != null && type.isInterface() && - (vhandler.isAbstractBase(type) || - ObjectStreamClassCorbaExt.isAbstractInterface(type))) { - - callType = ValueHandlerImpl.kAbstractType; - } - } - } - - // Now that we have used the FVD of the field to determine the proper course - // of action, it is ok to use the type (Class) from this point forward since - // the rep. id for this read will also follow on the wire. - - switch (callType) { - case ValueHandlerImpl.kRemoteType: - if (type != null) - objectValue = Utility.readObjectAndNarrow(orbStream, type); - else - objectValue = orbStream.read_Object(); - break; - case ValueHandlerImpl.kAbstractType: - if (type != null) - objectValue = Utility.readAbstractAndNarrow(orbStream, type); - else - objectValue = orbStream.read_abstract_interface(); - break; - case ValueHandlerImpl.kValueType: - if (type != null) - objectValue = orbStream.read_value(type); - else - objectValue = orbStream.read_value(); - break; - default: - // XXX I18N, logging needed. - throw new StreamCorruptedException("Unknown callType: " + callType); - } - } - - return objectValue; - } - - /** - * Factored out of inputClassFields and reused in - * inputCurrentClassFieldsForReadFields. - * - * Reads the field (which of an Object type as opposed to a primitive) - * described by ObjectStreamField field and returns it. - */ - private Object inputObjectField(ObjectStreamField field) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IndirectionException, IOException { - - if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) { - return javax.rmi.CORBA.Util.readAny(orbStream); - } - - Object objectValue = null; - - // fields have an API to provide the actual class - // corresponding to the data type - // Class type = osc.forClass(); - Class fieldType = field.getType(); - Class actualType = fieldType; // This may change if stub loaded. - - // Decide what method call to make based on the fieldType. If - // it is a type for which we need to load a stub, convert - // the type to the correct stub type. - - int callType = ValueHandlerImpl.kValueType; - boolean narrow = false; - - if (fieldType.isInterface()) { - boolean loadStubClass = false; - - if (java.rmi.Remote.class.isAssignableFrom(fieldType)) { - - // RMI Object reference... - callType = ValueHandlerImpl.kRemoteType; - - } else if (org.omg.CORBA.Object.class.isAssignableFrom(fieldType)){ - - // IDL Object reference... - callType = ValueHandlerImpl.kRemoteType; - loadStubClass = true; - - } else if (vhandler.isAbstractBase(fieldType)) { - // IDL Abstract Object reference... - - callType = ValueHandlerImpl.kAbstractType; - loadStubClass = true; - } else if (ObjectStreamClassCorbaExt.isAbstractInterface(fieldType)) { - // RMI Abstract Object reference... - - callType = ValueHandlerImpl.kAbstractType; - } - - if (loadStubClass) { - try { - String codebase = Util.getCodebase(fieldType); - String repID = vhandler.createForAnyType(fieldType); - Class stubType = - Utility.loadStubClass(repID, codebase, fieldType); - actualType = stubType; - } catch (ClassNotFoundException e) { - narrow = true; - } - } else { - narrow = true; - } - } - - switch (callType) { - case ValueHandlerImpl.kRemoteType: - if (!narrow) - objectValue = (Object)orbStream.read_Object(actualType); - else - objectValue = Utility.readObjectAndNarrow(orbStream, actualType); - break; - case ValueHandlerImpl.kAbstractType: - if (!narrow) - objectValue = (Object)orbStream.read_abstract_interface(actualType); - else - objectValue = Utility.readAbstractAndNarrow(orbStream, actualType); - break; - case ValueHandlerImpl.kValueType: - objectValue = (Object)orbStream.read_value(actualType); - break; - default: - // XXX I18N, logging needed. - throw new StreamCorruptedException("Unknown callType: " + callType); - } - - return objectValue; - } - - private final boolean mustUseRemoteValueMembers() { - return defaultReadObjectFVDMembers != null; - } - - void readFields(java.util.Map fieldToValueMap) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException { - - if (mustUseRemoteValueMembers()) { - inputRemoteMembersForReadFields(fieldToValueMap); - } else - inputCurrentClassFieldsForReadFields(fieldToValueMap); - } - - private final void inputRemoteMembersForReadFields(java.util.Map fieldToValueMap) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException { - - // Must have this local variable since defaultReadObjectFVDMembers - // may get mangled by recursion. - ValueMember fields[] = defaultReadObjectFVDMembers; - - try { - - for (int i = 0; i < fields.length; i++) { - - switch (fields[i].type.kind().value()) { - - case TCKind._tk_octet: - byte byteValue = orbStream.read_octet(); - fieldToValueMap.put(fields[i].name, new Byte(byteValue)); - break; - case TCKind._tk_boolean: - boolean booleanValue = orbStream.read_boolean(); - fieldToValueMap.put(fields[i].name, new Boolean(booleanValue)); - break; - case TCKind._tk_char: - // Backwards compatibility. Older Sun ORBs sent - // _tk_char even though they read and wrote wchars - // correctly. - // - // Fall through to the _tk_wchar case. - case TCKind._tk_wchar: - char charValue = orbStream.read_wchar(); - fieldToValueMap.put(fields[i].name, new Character(charValue)); - break; - case TCKind._tk_short: - short shortValue = orbStream.read_short(); - fieldToValueMap.put(fields[i].name, new Short(shortValue)); - break; - case TCKind._tk_long: - int intValue = orbStream.read_long(); - fieldToValueMap.put(fields[i].name, new Integer(intValue)); - break; - case TCKind._tk_longlong: - long longValue = orbStream.read_longlong(); - fieldToValueMap.put(fields[i].name, new Long(longValue)); - break; - case TCKind._tk_float: - float floatValue = orbStream.read_float(); - fieldToValueMap.put(fields[i].name, new Float(floatValue)); - break; - case TCKind._tk_double: - double doubleValue = orbStream.read_double(); - fieldToValueMap.put(fields[i].name, new Double(doubleValue)); - break; - case TCKind._tk_value: - case TCKind._tk_objref: - case TCKind._tk_value_box: - Object objectValue = null; - try { - objectValue = inputObjectField(fields[i], - cbSender); - - } catch (IndirectionException cdrie) { - // The CDR stream had never seen the given offset before, - // so check the recursion manager (it will throw an - // IOException if it doesn't have a reference, either). - objectValue = activeRecursionMgr.getObject(cdrie.offset); - } - - fieldToValueMap.put(fields[i].name, objectValue); - break; - default: - // XXX I18N, logging needed. - throw new StreamCorruptedException("Unknown kind: " - + fields[i].type.kind().value()); - } - } - } catch (Throwable t) { - StreamCorruptedException result = new StreamCorruptedException(t.getMessage()); - result.initCause(t); - throw result; - } - } - - /** - * Called from InputStreamHook. - * - * Reads the fields of the current class (could be the ones - * queried from the remote FVD) and puts them in - * the given Map, name to value. Wraps primitives in the - * corresponding java.lang Objects. - */ - private final void inputCurrentClassFieldsForReadFields(java.util.Map fieldToValueMap) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException { - - ObjectStreamField[] fields = currentClassDesc.getFieldsNoCopy(); - - int primFields = fields.length - currentClassDesc.objFields; - - // Handle the primitives first - for (int i = 0; i < primFields; ++i) { - - switch (fields[i].getTypeCode()) { - case 'B': - byte byteValue = orbStream.read_octet(); - fieldToValueMap.put(fields[i].getName(), - new Byte(byteValue)); - break; - case 'Z': - boolean booleanValue = orbStream.read_boolean(); - fieldToValueMap.put(fields[i].getName(), - new Boolean(booleanValue)); - break; - case 'C': - char charValue = orbStream.read_wchar(); - fieldToValueMap.put(fields[i].getName(), - new Character(charValue)); - break; - case 'S': - short shortValue = orbStream.read_short(); - fieldToValueMap.put(fields[i].getName(), - new Short(shortValue)); - break; - case 'I': - int intValue = orbStream.read_long(); - fieldToValueMap.put(fields[i].getName(), - new Integer(intValue)); - break; - case 'J': - long longValue = orbStream.read_longlong(); - fieldToValueMap.put(fields[i].getName(), - new Long(longValue)); - break; - case 'F' : - float floatValue = orbStream.read_float(); - fieldToValueMap.put(fields[i].getName(), - new Float(floatValue)); - break; - case 'D' : - double doubleValue = orbStream.read_double(); - fieldToValueMap.put(fields[i].getName(), - new Double(doubleValue)); - break; - default: - // XXX I18N, logging needed. - throw new InvalidClassException(currentClassDesc.getName()); - } - } - - /* Read and set object fields from the input stream. */ - if (currentClassDesc.objFields > 0) { - for (int i = primFields; i < fields.length; i++) { - Object objectValue = null; - try { - objectValue = inputObjectField(fields[i]); - } catch(IndirectionException cdrie) { - // The CDR stream had never seen the given offset before, - // so check the recursion manager (it will throw an - // IOException if it doesn't have a reference, either). - objectValue = activeRecursionMgr.getObject(cdrie.offset); - } - - fieldToValueMap.put(fields[i].getName(), objectValue); - } - } - } - - /* - * Read the fields of the specified class from the input stream and set - * the values of the fields in the specified object. If the specified - * object is null, just consume the fields without setting any values. If - * any ObjectStreamField does not have a reflected Field, don't try to set - * that field in the object. - * - * REVISIT -- This code doesn't do what the comment says to when - * getField() is null! - */ - private void inputClassFields(Object o, Class cl, - ObjectStreamField[] fields, - com.sun.org.omg.SendingContext.CodeBase sender) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException - { - - int primFields = fields.length - currentClassDesc.objFields; - - if (o != null) { - for (int i = 0; i < primFields; ++i) { - if (fields[i].getField() == null) - continue; - - inputPrimitiveField(o, cl, fields[i]); - } - } - - /* Read and set object fields from the input stream. */ - if (currentClassDesc.objFields > 0) { - for (int i = primFields; i < fields.length; i++) { - Object objectValue = null; - - try { - objectValue = inputObjectField(fields[i]); - } catch(IndirectionException cdrie) { - // The CDR stream had never seen the given offset before, - // so check the recursion manager (it will throw an - // IOException if it doesn't have a reference, either). - objectValue = activeRecursionMgr.getObject(cdrie.offset); - } - - if ((o == null) || (fields[i].getField() == null)) { - continue; - } - - try { - bridge.putObject( o, fields[i].getFieldID(), objectValue ) ; - // reflective code: fields[i].getField().set( o, objectValue ) ; - } catch (IllegalArgumentException e) { - ClassCastException exc = new ClassCastException("Assigning instance of class " + - objectValue.getClass().getName() + - " to field " + - currentClassDesc.getName() + - '#' + - fields[i].getField().getName()); - exc.initCause( e ) ; - throw exc ; - } - } // end : for loop - } - } - - /* - * Read the fields of the specified class from the input stream and set - * the values of the fields in the specified object. If the specified - * object is null, just consume the fields without setting any values. If - * any ObjectStreamField does not have a reflected Field, don't try to set - * that field in the object. - */ - private void inputClassFields(Object o, Class cl, - ObjectStreamClass osc, - ValueMember[] fields, - com.sun.org.omg.SendingContext.CodeBase sender) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException - { - try{ - for (int i = 0; i < fields.length; ++i) { - try { - switch (fields[i].type.kind().value()) { - case TCKind._tk_octet: - byte byteValue = orbStream.read_octet(); - if ((o != null) && osc.hasField(fields[i])) - setByteField(o, cl, fields[i].name, byteValue); - break; - case TCKind._tk_boolean: - boolean booleanValue = orbStream.read_boolean(); - if ((o != null) && osc.hasField(fields[i])) - setBooleanField(o, cl, fields[i].name, booleanValue); - break; - case TCKind._tk_char: - // Backwards compatibility. Older Sun ORBs sent - // _tk_char even though they read and wrote wchars - // correctly. - // - // Fall through to the _tk_wchar case. - case TCKind._tk_wchar: - char charValue = orbStream.read_wchar(); - if ((o != null) && osc.hasField(fields[i])) - setCharField(o, cl, fields[i].name, charValue); - break; - case TCKind._tk_short: - short shortValue = orbStream.read_short(); - if ((o != null) && osc.hasField(fields[i])) - setShortField(o, cl, fields[i].name, shortValue); - break; - case TCKind._tk_long: - int intValue = orbStream.read_long(); - if ((o != null) && osc.hasField(fields[i])) - setIntField(o, cl, fields[i].name, intValue); - break; - case TCKind._tk_longlong: - long longValue = orbStream.read_longlong(); - if ((o != null) && osc.hasField(fields[i])) - setLongField(o, cl, fields[i].name, longValue); - break; - case TCKind._tk_float: - float floatValue = orbStream.read_float(); - if ((o != null) && osc.hasField(fields[i])) - setFloatField(o, cl, fields[i].name, floatValue); - break; - case TCKind._tk_double: - double doubleValue = orbStream.read_double(); - if ((o != null) && osc.hasField(fields[i])) - setDoubleField(o, cl, fields[i].name, doubleValue); - break; - case TCKind._tk_value: - case TCKind._tk_objref: - case TCKind._tk_value_box: - Object objectValue = null; - try { - objectValue = inputObjectField(fields[i], sender); - } catch (IndirectionException cdrie) { - // The CDR stream had never seen the given offset before, - // so check the recursion manager (it will throw an - // IOException if it doesn't have a reference, either). - objectValue = activeRecursionMgr.getObject(cdrie.offset); - } - - if (o == null) - continue; - try { - if (osc.hasField(fields[i])){ - setObjectField(o, - cl, - fields[i].name, - objectValue); - } else { - // REVISIT. Convert to a log message. - // This is a normal case when fields have - // been added as part of evolution, but - // silently skipping can make it hard to - // debug if there's an error -// System.out.println("**** warning, not setting field: " -// + fields[i].name -// + " since not on class " -// + osc.getName()); - - } - } catch (IllegalArgumentException e) { - // XXX I18N, logging needed. - ClassCastException cce = new ClassCastException("Assigning instance of class " + - objectValue.getClass().getName() + " to field " + fields[i].name); - cce.initCause(e) ; - throw cce ; - } - break; - default: - // XXX I18N, logging needed. - throw new StreamCorruptedException("Unknown kind: " - + fields[i].type.kind().value()); - } - } catch (IllegalArgumentException e) { - /* This case should never happen. If the field types - are not the same, InvalidClassException is raised when - matching the local class to the serialized ObjectStreamClass. */ - // XXX I18N, logging needed. - ClassCastException cce = new ClassCastException("Assigning instance of class " + fields[i].id + - " to field " + currentClassDesc.getName() + '#' + fields[i].name); - cce.initCause( e ) ; - throw cce ; - } - } - } catch(Throwable t){ - // XXX I18N, logging needed. - StreamCorruptedException sce = new StreamCorruptedException(t.getMessage()); - sce.initCause(t) ; - throw sce ; - } - } - - private void skipCustomUsingFVD(ValueMember[] fields, - com.sun.org.omg.SendingContext.CodeBase sender) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException - { - readFormatVersion(); - boolean calledDefaultWriteObject = readBoolean(); - - if (calledDefaultWriteObject) - throwAwayData(fields, sender); - - if (getStreamFormatVersion() == 2) { - - ((ValueInputStream)getOrbStream()).start_value(); - ((ValueInputStream)getOrbStream()).end_value(); - } - } - - /* - * Read the fields of the specified class from the input stream throw data away. - * This must handle same switch logic as above. - */ - private void throwAwayData(ValueMember[] fields, - com.sun.org.omg.SendingContext.CodeBase sender) - throws InvalidClassException, StreamCorruptedException, - ClassNotFoundException, IOException - { - for (int i = 0; i < fields.length; ++i) { - - try { - - switch (fields[i].type.kind().value()) { - case TCKind._tk_octet: - orbStream.read_octet(); - break; - case TCKind._tk_boolean: - orbStream.read_boolean(); - break; - case TCKind._tk_char: - // Backwards compatibility. Older Sun ORBs sent - // _tk_char even though they read and wrote wchars - // correctly. - // - // Fall through to the _tk_wchar case. - case TCKind._tk_wchar: - orbStream.read_wchar(); - break; - case TCKind._tk_short: - orbStream.read_short(); - break; - case TCKind._tk_long: - orbStream.read_long(); - break; - case TCKind._tk_longlong: - orbStream.read_longlong(); - break; - case TCKind._tk_float: - orbStream.read_float(); - break; - case TCKind._tk_double: - orbStream.read_double(); - break; - case TCKind._tk_value: - case TCKind._tk_objref: - case TCKind._tk_value_box: - Class type = null; - String id = fields[i].id; - - try { - type = vhandler.getClassFromType(id); - } - catch(ClassNotFoundException cnfe){ - // Make sure type = null - type = null; - } - String signature = null; - if (type != null) - signature = ValueUtility.getSignature(fields[i]); - - // Read value - try { - if ((signature != null) && ( signature.equals("Ljava/lang/Object;") || - signature.equals("Ljava/io/Serializable;") || - signature.equals("Ljava/io/Externalizable;")) ) { - javax.rmi.CORBA.Util.readAny(orbStream); - } - else { - // Decide what method call to make based on the type. - // - // NOTE : Since FullValueDescription does not allow us - // to ask whether something is an interface we do not - // have the ability to optimize this check. - - int callType = ValueHandlerImpl.kValueType; - - if (!vhandler.isSequence(id)) { - FullValueDescription fieldFVD = sender.meta(fields[i].id); - if (kRemoteTypeCode == fields[i].type) { - - // RMI Object reference... - callType = ValueHandlerImpl.kRemoteType; - } else if (fieldFVD.is_abstract) { - // RMI Abstract Object reference... - - callType = ValueHandlerImpl.kAbstractType; - } - } - - // Now that we have used the FVD of the field to determine the proper course - // of action, it is ok to use the type (Class) from this point forward since - // the rep. id for this read will also follow on the wire. - - switch (callType) { - case ValueHandlerImpl.kRemoteType: - orbStream.read_Object(); - break; - case ValueHandlerImpl.kAbstractType: - orbStream.read_abstract_interface(); - break; - case ValueHandlerImpl.kValueType: - if (type != null) { - orbStream.read_value(type); - } else { - orbStream.read_value(); - } - break; - default: - // XXX I18N, logging needed. - throw new StreamCorruptedException("Unknown callType: " - + callType); - } - } - - } - catch(IndirectionException cdrie) { - // Since we are throwing this away, don't bother handling recursion. - continue; - } - - break; - default: - // XXX I18N, logging needed. - throw new StreamCorruptedException("Unknown kind: " - + fields[i].type.kind().value()); - - } - } catch (IllegalArgumentException e) { - /* This case should never happen. If the field types - are not the same, InvalidClassException is raised when - matching the local class to the serialized ObjectStreamClass. */ - // XXX I18N, logging needed. - ClassCastException cce = new ClassCastException("Assigning instance of class " + - fields[i].id + " to field " + currentClassDesc.getName() + - '#' + fields[i].name); - cce.initCause(e) ; - throw cce ; - } - } - - } - - private static void setObjectField(Object o, Class c, String fieldName, Object v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putObject( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetObjectField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - ObjectUtility.compactObjectToString( v )) ; - } - } - - private static void setBooleanField(Object o, Class c, String fieldName, boolean v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putBoolean( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetBooleanField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Boolean(v) ) ; - } - } - - private static void setByteField(Object o, Class c, String fieldName, byte v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putByte( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetByteField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Byte(v) ) ; - } - } - - private static void setCharField(Object o, Class c, String fieldName, char v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putChar( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetCharField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Character(v) ) ; - } - } - - private static void setShortField(Object o, Class c, String fieldName, short v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putShort( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetShortField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Short(v) ) ; - } - } - - private static void setIntField(Object o, Class c, String fieldName, int v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putInt( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetIntField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Integer(v) ) ; - } - } - - private static void setLongField(Object o, Class c, String fieldName, long v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putLong( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetLongField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Long(v) ) ; - } - } - - private static void setFloatField(Object o, Class c, String fieldName, float v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putFloat( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetFloatField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Float(v) ) ; - } - } - - private static void setDoubleField(Object o, Class c, String fieldName, double v) - { - try { - Field fld = c.getDeclaredField( fieldName ) ; - long key = bridge.objectFieldOffset( fld ) ; - bridge.putDouble( o, key, v ) ; - } catch (Exception e) { - throw utilWrapper.errorSetDoubleField( e, fieldName, - ObjectUtility.compactObjectToString( o ), - new Double(v) ) ; - } - } - - /** - * This class maintains a map of stream position to - * an Object currently being deserialized. It is used - * to handle the cases where the are indirections to - * an object on the recursion stack. The CDR level - * handles indirections to objects previously seen - * (and completely deserialized) in the stream. - */ - static class ActiveRecursionManager - { - private Map offsetToObjectMap; - - public ActiveRecursionManager() { - // A hash map is unsynchronized and allows - // null values - offsetToObjectMap = new HashMap(); - } - - // Called right after allocating a new object. - // Offset is the starting position in the stream - // of the object. - public void addObject(int offset, Object value) { - offsetToObjectMap.put(new Integer(offset), value); - } - - // If the given starting position doesn't refer - // to the beginning of an object currently being - // deserialized, this throws an IOException. - // Otherwise, it returns a reference to the - // object. - public Object getObject(int offset) throws IOException { - Integer position = new Integer(offset); - - if (!offsetToObjectMap.containsKey(position)) - // XXX I18N, logging needed. - throw new IOException("Invalid indirection to offset " - + offset); - - return offsetToObjectMap.get(position); - } - - // Called when an object has been completely - // deserialized, so it should no longer be in - // this mapping. The CDR level can handle - // further indirections. - public void removeObject(int offset) { - offsetToObjectMap.remove(new Integer(offset)); - } - - // If the given offset doesn't map to an Object, - // then it isn't an indirection to an object - // currently being deserialized. - public boolean containsObject(int offset) { - return offsetToObjectMap.containsKey(new Integer(offset)); - } - } -} diff --git a/corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java index 38e749c79fa..e1c82cf9bfc 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,32 +32,22 @@ package com.sun.corba.se.impl.io; import javax.rmi.CORBA.Util; -import javax.rmi.PortableRemoteObject; import java.util.Hashtable; -import java.util.Stack; import java.io.IOException; -import java.util.EmptyStackException; -import com.sun.corba.se.impl.util.Utility; -import com.sun.corba.se.impl.io.IIOPInputStream; -import com.sun.corba.se.impl.io.IIOPOutputStream; import com.sun.corba.se.impl.util.RepositoryId; import com.sun.corba.se.impl.util.Utility; import org.omg.CORBA.TCKind; -import org.omg.CORBA.MARSHAL; -import org.omg.CORBA.BAD_PARAM; -import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.portable.IndirectionException; import com.sun.org.omg.SendingContext.CodeBase; import com.sun.org.omg.SendingContext.CodeBaseHelper; import java.security.AccessController; import java.security.PrivilegedAction; - -import com.sun.corba.se.impl.io.IIOPInputStream.ActiveRecursionManager; +import java.security.PrivilegedExceptionAction; import com.sun.corba.se.spi.logging.CORBALogDomains; import com.sun.corba.se.impl.logging.OMGSystemException; @@ -809,65 +799,163 @@ public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat return "com.sun.corba.se.impl.io.IIOPOutputStream"; } - private com.sun.corba.se.impl.io.IIOPOutputStream createOutputStream() { - return (com.sun.corba.se.impl.io.IIOPOutputStream)AccessController.doPrivileged( - new StreamFactory(getOutputStreamClassName())); + private IIOPOutputStream createOutputStream() { + final String name = getOutputStreamClassName(); + try { + IIOPOutputStream stream = createOutputStreamBuiltIn(name); + if (stream != null) { + return stream; + } + return createCustom(IIOPOutputStream.class, name); + } catch (Throwable t) { + // Throw exception under the carpet. + InternalError ie = new InternalError( + "Error loading " + name + ); + ie.initCause(t); + throw ie; + } + } + + /** + * Construct a built in implementation with priveleges. + * Returning null indicates a non-built is specified. + */ + private IIOPOutputStream createOutputStreamBuiltIn( + final String name + ) throws Throwable { + try { + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public IIOPOutputStream run() throws IOException { + return createOutputStreamBuiltInNoPriv(name); + } + } + ); + } catch (java.security.PrivilegedActionException exc) { + throw exc.getCause(); + } + } + + /** + * Returning null indicates a non-built is specified. + */ + private IIOPOutputStream createOutputStreamBuiltInNoPriv( + final String name + ) throws IOException { + return + name.equals( + IIOPOutputStream + .class.getName() + ) ? + new IIOPOutputStream() : + + name.equals( + com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3 + .class.getName() + ) ? + new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3() : + + name.equals( + com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1 + .class.getName() + ) ? + new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1() : + + null; } protected String getInputStreamClassName() { return "com.sun.corba.se.impl.io.IIOPInputStream"; } - private com.sun.corba.se.impl.io.IIOPInputStream createInputStream() { - return (com.sun.corba.se.impl.io.IIOPInputStream)AccessController.doPrivileged( - new StreamFactory(getInputStreamClassName())); + private IIOPInputStream createInputStream() { + final String name = getInputStreamClassName(); + try { + IIOPInputStream stream = createInputStreamBuiltIn(name); + if (stream != null) { + return stream; + } + return createCustom(IIOPInputStream.class, name); + } catch (Throwable t) { + // Throw exception under the carpet. + InternalError ie = new InternalError( + "Error loading " + name + ); + ie.initCause(t); + throw ie; + } } /** - * Instantiates a class of the given name using the system ClassLoader - * as part of a PrivilegedAction. - * - * It's private final so hopefully people can't grab it outside of - * this class. - * - * If you're worried that someone could subclass ValueHandlerImpl, - * install his own streams, and snoop what's on the wire: - * Someone can do that only if he's allowed to use the feature - * of installing his own javax.rmi.CORBA.Util delegate (via a - * JVM property or orb.properties file, read the first time the - * Util class is used). If he can do that, he can snoop - * anything on the wire, anyway, without abusing the - * StreamFactory class. + * Construct a built in implementation with priveleges. + * Returning null indicates a non-built is specified. */ - private static final class StreamFactory implements PrivilegedAction { - private String className; + private IIOPInputStream createInputStreamBuiltIn( + final String name + ) throws Throwable { + try { + return AccessController.doPrivileged( + new PrivilegedExceptionAction() { + public IIOPInputStream run() throws IOException { + return createInputStreamBuiltInNoPriv(name); + } + } + ); + } catch (java.security.PrivilegedActionException exc) { + throw exc.getCause(); + } + } - public StreamFactory (String _className) { - className = _className; - } + /** + * Returning null indicates a non-built is specified. + */ + private IIOPInputStream createInputStreamBuiltInNoPriv( + final String name + ) throws IOException { + return + name.equals( + IIOPInputStream + .class.getName() + ) ? + new IIOPInputStream() : - public Object run() { - try { - // Note: We must use the system ClassLoader here - // since we want to load classes outside of the - // core JDK when running J2EE Pure ORB and - // talking to Kestrel. + name.equals( + com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3 + .class.getName() + ) ? + new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3() : + + name.equals( + com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1 + .class.getName() + ) ? + new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1() : + + null; + } + + /** + * Create a custom implementation without privileges. + */ + private T createCustom( + final Class type, final String className + ) throws Throwable { + // Note: We use the thread context or system ClassLoader here + // since we want to load classes outside of the + // core JDK when running J2EE Pure ORB and + // talking to Kestrel. ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) cl = ClassLoader.getSystemClassLoader(); - Class streamClass = cl.loadClass(className); + Class clazz = cl.loadClass(className); + Class streamClass = clazz.asSubclass(type); // Since the ClassLoader should cache the class, this isn't // as expensive as it looks. return streamClass.newInstance(); - } catch(Throwable t) { - InternalError ie = new InternalError( "Error loading " + className ) ; - ie.initCause( t ) ; - throw ie ; - } - } } /** diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orb/PrefixParserAction.java b/corba/src/share/classes/com/sun/corba/se/impl/orb/PrefixParserAction.java index 891628dd24e..ace0d795d15 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orb/PrefixParserAction.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/PrefixParserAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -110,7 +110,7 @@ public class PrefixParserAction extends ParserActionBase { throw wrapper.couldNotSetArray( thr, getPropertyName(), new Integer(ctr), componentType, new Integer(size), - ObjectUtility.compactObjectToString( obj )) ; + obj.toString() ) ; } ctr++ ; } diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java index aca7676b9c2..237ef2258c8 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,103 +50,8 @@ import java.math.BigInteger ; import java.math.BigDecimal ; public final class ObjectUtility { - private boolean useToString ; - private boolean isIndenting ; - private int initialLevel ; - private int increment ; - private ClassMap classToPrinter = new ClassMap() ; + private ObjectUtility() {} - private static ObjectUtility standard = new ObjectUtility( false, true, - 0, 4 ) ; - private static ObjectUtility compact = new ObjectUtility( true, false, - 0, 4 ) ; - - private ObjectUtility( boolean useToString, boolean isIndenting, - int initialLevel, int increment ) - { - this.useToString = useToString ; - this.isIndenting = isIndenting ; - this.initialLevel = initialLevel ; - this.increment = increment ; - classToPrinter.put( Properties.class, propertiesPrinter ) ; - classToPrinter.put( Collection.class, collectionPrinter ) ; - classToPrinter.put( Map.class, mapPrinter ) ; - } - - /** Construct an Utility instance with the desired objectToString - * behavior. - */ - public static ObjectUtility make( boolean useToString, boolean isIndenting, - int initialLevel, int increment ) - { - return new ObjectUtility( useToString, isIndenting, initialLevel, - increment ) ; - } - - /** Construct an Utility instance with the desired objectToString - * behavior. - */ - public static ObjectUtility make( boolean useToString, boolean isIndenting ) - { - return new ObjectUtility( useToString, isIndenting, 0, 4 ) ; - } - - /** Get the standard Utility object that supports objectToString with - * indented display and no use of toString() methods. - */ - public static ObjectUtility make() - { - return standard ; - } - - /** A convenience method that gives the default behavior: use indenting - * to display the object's structure and do not use built-in toString - * methods. - */ - public static String defaultObjectToString( java.lang.Object object ) - { - return standard.objectToString( object ) ; - } - - public static String compactObjectToString( java.lang.Object object ) - { - return compact.objectToString( object ) ; - } - - /** objectToString handles display of arbitrary objects. It correctly - * handles objects whose elements form an arbitrary graph. It uses - * reflection to display the contents of any kind of object. - * An object's toString() method may optionally be used, but the default - * is to ignore all toString() methods except for those defined for - * primitive types, primitive type wrappers, and strings. - */ - public String objectToString(java.lang.Object obj) - { - IdentityHashMap printed = new IdentityHashMap() ; - ObjectWriter result = ObjectWriter.make( isIndenting, initialLevel, - increment ) ; - objectToStringHelper( printed, result, obj ) ; - return result.toString() ; - } - - // Perform a deep structural equality comparison of the two objects. - // This handles all arrays, maps, and sets specially, otherwise - // it just calls the object's equals() method. - public static boolean equals( java.lang.Object obj1, java.lang.Object obj2 ) - { - // Set of pairs of objects that have been (or are being) considered for - // equality. Such pairs are presumed to be equals. If they are not, - // this will be detected eventually and the equals method will return - // false. - Set considered = new HashSet() ; - - // Map that gives the corresponding component of obj2 for a component - // of obj1. This is used to check for the same aliasing and use of - // equal objects in both objects. - Map counterpart = new IdentityHashMap() ; - - return equalsHelper( counterpart, considered, obj1, obj2 ) ; - } /** If arr1 and arr2 are both arrays of the same component type, * return an array of that component type that consists of the @@ -179,544 +84,4 @@ public final class ObjectUtility { return result ; } -//=========================================================================== -// Implementation -//=========================================================================== - - private void objectToStringHelper( IdentityHashMap printed, - ObjectWriter result, java.lang.Object obj) - { - if (obj==null) { - result.append( "null" ) ; - result.endElement() ; - } else { - Class cls = obj.getClass() ; - result.startObject( obj ) ; - - if (printed.keySet().contains( obj )) { - result.endObject( "*VISITED*" ) ; - } else { - printed.put( obj, null ) ; - - if (mustUseToString(cls)) { - result.endObject( obj.toString() ) ; - } else { - // First, handle any classes that have special printer - // methods defined. This is useful when the class - // overrides toString with something that - // is not sufficiently detailed. - ObjectPrinter printer = (ObjectPrinter)(classToPrinter.get( - cls )) ; - if (printer != null) { - printer.print( printed, result, obj ) ; - result.endObject() ; - } else { - Class compClass = cls.getComponentType() ; - - if (compClass == null) - // handleObject always calls endObject - handleObject( printed, result, obj ) ; - else { - handleArray( printed, result, obj ) ; - result.endObject() ; - } - } - } - } - } - } - - private static interface ObjectPrinter { - void print( IdentityHashMap printed, ObjectWriter buff, - java.lang.Object obj ) ; - } - - private ObjectPrinter propertiesPrinter = new ObjectPrinter() { - public void print( IdentityHashMap printed, ObjectWriter buff, - java.lang.Object obj ) - { - if (!(obj instanceof Properties)) - throw new Error() ; - - Properties props = (Properties)obj ; - Enumeration keys = props.propertyNames() ; - while (keys.hasMoreElements()) { - String key = (String)(keys.nextElement()) ; - String value = props.getProperty( key ) ; - buff.startElement() ; - buff.append( key ) ; - buff.append( "=" ) ; - buff.append( value ) ; - buff.endElement() ; - } - } - } ; - - private ObjectPrinter collectionPrinter = new ObjectPrinter() { - public void print( IdentityHashMap printed, ObjectWriter buff, - java.lang.Object obj ) - { - if (!(obj instanceof Collection)) - throw new Error() ; - - Collection coll = (Collection)obj ; - Iterator iter = coll.iterator() ; - while (iter.hasNext()) { - java.lang.Object element = iter.next() ; - buff.startElement() ; - objectToStringHelper( printed, buff, element ) ; - buff.endElement() ; - } - } - } ; - - private ObjectPrinter mapPrinter = new ObjectPrinter() { - public void print( IdentityHashMap printed, ObjectWriter buff, - java.lang.Object obj ) - { - if (!(obj instanceof Map)) - throw new Error() ; - - Map map = (Map)obj ; - Iterator iter = map.entrySet().iterator() ; - while (iter.hasNext()) { - Entry entry = (Entry)(iter.next()) ; - buff.startElement() ; - objectToStringHelper( printed, buff, entry.getKey() ) ; - buff.append( "=>" ) ; - objectToStringHelper( printed, buff, entry.getValue() ) ; - buff.endElement() ; - } - } - } ; - - private static class ClassMap { - ArrayList data ; - - public ClassMap() - { - data = new ArrayList() ; - } - - /** Return the first element of the ClassMap that is assignable to cls. - * The order is determined by the order in which the put method was - * called. Returns null if there is no match. - */ - public java.lang.Object get( Class cls ) - { - Iterator iter = data.iterator() ; - while (iter.hasNext()) { - java.lang.Object[] arr = (java.lang.Object[])(iter.next()) ; - Class key = (Class)(arr[0]) ; - if (key.isAssignableFrom( cls )) - return arr[1] ; - } - - return null ; - } - - /** Add obj to the map with key cls. Note that order matters, - * as the first match is returned. - */ - public void put( Class cls, java.lang.Object obj ) - { - java.lang.Object[] pair = { cls, obj } ; - data.add( pair ) ; - } - } - - private boolean mustUseToString( Class cls ) - { - // These probably never occur - if (cls.isPrimitive()) - return true ; - - // We must use toString for all primitive wrappers, since - // otherwise the code recurses endlessly (access value field - // inside Integer, returns another Integer through reflection). - if ((cls == Integer.class) || - (cls == BigInteger.class) || - (cls == BigDecimal.class) || - (cls == String.class) || - (cls == StringBuffer.class) || - (cls == Long.class) || - (cls == Short.class) || - (cls == Byte.class) || - (cls == Character.class) || - (cls == Float.class) || - (cls == Double.class) || - (cls == Boolean.class)) - return true ; - - if (useToString) { - try { - cls.getDeclaredMethod( "toString", (Class[])null ) ; - return true ; - } catch (Exception exc) { - return false ; - } - } - - return false ; - } - - private void handleObject( IdentityHashMap printed, ObjectWriter result, - java.lang.Object obj ) - { - Class cls = obj.getClass() ; - - try { - Field[] fields; - SecurityManager security = System.getSecurityManager(); - if (security != null && !Modifier.isPublic(cls.getModifiers())) { - fields = new Field[0]; - } else { - fields = cls.getDeclaredFields(); - } - - for (int ctr=0; ctr: " + this); } if (selectionKey.isAcceptable()) { - AccessController.doPrivileged(new PrivilegedAction() { - public java.lang.Object run() { accept(); - return null; - } - }); } else { if (orb.transportDebugFlag) { dprint(".doWork: ! selectionKey.isAcceptable: " + this); diff --git a/corba/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java b/corba/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java index 1b9460bde79..eb81eb56be0 100644 --- a/corba/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java +++ b/corba/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.corba.se.spi.orb ; import java.util.StringTokenizer ; +import java.util.Arrays ; import java.lang.reflect.Array ; @@ -446,7 +447,7 @@ public abstract class OperationFactory { public String toString() { return "sequenceAction(separator=\"" + sep + "\",actions=" + - ObjectUtility.compactObjectToString(actions) + ")" ; + Arrays.toString(actions) + ")" ; } } @@ -533,7 +534,7 @@ public abstract class OperationFactory { public String toString() { return "mapSequenceAction(" + - ObjectUtility.compactObjectToString(op) + ")" ; + Arrays.toString(op) + ")" ; } } diff --git a/corba/src/share/classes/com/sun/corba/se/spi/orb/ParserImplBase.java b/corba/src/share/classes/com/sun/corba/se/spi/orb/ParserImplBase.java index 374e585ec40..50e5760dd64 100644 --- a/corba/src/share/classes/com/sun/corba/se/spi/orb/ParserImplBase.java +++ b/corba/src/share/classes/com/sun/corba/se/spi/orb/ParserImplBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -125,7 +125,7 @@ public abstract class ParserImplBase { // Since exc wraps the actual exception, use exc.getCause() // instead of exc. throw wrapper.errorSettingField( exc.getCause(), name, - ObjectUtility.compactObjectToString(value) ) ; + value.toString() ) ; } } From f5bac56265c44b66bd8a9da18e8419dceeb01752 Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Mon, 27 Sep 2010 15:04:40 -0700 Subject: [PATCH 021/722] 6987115: Non-tiered compilation policy creates unnecessary C1 threads Fixed NonTieredCompPolicy::compiler_count() to return correct thread count. Reviewed-by: twisti, kvn --- .../share/vm/runtime/compilationPolicy.cpp | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/hotspot/src/share/vm/runtime/compilationPolicy.cpp b/hotspot/src/share/vm/runtime/compilationPolicy.cpp index 3d1ccc0a381..132a6101835 100644 --- a/hotspot/src/share/vm/runtime/compilationPolicy.cpp +++ b/hotspot/src/share/vm/runtime/compilationPolicy.cpp @@ -129,16 +129,31 @@ void NonTieredCompPolicy::initialize() { } } +// Note: this policy is used ONLY if TieredCompilation is off. +// compiler_count() behaves the following way: +// - with TIERED build (with both COMPILER1 and COMPILER2 defined) it should return +// zero for the c1 compilation levels, hence the particular ordering of the +// statements. +// - the same should happen when COMPILER2 is defined and COMPILER1 is not +// (server build without TIERED defined). +// - if only COMPILER1 is defined (client build), zero should be returned for +// the c2 level. +// - if neither is defined - always return zero. int NonTieredCompPolicy::compiler_count(CompLevel comp_level) { -#ifdef COMPILER1 - if (is_c1_compile(comp_level)) { - return _compiler_count; - } -#endif - + assert(!TieredCompilation, "This policy should not be used with TieredCompilation"); #ifdef COMPILER2 if (is_c2_compile(comp_level)) { return _compiler_count; + } else { + return 0; + } +#endif + +#ifdef COMPILER1 + if (is_c1_compile(comp_level)) { + return _compiler_count; + } else { + return 0; } #endif From 5384d6be9ede76f11ffe2e84cdf9930cff405844 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Mon, 27 Sep 2010 20:44:18 -0700 Subject: [PATCH 022/722] 6987763: assert(kind() == EmptyExceptionState) failed: only EmptyExceptionStates can be modified Reviewed-by: roland, kvn, iveresov --- hotspot/src/share/vm/c1/c1_ValueStack.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/c1/c1_ValueStack.hpp b/hotspot/src/share/vm/c1/c1_ValueStack.hpp index c65422567e1..0108131fd13 100644 --- a/hotspot/src/share/vm/c1/c1_ValueStack.hpp +++ b/hotspot/src/share/vm/c1/c1_ValueStack.hpp @@ -68,7 +68,12 @@ class ValueStack: public CompilationResourceObj { ValueStack* copy(Kind new_kind, int new_bci) { return new ValueStack(this, new_kind, new_bci); } ValueStack* copy_for_parsing() { return new ValueStack(this, Parsing, -99); } - void set_caller_state(ValueStack* s) { assert(kind() == EmptyExceptionState, "only EmptyExceptionStates can be modified"); _caller_state = s; } + void set_caller_state(ValueStack* s) { + assert(kind() == EmptyExceptionState || + (Compilation::current()->env()->jvmti_can_access_local_variables() && kind() == ExceptionState), + "only EmptyExceptionStates can be modified"); + _caller_state = s; + } bool is_same(ValueStack* s); // returns true if this & s's types match (w/o checking locals) From 421b7e62a6e803eb14c8e4b6c97a9e6724303574 Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Tue, 28 Sep 2010 01:09:10 -0700 Subject: [PATCH 023/722] 6559775: Race allows defaultReadObject to be invoked instead of readFields during deserialization Reviewed-by: hawtin --- jdk/make/java/java/FILES_java.gmk | 1 + .../classes/java/io/ObjectInputStream.java | 48 ++--------- .../classes/java/io/ObjectOutputStream.java | 40 +++++---- .../java/io/SerialCallbackContext.java | 58 +++++++++++++ jdk/test/java/io/Serializable/6559775/README | 29 +++++++ .../io/Serializable/6559775/SerialRace.java | 86 +++++++++++++++++++ .../io/Serializable/6559775/SerialVictim.java | 31 +++++++ .../io/Serializable/6559775/Test6559775.sh | 79 +++++++++++++++++ 8 files changed, 310 insertions(+), 62 deletions(-) create mode 100644 jdk/src/share/classes/java/io/SerialCallbackContext.java create mode 100644 jdk/test/java/io/Serializable/6559775/README create mode 100644 jdk/test/java/io/Serializable/6559775/SerialRace.java create mode 100644 jdk/test/java/io/Serializable/6559775/SerialVictim.java create mode 100644 jdk/test/java/io/Serializable/6559775/Test6559775.sh diff --git a/jdk/make/java/java/FILES_java.gmk b/jdk/make/java/java/FILES_java.gmk index 416eeb343d0..e59170a4250 100644 --- a/jdk/make/java/java/FILES_java.gmk +++ b/jdk/make/java/java/FILES_java.gmk @@ -400,6 +400,7 @@ JAVA_JAVA_java = \ java/io/FilePermission.java \ java/io/Serializable.java \ java/io/Externalizable.java \ + java/io/SerialCallbackContext.java \ java/io/Bits.java \ java/io/ObjectInput.java \ java/io/ObjectInputStream.java \ diff --git a/jdk/src/share/classes/java/io/ObjectInputStream.java b/jdk/src/share/classes/java/io/ObjectInputStream.java index 3a5c1dee080..2ed505f3b07 100644 --- a/jdk/src/share/classes/java/io/ObjectInputStream.java +++ b/jdk/src/share/classes/java/io/ObjectInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -265,7 +265,7 @@ public class ObjectInputStream * object currently being deserialized and descriptor for current class. * Null when not during readObject upcall. */ - private CallbackContext curContext; + private SerialCallbackContext curContext; /** * Creates an ObjectInputStream that reads from the specified InputStream. @@ -1798,7 +1798,7 @@ public class ObjectInputStream private void readExternalData(Externalizable obj, ObjectStreamClass desc) throws IOException { - CallbackContext oldContext = curContext; + SerialCallbackContext oldContext = curContext; curContext = null; try { boolean blocked = desc.hasBlockExternalData(); @@ -1857,10 +1857,10 @@ public class ObjectInputStream slotDesc.hasReadObjectMethod() && handles.lookupException(passHandle) == null) { - CallbackContext oldContext = curContext; + SerialCallbackContext oldContext = curContext; try { - curContext = new CallbackContext(obj, slotDesc); + curContext = new SerialCallbackContext(obj, slotDesc); bin.setBlockDataMode(true); slotDesc.invokeReadObject(obj, this); @@ -3505,42 +3505,4 @@ public class ObjectInputStream } } - /** - * Context that during upcalls to class-defined readObject methods; holds - * object currently being deserialized and descriptor for current class. - * This context keeps a boolean state to indicate that defaultReadObject - * or readFields has already been invoked with this context or the class's - * readObject method has returned; if true, the getObj method throws - * NotActiveException. - */ - private static class CallbackContext { - private final Object obj; - private final ObjectStreamClass desc; - private final AtomicBoolean used = new AtomicBoolean(); - - public CallbackContext(Object obj, ObjectStreamClass desc) { - this.obj = obj; - this.desc = desc; - } - - public Object getObj() throws NotActiveException { - checkAndSetUsed(); - return obj; - } - - public ObjectStreamClass getDesc() { - return desc; - } - - private void checkAndSetUsed() throws NotActiveException { - if (!used.compareAndSet(false, true)) { - throw new NotActiveException( - "not in readObject invocation or fields already read"); - } - } - - public void setUsed() { - used.set(true); - } - } } diff --git a/jdk/src/share/classes/java/io/ObjectOutputStream.java b/jdk/src/share/classes/java/io/ObjectOutputStream.java index 3a722d43a9e..5b37e4dc6ca 100644 --- a/jdk/src/share/classes/java/io/ObjectOutputStream.java +++ b/jdk/src/share/classes/java/io/ObjectOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,6 +35,7 @@ import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import static java.io.ObjectStreamClass.processQueue; +import java.io.SerialCallbackContext; /** * An ObjectOutputStream writes primitive data types and graphs of Java objects @@ -191,10 +192,12 @@ public class ObjectOutputStream private boolean enableReplace; // values below valid only during upcalls to writeObject()/writeExternal() - /** object currently being serialized */ - private Object curObj; - /** descriptor for current class (null if in writeExternal()) */ - private ObjectStreamClass curDesc; + /** + * Context during upcalls to class-defined writeObject methods; holds + * object currently being serialized and descriptor for current class. + * Null when not during writeObject upcall. + */ + private SerialCallbackContext curContext; /** current PutField object */ private PutFieldImpl curPut; @@ -426,9 +429,11 @@ public class ObjectOutputStream * OutputStream */ public void defaultWriteObject() throws IOException { - if (curObj == null || curDesc == null) { + if ( curContext == null ) { throw new NotActiveException("not in call to writeObject"); } + Object curObj = curContext.getObj(); + ObjectStreamClass curDesc = curContext.getDesc(); bout.setBlockDataMode(false); defaultWriteFields(curObj, curDesc); bout.setBlockDataMode(true); @@ -446,9 +451,11 @@ public class ObjectOutputStream */ public ObjectOutputStream.PutField putFields() throws IOException { if (curPut == null) { - if (curObj == null || curDesc == null) { + if (curContext == null) { throw new NotActiveException("not in call to writeObject"); } + Object curObj = curContext.getObj(); + ObjectStreamClass curDesc = curContext.getDesc(); curPut = new PutFieldImpl(curDesc); } return curPut; @@ -1420,17 +1427,15 @@ public class ObjectOutputStream * writeExternal() method. */ private void writeExternalData(Externalizable obj) throws IOException { - Object oldObj = curObj; - ObjectStreamClass oldDesc = curDesc; PutFieldImpl oldPut = curPut; - curObj = obj; - curDesc = null; curPut = null; if (extendedDebugInfo) { debugInfoStack.push("writeExternal data"); } + SerialCallbackContext oldContext = curContext; try { + curContext = null; if (protocol == PROTOCOL_VERSION_1) { obj.writeExternal(this); } else { @@ -1440,13 +1445,12 @@ public class ObjectOutputStream bout.writeByte(TC_ENDBLOCKDATA); } } finally { + curContext = oldContext; if (extendedDebugInfo) { debugInfoStack.pop(); } } - curObj = oldObj; - curDesc = oldDesc; curPut = oldPut; } @@ -1461,12 +1465,9 @@ public class ObjectOutputStream for (int i = 0; i < slots.length; i++) { ObjectStreamClass slotDesc = slots[i].desc; if (slotDesc.hasWriteObjectMethod()) { - Object oldObj = curObj; - ObjectStreamClass oldDesc = curDesc; PutFieldImpl oldPut = curPut; - curObj = obj; - curDesc = slotDesc; curPut = null; + SerialCallbackContext oldContext = curContext; if (extendedDebugInfo) { debugInfoStack.push( @@ -1474,18 +1475,19 @@ public class ObjectOutputStream slotDesc.getName() + "\")"); } try { + curContext = new SerialCallbackContext(obj, slotDesc); bout.setBlockDataMode(true); slotDesc.invokeWriteObject(obj, this); bout.setBlockDataMode(false); bout.writeByte(TC_ENDBLOCKDATA); } finally { + curContext.setUsed(); + curContext = oldContext; if (extendedDebugInfo) { debugInfoStack.pop(); } } - curObj = oldObj; - curDesc = oldDesc; curPut = oldPut; } else { defaultWriteFields(obj, slotDesc); diff --git a/jdk/src/share/classes/java/io/SerialCallbackContext.java b/jdk/src/share/classes/java/io/SerialCallbackContext.java new file mode 100644 index 00000000000..90d022e53ea --- /dev/null +++ b/jdk/src/share/classes/java/io/SerialCallbackContext.java @@ -0,0 +1,58 @@ + /* + * %W% %E% + * + * Copyright (c) 2006, 2010 Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + + package java.io; + + /** + * Context during upcalls from object stream to class-defined + * readObject/writeObject methods. + * Holds object currently being deserialized and descriptor for current class. + * + * This context keeps track of the thread it was constructed on, and allows + * only a single call of defaultReadObject, readFields, defaultWriteObject + * or writeFields which must be invoked on the same thread before the class's + * readObject/writeObject method has returned. + * If not set to the current thread, the getObj method throws NotActiveException. + */ + final class SerialCallbackContext { + private final Object obj; + private final ObjectStreamClass desc; + /** + * Thread this context is in use by. + * As this only works in one thread, we do not need to worry about thread-safety. + */ + private Thread thread; + + public SerialCallbackContext(Object obj, ObjectStreamClass desc) { + this.obj = obj; + this.desc = desc; + this.thread = Thread.currentThread(); + } + + public Object getObj() throws NotActiveException { + checkAndSetUsed(); + return obj; + } + + public ObjectStreamClass getDesc() { + return desc; + } + + private void checkAndSetUsed() throws NotActiveException { + if (thread != Thread.currentThread()) { + throw new NotActiveException( + "not in readObject invocation or fields already read"); + } + thread = null; + } + + public void setUsed() { + thread = null; + } + } + + diff --git a/jdk/test/java/io/Serializable/6559775/README b/jdk/test/java/io/Serializable/6559775/README new file mode 100644 index 00000000000..c7a4a9ffe25 --- /dev/null +++ b/jdk/test/java/io/Serializable/6559775/README @@ -0,0 +1,29 @@ +The testcase works well on dual core machines. +The below output indicates a successful fix: + +Exception in thread "Thread-0" java.lang.NullPointerException + at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:476) + at SerialRace$1.run(SerialRace.java:33) + at java.lang.Thread.run(Thread.java:595) + + +When the vulnerability exists, the output of the tescase is something like this: +Available processors: 2 +Iteration 1 +java.io.NotActiveException: not in readObject invocation or fields already read + at java.io.ObjectInputStream$CallbackContext.checkAndSetUsed(ObjectInputStream.java:3437) + at java.io.ObjectInputStream$CallbackContext.getObj(ObjectInputStream.java:3427) + at java.io.ObjectInputStream.readFields(ObjectInputStream.java:514) + at SerialVictim.readObject(SerialVictim.java:19) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:585) + at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) + at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) + at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) + at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) + at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) + at SerialRace.main(SerialRace.java:65) +Victim: ? +Victim: $ diff --git a/jdk/test/java/io/Serializable/6559775/SerialRace.java b/jdk/test/java/io/Serializable/6559775/SerialRace.java new file mode 100644 index 00000000000..2d4df6a0218 --- /dev/null +++ b/jdk/test/java/io/Serializable/6559775/SerialRace.java @@ -0,0 +1,86 @@ +/* + * @test %W% %E% + * @bug 6559775 + * @summary Race allows defaultReadObject to be invoked instead of readFields during deserialization + * @run shell Test6559775.sh +*/ + +import java.io.*; + +public class SerialRace { + public static void main(String[] args) throws Exception { + System.err.println( + "Available processors: "+ + Runtime.getRuntime().availableProcessors() + ); + + final int perStream = 10000; + + // Construct attack data. + ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); + { + ObjectOutputStream out = new ObjectOutputStream(byteOut); + char[] value = new char[] { '?' }; + out.writeObject(value); + for (int i=0; i test.out 2>&1 + +cat test.out + +STATUS=0 + +egrep "java.io.NotActiveException|not in readObject invocation or fields already read|^Victim" test.out + +if [ $? = 0 ] +then + STATUS=1 +else + grep "java.lang.NullPointerException" test.out + + if [ $? != 0 ]; then + STATUS=1 + fi +fi + +exit $STATUS From 523d43b1e343c11cd810d9a0c0d984f00249da54 Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Tue, 28 Sep 2010 01:13:22 -0700 Subject: [PATCH 024/722] 6966692: defaultReadObject can set a field multiple times Reviewed-by: hawtin --- .../classes/java/io/ObjectStreamClass.java | 26 +++--- .../java/io/Serializable/6966692/Attack.java | 34 ++++++++ jdk/test/java/io/Serializable/6966692/README | 23 ++++++ .../io/Serializable/6966692/Test6966692.sh | 79 +++++++++++++++++++ .../java/io/Serializable/6966692/Victim.java | 35 ++++++++ 5 files changed, 188 insertions(+), 9 deletions(-) create mode 100644 jdk/test/java/io/Serializable/6966692/Attack.java create mode 100644 jdk/test/java/io/Serializable/6966692/README create mode 100644 jdk/test/java/io/Serializable/6966692/Test6966692.sh create mode 100644 jdk/test/java/io/Serializable/6966692/Victim.java diff --git a/jdk/src/share/classes/java/io/ObjectStreamClass.java b/jdk/src/share/classes/java/io/ObjectStreamClass.java index 6b54f36f4b3..b3842f9128c 100644 --- a/jdk/src/share/classes/java/io/ObjectStreamClass.java +++ b/jdk/src/share/classes/java/io/ObjectStreamClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1830,8 +1830,10 @@ public class ObjectStreamClass implements Serializable { private final ObjectStreamField[] fields; /** number of primitive fields */ private final int numPrimFields; - /** unsafe field keys */ - private final long[] keys; + /** unsafe field keys for reading fields - may contain dupes */ + private final long[] readKeys; + /** unsafe fields keys for writing fields - no dupes */ + private final long[] writeKeys; /** field data offsets */ private final int[] offsets; /** field type codes */ @@ -1849,16 +1851,22 @@ public class ObjectStreamClass implements Serializable { FieldReflector(ObjectStreamField[] fields) { this.fields = fields; int nfields = fields.length; - keys = new long[nfields]; + readKeys = new long[nfields]; + writeKeys = new long[nfields]; offsets = new int[nfields]; typeCodes = new char[nfields]; ArrayList> typeList = new ArrayList>(); + Set usedKeys = new HashSet(); + for (int i = 0; i < nfields; i++) { ObjectStreamField f = fields[i]; Field rf = f.getField(); - keys[i] = (rf != null) ? + long key = (rf != null) ? unsafe.objectFieldOffset(rf) : Unsafe.INVALID_FIELD_OFFSET; + readKeys[i] = key; + writeKeys[i] = usedKeys.add(key) ? + key : Unsafe.INVALID_FIELD_OFFSET; offsets[i] = f.getOffset(); typeCodes[i] = f.getTypeCode(); if (!f.isPrimitive()) { @@ -1894,7 +1902,7 @@ public class ObjectStreamClass implements Serializable { * in array should be equal to Unsafe.INVALID_FIELD_OFFSET. */ for (int i = 0; i < numPrimFields; i++) { - long key = keys[i]; + long key = readKeys[i]; int off = offsets[i]; switch (typeCodes[i]) { case 'Z': @@ -1945,7 +1953,7 @@ public class ObjectStreamClass implements Serializable { throw new NullPointerException(); } for (int i = 0; i < numPrimFields; i++) { - long key = keys[i]; + long key = writeKeys[i]; if (key == Unsafe.INVALID_FIELD_OFFSET) { continue; // discard value } @@ -2006,7 +2014,7 @@ public class ObjectStreamClass implements Serializable { switch (typeCodes[i]) { case 'L': case '[': - vals[offsets[i]] = unsafe.getObject(obj, keys[i]); + vals[offsets[i]] = unsafe.getObject(obj, readKeys[i]); break; default: @@ -2027,7 +2035,7 @@ public class ObjectStreamClass implements Serializable { throw new NullPointerException(); } for (int i = numPrimFields; i < fields.length; i++) { - long key = keys[i]; + long key = writeKeys[i]; if (key == Unsafe.INVALID_FIELD_OFFSET) { continue; // discard value } diff --git a/jdk/test/java/io/Serializable/6966692/Attack.java b/jdk/test/java/io/Serializable/6966692/Attack.java new file mode 100644 index 00000000000..9a408b20d4e --- /dev/null +++ b/jdk/test/java/io/Serializable/6966692/Attack.java @@ -0,0 +1,34 @@ +/* + * @test + * @bug 6966692 + * @summary defaultReadObject can set a field multiple times + * @run shell Test6966692.sh +*/ + +import java.io.*; + +public class Attack { + public static void main(String[] args) throws Exception { + attack(setup()); + } + /** Returned data has Victim with two aaaa fields. */ + private static byte[] setup() throws Exception { + Victim victim = new Victim(); + ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); + ObjectOutputStream out = new ObjectOutputStream(byteOut); + out.writeObject(victim); + out.close(); + byte[] data = byteOut.toByteArray(); + String str = new String(data, 0); // hibyte is 0 + str = str.replaceAll("bbbb", "aaaa"); + str.getBytes(0, data.length, data, 0); // ignore hibyte + return data; + } + private static void attack(byte[] data) throws Exception { + ObjectInputStream in = new ObjectInputStream( + new ByteArrayInputStream(data) + ); + Victim victim = (Victim)in.readObject(); + System.out.println(victim+" "+victim.aaaa); + } +} diff --git a/jdk/test/java/io/Serializable/6966692/README b/jdk/test/java/io/Serializable/6966692/README new file mode 100644 index 00000000000..f4448688391 --- /dev/null +++ b/jdk/test/java/io/Serializable/6966692/README @@ -0,0 +1,23 @@ +Testcase shows default deserialisation of the Victim having two values for the same field. + +Probably requires dual core to run successfully. + +Reading thread is warmed up so that it can easily win the race for the demonstration, but this means we need to make the field volatile. + +Typical output: + +Victim@1551f60 BBBB +Victim@1551f60 AAAA + +The output when its fixed is, +Victim@1975b59 AAAA +Victim@1975b59 AAAA - The value is retained + +and when it is not fixed, it shows something like +Victim@173a10f AAAA +Victim@173a10f BBBB - the value of the object gets set again and hence is different. This is a bug + +Look at the +AAAA AAAA +and +AAAA BBBB diff --git a/jdk/test/java/io/Serializable/6966692/Test6966692.sh b/jdk/test/java/io/Serializable/6966692/Test6966692.sh new file mode 100644 index 00000000000..326f24684ed --- /dev/null +++ b/jdk/test/java/io/Serializable/6966692/Test6966692.sh @@ -0,0 +1,79 @@ +#!/bin/sh + +if [ "${TESTSRC}" = "" ] +then TESTSRC=. +fi + +if [ "${TESTJAVA}" = "" ] +then + PARENT=`dirname \`which java\`` + TESTJAVA=`dirname ${PARENT}` + echo "TESTJAVA not set, selecting " ${TESTJAVA} + echo "If this is incorrect, try setting the variable manually." +fi + +if [ "${TESTCLASSES}" = "" ] +then + echo "TESTCLASSES not set. Test cannot execute. Failed." + exit 1 +fi + +BIT_FLAG="" + +# set platform-dependent variables +OS=`uname -s` +case "$OS" in + SunOS | Linux ) + NULL=/dev/null + PS=":" + FS="/" + ## for solaris, linux it's HOME + FILE_LOCATION=$HOME + if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] + then + BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` + fi + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" + ;; + * ) + echo "Unrecognized system!" + exit 1; + ;; +esac + +JEMMYPATH=${CPAPPEND} +CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH + +THIS_DIR=`pwd` + +${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version + +cp ${TESTSRC}${FS}*.java . +chmod 777 *.java + +${TESTJAVA}${FS}bin${FS}javac *.java + +${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} Attack > test.out 2>&1 + +cat test.out + +STATUS=0 + +egrep "^Victim.*BBBB.*AAAA|^Victim.*AAAA.*BBBB" test.out + +if [ $? = 0 ] +then + STATUS=1 +else + egrep "^Victim.*BBBB.*BBBB|^Victim.*AAAA.*AAAA" test.out + + if [ $? != 0 ]; then + STATUS=1 + fi +fi + +exit $STATUS diff --git a/jdk/test/java/io/Serializable/6966692/Victim.java b/jdk/test/java/io/Serializable/6966692/Victim.java new file mode 100644 index 00000000000..f26276e3a66 --- /dev/null +++ b/jdk/test/java/io/Serializable/6966692/Victim.java @@ -0,0 +1,35 @@ +import java.io.*; + +public class Victim implements Serializable { + public volatile Object aaaa = "AAAA"; // must be volatile... + private final Object aabb = new Show(this); + public Object bbbb = "BBBB"; +} +class Show implements Serializable { + private final Victim victim; + public Show(Victim victim) { + this.victim = victim; + } + private void readObject(java.io.ObjectInputStream in) + throws IOException, ClassNotFoundException + { + in.defaultReadObject(); + Thread thread = new Thread(new Runnable() { public void run() { + for (;;) { + Object a = victim.aaaa; + if (a != null) { + System.err.println(victim+" "+a); + break; + } + } + }}); + thread.start(); + + // Make sure we are running compiled whilst serialisation is done interpreted. + try { + Thread.sleep(1000); + } catch (java.lang.InterruptedException exc) { + Thread.currentThread().interrupt(); + } + } +} From aff36499e705ba9764bc24b0ecde57689c07b089 Mon Sep 17 00:00:00 2001 From: John Cuthbertson Date: Tue, 28 Sep 2010 09:51:37 -0700 Subject: [PATCH 025/722] 6941395: G1: Use only lock-free versions of region stack push() and pop() Re-enable use of the lock-free versions of region stack push() and pop() by recording aborted regions in a thread-local structure, which are then processed when scanning of the region stack restarts. The previous locking versions of these routines are retained for diagnostic purposes. Reviewed-by: tonyp, ysr --- .../gc_implementation/g1/concurrentMark.cpp | 126 ++++++++++++++---- .../gc_implementation/g1/concurrentMark.hpp | 63 +++++++-- 2 files changed, 149 insertions(+), 40 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp index a1f79d50b79..5bf7faec667 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -278,15 +278,16 @@ CMRegionStack::~CMRegionStack() { if (_base != NULL) FREE_C_HEAP_ARRAY(oop, _base); } -void CMRegionStack::push(MemRegion mr) { +void CMRegionStack::push_lock_free(MemRegion mr) { assert(mr.word_size() > 0, "Precondition"); while (true) { - if (isFull()) { + jint index = _index; + + if (index >= _capacity) { _overflow = true; return; } // Otherwise... - jint index = _index; jint next_index = index+1; jint res = Atomic::cmpxchg(next_index, &_index, index); if (res == index) { @@ -297,19 +298,17 @@ void CMRegionStack::push(MemRegion mr) { } } -// Currently we do not call this at all. Normally we would call it -// during the concurrent marking / remark phases but we now call -// the lock-based version instead. But we might want to resurrect this -// code in the future. So, we'll leave it here commented out. -#if 0 -MemRegion CMRegionStack::pop() { +// Lock-free pop of the region stack. Called during the concurrent +// marking / remark phases. Should only be called in tandem with +// other lock-free pops. +MemRegion CMRegionStack::pop_lock_free() { while (true) { - // Otherwise... jint index = _index; if (index == 0) { return MemRegion(); } + // Otherwise... jint next_index = index-1; jint res = Atomic::cmpxchg(next_index, &_index, index); if (res == index) { @@ -326,7 +325,11 @@ MemRegion CMRegionStack::pop() { // Otherwise, we need to try again. } } -#endif // 0 + +#if 0 +// The routines that manipulate the region stack with a lock are +// not currently used. They should be retained, however, as a +// diagnostic aid. void CMRegionStack::push_with_lock(MemRegion mr) { assert(mr.word_size() > 0, "Precondition"); @@ -361,6 +364,7 @@ MemRegion CMRegionStack::pop_with_lock() { } } } +#endif bool CMRegionStack::invalidate_entries_into_cset() { bool result = false; @@ -648,8 +652,9 @@ void ConcurrentMark::reset() { // We do reset all of them, since different phases will use // different number of active threads. So, it's easiest to have all // of them ready. - for (int i = 0; i < (int) _max_task_num; ++i) + for (int i = 0; i < (int) _max_task_num; ++i) { _tasks[i]->reset(_nextMarkBitMap); + } // we need this to make sure that the flag is on during the evac // pause with initial mark piggy-backed @@ -988,7 +993,7 @@ void ConcurrentMark::grayRegionIfNecessary(MemRegion mr) { "below the finger, pushing it", mr.start(), mr.end()); - if (!region_stack_push(mr)) { + if (!region_stack_push_lock_free(mr)) { if (verbose_low()) gclog_or_tty->print_cr("[global] region stack has overflown."); } @@ -2333,6 +2338,39 @@ ConcurrentMark::claim_region(int task_num) { return NULL; } +bool ConcurrentMark::invalidate_aborted_regions_in_cset() { + bool result = false; + for (int i = 0; i < (int)_max_task_num; ++i) { + CMTask* the_task = _tasks[i]; + MemRegion mr = the_task->aborted_region(); + if (mr.start() != NULL) { + assert(mr.end() != NULL, "invariant"); + assert(mr.word_size() > 0, "invariant"); + HeapRegion* hr = _g1h->heap_region_containing(mr.start()); + assert(hr != NULL, "invariant"); + if (hr->in_collection_set()) { + // The region points into the collection set + the_task->set_aborted_region(MemRegion()); + result = true; + } + } + } + return result; +} + +bool ConcurrentMark::has_aborted_regions() { + for (int i = 0; i < (int)_max_task_num; ++i) { + CMTask* the_task = _tasks[i]; + MemRegion mr = the_task->aborted_region(); + if (mr.start() != NULL) { + assert(mr.end() != NULL, "invariant"); + assert(mr.word_size() > 0, "invariant"); + return true; + } + } + return false; +} + void ConcurrentMark::oops_do(OopClosure* cl) { if (_markStack.size() > 0 && verbose_low()) gclog_or_tty->print_cr("[global] scanning the global marking stack, " @@ -2351,13 +2389,22 @@ void ConcurrentMark::oops_do(OopClosure* cl) { queue->oops_do(cl); } - // finally, invalidate any entries that in the region stack that + // Invalidate any entries, that are in the region stack, that // point into the collection set if (_regionStack.invalidate_entries_into_cset()) { // otherwise, any gray objects copied during the evacuation pause // might not be visited. assert(_should_gray_objects, "invariant"); } + + // Invalidate any aborted regions, recorded in the individual CM + // tasks, that point into the collection set. + if (invalidate_aborted_regions_in_cset()) { + // otherwise, any gray objects copied during the evacuation pause + // might not be visited. + assert(_should_gray_objects, "invariant"); + } + } void ConcurrentMark::clear_marking_state() { @@ -2638,7 +2685,7 @@ void ConcurrentMark::newCSet() { // irrespective whether all collection set regions are below the // finger, if the region stack is not empty. This is expected to be // a rare case, so I don't think it's necessary to be smarted about it. - if (!region_stack_empty()) + if (!region_stack_empty() || has_aborted_regions()) _should_gray_objects = true; } @@ -2657,8 +2704,10 @@ void ConcurrentMark::abort() { _nextMarkBitMap->clearAll(); // Empty mark stack clear_marking_state(); - for (int i = 0; i < (int)_max_task_num; ++i) + for (int i = 0; i < (int)_max_task_num; ++i) { _tasks[i]->clear_region_fields(); + _tasks[i]->clear_aborted_region(); + } _has_aborted = true; SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set(); @@ -2936,6 +2985,7 @@ void CMTask::reset(CMBitMap* nextMarkBitMap) { _nextMarkBitMap = nextMarkBitMap; clear_region_fields(); + clear_aborted_region(); _calls = 0; _elapsed_time_ms = 0.0; @@ -3428,20 +3478,32 @@ void CMTask::drain_region_stack(BitMapClosure* bc) { assert(_region_finger == NULL, "it should be NULL when we're not scanning a region"); - if (!_cm->region_stack_empty()) { + if (!_cm->region_stack_empty() || !_aborted_region.is_empty()) { if (_cm->verbose_low()) gclog_or_tty->print_cr("[%d] draining region stack, size = %d", _task_id, _cm->region_stack_size()); - MemRegion mr = _cm->region_stack_pop_with_lock(); - // it returns MemRegion() if the pop fails - statsOnly(if (mr.start() != NULL) ++_region_stack_pops ); + MemRegion mr; + + if (!_aborted_region.is_empty()) { + mr = _aborted_region; + _aborted_region = MemRegion(); + + if (_cm->verbose_low()) + gclog_or_tty->print_cr("[%d] scanning aborted region [ " PTR_FORMAT ", " PTR_FORMAT " )", + _task_id, mr.start(), mr.end()); + } else { + mr = _cm->region_stack_pop_lock_free(); + // it returns MemRegion() if the pop fails + statsOnly(if (mr.start() != NULL) ++_region_stack_pops ); + } while (mr.start() != NULL) { if (_cm->verbose_medium()) gclog_or_tty->print_cr("[%d] we are scanning region " "["PTR_FORMAT", "PTR_FORMAT")", _task_id, mr.start(), mr.end()); + assert(mr.end() <= _cm->finger(), "otherwise the region shouldn't be on the stack"); assert(!mr.is_empty(), "Only non-empty regions live on the region stack"); @@ -3454,7 +3516,7 @@ void CMTask::drain_region_stack(BitMapClosure* bc) { if (has_aborted()) mr = MemRegion(); else { - mr = _cm->region_stack_pop_with_lock(); + mr = _cm->region_stack_pop_lock_free(); // it returns MemRegion() if the pop fails statsOnly(if (mr.start() != NULL) ++_region_stack_pops ); } @@ -3468,6 +3530,10 @@ void CMTask::drain_region_stack(BitMapClosure* bc) { // have definitely set _region_finger to something non-null. assert(_region_finger != NULL, "invariant"); + // Make sure that any previously aborted region has been + // cleared. + assert(_aborted_region.is_empty(), "aborted region not cleared"); + // The iteration was actually aborted. So now _region_finger // points to the address of the object we last scanned. If we // leave it there, when we restart this task, we will rescan @@ -3480,14 +3546,14 @@ void CMTask::drain_region_stack(BitMapClosure* bc) { if (!newRegion.is_empty()) { if (_cm->verbose_low()) { - gclog_or_tty->print_cr("[%d] pushing unscanned region" - "[" PTR_FORMAT "," PTR_FORMAT ") on region stack", + gclog_or_tty->print_cr("[%d] recording unscanned region" + "[" PTR_FORMAT "," PTR_FORMAT ") in CMTask", _task_id, newRegion.start(), newRegion.end()); } - // Now push the part of the region we didn't scan on the - // region stack to make sure a task scans it later. - _cm->region_stack_push_with_lock(newRegion); + // Now record the part of the region we didn't scan to + // make sure this task scans it later. + _aborted_region = newRegion; } // break from while mr = MemRegion(); @@ -3657,6 +3723,8 @@ void CMTask::do_marking_step(double time_target_ms) { assert(concurrent() || _cm->region_stack_empty(), "the region stack should have been cleared before remark"); + assert(concurrent() || !_cm->has_aborted_regions(), + "aborted regions should have been cleared before remark"); assert(_region_finger == NULL, "this should be non-null only when a region is being scanned"); @@ -3946,6 +4014,7 @@ void CMTask::do_marking_step(double time_target_ms) { // that, if a condition is false, we can immediately find out // which one. guarantee(_cm->out_of_regions(), "only way to reach here"); + guarantee(_aborted_region.is_empty(), "only way to reach here"); guarantee(_cm->region_stack_empty(), "only way to reach here"); guarantee(_cm->mark_stack_empty(), "only way to reach here"); guarantee(_task_queue->size() == 0, "only way to reach here"); @@ -4045,7 +4114,8 @@ CMTask::CMTask(int task_id, _nextMarkBitMap(NULL), _hash_seed(17), _task_queue(task_queue), _task_queues(task_queues), - _oop_closure(NULL) { + _oop_closure(NULL), + _aborted_region(MemRegion()) { guarantee(task_queue != NULL, "invariant"); guarantee(task_queues != NULL, "invariant"); diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp index 6791ebcedd9..3bc06d0b1cf 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp @@ -250,21 +250,23 @@ public: // This is lock-free; assumes that it will only be called in parallel // with other "push" operations (no pops). - void push(MemRegion mr); - -#if 0 - // This is currently not used. See the comment in the .cpp file. + void push_lock_free(MemRegion mr); // Lock-free; assumes that it will only be called in parallel // with other "pop" operations (no pushes). - MemRegion pop(); -#endif // 0 + MemRegion pop_lock_free(); + +#if 0 + // The routines that manipulate the region stack with a lock are + // not currently used. They should be retained, however, as a + // diagnostic aid. // These two are the implementations that use a lock. They can be // called concurrently with each other but they should not be called // concurrently with the lock-free versions (push() / pop()). void push_with_lock(MemRegion mr); MemRegion pop_with_lock(); +#endif bool isEmpty() { return _index == 0; } bool isFull() { return _index == _capacity; } @@ -398,6 +400,7 @@ protected: volatile bool _concurrent; // set at the end of a Full GC so that marking aborts volatile bool _has_aborted; + // used when remark aborts due to an overflow to indicate that // another concurrent marking phase should start volatile bool _restart_for_overflow; @@ -548,23 +551,30 @@ public: bool mark_stack_overflow() { return _markStack.overflow(); } bool mark_stack_empty() { return _markStack.isEmpty(); } - // Manipulation of the region stack - bool region_stack_push(MemRegion mr) { + // (Lock-free) Manipulation of the region stack + bool region_stack_push_lock_free(MemRegion mr) { // Currently we only call the lock-free version during evacuation // pauses. assert(SafepointSynchronize::is_at_safepoint(), "world should be stopped"); - _regionStack.push(mr); + _regionStack.push_lock_free(mr); if (_regionStack.overflow()) { set_has_overflown(); return false; } return true; } + + // Lock-free version of region-stack pop. Should only be + // called in tandem with other lock-free pops. + MemRegion region_stack_pop_lock_free() { + return _regionStack.pop_lock_free(); + } + #if 0 - // Currently this is not used. See the comment in the .cpp file. - MemRegion region_stack_pop() { return _regionStack.pop(); } -#endif // 0 + // The routines that manipulate the region stack with a lock are + // not currently used. They should be retained, however, as a + // diagnostic aid. bool region_stack_push_with_lock(MemRegion mr) { // Currently we only call the lock-based version during either @@ -579,6 +589,7 @@ public: } return true; } + MemRegion region_stack_pop_with_lock() { // Currently we only call the lock-based version during either // concurrent marking or remark. @@ -587,11 +598,21 @@ public: return _regionStack.pop_with_lock(); } +#endif int region_stack_size() { return _regionStack.size(); } bool region_stack_overflow() { return _regionStack.overflow(); } bool region_stack_empty() { return _regionStack.isEmpty(); } + // Iterate over any regions that were aborted while draining the + // region stack (any such regions are saved in the corresponding + // CMTask) and invalidate (i.e. assign to the empty MemRegion()) + // any regions that point into the collection set. + bool invalidate_aborted_regions_in_cset(); + + // Returns true if there are any aborted memory regions. + bool has_aborted_regions(); + bool concurrent_marking_in_progress() { return _concurrent_marking_in_progress; } @@ -856,6 +877,15 @@ private: // stack. HeapWord* _region_finger; + // If we abort while scanning a region we record the remaining + // unscanned portion and check this field when marking restarts. + // This avoids having to push on the region stack while other + // marking threads may still be popping regions. + // If we were to push the unscanned portion directly to the + // region stack then we would need to using locking versions + // of the push and pop operations. + MemRegion _aborted_region; + // the number of words this task has scanned size_t _words_scanned; // When _words_scanned reaches this limit, the regular clock is @@ -1012,6 +1042,15 @@ public: void clear_has_aborted() { _has_aborted = false; } bool claimed() { return _claimed; } + // Support routines for the partially scanned region that may be + // recorded as a result of aborting while draining the CMRegionStack + MemRegion aborted_region() { return _aborted_region; } + void set_aborted_region(MemRegion mr) + { _aborted_region = mr; } + + // Clears any recorded partially scanned region + void clear_aborted_region() { set_aborted_region(MemRegion()); } + void set_oop_closure(OopClosure* oop_closure) { _oop_closure = oop_closure; } From 8ddfb92179e4191dbe515605daf6ffed46c0ea59 Mon Sep 17 00:00:00 2001 From: Igor Nekrestyanov Date: Tue, 28 Sep 2010 10:29:08 -0700 Subject: [PATCH 026/722] 6982520: Move kernel to install ws Reviewed-by: herrick, billyh --- make/deploy-rules.gmk | 1 - 1 file changed, 1 deletion(-) diff --git a/make/deploy-rules.gmk b/make/deploy-rules.gmk index 988c7d0921b..7e080a60e40 100644 --- a/make/deploy-rules.gmk +++ b/make/deploy-rules.gmk @@ -79,7 +79,6 @@ ifneq ($(KERNEL), off) ifeq ($(UP_TMP), true) DEPLOY_BUILD_TARGETS += cmd-comp-all endif - DEPLOY_BUILD_TARGETS += kernel-all endif endif endif From 1cdd538ea549202dfe504af4f8c939c97657a129 Mon Sep 17 00:00:00 2001 From: John Coomes Date: Tue, 28 Sep 2010 15:56:15 -0700 Subject: [PATCH 027/722] 6423256: GC stacks should use a better data structure 6942771: SEGV in ParScanThreadState::take_from_overflow_stack Reviewed-by: apetrusenko, ysr, pbk --- .../concurrentMarkSweepGeneration.cpp | 47 +-- .../concurrentMarkSweepGeneration.hpp | 4 +- .../gc_implementation/g1/g1CollectedHeap.hpp | 4 +- .../vm/gc_implementation/g1/g1MarkSweep.cpp | 24 +- .../includeDB_gc_concurrentMarkSweep | 1 + .../includeDB_gc_parallelScavenge | 7 + .../vm/gc_implementation/includeDB_gc_serial | 2 + .../parNew/parNewGeneration.cpp | 47 ++- .../parNew/parNewGeneration.hpp | 8 +- .../parallelScavenge/pcTasks.cpp | 5 - .../parallelScavenge/psCompactionManager.cpp | 30 +- .../parallelScavenge/psCompactionManager.hpp | 21 +- .../parallelScavenge/psMarkSweep.cpp | 35 +-- .../parallelScavenge/psParallelCompact.cpp | 42 ++- .../parallelScavenge/psPromotionManager.cpp | 1 - .../parallelScavenge/psScavenge.cpp | 47 ++- .../parallelScavenge/psScavenge.hpp | 8 +- .../vm/gc_implementation/shared/markSweep.cpp | 100 +++---- .../vm/gc_implementation/shared/markSweep.hpp | 13 +- .../shared/markSweep.inline.hpp | 4 +- hotspot/src/share/vm/includeDB_core | 8 + hotspot/src/share/vm/memory/allocation.hpp | 15 +- .../src/share/vm/memory/defNewGeneration.cpp | 67 ++--- .../src/share/vm/memory/defNewGeneration.hpp | 20 +- hotspot/src/share/vm/memory/genMarkSweep.cpp | 34 +-- hotspot/src/share/vm/runtime/globals.hpp | 3 + hotspot/src/share/vm/runtime/thread.cpp | 2 + hotspot/src/share/vm/utilities/stack.hpp | 204 +++++++++++++ .../src/share/vm/utilities/stack.inline.hpp | 273 ++++++++++++++++++ hotspot/src/share/vm/utilities/taskqueue.hpp | 44 +-- 30 files changed, 718 insertions(+), 402 deletions(-) create mode 100644 hotspot/src/share/vm/utilities/stack.hpp create mode 100644 hotspot/src/share/vm/utilities/stack.inline.hpp diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index 3d1c4c1e5b2..4b616950cae 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -540,8 +540,6 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen, _is_alive_closure(_span, &_markBitMap), _restart_addr(NULL), _overflow_list(NULL), - _preserved_oop_stack(NULL), - _preserved_mark_stack(NULL), _stats(cmsGen), _eden_chunk_array(NULL), // may be set in ctor body _eden_chunk_capacity(0), // -- ditto -- @@ -8907,23 +8905,10 @@ void CMSCollector::par_push_on_overflow_list(oop p) { // failures where possible, thus, incrementally hardening the VM // in such low resource situations. void CMSCollector::preserve_mark_work(oop p, markOop m) { - if (_preserved_oop_stack == NULL) { - assert(_preserved_mark_stack == NULL, - "bijection with preserved_oop_stack"); - // Allocate the stacks - _preserved_oop_stack = new (ResourceObj::C_HEAP) - GrowableArray(PreserveMarkStackSize, true); - _preserved_mark_stack = new (ResourceObj::C_HEAP) - GrowableArray(PreserveMarkStackSize, true); - if (_preserved_oop_stack == NULL || _preserved_mark_stack == NULL) { - vm_exit_out_of_memory(2* PreserveMarkStackSize * sizeof(oop) /* punt */, - "Preserved Mark/Oop Stack for CMS (C-heap)"); - } - } - _preserved_oop_stack->push(p); - _preserved_mark_stack->push(m); + _preserved_oop_stack.push(p); + _preserved_mark_stack.push(m); assert(m == p->mark(), "Mark word changed"); - assert(_preserved_oop_stack->length() == _preserved_mark_stack->length(), + assert(_preserved_oop_stack.size() == _preserved_mark_stack.size(), "bijection"); } @@ -8965,42 +8950,30 @@ void CMSCollector::par_preserve_mark_if_necessary(oop p) { // effect on performance so great that this will // likely just be in the noise anyway. void CMSCollector::restore_preserved_marks_if_any() { - if (_preserved_oop_stack == NULL) { - assert(_preserved_mark_stack == NULL, - "bijection with preserved_oop_stack"); - return; - } - assert(SafepointSynchronize::is_at_safepoint(), "world should be stopped"); assert(Thread::current()->is_ConcurrentGC_thread() || Thread::current()->is_VM_thread(), "should be single-threaded"); + assert(_preserved_oop_stack.size() == _preserved_mark_stack.size(), + "bijection"); - int length = _preserved_oop_stack->length(); - assert(_preserved_mark_stack->length() == length, "bijection"); - for (int i = 0; i < length; i++) { - oop p = _preserved_oop_stack->at(i); + while (!_preserved_oop_stack.is_empty()) { + oop p = _preserved_oop_stack.pop(); assert(p->is_oop(), "Should be an oop"); assert(_span.contains(p), "oop should be in _span"); assert(p->mark() == markOopDesc::prototype(), "Set when taken from overflow list"); - markOop m = _preserved_mark_stack->at(i); + markOop m = _preserved_mark_stack.pop(); p->set_mark(m); } - _preserved_mark_stack->clear(); - _preserved_oop_stack->clear(); - assert(_preserved_mark_stack->is_empty() && - _preserved_oop_stack->is_empty(), + assert(_preserved_mark_stack.is_empty() && _preserved_oop_stack.is_empty(), "stacks were cleared above"); } #ifndef PRODUCT bool CMSCollector::no_preserved_marks() const { - return ( ( _preserved_mark_stack == NULL - && _preserved_oop_stack == NULL) - || ( _preserved_mark_stack->is_empty() - && _preserved_oop_stack->is_empty())); + return _preserved_mark_stack.is_empty() && _preserved_oop_stack.is_empty(); } #endif diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp index 222faab301c..7a0670734e4 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp @@ -537,8 +537,8 @@ class CMSCollector: public CHeapObj { // The following array-pair keeps track of mark words // displaced for accomodating overflow list above. // This code will likely be revisited under RFE#4922830. - GrowableArray* _preserved_oop_stack; - GrowableArray* _preserved_mark_stack; + Stack _preserved_oop_stack; + Stack _preserved_mark_stack; int* _hash_seed; diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index f6f07660de8..50869e301fb 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -1691,8 +1691,8 @@ public: ref = new_ref; } - int refs_to_scan() { return refs()->size(); } - int overflowed_refs_to_scan() { return refs()->overflow_stack()->length(); } + int refs_to_scan() { return (int)refs()->size(); } + int overflowed_refs_to_scan() { return (int)refs()->overflow_stack()->size(); } template void update_rs(HeapRegion* from, T* p, int tid) { if (G1DeferredRSUpdate) { diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp index 465f7d17161..0839d11404b 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp @@ -101,22 +101,6 @@ void G1MarkSweep::allocate_stacks() { GenMarkSweep::_preserved_count_max = 0; GenMarkSweep::_preserved_marks = NULL; GenMarkSweep::_preserved_count = 0; - GenMarkSweep::_preserved_mark_stack = NULL; - GenMarkSweep::_preserved_oop_stack = NULL; - - GenMarkSweep::_marking_stack = - new (ResourceObj::C_HEAP) GrowableArray(4000, true); - GenMarkSweep::_objarray_stack = - new (ResourceObj::C_HEAP) GrowableArray(50, true); - - int size = SystemDictionary::number_of_classes() * 2; - GenMarkSweep::_revisit_klass_stack = - new (ResourceObj::C_HEAP) GrowableArray(size, true); - // (#klass/k)^2 for k ~ 10 appears a better fit, but this will have to do - // for now until we have a chance to work out a more optimal setting. - GenMarkSweep::_revisit_mdo_stack = - new (ResourceObj::C_HEAP) GrowableArray(size*2, true); - } void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading, @@ -145,7 +129,7 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading, // Follow system dictionary roots and unload classes bool purged_class = SystemDictionary::do_unloading(&GenMarkSweep::is_alive); - assert(GenMarkSweep::_marking_stack->is_empty(), + assert(GenMarkSweep::_marking_stack.is_empty(), "stack should be empty by now"); // Follow code cache roots (has to be done after system dictionary, @@ -157,19 +141,19 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading, // Update subklass/sibling/implementor links of live klasses GenMarkSweep::follow_weak_klass_links(); - assert(GenMarkSweep::_marking_stack->is_empty(), + assert(GenMarkSweep::_marking_stack.is_empty(), "stack should be empty by now"); // Visit memoized MDO's and clear any unmarked weak refs GenMarkSweep::follow_mdo_weak_refs(); - assert(GenMarkSweep::_marking_stack->is_empty(), "just drained"); + assert(GenMarkSweep::_marking_stack.is_empty(), "just drained"); // Visit symbol and interned string tables and delete unmarked oops SymbolTable::unlink(&GenMarkSweep::is_alive); StringTable::unlink(&GenMarkSweep::is_alive); - assert(GenMarkSweep::_marking_stack->is_empty(), + assert(GenMarkSweep::_marking_stack.is_empty(), "stack should be empty by now"); } diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep b/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep index 6efae46edd1..7f1a077007a 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep @@ -171,6 +171,7 @@ concurrentMarkSweepGeneration.hpp generation.hpp concurrentMarkSweepGeneration.hpp generationCounters.hpp concurrentMarkSweepGeneration.hpp memoryService.hpp concurrentMarkSweepGeneration.hpp mutexLocker.hpp +concurrentMarkSweepGeneration.hpp stack.inline.hpp concurrentMarkSweepGeneration.hpp taskqueue.hpp concurrentMarkSweepGeneration.hpp virtualspace.hpp concurrentMarkSweepGeneration.hpp yieldingWorkgroup.hpp diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge index 83eae5eebe7..1d91dce282d 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge @@ -187,9 +187,11 @@ psCompactionManager.cpp parMarkBitMap.hpp psCompactionManager.cpp psParallelCompact.hpp psCompactionManager.cpp psCompactionManager.hpp psCompactionManager.cpp psOldGen.hpp +psCompactionManager.cpp stack.inline.hpp psCompactionManager.cpp systemDictionary.hpp psCompactionManager.hpp allocation.hpp +psCompactionManager.hpp stack.hpp psCompactionManager.hpp taskqueue.hpp psCompactionManager.inline.hpp psCompactionManager.hpp @@ -233,12 +235,14 @@ psMarkSweep.cpp referencePolicy.hpp psMarkSweep.cpp referenceProcessor.hpp psMarkSweep.cpp safepoint.hpp psMarkSweep.cpp spaceDecorator.hpp +psMarkSweep.cpp stack.inline.hpp psMarkSweep.cpp symbolTable.hpp psMarkSweep.cpp systemDictionary.hpp psMarkSweep.cpp vmThread.hpp psMarkSweep.hpp markSweep.inline.hpp psMarkSweep.hpp collectorCounters.hpp +psMarkSweep.hpp stack.hpp psMarkSweepDecorator.cpp liveRange.hpp psMarkSweepDecorator.cpp markSweep.inline.hpp @@ -280,6 +284,7 @@ psParallelCompact.cpp psYoungGen.hpp psParallelCompact.cpp referencePolicy.hpp psParallelCompact.cpp referenceProcessor.hpp psParallelCompact.cpp safepoint.hpp +psParallelCompact.cpp stack.inline.hpp psParallelCompact.cpp symbolTable.hpp psParallelCompact.cpp systemDictionary.hpp psParallelCompact.cpp vmThread.hpp @@ -367,6 +372,7 @@ psScavenge.cpp referencePolicy.hpp psScavenge.cpp referenceProcessor.hpp psScavenge.cpp resourceArea.hpp psScavenge.cpp spaceDecorator.hpp +psScavenge.cpp stack.inline.hpp psScavenge.cpp threadCritical.hpp psScavenge.cpp vmThread.hpp psScavenge.cpp vm_operations.hpp @@ -376,6 +382,7 @@ psScavenge.hpp cardTableExtension.hpp psScavenge.hpp collectorCounters.hpp psScavenge.hpp oop.hpp psScavenge.hpp psVirtualspace.hpp +psScavenge.hpp stack.hpp psScavenge.inline.hpp cardTableExtension.hpp psScavenge.inline.hpp parallelScavengeHeap.hpp diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_serial b/hotspot/src/share/vm/gc_implementation/includeDB_gc_serial index ef4508a1540..df6272f68c7 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_serial +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_serial @@ -93,11 +93,13 @@ markSweep.cpp oop.inline.hpp markSweep.hpp growableArray.hpp markSweep.hpp markOop.hpp markSweep.hpp oop.hpp +markSweep.hpp stack.hpp markSweep.hpp timer.hpp markSweep.hpp universe.hpp markSweep.inline.hpp collectedHeap.hpp markSweep.inline.hpp markSweep.hpp +markSweep.inline.hpp stack.inline.hpp mutableSpace.hpp immutableSpace.hpp mutableSpace.hpp memRegion.hpp diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp index f24236ae603..2aa4e7f4447 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @@ -34,12 +34,12 @@ ParScanThreadState::ParScanThreadState(Space* to_space_, Generation* old_gen_, int thread_num_, ObjToScanQueueSet* work_queue_set_, - GrowableArray** overflow_stack_set_, + Stack* overflow_stacks_, size_t desired_plab_sz_, ParallelTaskTerminator& term_) : _to_space(to_space_), _old_gen(old_gen_), _young_gen(gen_), _thread_num(thread_num_), _work_queue(work_queue_set_->queue(thread_num_)), _to_space_full(false), - _overflow_stack(overflow_stack_set_[thread_num_]), + _overflow_stack(overflow_stacks_ ? overflow_stacks_ + thread_num_ : NULL), _ageTable(false), // false ==> not the global age table, no perf data. _to_space_alloc_buffer(desired_plab_sz_), _to_space_closure(gen_, this), _old_gen_closure(gen_, this), @@ -159,11 +159,12 @@ bool ParScanThreadState::take_from_overflow_stack() { assert(ParGCUseLocalOverflow, "Else should not call"); assert(young_gen()->overflow_list() == NULL, "Error"); ObjToScanQueue* queue = work_queue(); - GrowableArray* of_stack = overflow_stack(); - uint num_overflow_elems = of_stack->length(); - uint num_take_elems = MIN2(MIN2((queue->max_elems() - queue->size())/4, - (juint)ParGCDesiredObjsFromOverflowList), - num_overflow_elems); + Stack* const of_stack = overflow_stack(); + const size_t num_overflow_elems = of_stack->size(); + const size_t space_available = queue->max_elems() - queue->size(); + const size_t num_take_elems = MIN3(space_available / 4, + ParGCDesiredObjsFromOverflowList, + num_overflow_elems); // Transfer the most recent num_take_elems from the overflow // stack to our work queue. for (size_t i = 0; i != num_take_elems; i++) { @@ -271,7 +272,7 @@ public: ParNewGeneration& gen, Generation& old_gen, ObjToScanQueueSet& queue_set, - GrowableArray** overflow_stacks_, + Stack* overflow_stacks_, size_t desired_plab_sz, ParallelTaskTerminator& term); @@ -302,17 +303,19 @@ private: ParScanThreadStateSet::ParScanThreadStateSet( int num_threads, Space& to_space, ParNewGeneration& gen, Generation& old_gen, ObjToScanQueueSet& queue_set, - GrowableArray** overflow_stack_set_, + Stack* overflow_stacks, size_t desired_plab_sz, ParallelTaskTerminator& term) : ResourceArray(sizeof(ParScanThreadState), num_threads), _gen(gen), _next_gen(old_gen), _term(term) { assert(num_threads > 0, "sanity check!"); + assert(ParGCUseLocalOverflow == (overflow_stacks != NULL), + "overflow_stack allocation mismatch"); // Initialize states. for (int i = 0; i < num_threads; ++i) { new ((ParScanThreadState*)_data + i) ParScanThreadState(&to_space, &gen, &old_gen, i, &queue_set, - overflow_stack_set_, desired_plab_sz, term); + overflow_stacks, desired_plab_sz, term); } } @@ -596,14 +599,11 @@ ParNewGeneration(ReservedSpace rs, size_t initial_byte_size, int level) for (uint i2 = 0; i2 < ParallelGCThreads; i2++) _task_queues->queue(i2)->initialize(); - _overflow_stacks = NEW_C_HEAP_ARRAY(GrowableArray*, ParallelGCThreads); - guarantee(_overflow_stacks != NULL, "Overflow stack set allocation failure"); - for (uint i = 0; i < ParallelGCThreads; i++) { - if (ParGCUseLocalOverflow) { - _overflow_stacks[i] = new (ResourceObj::C_HEAP) GrowableArray(512, true); - guarantee(_overflow_stacks[i] != NULL, "Overflow Stack allocation failure."); - } else { - _overflow_stacks[i] = NULL; + _overflow_stacks = NULL; + if (ParGCUseLocalOverflow) { + _overflow_stacks = NEW_C_HEAP_ARRAY(Stack, ParallelGCThreads); + for (size_t i = 0; i < ParallelGCThreads; ++i) { + new (_overflow_stacks + i) Stack(); } } @@ -937,12 +937,9 @@ void ParNewGeneration::collect(bool full, } else { assert(HandlePromotionFailure, "Should only be here if promotion failure handling is on"); - if (_promo_failure_scan_stack != NULL) { - // Can be non-null because of reference processing. - // Free stack with its elements. - delete _promo_failure_scan_stack; - _promo_failure_scan_stack = NULL; - } + assert(_promo_failure_scan_stack.is_empty(), "post condition"); + _promo_failure_scan_stack.clear(true); // Clear cached segments. + remove_forwarding_pointers(); if (PrintGCDetails) { gclog_or_tty->print(" (promotion failed)"); @@ -1397,8 +1394,8 @@ bool ParNewGeneration::take_from_overflow_list_work(ParScanThreadState* par_scan size_t objsFromOverflow = MIN2((size_t)(work_q->max_elems() - work_q->size())/4, (size_t)ParGCDesiredObjsFromOverflowList); - assert(par_scan_state->overflow_stack() == NULL, "Error"); assert(!UseCompressedOops, "Error"); + assert(par_scan_state->overflow_stack() == NULL, "Error"); if (_overflow_list == NULL) return false; // Otherwise, there was something there; try claiming the list. diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp index 338042c32b4..c10531f4f1d 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp @@ -52,7 +52,7 @@ class ParScanThreadState { friend class ParScanThreadStateSet; private: ObjToScanQueue *_work_queue; - GrowableArray* _overflow_stack; + Stack* const _overflow_stack; ParGCAllocBuffer _to_space_alloc_buffer; @@ -120,7 +120,7 @@ class ParScanThreadState { ParScanThreadState(Space* to_space_, ParNewGeneration* gen_, Generation* old_gen_, int thread_num_, ObjToScanQueueSet* work_queue_set_, - GrowableArray** overflow_stack_set_, + Stack* overflow_stacks_, size_t desired_plab_sz_, ParallelTaskTerminator& term_); @@ -144,7 +144,7 @@ class ParScanThreadState { void trim_queues(int max_size); // Private overflow stack usage - GrowableArray* overflow_stack() { return _overflow_stack; } + Stack* overflow_stack() { return _overflow_stack; } bool take_from_overflow_stack(); void push_on_overflow_stack(oop p); @@ -301,7 +301,7 @@ class ParNewGeneration: public DefNewGeneration { ObjToScanQueueSet* _task_queues; // Per-worker-thread local overflow stacks - GrowableArray** _overflow_stacks; + Stack* _overflow_stacks; // Desired size of survivor space plab's PLABStats _plab_stats; diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp index c7415706adf..27b67627309 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp @@ -59,8 +59,6 @@ void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) { PrintGCDetails && TraceParallelOldGCTasks, true, gclog_or_tty)); ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(which); - assert(cm->stacks_have_been_allocated(), - "Stack space has not been allocated"); PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm); switch (_root_type) { @@ -119,7 +117,6 @@ void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) { // Do the real work cm->follow_marking_stacks(); - // cm->deallocate_stacks(); } @@ -135,8 +132,6 @@ void RefProcTaskProxy::do_it(GCTaskManager* manager, uint which) PrintGCDetails && TraceParallelOldGCTasks, true, gclog_or_tty)); ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(which); - assert(cm->stacks_have_been_allocated(), - "Stack space has not been allocated"); PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm); PSParallelCompact::FollowStackClosure follow_stack_closure(cm); _rp_task.work(_work_id, *PSParallelCompact::is_alive_closure(), diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp index a42bbaba412..1ce20cdbf2b 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp @@ -46,23 +46,6 @@ ParCompactionManager::ParCompactionManager() : marking_stack()->initialize(); _objarray_stack.initialize(); region_stack()->initialize(); - - // Note that _revisit_klass_stack is allocated out of the - // C heap (as opposed to out of ResourceArena). - int size = - (SystemDictionary::number_of_classes() * 2) * 2 / ParallelGCThreads; - _revisit_klass_stack = new (ResourceObj::C_HEAP) GrowableArray(size, true); - // From some experiments (#klass/k)^2 for k = 10 seems a better fit, but this will - // have to do for now until we are able to investigate a more optimal setting. - _revisit_mdo_stack = new (ResourceObj::C_HEAP) GrowableArray(size*2, true); -} - -ParCompactionManager::~ParCompactionManager() { - delete _revisit_klass_stack; - delete _revisit_mdo_stack; - // _manager_array and _stack_array are statics - // shared with all instances of ParCompactionManager - // should not be deallocated. } void ParCompactionManager::initialize(ParMarkBitMap* mbm) { @@ -134,9 +117,9 @@ ParCompactionManager::gc_thread_compaction_manager(int index) { } void ParCompactionManager::reset() { - for(uint i=0; irevisit_klass_stack()->clear(); - manager_array(i)->revisit_mdo_stack()->clear(); + for(uint i = 0; i < ParallelGCThreads + 1; i++) { + assert(manager_array(i)->revisit_klass_stack()->is_empty(), "sanity"); + assert(manager_array(i)->revisit_mdo_stack()->is_empty(), "sanity"); } } @@ -178,10 +161,3 @@ void ParCompactionManager::drain_region_stacks() { } } while (!region_stack()->is_empty()); } - -#ifdef ASSERT -bool ParCompactionManager::stacks_have_been_allocated() { - return (revisit_klass_stack()->data_addr() != NULL && - revisit_mdo_stack()->data_addr() != NULL); -} -#endif diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp index 101f19dc46d..24723c9e7bb 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.hpp @@ -80,10 +80,9 @@ private: // type of TaskQueue. RegionTaskQueue _region_stack; -#if 1 // does this happen enough to need a per thread stack? - GrowableArray* _revisit_klass_stack; - GrowableArray* _revisit_mdo_stack; -#endif + Stack _revisit_klass_stack; + Stack _revisit_mdo_stack; + static ParMarkBitMap* _mark_bitmap; Action _action; @@ -113,10 +112,7 @@ private: inline static ParCompactionManager* manager_array(int index); ParCompactionManager(); - ~ParCompactionManager(); - void allocate_stacks(); - void deallocate_stacks(); ParMarkBitMap* mark_bitmap() { return _mark_bitmap; } // Take actions in preparation for a compaction. @@ -129,11 +125,8 @@ private: bool should_verify_only(); bool should_reset_only(); -#if 1 - // Probably stays as a growable array - GrowableArray* revisit_klass_stack() { return _revisit_klass_stack; } - GrowableArray* revisit_mdo_stack() { return _revisit_mdo_stack; } -#endif + Stack* revisit_klass_stack() { return &_revisit_klass_stack; } + Stack* revisit_mdo_stack() { return &_revisit_mdo_stack; } // Save for later processing. Must not fail. inline void push(oop obj) { _marking_stack.push(obj); } @@ -162,10 +155,6 @@ private: // Process tasks remaining on any stack void drain_region_stacks(); - // Debugging support -#ifdef ASSERT - bool stacks_have_been_allocated(); -#endif }; inline ParCompactionManager* ParCompactionManager::manager_array(int index) { diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp index 9006652c092..9905cfe82ed 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp @@ -466,33 +466,16 @@ void PSMarkSweep::allocate_stacks() { _preserved_count_max = pointer_delta(to_space->end(), to_space->top(), sizeof(jbyte)); // Now divide by the size of a PreservedMark _preserved_count_max /= sizeof(PreservedMark); - - _preserved_mark_stack = NULL; - _preserved_oop_stack = NULL; - - _marking_stack = new (ResourceObj::C_HEAP) GrowableArray(4000, true); - _objarray_stack = new (ResourceObj::C_HEAP) GrowableArray(50, true); - - int size = SystemDictionary::number_of_classes() * 2; - _revisit_klass_stack = new (ResourceObj::C_HEAP) GrowableArray(size, true); - // (#klass/k)^2, for k ~ 10 appears a better setting, but this will have to do for - // now until we investigate a more optimal setting. - _revisit_mdo_stack = new (ResourceObj::C_HEAP) GrowableArray(size*2, true); } void PSMarkSweep::deallocate_stacks() { - if (_preserved_oop_stack) { - delete _preserved_mark_stack; - _preserved_mark_stack = NULL; - delete _preserved_oop_stack; - _preserved_oop_stack = NULL; - } - - delete _marking_stack; - delete _objarray_stack; - delete _revisit_klass_stack; - delete _revisit_mdo_stack; + _preserved_mark_stack.clear(true); + _preserved_oop_stack.clear(true); + _marking_stack.clear(); + _objarray_stack.clear(true); + _revisit_klass_stack.clear(true); + _revisit_mdo_stack.clear(true); } void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) { @@ -542,17 +525,17 @@ void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) { // Update subklass/sibling/implementor links of live klasses follow_weak_klass_links(); - assert(_marking_stack->is_empty(), "just drained"); + assert(_marking_stack.is_empty(), "just drained"); // Visit memoized mdo's and clear unmarked weak refs follow_mdo_weak_refs(); - assert(_marking_stack->is_empty(), "just drained"); + assert(_marking_stack.is_empty(), "just drained"); // Visit symbol and interned string tables and delete unmarked oops SymbolTable::unlink(is_alive_closure()); StringTable::unlink(is_alive_closure()); - assert(_marking_stack->is_empty(), "stack should be empty by now"); + assert(_marking_stack.is_empty(), "stack should be empty by now"); } diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp index 77a5c76b057..57ff986c3ec 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @@ -2170,6 +2170,16 @@ void PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) { heap->update_counters(); } +#ifdef ASSERT + for (size_t i = 0; i < ParallelGCThreads + 1; ++i) { + ParCompactionManager* const cm = + ParCompactionManager::manager_array(int(i)); + assert(cm->marking_stack()->is_empty(), "should be empty"); + assert(cm->region_stack()->is_empty(), "should be empty"); + assert(cm->revisit_klass_stack()->is_empty(), "should be empty"); + } +#endif // ASSERT + if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) { HandleMark hm; // Discard invalid handles created during verification gclog_or_tty->print(" VerifyAfterGC:"); @@ -2711,21 +2721,22 @@ PSParallelCompact::follow_weak_klass_links() { // All klasses on the revisit stack are marked at this point. // Update and follow all subklass, sibling and implementor links. if (PrintRevisitStats) { - gclog_or_tty->print_cr("#classes in system dictionary = %d", SystemDictionary::number_of_classes()); + gclog_or_tty->print_cr("#classes in system dictionary = %d", + SystemDictionary::number_of_classes()); } for (uint i = 0; i < ParallelGCThreads + 1; i++) { ParCompactionManager* cm = ParCompactionManager::manager_array(i); KeepAliveClosure keep_alive_closure(cm); - int length = cm->revisit_klass_stack()->length(); + Stack* const rks = cm->revisit_klass_stack(); if (PrintRevisitStats) { - gclog_or_tty->print_cr("Revisit klass stack[%d] length = %d", i, length); + gclog_or_tty->print_cr("Revisit klass stack[%u] length = " SIZE_FORMAT, + i, rks->size()); } - for (int j = 0; j < length; j++) { - cm->revisit_klass_stack()->at(j)->follow_weak_klass_links( - is_alive_closure(), - &keep_alive_closure); + while (!rks->is_empty()) { + Klass* const k = rks->pop(); + k->follow_weak_klass_links(is_alive_closure(), &keep_alive_closure); } - // revisit_klass_stack is cleared in reset() + cm->follow_marking_stacks(); } } @@ -2744,19 +2755,20 @@ void PSParallelCompact::follow_mdo_weak_refs() { // we can visit and clear any weak references from MDO's which // we memoized during the strong marking phase. if (PrintRevisitStats) { - gclog_or_tty->print_cr("#classes in system dictionary = %d", SystemDictionary::number_of_classes()); + gclog_or_tty->print_cr("#classes in system dictionary = %d", + SystemDictionary::number_of_classes()); } for (uint i = 0; i < ParallelGCThreads + 1; i++) { ParCompactionManager* cm = ParCompactionManager::manager_array(i); - GrowableArray* rms = cm->revisit_mdo_stack(); - int length = rms->length(); + Stack* rms = cm->revisit_mdo_stack(); if (PrintRevisitStats) { - gclog_or_tty->print_cr("Revisit MDO stack[%d] length = %d", i, length); + gclog_or_tty->print_cr("Revisit MDO stack[%u] size = " SIZE_FORMAT, + i, rms->size()); } - for (int j = 0; j < length; j++) { - rms->at(j)->follow_weak_refs(is_alive_closure()); + while (!rms->is_empty()) { + rms->pop()->follow_weak_refs(is_alive_closure()); } - // revisit_mdo_stack is cleared in reset() + cm->follow_marking_stacks(); } } diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp index 1e73d11d1e3..5a805786266 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp @@ -185,7 +185,6 @@ void PSPromotionManager::reset() { void PSPromotionManager::drain_stacks_depth(bool totally_drain) { - assert(claimed_stack_depth()->overflow_stack() != NULL, "invariant"); totally_drain = totally_drain || _totally_drain; #ifdef ASSERT diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp index 0ea076812b0..96add27c729 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp @@ -34,9 +34,10 @@ bool PSScavenge::_survivor_overflow = false; int PSScavenge::_tenuring_threshold = 0; HeapWord* PSScavenge::_young_generation_boundary = NULL; elapsedTimer PSScavenge::_accumulated_time; -GrowableArray* PSScavenge::_preserved_mark_stack = NULL; -GrowableArray* PSScavenge::_preserved_oop_stack = NULL; +Stack PSScavenge::_preserved_mark_stack; +Stack PSScavenge::_preserved_oop_stack; CollectorCounters* PSScavenge::_counters = NULL; +bool PSScavenge::_promotion_failed = false; // Define before use class PSIsAliveClosure: public BoolObjectClosure { @@ -223,6 +224,9 @@ bool PSScavenge::invoke_no_policy() { assert(SafepointSynchronize::is_at_safepoint(), "should be at safepoint"); assert(Thread::current() == (Thread*)VMThread::vm_thread(), "should be in vm thread"); + assert(_preserved_mark_stack.is_empty(), "should be empty"); + assert(_preserved_oop_stack.is_empty(), "should be empty"); + TimeStamp scavenge_entry; TimeStamp scavenge_midpoint; TimeStamp scavenge_exit; @@ -636,24 +640,20 @@ void PSScavenge::clean_up_failed_promotion() { young_gen->object_iterate(&unforward_closure); if (PrintGC && Verbose) { - gclog_or_tty->print_cr("Restoring %d marks", - _preserved_oop_stack->length()); + gclog_or_tty->print_cr("Restoring %d marks", _preserved_oop_stack.size()); } // Restore any saved marks. - for (int i=0; i < _preserved_oop_stack->length(); i++) { - oop obj = _preserved_oop_stack->at(i); - markOop mark = _preserved_mark_stack->at(i); + while (!_preserved_oop_stack.is_empty()) { + oop obj = _preserved_oop_stack.pop(); + markOop mark = _preserved_mark_stack.pop(); obj->set_mark(mark); } - // Deallocate the preserved mark and oop stacks. - // The stacks were allocated as CHeap objects, so - // we must call delete to prevent mem leaks. - delete _preserved_mark_stack; - _preserved_mark_stack = NULL; - delete _preserved_oop_stack; - _preserved_oop_stack = NULL; + // Clear the preserved mark and oop stack caches. + _preserved_mark_stack.clear(true); + _preserved_oop_stack.clear(true); + _promotion_failed = false; } // Reset the PromotionFailureALot counters. @@ -661,27 +661,16 @@ void PSScavenge::clean_up_failed_promotion() { } // This method is called whenever an attempt to promote an object -// fails. Some markOops will need preserving, some will not. Note +// fails. Some markOops will need preservation, some will not. Note // that the entire eden is traversed after a failed promotion, with // all forwarded headers replaced by the default markOop. This means // it is not neccessary to preserve most markOops. void PSScavenge::oop_promotion_failed(oop obj, markOop obj_mark) { - if (_preserved_mark_stack == NULL) { - ThreadCritical tc; // Lock and retest - if (_preserved_mark_stack == NULL) { - assert(_preserved_oop_stack == NULL, "Sanity"); - _preserved_mark_stack = new (ResourceObj::C_HEAP) GrowableArray(40, true); - _preserved_oop_stack = new (ResourceObj::C_HEAP) GrowableArray(40, true); - } - } - - // Because we must hold the ThreadCritical lock before using - // the stacks, we should be safe from observing partial allocations, - // which are also guarded by the ThreadCritical lock. + _promotion_failed = true; if (obj_mark->must_be_preserved_for_promotion_failure(obj)) { ThreadCritical tc; - _preserved_oop_stack->push(obj); - _preserved_mark_stack->push(obj_mark); + _preserved_oop_stack.push(obj); + _preserved_mark_stack.push(obj_mark); } } diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp index f41372bb0d4..836106d8a5c 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp @@ -61,9 +61,10 @@ class PSScavenge: AllStatic { static HeapWord* _young_generation_boundary; // The lowest address possible for the young_gen. // This is used to decide if an oop should be scavenged, // cards should be marked, etc. - static GrowableArray* _preserved_mark_stack; // List of marks to be restored after failed promotion - static GrowableArray* _preserved_oop_stack; // List of oops that need their mark restored. + static Stack _preserved_mark_stack; // List of marks to be restored after failed promotion + static Stack _preserved_oop_stack; // List of oops that need their mark restored. static CollectorCounters* _counters; // collector performance counters + static bool _promotion_failed; static void clean_up_failed_promotion(); @@ -79,8 +80,7 @@ class PSScavenge: AllStatic { // Accessors static int tenuring_threshold() { return _tenuring_threshold; } static elapsedTimer* accumulated_time() { return &_accumulated_time; } - static bool promotion_failed() - { return _preserved_mark_stack != NULL; } + static bool promotion_failed() { return _promotion_failed; } static int consecutive_skipped_scavenges() { return _consecutive_skipped_scavenges; } diff --git a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp index e6f1deec687..5ddfbf039ab 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp +++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp @@ -25,13 +25,13 @@ #include "incls/_precompiled.incl" #include "incls/_markSweep.cpp.incl" -GrowableArray* MarkSweep::_marking_stack = NULL; -GrowableArray* MarkSweep::_objarray_stack = NULL; -GrowableArray* MarkSweep::_revisit_klass_stack = NULL; -GrowableArray* MarkSweep::_revisit_mdo_stack = NULL; +Stack MarkSweep::_marking_stack; +Stack MarkSweep::_revisit_mdo_stack; +Stack MarkSweep::_revisit_klass_stack; +Stack MarkSweep::_objarray_stack; -GrowableArray* MarkSweep::_preserved_oop_stack = NULL; -GrowableArray* MarkSweep::_preserved_mark_stack= NULL; +Stack MarkSweep::_preserved_oop_stack; +Stack MarkSweep::_preserved_mark_stack; size_t MarkSweep::_preserved_count = 0; size_t MarkSweep::_preserved_count_max = 0; PreservedMark* MarkSweep::_preserved_marks = NULL; @@ -58,37 +58,42 @@ GrowableArray * MarkSweep::_last_gc_live_oops_size = NULL; #endif void MarkSweep::revisit_weak_klass_link(Klass* k) { - _revisit_klass_stack->push(k); + _revisit_klass_stack.push(k); } void MarkSweep::follow_weak_klass_links() { // All klasses on the revisit stack are marked at this point. // Update and follow all subklass, sibling and implementor links. if (PrintRevisitStats) { - gclog_or_tty->print_cr("#classes in system dictionary = %d", SystemDictionary::number_of_classes()); - gclog_or_tty->print_cr("Revisit klass stack length = %d", _revisit_klass_stack->length()); + gclog_or_tty->print_cr("#classes in system dictionary = %d", + SystemDictionary::number_of_classes()); + gclog_or_tty->print_cr("Revisit klass stack size = " SIZE_FORMAT, + _revisit_klass_stack.size()); } - for (int i = 0; i < _revisit_klass_stack->length(); i++) { - _revisit_klass_stack->at(i)->follow_weak_klass_links(&is_alive,&keep_alive); + while (!_revisit_klass_stack.is_empty()) { + Klass* const k = _revisit_klass_stack.pop(); + k->follow_weak_klass_links(&is_alive, &keep_alive); } follow_stack(); } void MarkSweep::revisit_mdo(DataLayout* p) { - _revisit_mdo_stack->push(p); + _revisit_mdo_stack.push(p); } void MarkSweep::follow_mdo_weak_refs() { // All strongly reachable oops have been marked at this point; // we can visit and clear any weak references from MDO's which // we memoized during the strong marking phase. - assert(_marking_stack->is_empty(), "Marking stack should be empty"); + assert(_marking_stack.is_empty(), "Marking stack should be empty"); if (PrintRevisitStats) { - gclog_or_tty->print_cr("#classes in system dictionary = %d", SystemDictionary::number_of_classes()); - gclog_or_tty->print_cr("Revisit MDO stack length = %d", _revisit_mdo_stack->length()); + gclog_or_tty->print_cr("#classes in system dictionary = %d", + SystemDictionary::number_of_classes()); + gclog_or_tty->print_cr("Revisit MDO stack size = " SIZE_FORMAT, + _revisit_mdo_stack.size()); } - for (int i = 0; i < _revisit_mdo_stack->length(); i++) { - _revisit_mdo_stack->at(i)->follow_weak_refs(&is_alive); + while (!_revisit_mdo_stack.is_empty()) { + _revisit_mdo_stack.pop()->follow_weak_refs(&is_alive); } follow_stack(); } @@ -106,41 +111,37 @@ void MarkSweep::MarkAndPushClosure::do_oop(narrowOop* p) { mark_and_push(p); } void MarkSweep::follow_stack() { do { - while (!_marking_stack->is_empty()) { - oop obj = _marking_stack->pop(); + while (!_marking_stack.is_empty()) { + oop obj = _marking_stack.pop(); assert (obj->is_gc_marked(), "p must be marked"); obj->follow_contents(); } // Process ObjArrays one at a time to avoid marking stack bloat. - if (!_objarray_stack->is_empty()) { - ObjArrayTask task = _objarray_stack->pop(); + if (!_objarray_stack.is_empty()) { + ObjArrayTask task = _objarray_stack.pop(); objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); k->oop_follow_contents(task.obj(), task.index()); } - } while (!_marking_stack->is_empty() || !_objarray_stack->is_empty()); + } while (!_marking_stack.is_empty() || !_objarray_stack.is_empty()); } MarkSweep::FollowStackClosure MarkSweep::follow_stack_closure; void MarkSweep::FollowStackClosure::do_void() { follow_stack(); } -// We preserve the mark which should be replaced at the end and the location that it -// will go. Note that the object that this markOop belongs to isn't currently at that -// address but it will be after phase4 +// We preserve the mark which should be replaced at the end and the location +// that it will go. Note that the object that this markOop belongs to isn't +// currently at that address but it will be after phase4 void MarkSweep::preserve_mark(oop obj, markOop mark) { - // we try to store preserved marks in the to space of the new generation since this - // is storage which should be available. Most of the time this should be sufficient - // space for the marks we need to preserve but if it isn't we fall back in using - // GrowableArrays to keep track of the overflow. + // We try to store preserved marks in the to space of the new generation since + // this is storage which should be available. Most of the time this should be + // sufficient space for the marks we need to preserve but if it isn't we fall + // back to using Stacks to keep track of the overflow. if (_preserved_count < _preserved_count_max) { _preserved_marks[_preserved_count++].init(obj, mark); } else { - if (_preserved_mark_stack == NULL) { - _preserved_mark_stack = new (ResourceObj::C_HEAP) GrowableArray(40, true); - _preserved_oop_stack = new (ResourceObj::C_HEAP) GrowableArray(40, true); - } - _preserved_mark_stack->push(mark); - _preserved_oop_stack->push(obj); + _preserved_mark_stack.push(mark); + _preserved_oop_stack.push(obj); } } @@ -151,8 +152,7 @@ void MarkSweep::AdjustPointerClosure::do_oop(oop* p) { adjust_pointer(p, _ void MarkSweep::AdjustPointerClosure::do_oop(narrowOop* p) { adjust_pointer(p, _is_root); } void MarkSweep::adjust_marks() { - assert(_preserved_oop_stack == NULL || - _preserved_oop_stack->length() == _preserved_mark_stack->length(), + assert( _preserved_oop_stack.size() == _preserved_mark_stack.size(), "inconsistent preserved oop stacks"); // adjust the oops we saved earlier @@ -161,21 +161,19 @@ void MarkSweep::adjust_marks() { } // deal with the overflow stack - if (_preserved_oop_stack) { - for (int i = 0; i < _preserved_oop_stack->length(); i++) { - oop* p = _preserved_oop_stack->adr_at(i); - adjust_pointer(p); - } + StackIterator iter(_preserved_oop_stack); + while (!iter.is_empty()) { + oop* p = iter.next_addr(); + adjust_pointer(p); } } void MarkSweep::restore_marks() { - assert(_preserved_oop_stack == NULL || - _preserved_oop_stack->length() == _preserved_mark_stack->length(), + assert(_preserved_oop_stack.size() == _preserved_mark_stack.size(), "inconsistent preserved oop stacks"); if (PrintGC && Verbose) { - gclog_or_tty->print_cr("Restoring %d marks", _preserved_count + - (_preserved_oop_stack ? _preserved_oop_stack->length() : 0)); + gclog_or_tty->print_cr("Restoring %d marks", + _preserved_count + _preserved_oop_stack.size()); } // restore the marks we saved earlier @@ -184,12 +182,10 @@ void MarkSweep::restore_marks() { } // deal with the overflow - if (_preserved_oop_stack) { - for (int i = 0; i < _preserved_oop_stack->length(); i++) { - oop obj = _preserved_oop_stack->at(i); - markOop mark = _preserved_mark_stack->at(i); - obj->set_mark(mark); - } + while (!_preserved_oop_stack.is_empty()) { + oop obj = _preserved_oop_stack.pop(); + markOop mark = _preserved_mark_stack.pop(); + obj->set_mark(mark); } } diff --git a/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp b/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp index add0a966d86..a4939080bf3 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp +++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.hpp @@ -104,23 +104,22 @@ class MarkSweep : AllStatic { friend class KeepAliveClosure; friend class VM_MarkSweep; friend void marksweep_init(); - friend class DataLayout; // // Vars // protected: // Traversal stacks used during phase1 - static GrowableArray* _marking_stack; - static GrowableArray* _objarray_stack; + static Stack _marking_stack; + static Stack _objarray_stack; // Stack for live klasses to revisit at end of marking phase - static GrowableArray* _revisit_klass_stack; + static Stack _revisit_klass_stack; // Set (stack) of MDO's to revisit at end of marking phase - static GrowableArray* _revisit_mdo_stack; + static Stack _revisit_mdo_stack; // Space for storing/restoring mark word - static GrowableArray* _preserved_mark_stack; - static GrowableArray* _preserved_oop_stack; + static Stack _preserved_mark_stack; + static Stack _preserved_oop_stack; static size_t _preserved_count; static size_t _preserved_count_max; static PreservedMark* _preserved_marks; diff --git a/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp b/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp index 7570a9c097a..933e3baad3e 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.inline.hpp @@ -72,7 +72,7 @@ template inline void MarkSweep::mark_and_push(T* p) { oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); if (!obj->mark()->is_marked()) { mark_object(obj); - _marking_stack->push(obj); + _marking_stack.push(obj); } } } @@ -80,7 +80,7 @@ template inline void MarkSweep::mark_and_push(T* p) { void MarkSweep::push_objarray(oop obj, size_t index) { ObjArrayTask task(obj, index); assert(task.is_valid(), "bad ObjArrayTask"); - _objarray_stack->push(task); + _objarray_stack.push(task); } template inline void MarkSweep::adjust_pointer(T* p, bool isroot) { diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index 479b819d967..8985a211cc4 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -1435,12 +1435,14 @@ defNewGeneration.cpp oop.inline.hpp defNewGeneration.cpp referencePolicy.hpp defNewGeneration.cpp space.inline.hpp defNewGeneration.cpp spaceDecorator.hpp +defNewGeneration.cpp stack.inline.hpp defNewGeneration.cpp thread_.inline.hpp defNewGeneration.hpp ageTable.hpp defNewGeneration.hpp cSpaceCounters.hpp defNewGeneration.hpp generation.inline.hpp defNewGeneration.hpp generationCounters.hpp +defNewGeneration.hpp stack.hpp defNewGeneration.inline.hpp cardTableRS.hpp defNewGeneration.inline.hpp defNewGeneration.hpp @@ -3852,6 +3854,10 @@ specialized_oop_closures.cpp specialized_oop_closures.hpp specialized_oop_closures.hpp atomic.hpp +stack.hpp allocation.inline.hpp + +stack.inline.hpp stack.hpp + stackMapFrame.cpp globalDefinitions.hpp stackMapFrame.cpp handles.inline.hpp stackMapFrame.cpp oop.inline.hpp @@ -4095,6 +4101,7 @@ task.hpp top.hpp taskqueue.cpp debug.hpp taskqueue.cpp oop.inline.hpp taskqueue.cpp os.hpp +taskqueue.cpp stack.inline.hpp taskqueue.cpp taskqueue.hpp taskqueue.cpp thread_.inline.hpp @@ -4102,6 +4109,7 @@ taskqueue.hpp allocation.hpp taskqueue.hpp allocation.inline.hpp taskqueue.hpp mutex.hpp taskqueue.hpp orderAccess_.inline.hpp +taskqueue.hpp stack.hpp templateInterpreter.cpp interpreter.hpp templateInterpreter.cpp interpreterGenerator.hpp diff --git a/hotspot/src/share/vm/memory/allocation.hpp b/hotspot/src/share/vm/memory/allocation.hpp index a9f363b499b..7918d9f00b5 100644 --- a/hotspot/src/share/vm/memory/allocation.hpp +++ b/hotspot/src/share/vm/memory/allocation.hpp @@ -289,16 +289,17 @@ private: // One of the following macros must be used when allocating // an array or object from an arena -#define NEW_ARENA_ARRAY(arena, type, size)\ - (type*) arena->Amalloc((size) * sizeof(type)) +#define NEW_ARENA_ARRAY(arena, type, size) \ + (type*) (arena)->Amalloc((size) * sizeof(type)) -#define REALLOC_ARENA_ARRAY(arena, type, old, old_size, new_size)\ - (type*) arena->Arealloc((char*)(old), (old_size) * sizeof(type), (new_size) * sizeof(type) ) +#define REALLOC_ARENA_ARRAY(arena, type, old, old_size, new_size) \ + (type*) (arena)->Arealloc((char*)(old), (old_size) * sizeof(type), \ + (new_size) * sizeof(type) ) -#define FREE_ARENA_ARRAY(arena, type, old, size)\ - arena->Afree((char*)(old), (size) * sizeof(type)) +#define FREE_ARENA_ARRAY(arena, type, old, size) \ + (arena)->Afree((char*)(old), (size) * sizeof(type)) -#define NEW_ARENA_OBJ(arena, type)\ +#define NEW_ARENA_OBJ(arena, type) \ NEW_ARENA_ARRAY(arena, type, 1) diff --git a/hotspot/src/share/vm/memory/defNewGeneration.cpp b/hotspot/src/share/vm/memory/defNewGeneration.cpp index 8cce52edeee..ac7cc267f23 100644 --- a/hotspot/src/share/vm/memory/defNewGeneration.cpp +++ b/hotspot/src/share/vm/memory/defNewGeneration.cpp @@ -87,9 +87,7 @@ void DefNewGeneration::FastEvacuateFollowersClosure::do_void() { _gch->oop_since_save_marks_iterate(_level, _scan_cur_or_nonheap, _scan_older); } while (!_gch->no_allocs_since_save_marks(_level)); - guarantee(_gen->promo_failure_scan_stack() == NULL - || _gen->promo_failure_scan_stack()->length() == 0, - "Failed to finish scan"); + guarantee(_gen->promo_failure_scan_is_complete(), "Failed to finish scan"); } ScanClosure::ScanClosure(DefNewGeneration* g, bool gc_barrier) : @@ -130,9 +128,6 @@ DefNewGeneration::DefNewGeneration(ReservedSpace rs, int level, const char* policy) : Generation(rs, initial_size, level), - _objs_with_preserved_marks(NULL), - _preserved_marks_of_objs(NULL), - _promo_failure_scan_stack(NULL), _promo_failure_drain_in_progress(false), _should_allocate_from_space(false) { @@ -604,12 +599,8 @@ void DefNewGeneration::collect(bool full, } else { assert(HandlePromotionFailure, "Should not be here unless promotion failure handling is on"); - assert(_promo_failure_scan_stack != NULL && - _promo_failure_scan_stack->length() == 0, "post condition"); - - // deallocate stack and it's elements - delete _promo_failure_scan_stack; - _promo_failure_scan_stack = NULL; + assert(_promo_failure_scan_stack.is_empty(), "post condition"); + _promo_failure_scan_stack.clear(true); // Clear cached segments. remove_forwarding_pointers(); if (PrintGCDetails) { @@ -620,7 +611,7 @@ void DefNewGeneration::collect(bool full, // case there can be live objects in to-space // as a result of a partial evacuation of eden // and from-space. - swap_spaces(); // For the sake of uniformity wrt ParNewGeneration::collect(). + swap_spaces(); // For uniformity wrt ParNewGeneration. from()->set_next_compaction_space(to()); gch->set_incremental_collection_will_fail(); @@ -653,34 +644,23 @@ void DefNewGeneration::remove_forwarding_pointers() { RemoveForwardPointerClosure rspc; eden()->object_iterate(&rspc); from()->object_iterate(&rspc); + // Now restore saved marks, if any. - if (_objs_with_preserved_marks != NULL) { - assert(_preserved_marks_of_objs != NULL, "Both or none."); - assert(_objs_with_preserved_marks->length() == - _preserved_marks_of_objs->length(), "Both or none."); - for (int i = 0; i < _objs_with_preserved_marks->length(); i++) { - oop obj = _objs_with_preserved_marks->at(i); - markOop m = _preserved_marks_of_objs->at(i); - obj->set_mark(m); - } - delete _objs_with_preserved_marks; - delete _preserved_marks_of_objs; - _objs_with_preserved_marks = NULL; - _preserved_marks_of_objs = NULL; + assert(_objs_with_preserved_marks.size() == _preserved_marks_of_objs.size(), + "should be the same"); + while (!_objs_with_preserved_marks.is_empty()) { + oop obj = _objs_with_preserved_marks.pop(); + markOop m = _preserved_marks_of_objs.pop(); + obj->set_mark(m); } + _objs_with_preserved_marks.clear(true); + _preserved_marks_of_objs.clear(true); } void DefNewGeneration::preserve_mark_if_necessary(oop obj, markOop m) { if (m->must_be_preserved_for_promotion_failure(obj)) { - if (_objs_with_preserved_marks == NULL) { - assert(_preserved_marks_of_objs == NULL, "Both or none."); - _objs_with_preserved_marks = new (ResourceObj::C_HEAP) - GrowableArray(PreserveMarkStackSize, true); - _preserved_marks_of_objs = new (ResourceObj::C_HEAP) - GrowableArray(PreserveMarkStackSize, true); - } - _objs_with_preserved_marks->push(obj); - _preserved_marks_of_objs->push(m); + _objs_with_preserved_marks.push(obj); + _preserved_marks_of_objs.push(m); } } @@ -695,7 +675,7 @@ void DefNewGeneration::handle_promotion_failure(oop old) { old->forward_to(old); _promotion_failed = true; - push_on_promo_failure_scan_stack(old); + _promo_failure_scan_stack.push(old); if (!_promo_failure_drain_in_progress) { // prevent recursion in copy_to_survivor_space() @@ -748,20 +728,9 @@ oop DefNewGeneration::copy_to_survivor_space(oop old) { return obj; } -void DefNewGeneration::push_on_promo_failure_scan_stack(oop obj) { - if (_promo_failure_scan_stack == NULL) { - _promo_failure_scan_stack = new (ResourceObj::C_HEAP) - GrowableArray(40, true); - } - - _promo_failure_scan_stack->push(obj); -} - void DefNewGeneration::drain_promo_failure_scan_stack() { - assert(_promo_failure_scan_stack != NULL, "precondition"); - - while (_promo_failure_scan_stack->length() > 0) { - oop obj = _promo_failure_scan_stack->pop(); + while (!_promo_failure_scan_stack.is_empty()) { + oop obj = _promo_failure_scan_stack.pop(); obj->oop_iterate(_promo_failure_scan_stack_closure); } } diff --git a/hotspot/src/share/vm/memory/defNewGeneration.hpp b/hotspot/src/share/vm/memory/defNewGeneration.hpp index 64b1a82dc66..166510b0a38 100644 --- a/hotspot/src/share/vm/memory/defNewGeneration.hpp +++ b/hotspot/src/share/vm/memory/defNewGeneration.hpp @@ -77,10 +77,10 @@ protected: // word being overwritten with a self-forwarding-pointer. void preserve_mark_if_necessary(oop obj, markOop m); - // When one is non-null, so is the other. Together, they each pair is - // an object with a preserved mark, and its mark value. - GrowableArray* _objs_with_preserved_marks; - GrowableArray* _preserved_marks_of_objs; + // Together, these keep pairs. + // They should always contain the same number of elements. + Stack _objs_with_preserved_marks; + Stack _preserved_marks_of_objs; // Returns true if the collection can be safely attempted. // If this method returns false, a collection is not @@ -94,11 +94,7 @@ protected: _promo_failure_scan_stack_closure = scan_stack_closure; } - GrowableArray* _promo_failure_scan_stack; - GrowableArray* promo_failure_scan_stack() const { - return _promo_failure_scan_stack; - } - void push_on_promo_failure_scan_stack(oop); + Stack _promo_failure_scan_stack; void drain_promo_failure_scan_stack(void); bool _promo_failure_drain_in_progress; @@ -184,8 +180,6 @@ protected: void do_void(); }; - class FastEvacuateFollowersClosure; - friend class FastEvacuateFollowersClosure; class FastEvacuateFollowersClosure: public VoidClosure { GenCollectedHeap* _gch; int _level; @@ -336,6 +330,10 @@ protected: void verify(bool allow_dirty); + bool promo_failure_scan_is_complete() const { + return _promo_failure_scan_stack.is_empty(); + } + protected: // If clear_space is true, clear the survivor spaces. Eden is // cleared if the minimum size of eden is 0. If mangle_space diff --git a/hotspot/src/share/vm/memory/genMarkSweep.cpp b/hotspot/src/share/vm/memory/genMarkSweep.cpp index 685b7df9d74..da99d56cfc8 100644 --- a/hotspot/src/share/vm/memory/genMarkSweep.cpp +++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp @@ -161,17 +161,6 @@ void GenMarkSweep::allocate_stacks() { _preserved_marks = (PreservedMark*)scratch; _preserved_count = 0; - _preserved_mark_stack = NULL; - _preserved_oop_stack = NULL; - - _marking_stack = new (ResourceObj::C_HEAP) GrowableArray(4000, true); - _objarray_stack = new (ResourceObj::C_HEAP) GrowableArray(50, true); - - int size = SystemDictionary::number_of_classes() * 2; - _revisit_klass_stack = new (ResourceObj::C_HEAP) GrowableArray(size, true); - // (#klass/k)^2 for k ~ 10 appears to be a better fit, but this will have to do for - // now until we have had a chance to investigate a more optimal setting. - _revisit_mdo_stack = new (ResourceObj::C_HEAP) GrowableArray(2*size, true); #ifdef VALIDATE_MARK_SWEEP if (ValidateMarkSweep) { @@ -206,17 +195,12 @@ void GenMarkSweep::deallocate_stacks() { gch->release_scratch(); } - if (_preserved_oop_stack) { - delete _preserved_mark_stack; - _preserved_mark_stack = NULL; - delete _preserved_oop_stack; - _preserved_oop_stack = NULL; - } - - delete _marking_stack; - delete _objarray_stack; - delete _revisit_klass_stack; - delete _revisit_mdo_stack; + _preserved_mark_stack.clear(true); + _preserved_oop_stack.clear(true); + _marking_stack.clear(); + _objarray_stack.clear(true); + _revisit_klass_stack.clear(true); + _revisit_mdo_stack.clear(true); #ifdef VALIDATE_MARK_SWEEP if (ValidateMarkSweep) { @@ -274,17 +258,17 @@ void GenMarkSweep::mark_sweep_phase1(int level, // Update subklass/sibling/implementor links of live klasses follow_weak_klass_links(); - assert(_marking_stack->is_empty(), "just drained"); + assert(_marking_stack.is_empty(), "just drained"); // Visit memoized MDO's and clear any unmarked weak refs follow_mdo_weak_refs(); - assert(_marking_stack->is_empty(), "just drained"); + assert(_marking_stack.is_empty(), "just drained"); // Visit symbol and interned string tables and delete unmarked oops SymbolTable::unlink(&is_alive); StringTable::unlink(&is_alive); - assert(_marking_stack->is_empty(), "stack should be empty by now"); + assert(_marking_stack.is_empty(), "stack should be empty by now"); } diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index c7c2fe833b2..6822161323b 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -641,6 +641,9 @@ class CommandLineFlags { develop(bool, ZapJNIHandleArea, trueInDebug, \ "Zap freed JNI handle space with 0xFEFEFEFE") \ \ + notproduct(bool, ZapStackSegments, trueInDebug, \ + "Zap allocated/freed Stack segments with 0xFADFADED") \ + \ develop(bool, ZapUnusedHeapArea, trueInDebug, \ "Zap unused heap space with 0xBAADBABE") \ \ diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 00e5e991efc..87e22fc4982 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1073,6 +1073,7 @@ void WatcherThread::run() { } } +#if 0 if (is_error_reported()) { // A fatal error has happened, the error handler(VMError::report_and_die) // should abort JVM after creating an error log file. However in some @@ -1100,6 +1101,7 @@ void WatcherThread::run() { os::sleep(this, 5 * 1000, false); } } +#endif // #if 0 PeriodicTask::real_time_tick(time_to_wait); diff --git a/hotspot/src/share/vm/utilities/stack.hpp b/hotspot/src/share/vm/utilities/stack.hpp new file mode 100644 index 00000000000..0e095b5a7a3 --- /dev/null +++ b/hotspot/src/share/vm/utilities/stack.hpp @@ -0,0 +1,204 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +// Class Stack (below) grows and shrinks by linking together "segments" which +// are allocated on demand. Segments are arrays of the element type (E) plus an +// extra pointer-sized field to store the segment link. Recently emptied +// segments are kept in a cache and reused. +// +// Notes/caveats: +// +// The size of an element must either evenly divide the size of a pointer or be +// a multiple of the size of a pointer. +// +// Destructors are not called for elements popped off the stack, so element +// types which rely on destructors for things like reference counting will not +// work properly. +// +// Class Stack allocates segments from the C heap. However, two protected +// virtual methods are used to alloc/free memory which subclasses can override: +// +// virtual void* alloc(size_t bytes); +// virtual void free(void* addr, size_t bytes); +// +// The alloc() method must return storage aligned for any use. The +// implementation in class Stack assumes that alloc() will terminate the process +// if the allocation fails. + +template class StackIterator; + +// StackBase holds common data/methods that don't depend on the element type, +// factored out to reduce template code duplication. +class StackBase +{ +public: + size_t segment_size() const { return _seg_size; } // Elements per segment. + size_t max_size() const { return _max_size; } // Max elements allowed. + size_t max_cache_size() const { return _max_cache_size; } // Max segments + // allowed in cache. + + size_t cache_size() const { return _cache_size; } // Segments in the cache. + +protected: + // The ctor arguments correspond to the like-named functions above. + // segment_size: number of items per segment + // max_cache_size: maxmium number of *segments* to cache + // max_size: maximum number of items allowed, rounded to a multiple of + // the segment size (0 == unlimited) + inline StackBase(size_t segment_size, size_t max_cache_size, size_t max_size); + + // Round max_size to a multiple of the segment size. Treat 0 as unlimited. + static inline size_t adjust_max_size(size_t max_size, size_t seg_size); + +protected: + const size_t _seg_size; // Number of items per segment. + const size_t _max_size; // Maximum number of items allowed in the stack. + const size_t _max_cache_size; // Maximum number of segments to cache. + size_t _cur_seg_size; // Number of items in the current segment. + size_t _full_seg_size; // Number of items in already-filled segments. + size_t _cache_size; // Number of segments in the cache. +}; + +#ifdef __GNUC__ +#define inline +#endif // __GNUC__ + +template +class Stack: public StackBase +{ +public: + friend class StackIterator; + + // segment_size: number of items per segment + // max_cache_size: maxmium number of *segments* to cache + // max_size: maximum number of items allowed, rounded to a multiple of + // the segment size (0 == unlimited) + inline Stack(size_t segment_size = default_segment_size(), + size_t max_cache_size = 4, size_t max_size = 0); + inline ~Stack() { clear(true); } + + inline bool is_empty() const { return _cur_seg == NULL; } + inline bool is_full() const { return _full_seg_size >= max_size(); } + + // Performance sensitive code should use is_empty() instead of size() == 0 and + // is_full() instead of size() == max_size(). Using a conditional here allows + // just one var to be updated when pushing/popping elements instead of two; + // _full_seg_size is updated only when pushing/popping segments. + inline size_t size() const { + return is_empty() ? 0 : _full_seg_size + _cur_seg_size; + } + + inline void push(E elem); + inline E pop(); + + // Clear everything from the stack, releasing the associated memory. If + // clear_cache is true, also release any cached segments. + void clear(bool clear_cache = false); + + static inline size_t default_segment_size(); + +protected: + // Each segment includes space for _seg_size elements followed by a link + // (pointer) to the previous segment; the space is allocated as a single block + // of size segment_bytes(). _seg_size is rounded up if necessary so the link + // is properly aligned. The C struct for the layout would be: + // + // struct segment { + // E elements[_seg_size]; + // E* link; + // }; + + // Round up seg_size to keep the link field aligned. + static inline size_t adjust_segment_size(size_t seg_size); + + // Methods for allocation size and getting/setting the link. + inline size_t link_offset() const; // Byte offset of link field. + inline size_t segment_bytes() const; // Segment size in bytes. + inline E** link_addr(E* seg) const; // Address of the link field. + inline E* get_link(E* seg) const; // Extract the link from seg. + inline E* set_link(E* new_seg, E* old_seg); // new_seg.link = old_seg. + + virtual E* alloc(size_t bytes); + virtual void free(E* addr, size_t bytes); + + void push_segment(); + void pop_segment(); + + void free_segments(E* seg); // Free all segments in the list. + inline void reset(bool reset_cache); // Reset all data fields. + + DEBUG_ONLY(void verify(bool at_empty_transition) const;) + DEBUG_ONLY(void zap_segment(E* seg, bool zap_link_field) const;) + +private: + E* _cur_seg; // Current segment. + E* _cache; // Segment cache to avoid ping-ponging. +}; + +template class ResourceStack: public Stack, public ResourceObj +{ +public: + // If this class becomes widely used, it may make sense to save the Thread + // and use it when allocating segments. + ResourceStack(size_t segment_size = Stack::default_segment_size()): + Stack(segment_size, max_uintx) + { } + + // Set the segment pointers to NULL so the parent dtor does not free them; + // that must be done by the ResourceMark code. + ~ResourceStack() { Stack::reset(true); } + +protected: + virtual E* alloc(size_t bytes); + virtual void free(E* addr, size_t bytes); + +private: + void clear(bool clear_cache = false); +}; + +template +class StackIterator: public StackObj +{ +public: + StackIterator(Stack& stack): _stack(stack) { sync(); } + + Stack& stack() const { return _stack; } + + bool is_empty() const { return _cur_seg == NULL; } + + E next() { return *next_addr(); } + E* next_addr(); + + void sync(); // Sync the iterator's state to the stack's current state. + +private: + Stack& _stack; + size_t _cur_seg_size; + E* _cur_seg; + size_t _full_seg_size; +}; + +#ifdef __GNUC__ +#undef inline +#endif // __GNUC__ diff --git a/hotspot/src/share/vm/utilities/stack.inline.hpp b/hotspot/src/share/vm/utilities/stack.inline.hpp new file mode 100644 index 00000000000..9e2d8cb5449 --- /dev/null +++ b/hotspot/src/share/vm/utilities/stack.inline.hpp @@ -0,0 +1,273 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +StackBase::StackBase(size_t segment_size, size_t max_cache_size, + size_t max_size): + _seg_size(segment_size), + _max_cache_size(max_cache_size), + _max_size(adjust_max_size(max_size, segment_size)) +{ + assert(_max_size % _seg_size == 0, "not a multiple"); +} + +size_t StackBase::adjust_max_size(size_t max_size, size_t seg_size) +{ + assert(seg_size > 0, "cannot be 0"); + assert(max_size >= seg_size || max_size == 0, "max_size too small"); + const size_t limit = max_uintx - (seg_size - 1); + if (max_size == 0 || max_size > limit) { + max_size = limit; + } + return (max_size + seg_size - 1) / seg_size * seg_size; +} + +template +Stack::Stack(size_t segment_size, size_t max_cache_size, size_t max_size): + StackBase(adjust_segment_size(segment_size), max_cache_size, max_size) +{ + reset(true); +} + +template +void Stack::push(E item) +{ + assert(!is_full(), "pushing onto a full stack"); + if (_cur_seg_size == _seg_size) { + push_segment(); + } + _cur_seg[_cur_seg_size] = item; + ++_cur_seg_size; +} + +template +E Stack::pop() +{ + assert(!is_empty(), "popping from an empty stack"); + if (_cur_seg_size == 1) { + E tmp = _cur_seg[--_cur_seg_size]; + pop_segment(); + return tmp; + } + return _cur_seg[--_cur_seg_size]; +} + +template +void Stack::clear(bool clear_cache) +{ + free_segments(_cur_seg); + if (clear_cache) free_segments(_cache); + reset(clear_cache); +} + +template +size_t Stack::default_segment_size() +{ + // Number of elements that fit in 4K bytes minus the size of two pointers + // (link field and malloc header). + return (4096 - 2 * sizeof(E*)) / sizeof(E); +} + +template +size_t Stack::adjust_segment_size(size_t seg_size) +{ + const size_t elem_sz = sizeof(E); + const size_t ptr_sz = sizeof(E*); + assert(elem_sz % ptr_sz == 0 || ptr_sz % elem_sz == 0, "bad element size"); + if (elem_sz < ptr_sz) { + return align_size_up(seg_size * elem_sz, ptr_sz) / elem_sz; + } + return seg_size; +} + +template +size_t Stack::link_offset() const +{ + return align_size_up(_seg_size * sizeof(E), sizeof(E*)); +} + +template +size_t Stack::segment_bytes() const +{ + return link_offset() + sizeof(E*); +} + +template +E** Stack::link_addr(E* seg) const +{ + return (E**) ((char*)seg + link_offset()); +} + +template +E* Stack::get_link(E* seg) const +{ + return *link_addr(seg); +} + +template +E* Stack::set_link(E* new_seg, E* old_seg) +{ + *link_addr(new_seg) = old_seg; + return new_seg; +} + +template +E* Stack::alloc(size_t bytes) +{ + return (E*) NEW_C_HEAP_ARRAY(char, bytes); +} + +template +void Stack::free(E* addr, size_t bytes) +{ + FREE_C_HEAP_ARRAY(char, (char*) addr); +} + +template +void Stack::push_segment() +{ + assert(_cur_seg_size == _seg_size, "current segment is not full"); + E* next; + if (_cache_size > 0) { + // Use a cached segment. + next = _cache; + _cache = get_link(_cache); + --_cache_size; + } else { + next = alloc(segment_bytes()); + DEBUG_ONLY(zap_segment(next, true);) + } + const bool at_empty_transition = is_empty(); + _cur_seg = set_link(next, _cur_seg); + _cur_seg_size = 0; + _full_seg_size += at_empty_transition ? 0 : _seg_size; + DEBUG_ONLY(verify(at_empty_transition);) +} + +template +void Stack::pop_segment() +{ + assert(_cur_seg_size == 0, "current segment is not empty"); + E* const prev = get_link(_cur_seg); + if (_cache_size < _max_cache_size) { + // Add the current segment to the cache. + DEBUG_ONLY(zap_segment(_cur_seg, false);) + _cache = set_link(_cur_seg, _cache); + ++_cache_size; + } else { + DEBUG_ONLY(zap_segment(_cur_seg, true);) + free(_cur_seg, segment_bytes()); + } + const bool at_empty_transition = prev == NULL; + _cur_seg = prev; + _cur_seg_size = _seg_size; + _full_seg_size -= at_empty_transition ? 0 : _seg_size; + DEBUG_ONLY(verify(at_empty_transition);) +} + +template +void Stack::free_segments(E* seg) +{ + const size_t bytes = segment_bytes(); + while (seg != NULL) { + E* const prev = get_link(seg); + free(seg, bytes); + seg = prev; + } +} + +template +void Stack::reset(bool reset_cache) +{ + _cur_seg_size = _seg_size; // So push() will alloc a new segment. + _full_seg_size = 0; + _cur_seg = NULL; + if (reset_cache) { + _cache_size = 0; + _cache = NULL; + } +} + +#ifdef ASSERT +template +void Stack::verify(bool at_empty_transition) const +{ + assert(size() <= max_size(), "stack exceeded bounds"); + assert(cache_size() <= max_cache_size(), "cache exceeded bounds"); + assert(_cur_seg_size <= segment_size(), "segment index exceeded bounds"); + + assert(_full_seg_size % _seg_size == 0, "not a multiple"); + assert(at_empty_transition || is_empty() == (size() == 0), "mismatch"); + assert((_cache == NULL) == (cache_size() == 0), "mismatch"); + + if (is_empty()) { + assert(_cur_seg_size == segment_size(), "sanity"); + } +} + +template +void Stack::zap_segment(E* seg, bool zap_link_field) const +{ + if (!ZapStackSegments) return; + const size_t zap_bytes = segment_bytes() - (zap_link_field ? 0 : sizeof(E*)); + uint32_t* cur = (uint32_t*)seg; + const uint32_t* end = cur + zap_bytes / sizeof(uint32_t); + while (cur < end) { + *cur++ = 0xfadfaded; + } +} +#endif + +template +E* ResourceStack::alloc(size_t bytes) +{ + return (E*) resource_allocate_bytes(bytes); +} + +template +void ResourceStack::free(E* addr, size_t bytes) +{ + resource_free_bytes((char*) addr, bytes); +} + +template +void StackIterator::sync() +{ + _full_seg_size = _stack._full_seg_size; + _cur_seg_size = _stack._cur_seg_size; + _cur_seg = _stack._cur_seg; +} + +template +E* StackIterator::next_addr() +{ + assert(!is_empty(), "no items left"); + if (_cur_seg_size == 1) { + E* addr = _cur_seg; + _cur_seg = _stack.get_link(_cur_seg); + _cur_seg_size = _stack.segment_size(); + _full_seg_size -= _stack.segment_size(); + return addr; + } + return _cur_seg + --_cur_seg_size; +} diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp index c0d5497e833..61af8d7e4b0 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.hpp +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp @@ -372,75 +372,47 @@ GenericTaskQueue::~GenericTaskQueue() { // OverflowTaskQueue is a TaskQueue that also includes an overflow stack for // elements that do not fit in the TaskQueue. // -// Three methods from super classes are overridden: +// This class hides two methods from super classes: // -// initialize() - initialize the super classes and create the overflow stack // push() - push onto the task queue or, if that fails, onto the overflow stack // is_empty() - return true if both the TaskQueue and overflow stack are empty // -// Note that size() is not overridden--it returns the number of elements in the +// Note that size() is not hidden--it returns the number of elements in the // TaskQueue, and does not include the size of the overflow stack. This // simplifies replacement of GenericTaskQueues with OverflowTaskQueues. template class OverflowTaskQueue: public GenericTaskQueue { public: - typedef GrowableArray overflow_t; + typedef Stack overflow_t; typedef GenericTaskQueue taskqueue_t; TASKQUEUE_STATS_ONLY(using taskqueue_t::stats;) - OverflowTaskQueue(); - ~OverflowTaskQueue(); - void initialize(); - - inline overflow_t* overflow_stack() const { return _overflow_stack; } - // Push task t onto the queue or onto the overflow stack. Return true. inline bool push(E t); // Attempt to pop from the overflow stack; return true if anything was popped. inline bool pop_overflow(E& t); + inline overflow_t* overflow_stack() { return &_overflow_stack; } + inline bool taskqueue_empty() const { return taskqueue_t::is_empty(); } - inline bool overflow_empty() const { return overflow_stack()->is_empty(); } + inline bool overflow_empty() const { return _overflow_stack.is_empty(); } inline bool is_empty() const { return taskqueue_empty() && overflow_empty(); } private: - overflow_t* _overflow_stack; + overflow_t _overflow_stack; }; -template -OverflowTaskQueue::OverflowTaskQueue() -{ - _overflow_stack = NULL; -} - -template -OverflowTaskQueue::~OverflowTaskQueue() -{ - if (_overflow_stack != NULL) { - delete _overflow_stack; - _overflow_stack = NULL; - } -} - -template -void OverflowTaskQueue::initialize() -{ - taskqueue_t::initialize(); - assert(_overflow_stack == NULL, "memory leak"); - _overflow_stack = new (ResourceObj::C_HEAP) GrowableArray(10, true); -} - template bool OverflowTaskQueue::push(E t) { if (!taskqueue_t::push(t)) { overflow_stack()->push(t); - TASKQUEUE_STATS_ONLY(stats.record_overflow(overflow_stack()->length())); + TASKQUEUE_STATS_ONLY(stats.record_overflow(overflow_stack()->size())); } return true; } From 59ea7a14e684ef96ef345f1d24f3d35f582439ad Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Wed, 29 Sep 2010 00:30:57 -0700 Subject: [PATCH 028/722] 6987634: JSR 292 assert(start_bci() >= 0 && start_bci() < code_size()) failed: correct osr_bci argument Reviewed-by: never, kvn --- hotspot/src/share/vm/opto/doCall.cpp | 105 ++++++++++++++------------- 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/hotspot/src/share/vm/opto/doCall.cpp b/hotspot/src/share/vm/opto/doCall.cpp index 4b1b600557d..bfe52483ad6 100644 --- a/hotspot/src/share/vm/opto/doCall.cpp +++ b/hotspot/src/share/vm/opto/doCall.cpp @@ -94,6 +94,60 @@ CallGenerator* Compile::call_generator(ciMethod* call_method, int vtable_index, if (cg != NULL) return cg; } + // Do MethodHandle calls. + // NOTE: This must happen before normal inlining logic below since + // MethodHandle.invoke* are native methods which obviously don't + // have bytecodes and so normal inlining fails. + if (call_method->is_method_handle_invoke()) { + if (jvms->method()->java_code_at_bci(jvms->bci()) != Bytecodes::_invokedynamic) { + GraphKit kit(jvms); + Node* n = kit.argument(0); + + if (n->Opcode() == Op_ConP) { + const TypeOopPtr* oop_ptr = n->bottom_type()->is_oopptr(); + ciObject* const_oop = oop_ptr->const_oop(); + ciMethodHandle* method_handle = const_oop->as_method_handle(); + + // Set the actually called method to have access to the class + // and signature in the MethodHandleCompiler. + method_handle->set_callee(call_method); + + // Get an adapter for the MethodHandle. + ciMethod* target_method = method_handle->get_method_handle_adapter(); + + CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor); + if (hit_cg != NULL && hit_cg->is_inline()) + return hit_cg; + } + + return CallGenerator::for_direct_call(call_method); + } + else { + // Get the MethodHandle from the CallSite. + ciMethod* caller_method = jvms->method(); + ciBytecodeStream str(caller_method); + str.force_bci(jvms->bci()); // Set the stream to the invokedynamic bci. + ciCallSite* call_site = str.get_call_site(); + ciMethodHandle* method_handle = call_site->get_target(); + + // Set the actually called method to have access to the class + // and signature in the MethodHandleCompiler. + method_handle->set_callee(call_method); + + // Get an adapter for the MethodHandle. + ciMethod* target_method = method_handle->get_invokedynamic_adapter(); + + CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor); + if (hit_cg != NULL && hit_cg->is_inline()) { + CallGenerator* miss_cg = CallGenerator::for_dynamic_call(call_method); + return CallGenerator::for_predicted_dynamic_call(method_handle, miss_cg, hit_cg, prof_factor); + } + + // If something failed, generate a normal dynamic call. + return CallGenerator::for_dynamic_call(call_method); + } + } + // Do not inline strict fp into non-strict code, or the reverse bool caller_method_is_strict = jvms->method()->is_strict(); if( caller_method_is_strict ^ call_method->is_strict() ) { @@ -216,57 +270,6 @@ CallGenerator* Compile::call_generator(ciMethod* call_method, int vtable_index, } } - // Do MethodHandle calls. - if (call_method->is_method_handle_invoke()) { - if (jvms->method()->java_code_at_bci(jvms->bci()) != Bytecodes::_invokedynamic) { - GraphKit kit(jvms); - Node* n = kit.argument(0); - - if (n->Opcode() == Op_ConP) { - const TypeOopPtr* oop_ptr = n->bottom_type()->is_oopptr(); - ciObject* const_oop = oop_ptr->const_oop(); - ciMethodHandle* method_handle = const_oop->as_method_handle(); - - // Set the actually called method to have access to the class - // and signature in the MethodHandleCompiler. - method_handle->set_callee(call_method); - - // Get an adapter for the MethodHandle. - ciMethod* target_method = method_handle->get_method_handle_adapter(); - - CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor); - if (hit_cg != NULL && hit_cg->is_inline()) - return hit_cg; - } - - return CallGenerator::for_direct_call(call_method); - } - else { - // Get the MethodHandle from the CallSite. - ciMethod* caller_method = jvms->method(); - ciBytecodeStream str(caller_method); - str.force_bci(jvms->bci()); // Set the stream to the invokedynamic bci. - ciCallSite* call_site = str.get_call_site(); - ciMethodHandle* method_handle = call_site->get_target(); - - // Set the actually called method to have access to the class - // and signature in the MethodHandleCompiler. - method_handle->set_callee(call_method); - - // Get an adapter for the MethodHandle. - ciMethod* target_method = method_handle->get_invokedynamic_adapter(); - - CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor); - if (hit_cg != NULL && hit_cg->is_inline()) { - CallGenerator* miss_cg = CallGenerator::for_dynamic_call(call_method); - return CallGenerator::for_predicted_dynamic_call(method_handle, miss_cg, hit_cg, prof_factor); - } - - // If something failed, generate a normal dynamic call. - return CallGenerator::for_dynamic_call(call_method); - } - } - // There was no special inlining tactic, or it bailed out. // Use a more generic tactic, like a simple call. if (call_is_virtual) { From 8067fc5d4a86d7896b0f7cc0d1291b217a8195fb Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Wed, 29 Sep 2010 18:53:28 +0200 Subject: [PATCH 029/722] 6988303: 6986046 breaks build with recent gcc Fixes build break Reviewed-by: never, kvn --- hotspot/src/share/vm/c1/c1_Instruction.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/c1/c1_Instruction.hpp b/hotspot/src/share/vm/c1/c1_Instruction.hpp index 9f0a25ab38d..7ad40888557 100644 --- a/hotspot/src/share/vm/c1/c1_Instruction.hpp +++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp @@ -358,7 +358,7 @@ class Instruction: public CompilationResourceObj { } // creation - Instruction(ValueType* type, ValueStack* state_before = NULL, bool type_is_constant = false, bool create_hi = true) + Instruction(ValueType* type, ValueStack* state_before = NULL, bool type_is_constant = false) : _use_count(0) #ifndef PRODUCT , _printable_bci(-99) @@ -1966,9 +1966,9 @@ LEAF(OsrEntry, Instruction) public: // creation #ifdef _LP64 - OsrEntry() : Instruction(longType, false) { pin(); } + OsrEntry() : Instruction(longType) { pin(); } #else - OsrEntry() : Instruction(intType, false) { pin(); } + OsrEntry() : Instruction(intType) { pin(); } #endif // generic @@ -1980,7 +1980,7 @@ LEAF(OsrEntry, Instruction) LEAF(ExceptionObject, Instruction) public: // creation - ExceptionObject() : Instruction(objectType, false) { + ExceptionObject() : Instruction(objectType) { pin(); } From cf2163334f421ebd6805fb7ae429173abbf5c04e Mon Sep 17 00:00:00 2001 From: "Y. Srinivas Ramakrishna" Date: Wed, 29 Sep 2010 16:17:02 -0700 Subject: [PATCH 030/722] 6692906: CMS: parallel concurrent marking may be prone to hanging or stalling mutators for periods of time Inserted missing yield(check)s in closures used during the work-stealing phase of parallel concurrent marking, a missing synchronous yield-request in the cms perm gen allocation path, and a terminator-terminator for the offer_termination invocation that monitors the yield status of the concurrent marking task. Elaborated some documentation comments and made some task queue termination loop flags configurable at start-up to aid debugging in the field. Reviewed-by: jmasa, johnc, poonam --- .../concurrentMarkSweepGeneration.cpp | 68 ++++++++++++++----- .../concurrentMarkSweepThread.hpp | 48 +++++++++---- hotspot/src/share/vm/runtime/globals.hpp | 12 ++-- .../share/vm/utilities/yieldingWorkgroup.hpp | 3 +- 4 files changed, 97 insertions(+), 34 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index 4b616950cae..2573d31a808 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -3264,6 +3264,7 @@ HeapWord* ConcurrentMarkSweepGeneration::expand_and_allocate(size_t word_size, bool tlab, bool parallel) { + CMSSynchronousYieldRequest yr; assert(!tlab, "Can't deal with TLAB allocation"); MutexLockerEx x(freelistLock(), Mutex::_no_safepoint_check_flag); expand(word_size*HeapWordSize, MinHeapDeltaBytes, @@ -3710,25 +3711,31 @@ class CMSConcMarkingTask; class CMSConcMarkingTerminator: public ParallelTaskTerminator { CMSCollector* _collector; CMSConcMarkingTask* _task; - bool _yield; - protected: - virtual void yield(); public: + virtual void yield(); + // "n_threads" is the number of threads to be terminated. // "queue_set" is a set of work queues of other threads. // "collector" is the CMS collector associated with this task terminator. // "yield" indicates whether we need the gang as a whole to yield. - CMSConcMarkingTerminator(int n_threads, TaskQueueSetSuper* queue_set, - CMSCollector* collector, bool yield) : + CMSConcMarkingTerminator(int n_threads, TaskQueueSetSuper* queue_set, CMSCollector* collector) : ParallelTaskTerminator(n_threads, queue_set), - _collector(collector), - _yield(yield) { } + _collector(collector) { } void set_task(CMSConcMarkingTask* task) { _task = task; } }; +class CMSConcMarkingTerminatorTerminator: public TerminatorTerminator { + CMSConcMarkingTask* _task; + public: + bool should_exit_termination(); + void set_task(CMSConcMarkingTask* task) { + _task = task; + } +}; + // MT Concurrent Marking Task class CMSConcMarkingTask: public YieldingFlexibleGangTask { CMSCollector* _collector; @@ -3737,7 +3744,9 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { bool _result; CompactibleFreeListSpace* _cms_space; CompactibleFreeListSpace* _perm_space; - HeapWord* _global_finger; + char _pad_front[64]; // padding to ... + HeapWord* _global_finger; // ... avoid sharing cache line + char _pad_back[64]; HeapWord* _restart_addr; // Exposed here for yielding support @@ -3745,7 +3754,10 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { // The per thread work queues, available here for stealing OopTaskQueueSet* _task_queues; + + // Termination (and yielding) support CMSConcMarkingTerminator _term; + CMSConcMarkingTerminatorTerminator _term_term; public: CMSConcMarkingTask(CMSCollector* collector, @@ -3760,11 +3772,12 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { _perm_space(perm_space), _asynch(asynch), _n_workers(0), _result(true), _task_queues(task_queues), - _term(_n_workers, task_queues, _collector, asynch), + _term(_n_workers, task_queues, _collector), _bit_map_lock(collector->bitMapLock()) { _requested_size = _n_workers; _term.set_task(this); + _term_term.set_task(this); assert(_cms_space->bottom() < _perm_space->bottom(), "Finger incorrectly initialized below"); _restart_addr = _global_finger = _cms_space->bottom(); @@ -3784,6 +3797,11 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { } void work(int i); + bool should_yield() { + return ConcurrentMarkSweepThread::should_yield() + && !_collector->foregroundGCIsActive() + && _asynch; + } virtual void coordinator_yield(); // stuff done by coordinator bool result() { return _result; } @@ -3805,10 +3823,17 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { void bump_global_finger(HeapWord* f); }; +bool CMSConcMarkingTerminatorTerminator::should_exit_termination() { + assert(_task != NULL, "Error"); + return _task->yielding(); + // Note that we do not need the disjunct || _task->should_yield() above + // because we want terminating threads to yield only if the task + // is already in the midst of yielding, which happens only after at least one + // thread has yielded. +} + void CMSConcMarkingTerminator::yield() { - if (ConcurrentMarkSweepThread::should_yield() && - !_collector->foregroundGCIsActive() && - _yield) { + if (_task->should_yield()) { _task->yield(); } else { ParallelTaskTerminator::yield(); @@ -4033,6 +4058,7 @@ void CMSConcMarkingTask::do_scan_and_mark(int i, CompactibleFreeListSpace* sp) { class Par_ConcMarkingClosure: public Par_KlassRememberingOopClosure { private: + CMSConcMarkingTask* _task; MemRegion _span; CMSBitMap* _bit_map; CMSMarkStack* _overflow_stack; @@ -4040,11 +4066,12 @@ class Par_ConcMarkingClosure: public Par_KlassRememberingOopClosure { protected: DO_OOP_WORK_DEFN public: - Par_ConcMarkingClosure(CMSCollector* collector, OopTaskQueue* work_queue, + Par_ConcMarkingClosure(CMSCollector* collector, CMSConcMarkingTask* task, OopTaskQueue* work_queue, CMSBitMap* bit_map, CMSMarkStack* overflow_stack, CMSMarkStack* revisit_stack): Par_KlassRememberingOopClosure(collector, NULL, revisit_stack), - _span(_collector->_span), + _task(task), + _span(collector->_span), _work_queue(work_queue), _bit_map(bit_map), _overflow_stack(overflow_stack) @@ -4053,6 +4080,11 @@ class Par_ConcMarkingClosure: public Par_KlassRememberingOopClosure { virtual void do_oop(narrowOop* p); void trim_queue(size_t max); void handle_stack_overflow(HeapWord* lost); + void do_yield_check() { + if (_task->should_yield()) { + _task->yield(); + } + } }; // Grey object scanning during work stealing phase -- @@ -4096,6 +4128,7 @@ void Par_ConcMarkingClosure::do_oop(oop obj) { handle_stack_overflow(addr); } } // Else, some other thread got there first + do_yield_check(); } } @@ -4111,6 +4144,7 @@ void Par_ConcMarkingClosure::trim_queue(size_t max) { assert(_span.contains((HeapWord*)new_oop), "Not in span"); assert(new_oop->is_parsable(), "Should be parsable"); new_oop->oop_iterate(this); // do_oop() above + do_yield_check(); } } } @@ -4138,7 +4172,7 @@ void CMSConcMarkingTask::do_work_steal(int i) { CMSMarkStack* ovflw = &(_collector->_markStack); CMSMarkStack* revisit = &(_collector->_revisitStack); int* seed = _collector->hash_seed(i); - Par_ConcMarkingClosure cl(_collector, work_q, bm, ovflw, revisit); + Par_ConcMarkingClosure cl(_collector, this, work_q, bm, ovflw, revisit); while (true) { cl.trim_queue(0); assert(work_q->size() == 0, "Should have been emptied above"); @@ -4151,9 +4185,11 @@ void CMSConcMarkingTask::do_work_steal(int i) { assert(obj_to_scan->is_oop(), "Should be an oop"); assert(bm->isMarked((HeapWord*)obj_to_scan), "Grey object"); obj_to_scan->oop_iterate(&cl); - } else if (terminator()->offer_termination()) { + } else if (terminator()->offer_termination(&_term_term)) { assert(work_q->size() == 0, "Impossible!"); break; + } else if (yielding() || should_yield()) { + yield(); } } } diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp index e83573ca0c0..26eac7c37c0 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -123,24 +123,44 @@ class ConcurrentMarkSweepThread: public ConcurrentGCThread { // or given timeout, whichever is earlier. void wait_on_cms_lock(long t); // milliseconds - // The CMS thread will yield during the work portion of it's cycle + // The CMS thread will yield during the work portion of its cycle // only when requested to. Both synchronous and asychronous requests - // are provided. A synchronous request is used for young gen - // collections and direct allocations. The requesting thread increments - // pending_yields at the beginning of an operation, and decrements it when - // the operation is completed. The CMS thread yields when pending_yields - // is positive. An asynchronous request is used by iCMS in the stop_icms() - // operation. A single yield satisfies the outstanding asynch yield requests. - // The requesting thread increments both pending_yields and pending_decrements. - // After yielding, the CMS thread decrements both by the amount in - // pending_decrements. + // are provided: + // (1) A synchronous request is used for young gen collections and + // for direct allocations. The requesting thread increments + // _pending_yields at the beginning of an operation, and decrements + // _pending_yields when that operation is completed. + // In turn, the CMS thread yields when _pending_yields is positive, + // and continues to yield until the value reverts to 0. + // (2) An asynchronous request, on the other hand, is used by iCMS + // for the stop_icms() operation. A single yield satisfies all of + // the outstanding asynch yield requests, of which there may + // occasionally be several in close succession. To accomplish + // this, an asynch-requesting thread atomically increments both + // _pending_yields and _pending_decrements. An asynchr requesting + // thread does not wait and "acknowledge" completion of an operation + // and deregister the request, like the synchronous version described + // above does. In turn, after yielding, the CMS thread decrements both + // _pending_yields and _pending_decrements by the value seen in + // _pending_decrements before the decrement. + // NOTE: The above scheme is isomorphic to having two request counters, + // one for async requests and one for sync requests, and for the CMS thread + // to check the sum of the two counters to decide whether it should yield + // and to clear only the async counter when it yields. However, it turns out + // to be more efficient for CMS code to just check a single counter + // _pending_yields that holds the sum (of both sync and async requests), and + // a second counter _pending_decrements that only holds the async requests, + // for greater efficiency, since in a typical CMS run, there are many more + // pontential (i.e. static) yield points than there are actual + // (i.e. dynamic) yields because of requests, which are few and far between. + // // Note that, while "_pending_yields >= _pending_decrements" is an invariant, // we cannot easily test that invariant, since the counters are manipulated via // atomic instructions without explicit locking and we cannot read // the two counters atomically together: one suggestion is to // use (for example) 16-bit counters so as to be able to read the // two counters atomically even on 32-bit platforms. Notice that - // the second assert in acknowledge_yield_request() does indeed + // the second assert in acknowledge_yield_request() below does indeed // check a form of the above invariant, albeit indirectly. static void increment_pending_yields() { @@ -152,6 +172,7 @@ class ConcurrentMarkSweepThread: public ConcurrentGCThread { assert(_pending_yields >= 0, "can't be negative"); } static void asynchronous_yield_request() { + assert(CMSIncrementalMode, "Currently only used w/iCMS"); increment_pending_yields(); Atomic::inc(&_pending_decrements); assert(_pending_decrements >= 0, "can't be negative"); @@ -159,6 +180,7 @@ class ConcurrentMarkSweepThread: public ConcurrentGCThread { static void acknowledge_yield_request() { jint decrement = _pending_decrements; if (decrement > 0) { + assert(CMSIncrementalMode, "Currently only used w/iCMS"); // Order important to preserve: _pending_yields >= _pending_decrements Atomic::add(-decrement, &_pending_decrements); Atomic::add(-decrement, &_pending_yields); @@ -195,7 +217,7 @@ inline void ConcurrentMarkSweepThread::trace_state(const char* desc) { } } -// For scoped increment/decrement of yield requests +// For scoped increment/decrement of (synchronous) yield requests class CMSSynchronousYieldRequest: public StackObj { public: CMSSynchronousYieldRequest() { diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 6822161323b..e76396ab366 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -280,6 +280,10 @@ class CommandLineFlags { // UnlockExperimentalVMOptions flag, which allows the control and // modification of the experimental flags. // +// Nota bene: neither diagnostic nor experimental options should be used casually, +// and they are not supported on production loads, except under explicit +// direction from support engineers. +// // manageable flags are writeable external product flags. // They are dynamically writeable through the JDK management interface // (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole. @@ -1809,17 +1813,17 @@ class CommandLineFlags { develop(uintx, PromotionFailureALotInterval, 5, \ "Total collections between promotion failures alot") \ \ - develop(intx, WorkStealingSleepMillis, 1, \ + experimental(intx, WorkStealingSleepMillis, 1, \ "Sleep time when sleep is used for yields") \ \ - develop(uintx, WorkStealingYieldsBeforeSleep, 1000, \ + experimental(uintx, WorkStealingYieldsBeforeSleep, 1000, \ "Number of yields before a sleep is done during workstealing") \ \ - develop(uintx, WorkStealingHardSpins, 4096, \ + experimental(uintx, WorkStealingHardSpins, 4096, \ "Number of iterations in a spin loop between checks on " \ "time out of hard spin") \ \ - develop(uintx, WorkStealingSpinToYieldRatio, 10, \ + experimental(uintx, WorkStealingSpinToYieldRatio, 10, \ "Ratio of hard spins to calls to yield") \ \ product(uintx, PreserveMarkStackSize, 1024, \ diff --git a/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp b/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp index 174b429364d..a1d396f2aaf 100644 --- a/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp +++ b/hotspot/src/share/vm/utilities/yieldingWorkgroup.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,6 +137,7 @@ public: virtual void abort(); Status status() const { return _status; } + bool yielding() const { return _status == YIELDING; } bool yielded() const { return _status == YIELDED; } bool completed() const { return _status == COMPLETED; } bool aborted() const { return _status == ABORTED; } From 8309071a08776ebb3936070542873cc7733cc9f8 Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Wed, 29 Sep 2010 16:53:42 -0700 Subject: [PATCH 031/722] 6988346: 6986046 breaks tiered Adjusted profiling code generation to use the new ValueStack implementation; lowered optimization level for c1_LinearScan.cpp on solaris x64. Reviewed-by: kvn, never --- hotspot/make/solaris/makefiles/amd64.make | 3 ++- hotspot/src/share/vm/c1/c1_GraphBuilder.cpp | 6 +++--- hotspot/src/share/vm/c1/c1_GraphBuilder.hpp | 2 +- hotspot/src/share/vm/c1/c1_Instruction.hpp | 5 +---- hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hotspot/make/solaris/makefiles/amd64.make b/hotspot/make/solaris/makefiles/amd64.make index d9ca84a6e67..4c6afaad702 100644 --- a/hotspot/make/solaris/makefiles/amd64.make +++ b/hotspot/make/solaris/makefiles/amd64.make @@ -35,7 +35,8 @@ ifeq ("${Platform_compiler}", "sparcWorks") # Temporary until SS10 C++ compiler is fixed OPT_CFLAGS/generateOptoStub.o = -xO2 - +# Temporary util SS12u1 C++ compiler is fixed +OPT_CFLAGS/c1_LinearScan.o = -xO2 else ifeq ("${Platform_compiler}", "gcc") diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp index eee48450964..d41930644a0 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp @@ -3405,7 +3405,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known) { profile_call(recv, holder_known ? callee->holder() : NULL); } if (profile_inlined_calls()) { - profile_invocation(callee, state(), 0); + profile_invocation(callee, copy_state_before()); } } @@ -3780,6 +3780,6 @@ void GraphBuilder::profile_call(Value recv, ciKlass* known_holder) { append(new ProfileCall(method(), bci(), recv, known_holder)); } -void GraphBuilder::profile_invocation(ciMethod* callee, ValueStack* state, int bci) { - append(new ProfileInvoke(callee, state, bci)); +void GraphBuilder::profile_invocation(ciMethod* callee, ValueStack* state) { + append(new ProfileInvoke(callee, state)); } diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp index 76699ef82a0..26c1b96a0f7 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp @@ -347,7 +347,7 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC { NOT_PRODUCT(void print_inline_result(ciMethod* callee, bool res);) void profile_call(Value recv, ciKlass* predicted_holder); - void profile_invocation(ciMethod* inlinee, ValueStack* state, int bci); + void profile_invocation(ciMethod* inlinee, ValueStack* state); // Shortcuts to profiling control. bool is_profiling() { return _compilation->is_profiling(); } diff --git a/hotspot/src/share/vm/c1/c1_Instruction.hpp b/hotspot/src/share/vm/c1/c1_Instruction.hpp index 7ad40888557..fa684e4b1a5 100644 --- a/hotspot/src/share/vm/c1/c1_Instruction.hpp +++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp @@ -2246,13 +2246,11 @@ LEAF(ProfileInvoke, Instruction) private: ciMethod* _inlinee; ValueStack* _state; - int _bci_of_invoke; public: - ProfileInvoke(ciMethod* inlinee, ValueStack* state, int bci) + ProfileInvoke(ciMethod* inlinee, ValueStack* state) : Instruction(voidType) , _inlinee(inlinee) - , _bci_of_invoke(bci) , _state(state) { // The ProfileInvoke has side-effects and must occur precisely where located QQQ??? @@ -2261,7 +2259,6 @@ LEAF(ProfileInvoke, Instruction) ciMethod* inlinee() { return _inlinee; } ValueStack* state() { return _state; } - int bci_of_invoke() { return _bci_of_invoke; } virtual void input_values_do(ValueVisitor*) {} virtual void state_values_do(ValueVisitor*); }; diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp index ed3596dc67c..332f193e28e 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp @@ -2309,7 +2309,7 @@ void LIRGenerator::do_Base(Base* x) { // increment invocation counters if needed if (!method()->is_accessor()) { // Accessors do not have MDOs, so no counting. - CodeEmitInfo* info = new CodeEmitInfo(scope()->start()->state(), NULL); + CodeEmitInfo* info = new CodeEmitInfo(scope()->start()->state()->copy(ValueStack::StateBefore, SynchronizationEntryBCI), NULL); increment_invocation_counter(info); } From afc563751f00e5c992b7dc1bbcb13fa72f9d4dc5 Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Thu, 30 Sep 2010 12:05:08 -0400 Subject: [PATCH 032/722] 6988363: Rebrand vm vendor property settings (jdk7 only) Vendor properties should be initialized after JDK version is determined. Reviewed-by: kamg, ohair, dcubed, dholmes --- hotspot/src/share/vm/runtime/arguments.cpp | 11 ++++++++--- hotspot/src/share/vm/runtime/arguments.hpp | 3 +++ hotspot/src/share/vm/runtime/thread.cpp | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 78bccb66cf9..f62565a4192 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -119,11 +119,8 @@ void Arguments::init_system_properties() { PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.version", "1.0", false)); PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name", "Java Virtual Machine Specification", false)); - PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.vendor", - JDK_Version::is_gte_jdk17x_version() ? "Oracle Corporation" : "Sun Microsystems Inc.", false)); PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false)); PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false)); - PropertyList_add(&_system_properties, new SystemProperty("java.vm.vendor", VM_Version::vm_vendor(), false)); PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true)); // following are JVMTI agent writeable properties. @@ -151,6 +148,14 @@ void Arguments::init_system_properties() { os::init_system_properties_values(); } + + // Update/Initialize System properties after JDK version number is known +void Arguments::init_version_specific_system_properties() { + PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.vendor", + JDK_Version::is_gte_jdk17x_version() ? "Oracle Corporation" : "Sun Microsystems Inc.", false)); + PropertyList_add(&_system_properties, new SystemProperty("java.vm.vendor", VM_Version::vm_vendor(), false)); +} + /** * Provide a slightly more user-friendly way of eliminating -XX flags. * When a flag is eliminated, it can be added to this list in order to diff --git a/hotspot/src/share/vm/runtime/arguments.hpp b/hotspot/src/share/vm/runtime/arguments.hpp index 949d4560f97..2d278e18741 100644 --- a/hotspot/src/share/vm/runtime/arguments.hpp +++ b/hotspot/src/share/vm/runtime/arguments.hpp @@ -484,6 +484,9 @@ class Arguments : AllStatic { // System properties static void init_system_properties(); + // Update/Initialize System properties after JDK version number is known + static void init_version_specific_system_properties(); + // Property List manipulation static void PropertyList_add(SystemProperty** plist, SystemProperty *element); static void PropertyList_add(SystemProperty** plist, const char* k, char* v); diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 00e5e991efc..7e96ac60956 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -2898,6 +2898,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { // So that JDK version can be used as a discrimintor when parsing arguments JDK_Version_init(); + // Update/Initialize System properties after JDK version number is known + Arguments::init_version_specific_system_properties(); + // Parse arguments jint parse_result = Arguments::parse(args); if (parse_result != JNI_OK) return parse_result; From 603e50f355fd97661b8ce4231f8f0ddc629e4e39 Mon Sep 17 00:00:00 2001 From: John Coomes Date: Thu, 30 Sep 2010 12:15:13 -0700 Subject: [PATCH 033/722] 6988678: fatal error deadlock handling was unintentionally disabled Reviewed-by: ysr --- hotspot/src/share/vm/runtime/thread.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 87e22fc4982..00e5e991efc 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1073,7 +1073,6 @@ void WatcherThread::run() { } } -#if 0 if (is_error_reported()) { // A fatal error has happened, the error handler(VMError::report_and_die) // should abort JVM after creating an error log file. However in some @@ -1101,7 +1100,6 @@ void WatcherThread::run() { os::sleep(this, 5 * 1000, false); } } -#endif // #if 0 PeriodicTask::real_time_tick(time_to_wait); From 7cc55737b63453f1f405b184500094ecc839ede3 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Thu, 30 Sep 2010 18:31:45 -0700 Subject: [PATCH 034/722] 6916062: assert(_inserts <= _insert_limit,"hash table overflow") in NodeHash::hash_insert Missing check for not empty worklist when puting memory node back on worklist and expecting address type update. Reviewed-by: never --- hotspot/src/share/vm/opto/memnode.cpp | 3 ++- hotspot/src/share/vm/opto/phaseX.cpp | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp index 9d8cb72e26e..d425ae6d117 100644 --- a/hotspot/src/share/vm/opto/memnode.cpp +++ b/hotspot/src/share/vm/opto/memnode.cpp @@ -256,7 +256,8 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) { if( t_adr == Type::TOP ) return NodeSentinel; // caller will return NULL if( can_reshape && igvn != NULL && - (igvn->_worklist.member(address) || phase->type(address) != adr_type()) ) { + (igvn->_worklist.member(address) || + igvn->_worklist.size() > 0 && (phase->type(address) != adr_type())) ) { // The address's base and type may change when the address is processed. // Delay this mem node transformation until the address is processed. phase->is_IterGVN()->_worklist.push(this); diff --git a/hotspot/src/share/vm/opto/phaseX.cpp b/hotspot/src/share/vm/opto/phaseX.cpp index 590bbd0adae..164d1afb9ae 100644 --- a/hotspot/src/share/vm/opto/phaseX.cpp +++ b/hotspot/src/share/vm/opto/phaseX.cpp @@ -844,10 +844,33 @@ void PhaseIterGVN::optimize() { } #endif +#ifdef ASSERT + Node* prev = NULL; + uint rep_cnt = 0; +#endif + uint loop_count = 0; + // Pull from worklist; transform node; // If node has changed: update edge info and put uses on worklist. while( _worklist.size() ) { Node *n = _worklist.pop(); + if (++loop_count >= K * C->unique()) { + debug_only(n->dump(4);) + assert(false, "infinite loop in PhaseIterGVN::optimize"); + C->record_method_not_compilable("infinite loop in PhaseIterGVN::optimize"); + return; + } +#ifdef ASSERT + if (n == prev) { + if (++rep_cnt > 3) { + n->dump(4); + assert(false, "loop in Ideal transformation"); + } + } else { + rep_cnt = 0; + } + prev = n; +#endif if (TraceIterativeGVN && Verbose) { tty->print(" Pop "); NOT_PRODUCT( n->dump(); ) From 8fbdf5c7f09bef328a4fe8d44f5cebf7f8f2f78d Mon Sep 17 00:00:00 2001 From: "Y. Srinivas Ramakrishna" Date: Fri, 1 Oct 2010 16:12:54 -0700 Subject: [PATCH 035/722] 6794422: Perm gen expansion policy for concurrent collectors Concurrent collectors should expand the perm gen without a full STW GC, but possibly by triggering a concurrent collection. Temporary band-aid for G1 where no concurrent collection is kicked off since the perm gen is not collected concurrently. Reviewed-by: johnc --- .../concurrentMarkSweep/cmsPermGen.cpp | 14 +++++++++- .../concurrentMarkSweep/cmsPermGen.hpp | 4 +++ hotspot/src/share/vm/includeDB_core | 1 + hotspot/src/share/vm/memory/permGen.cpp | 27 ++++++++++++++----- hotspot/src/share/vm/memory/permGen.hpp | 15 +++++++++-- 5 files changed, 52 insertions(+), 9 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp index 9d5929d0c81..f04b8a46772 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,6 +50,18 @@ HeapWord* CMSPermGen::mem_allocate(size_t size) { } } +HeapWord* CMSPermGen::request_expand_and_allocate(Generation* gen, + size_t size, + GCCause::Cause prev_cause /* ignored */) { + HeapWord* obj = gen->expand_and_allocate(size, false); + if (gen->capacity() >= _capacity_expansion_limit) { + set_capacity_expansion_limit(gen->capacity() + MaxPermHeapExpansion); + assert(((ConcurrentMarkSweepGeneration*)gen)->should_concurrent_collect(), + "Should kick off a collection if one not in progress"); + } + return obj; +} + void CMSPermGen::compute_new_size() { _gen->compute_new_size(); } diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.hpp index 3c9d9f7f767..fd675623ea8 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.hpp @@ -33,6 +33,10 @@ class CMSPermGen: public PermGen { // The "generation" view. ConcurrentMarkSweepGeneration* _gen; + // Override default implementation from PermGen + virtual HeapWord* request_expand_and_allocate(Generation* gen, size_t size, + GCCause::Cause prev_cause); + public: CMSPermGen(ReservedSpace rs, size_t initial_byte_size, CardTableRS* ct, FreeBlockDictionary::DictionaryChoice); diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index 8985a211cc4..d1a0f892c1f 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -3456,6 +3456,7 @@ permGen.hpp gcCause.hpp permGen.hpp generation.hpp permGen.hpp handles.hpp permGen.hpp iterator.hpp +permGen.hpp mutexLocker.hpp permGen.hpp virtualspace.hpp placeholders.cpp fieldType.hpp diff --git a/hotspot/src/share/vm/memory/permGen.cpp b/hotspot/src/share/vm/memory/permGen.cpp index cae72174dcf..7073aa47d6e 100644 --- a/hotspot/src/share/vm/memory/permGen.cpp +++ b/hotspot/src/share/vm/memory/permGen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,17 @@ #include "incls/_precompiled.incl" #include "incls/_permGen.cpp.incl" +HeapWord* PermGen::request_expand_and_allocate(Generation* gen, size_t size, + GCCause::Cause prev_cause) { + if (gen->capacity() < _capacity_expansion_limit || + prev_cause != GCCause::_no_gc || UseG1GC) { // last disjunct is a temporary hack for G1 + return gen->expand_and_allocate(size, false); + } + // We have reached the limit of capacity expansion where + // we will not expand further until a GC is done; request denied. + return NULL; +} + HeapWord* PermGen::mem_allocate_in_gen(size_t size, Generation* gen) { GCCause::Cause next_cause = GCCause::_permanent_generation_full; GCCause::Cause prev_cause = GCCause::_no_gc; @@ -37,10 +48,14 @@ HeapWord* PermGen::mem_allocate_in_gen(size_t size, Generation* gen) { if ((obj = gen->allocate(size, false)) != NULL) { return obj; } - if (gen->capacity() < _capacity_expansion_limit || - prev_cause != GCCause::_no_gc) { - obj = gen->expand_and_allocate(size, false); - } + // Attempt to expand and allocate the requested space: + // specific subtypes may use specific policy to either expand + // or not. The default policy (see above) is to expand until + // _capacity_expansion_limit, and no further unless a GC is done. + // Concurrent collectors may decide to kick off a concurrent + // collection under appropriate conditions. + obj = request_expand_and_allocate(gen, size, prev_cause); + if (obj != NULL || prev_cause == GCCause::_last_ditch_collection) { return obj; } @@ -119,5 +134,5 @@ void CompactingPermGen::compute_new_size() { if (_gen->capacity() > desired_capacity) { _gen->shrink(_gen->capacity() - desired_capacity); } - _capacity_expansion_limit = _gen->capacity() + MaxPermHeapExpansion; + set_capacity_expansion_limit(_gen->capacity() + MaxPermHeapExpansion); } diff --git a/hotspot/src/share/vm/memory/permGen.hpp b/hotspot/src/share/vm/memory/permGen.hpp index 67ce81aeb42..a6f54e0f842 100644 --- a/hotspot/src/share/vm/memory/permGen.hpp +++ b/hotspot/src/share/vm/memory/permGen.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,15 +30,26 @@ class Generation; class GenRemSet; class CSpaceCounters; -// PermGen models the part of the heap +// PermGen models the part of the heap used to allocate class meta-data. class PermGen : public CHeapObj { friend class VMStructs; protected: size_t _capacity_expansion_limit; // maximum expansion allowed without a // full gc occurring + void set_capacity_expansion_limit(size_t limit) { + assert_locked_or_safepoint(Heap_lock); + _capacity_expansion_limit = limit; + } HeapWord* mem_allocate_in_gen(size_t size, Generation* gen); + // Along with mem_allocate_in_gen() above, implements policy for + // "scheduling" allocation/expansion/collection of the perm gen. + // The virtual method request_...() below can be overridden by + // subtypes that want to implement a different expansion/collection + // policy from the default provided. + virtual HeapWord* request_expand_and_allocate(Generation* gen, size_t size, + GCCause::Cause prev_cause); public: enum Name { From 20289fbffdec959e5c665c3d4b8d09f834337680 Mon Sep 17 00:00:00 2001 From: John Cuthbertson Date: Fri, 1 Oct 2010 18:23:16 -0700 Subject: [PATCH 036/722] 6983311: G1: LoopTest hangs when run with -XX:+ExplicitInvokesConcurrent Clear the concurrent marking "in progress" flag while the FullGCCount_lock is held. This avoids a race that can cause back to back System.gc() calls, when ExplicitGCInvokesConcurrent is enabled, to fail to initiate a marking cycle causing the requesting thread to hang. Reviewed-by: tonyp, ysr --- .../vm/gc_implementation/g1/concurrentMarkThread.cpp | 3 ++- .../vm/gc_implementation/g1/concurrentMarkThread.hpp | 8 ++++---- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 8 ++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp index 88d9e01d0ab..f2f8ed9de01 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp @@ -303,9 +303,10 @@ void ConcurrentMarkThread::print_on(outputStream* st) const { } void ConcurrentMarkThread::sleepBeforeNextCycle() { - clear_in_progress(); // We join here because we don't want to do the "shouldConcurrentMark()" // below while the world is otherwise stopped. + assert(!in_progress(), "should have been cleared"); + MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag); while (!started()) { CGC_lock->wait(Mutex::_no_safepoint_check_flag); diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp index c6480c90dc0..92361551c5c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp @@ -69,12 +69,12 @@ class ConcurrentMarkThread: public ConcurrentGCThread { ConcurrentMark* cm() { return _cm; } - void set_started() { _started = true; } - void clear_started() { _started = false; } + void set_started() { assert(!_in_progress, "cycle in progress"); _started = true; } + void clear_started() { assert(_in_progress, "must be starting a cycle"); _started = false; } bool started() { return _started; } - void set_in_progress() { _in_progress = true; } - void clear_in_progress() { _in_progress = false; } + void set_in_progress() { assert(_started, "must be starting a cycle"); _in_progress = true; } + void clear_in_progress() { assert(!_started, "must not be starting a new cycle"); _in_progress = false; } bool in_progress() { return _in_progress; } // This flag returns true from the moment a marking cycle is diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index d4d58c3f13d..c72e154c494 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -1785,6 +1785,14 @@ void G1CollectedHeap::increment_full_collections_completed(bool outer) { _full_collections_completed += 1; + // We need to clear the "in_progress" flag in the CM thread before + // we wake up any waiters (especially when ExplicitInvokesConcurrent + // is set) so that if a waiter requests another System.gc() it doesn't + // incorrectly see that a marking cyle is still in progress. + if (outer) { + _cmThread->clear_in_progress(); + } + // This notify_all() will ensure that a thread that called // System.gc() with (with ExplicitGCInvokesConcurrent set or not) // and it's waiting for a full GC to finish will be woken up. It is From 189be5a71f77fb6c01c90eeacc2d998fa613911c Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Fri, 1 Oct 2010 16:43:05 -0400 Subject: [PATCH 037/722] 6980838: G1: guarantee(false) failed: thread has an unexpected active value in its SATB queue Under certain circumstances a safepoint could happen between a JavaThread object being created and that object being added to the Java threads list. This could cause the active field of that thread's SATB queue to get out-of-sync with respect to the other Java threads. The solution is to activate the SATB queue, when necessary, before adding the thread to the Java threads list, not when the JavaThread object is created. The changeset also includes a small fix to rename the surrogate locker thread from "Surrogate Locker Thread (CMS)" to "Surrogate Locker Thread (Concurrent GC)" since it's also used in G1. Reviewed-by: iveresov, ysr, johnc, jcoomes --- .../gc_implementation/g1/dirtyCardQueue.hpp | 9 +++--- .../vm/gc_implementation/g1/ptrQueue.hpp | 4 +++ .../vm/gc_implementation/g1/satbQueue.hpp | 7 ++++- .../shared/concurrentGCThread.cpp | 2 +- hotspot/src/share/vm/runtime/thread.cpp | 28 ++++++++++++++++++- hotspot/src/share/vm/runtime/thread.hpp | 23 +++++++++++++++ 6 files changed, 65 insertions(+), 8 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp index 524c0c25681..9f6d95f00a2 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp @@ -37,11 +37,10 @@ public: class DirtyCardQueue: public PtrQueue { public: DirtyCardQueue(PtrQueueSet* qset_, bool perm = false) : - PtrQueue(qset_, perm) - { - // Dirty card queues are always active. - _active = true; - } + // Dirty card queues are always active, so we create them with their + // active field set to true. + PtrQueue(qset_, perm, true /* active */) { } + // Apply the closure to all elements, and reset the index to make the // buffer empty. If a closure application returns "false", return // "false" immediately, halting the iteration. If "consume" is true, diff --git a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp index bbd4788e89f..c66973b0cad 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp @@ -89,6 +89,10 @@ public: return _buf == NULL ? 0 : _sz - _index; } + bool is_empty() { + return _buf == NULL || _sz == _index; + } + // Set the "active" property of the queue to "b". An enqueue to an // inactive thread is a no-op. Setting a queue to inactive resets its // log to the empty state. diff --git a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp index 49f824463e9..6a1f50e2b31 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp @@ -29,7 +29,12 @@ class JavaThread; class ObjPtrQueue: public PtrQueue { public: ObjPtrQueue(PtrQueueSet* qset_, bool perm = false) : - PtrQueue(qset_, perm, qset_->is_active()) { } + // SATB queues are only active during marking cycles. We create + // them with their active field set to false. If a thread is + // created during a cycle and its SATB queue needs to be activated + // before the thread starts running, we'll need to set its active + // field to true. This is done in JavaThread::initialize_queues(). + PtrQueue(qset_, perm, false /* active */) { } // Apply the closure to all elements, and reset the index to make the // buffer empty. void apply_closure(ObjectClosure* cl); diff --git a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp index 65643f818b5..6b81ed95f1b 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp @@ -185,7 +185,7 @@ SurrogateLockerThread* SurrogateLockerThread::make(TRAPS) { instanceKlassHandle klass (THREAD, k); instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_NULL); - const char thread_name[] = "Surrogate Locker Thread (CMS)"; + const char thread_name[] = "Surrogate Locker Thread (Concurrent GC)"; Handle string = java_lang_String::create_from_str(thread_name, CHECK_NULL); // Initialize thread_oop to put it into the system threadGroup diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 00e5e991efc..89a710d45ac 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1644,7 +1644,29 @@ void JavaThread::flush_barrier_queues() { satb_mark_queue().flush(); dirty_card_queue().flush(); } -#endif + +void JavaThread::initialize_queues() { + assert(!SafepointSynchronize::is_at_safepoint(), + "we should not be at a safepoint"); + + ObjPtrQueue& satb_queue = satb_mark_queue(); + SATBMarkQueueSet& satb_queue_set = satb_mark_queue_set(); + // The SATB queue should have been constructed with its active + // field set to false. + assert(!satb_queue.is_active(), "SATB queue should not be active"); + assert(satb_queue.is_empty(), "SATB queue should be empty"); + // If we are creating the thread during a marking cycle, we should + // set the active field of the SATB queue to true. + if (satb_queue_set.is_active()) { + satb_queue.set_active(true); + } + + DirtyCardQueue& dirty_queue = dirty_card_queue(); + // The dirty card queue should have been constructed with its + // active field set to true. + assert(dirty_queue.is_active(), "dirty card queue should be active"); +} +#endif // !SERIALGC void JavaThread::cleanup_failed_attach_current_thread() { if (get_thread_profiler() != NULL) { @@ -3626,6 +3648,10 @@ jboolean Threads::is_supported_jni_version(jint version) { void Threads::add(JavaThread* p, bool force_daemon) { // The threads lock must be owned at this point assert_locked_or_safepoint(Threads_lock); + + // See the comment for this method in thread.hpp for its purpose and + // why it is called here. + p->initialize_queues(); p->set_next(_thread_list); _thread_list = p; _number_of_threads++; diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp index 61237f41323..4a7f650c232 100644 --- a/hotspot/src/share/vm/runtime/thread.hpp +++ b/hotspot/src/share/vm/runtime/thread.hpp @@ -1487,6 +1487,29 @@ public: } #endif // !SERIALGC + // This method initializes the SATB and dirty card queues before a + // JavaThread is added to the Java thread list. Right now, we don't + // have to do anything to the dirty card queue (it should have been + // activated when the thread was created), but we have to activate + // the SATB queue if the thread is created while a marking cycle is + // in progress. The activation / de-activation of the SATB queues at + // the beginning / end of a marking cycle is done during safepoints + // so we have to make sure this method is called outside one to be + // able to safely read the active field of the SATB queue set. Right + // now, it is called just before the thread is added to the Java + // thread list in the Threads::add() method. That method is holding + // the Threads_lock which ensures we are outside a safepoint. We + // cannot do the obvious and set the active field of the SATB queue + // when the thread is created given that, in some cases, safepoints + // might happen between the JavaThread constructor being called and the + // thread being added to the Java thread list (an example of this is + // when the structure for the DestroyJavaVM thread is created). +#ifndef SERIALGC + void initialize_queues(); +#else // !SERIALGC + void initialize_queues() { } +#endif // !SERIALGC + // Machine dependent stuff #include "incls/_thread_pd.hpp.incl" From 3ee389a913d887bfb42c2bf781b9dede33f6c630 Mon Sep 17 00:00:00 2001 From: Erik Trimble Date: Fri, 1 Oct 2010 18:04:36 -0700 Subject: [PATCH 038/722] Added tag hs20-b01 for changeset 75ef8813e3e2 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index cc365510f54..8dabba4e817 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -122,3 +122,4 @@ cc4bb3022b3144dc5db0805b9ef6c7eff2aa3b81 jdk7-b109 2f25f2b8de2700a1822463b1bd3d02b5e218018f jdk7-b110 07b042e13dde4f3479ba9ec55120fcd5e8623323 jdk7-b111 5511edd5d719f3fc9fdd04879482026a3d2c8652 jdk7-b112 +5511edd5d719f3fc9fdd04879482026a3d2c8652 hs20-b01 From 9e4a795ff5a949b86d68aac961309da7d109eb62 Mon Sep 17 00:00:00 2001 From: Karen Kinnear Date: Mon, 4 Oct 2010 13:11:10 -0400 Subject: [PATCH 039/722] 6763959: java.util.concurrent.locks.LockSupport.parkUntil(0) blocks forever Absolute time 0 needs to return immediately. Reviewed-by: phh, dcubed, dholmes --- hotspot/src/os/linux/vm/os_linux.cpp | 4 ++-- hotspot/src/os/solaris/vm/os_solaris.cpp | 4 ++-- hotspot/src/os/windows/vm/os_windows.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index e3e117eb5fb..38eea57f743 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -4839,7 +4839,7 @@ void Parker::park(bool isAbsolute, jlong time) { // Next, demultiplex/decode time arguments timespec absTime; - if (time < 0) { // don't wait at all + if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all return; } if (time > 0) { diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp index 0245d6f609d..0db63b82f10 100644 --- a/hotspot/src/os/solaris/vm/os_solaris.cpp +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -5837,7 +5837,7 @@ void Parker::park(bool isAbsolute, jlong time) { // First, demultiplex/decode time arguments timespec absTime; - if (time < 0) { // don't wait at all + if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all return; } if (time > 0) { diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp index f2b7eedcb5e..59b60df03f9 100644 --- a/hotspot/src/os/windows/vm/os_windows.cpp +++ b/hotspot/src/os/windows/vm/os_windows.cpp @@ -3992,7 +3992,7 @@ void Parker::park(bool isAbsolute, jlong time) { if (time < 0) { // don't wait return; } - else if (time == 0) { + else if (time == 0 && !isAbsolute) { time = INFINITE; } else if (isAbsolute) { From 981d5fdfcb7488c53ed5eb6134801f427e9ad86c Mon Sep 17 00:00:00 2001 From: Qi Zuo Date: Mon, 4 Oct 2010 16:36:17 -0400 Subject: [PATCH 040/722] 6983855: The jre combo bundle target needs to be added in the makefile Reviewed-by: billyh, paulk --- make/install-rules.gmk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/make/install-rules.gmk b/make/install-rules.gmk index b20f8ea072f..56b9baa05dd 100644 --- a/make/install-rules.gmk +++ b/make/install-rules.gmk @@ -93,6 +93,10 @@ ifeq ($(BUILD_INSTALL), true) fi endif +combo_build: + @$(ECHO) $@ installer combo build started: `$(DATE) '+%y-%m-%d %H:%M'` + $(CD) $(INSTALL_TOPDIR)/make/installer/bundles/windows/ishield/wrapper/wrapper.jreboth ; $(MAKE) all + install-clobber: ifeq ($(BUILD_INSTALL), true) @$(call MakeStart, install, clobber) From f591ed981dda8034ffb83040441d7b5ddf9a3141 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Mon, 4 Oct 2010 17:09:18 -0700 Subject: [PATCH 041/722] 6968348: Byteswapped memory access can point to wrong location after JIT Reviewed-by: twisti, kvn, iveresov --- hotspot/src/cpu/x86/vm/x86_64.ad | 37 ------------ .../test/compiler/6968348/Test6968348.java | 58 +++++++++++++++++++ 2 files changed, 58 insertions(+), 37 deletions(-) create mode 100644 hotspot/test/compiler/6968348/Test6968348.java diff --git a/hotspot/src/cpu/x86/vm/x86_64.ad b/hotspot/src/cpu/x86/vm/x86_64.ad index b0f73012f5f..3978169943d 100644 --- a/hotspot/src/cpu/x86/vm/x86_64.ad +++ b/hotspot/src/cpu/x86/vm/x86_64.ad @@ -7349,43 +7349,6 @@ instruct bytes_reverse_short(rRegI dst) %{ ins_pipe( ialu_reg ); %} -instruct loadI_reversed(rRegI dst, memory src) %{ - match(Set dst (ReverseBytesI (LoadI src))); - - format %{ "bswap_movl $dst, $src" %} - opcode(0x8B, 0x0F, 0xC8); /* Opcode 8B 0F C8 */ - ins_encode(REX_reg_mem(dst, src), OpcP, reg_mem(dst, src), REX_reg(dst), OpcS, opc3_reg(dst)); - ins_pipe( ialu_reg_mem ); -%} - -instruct loadL_reversed(rRegL dst, memory src) %{ - match(Set dst (ReverseBytesL (LoadL src))); - - format %{ "bswap_movq $dst, $src" %} - opcode(0x8B, 0x0F, 0xC8); /* Opcode 8B 0F C8 */ - ins_encode(REX_reg_mem_wide(dst, src), OpcP, reg_mem(dst, src), REX_reg_wide(dst), OpcS, opc3_reg(dst)); - ins_pipe( ialu_reg_mem ); -%} - -instruct storeI_reversed(memory dst, rRegI src) %{ - match(Set dst (StoreI dst (ReverseBytesI src))); - - format %{ "movl_bswap $dst, $src" %} - opcode(0x0F, 0xC8, 0x89); /* Opcode 0F C8 89 */ - ins_encode( REX_reg(src), OpcP, opc2_reg(src), REX_reg_mem(src, dst), OpcT, reg_mem(src, dst) ); - ins_pipe( ialu_mem_reg ); -%} - -instruct storeL_reversed(memory dst, rRegL src) %{ - match(Set dst (StoreL dst (ReverseBytesL src))); - - format %{ "movq_bswap $dst, $src" %} - opcode(0x0F, 0xC8, 0x89); /* Opcode 0F C8 89 */ - ins_encode( REX_reg_wide(src), OpcP, opc2_reg(src), REX_reg_mem_wide(src, dst), OpcT, reg_mem(src, dst) ); - ins_pipe( ialu_mem_reg ); -%} - - //---------- Zeros Count Instructions ------------------------------------------ instruct countLeadingZerosI(rRegI dst, rRegI src, rFlagsReg cr) %{ diff --git a/hotspot/test/compiler/6968348/Test6968348.java b/hotspot/test/compiler/6968348/Test6968348.java new file mode 100644 index 00000000000..14568d7526b --- /dev/null +++ b/hotspot/test/compiler/6968348/Test6968348.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/** + * @test + * @bug 6968348 + * @summary Byteswapped memory access can point to wrong location after JIT + * + * @run main Test6968348 + */ + +import sun.misc.Unsafe; +import java.lang.reflect.*; + +public class Test6968348 { + static Unsafe unsafe; + static final long[] buffer = new long[4096]; + static int array_long_base_offset; + + public static void main(String[] args) throws Exception { + Class c = Test6968348.class.getClassLoader().loadClass("sun.misc.Unsafe"); + Field f = c.getDeclaredField("theUnsafe"); + f.setAccessible(true); + unsafe = (Unsafe)f.get(c); + array_long_base_offset = unsafe.arrayBaseOffset(long[].class); + + for (int n = 0; n < 100000; n++) { + test(); + } + } + + public static void test() { + for (long i = array_long_base_offset; i < 4096; i += 8) { + unsafe.putLong(buffer, i, Long.reverseBytes(i)); + } + } +} From 014b414926a9b7a2a503e50f86215b4ddffd8bb8 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Tue, 5 Oct 2010 10:23:14 +0400 Subject: [PATCH 042/722] 6976076: sun/java2d/pipe/MutableColorTest/MutableColorTest.java failed Reviewed-by: igor, prr --- .../MutableColorTest/MutableColorTest.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/jdk/test/sun/java2d/pipe/MutableColorTest/MutableColorTest.java b/jdk/test/sun/java2d/pipe/MutableColorTest/MutableColorTest.java index 2660b496122..beeb01a6326 100644 --- a/jdk/test/sun/java2d/pipe/MutableColorTest/MutableColorTest.java +++ b/jdk/test/sun/java2d/pipe/MutableColorTest/MutableColorTest.java @@ -105,7 +105,7 @@ public class MutableColorTest { for (int y = 0; y < snapshot.getHeight(); y++) { for (int x = 0; x < snapshot.getWidth(); x++) { int snapRGB = snapshot.getRGB(x, y); - if (snapRGB != evilColor) { + if (!isSameColor(snapRGB, evilColor)) { System.err.printf("Wrong RGB for %s at (%d,%d): 0x%x " + "instead of 0x%x\n", desc, x, y, snapRGB, evilColor); String fileName = "MutableColorTest_"+desc+".png"; @@ -166,4 +166,24 @@ public class MutableColorTest { System.err.println("Test passed."); } + + /* + * We assume that colors with slightly different components + * are the same. This is done just in order to workaround + * peculiarities of OGL rendering pipeline on some platforms. + * See CR 6989217 for more details. + */ + private static boolean isSameColor(int color1, int color2) { + final int tolerance = 2; + + for (int i = 0; i < 32; i += 8) { + int c1 = 0xff & (color1 >> i); + int c2 = 0xff & (color2 >> i); + + if (Math.abs(c1 - c2) > tolerance) { + return false; + } + } + return true; + } } From 32ebbc92ecf7e28355a65e41f44d5e9bd3000c18 Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Tue, 5 Oct 2010 00:19:21 -0700 Subject: [PATCH 043/722] 6989368: Regression in scimark2.MonteCarlo in jdk7_b112 on Linux Fix ciMethod::instructions_size() to return correct value Reviewed-by: kvn, twisti --- hotspot/src/share/vm/ci/ciMethod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/ci/ciMethod.cpp b/hotspot/src/share/vm/ci/ciMethod.cpp index 7190af55e85..9d12b27f110 100644 --- a/hotspot/src/share/vm/ci/ciMethod.cpp +++ b/hotspot/src/share/vm/ci/ciMethod.cpp @@ -979,7 +979,7 @@ int ciMethod::instructions_size(int comp_level) { GUARDED_VM_ENTRY( nmethod* code = get_methodOop()->code(); if (code != NULL && (comp_level == CompLevel_any || comp_level == code->comp_level())) { - return code->code_end() - code->verified_entry_point(); + return code->insts_end() - code->verified_entry_point(); } return 0; ) From 42867588ae45877997b2e68128d735fe8fe19b0f Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Tue, 5 Oct 2010 18:12:04 +0400 Subject: [PATCH 044/722] 6829546: Modal dialog causes underlying parent JFrame to be set to "Always on top" Reviewed-by: anthony, dcherepanov --- .../windows/native/sun/windows/awt_Dialog.cpp | 10 +- .../MakeWindowAlwaysOnTop.java | 131 ++++++++++++++++++ 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java diff --git a/jdk/src/windows/native/sun/windows/awt_Dialog.cpp b/jdk/src/windows/native/sun/windows/awt_Dialog.cpp index 41142900568..628797f8af9 100644 --- a/jdk/src/windows/native/sun/windows/awt_Dialog.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Dialog.cpp @@ -304,7 +304,15 @@ void AwtDialog::PopupOneDialog(HWND dialog, HWND blocker, BOOL isModalHook, HWND UINT flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE; if (isBlocked) { - ::SetWindowPos(dialog, blocker, 0, 0, 0, 0, flags); + // Fix for 6829546: if blocker is a top-most window, but window isn't, then + // calling ::SetWindowPos(dialog, blocker, ...) makes window top-most as well + BOOL isBlockerTopmost = (::GetWindowLong(blocker, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0; + BOOL isDialogTopmost = (::GetWindowLong(dialog, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0; + if (!isBlockerTopmost || isDialogTopmost) { + ::SetWindowPos(dialog, blocker, 0, 0, 0, 0, flags); + } else { + ::SetWindowPos(dialog, HWND_TOP, 0, 0, 0, 0, flags); + } } else { ::SetWindowPos(dialog, HWND_TOP, 0, 0, 0, 0, flags); // no beep/flash if the mouse was clicked in the taskbar menu diff --git a/jdk/test/java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java b/jdk/test/java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java new file mode 100644 index 00000000000..3e3e83f1069 --- /dev/null +++ b/jdk/test/java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 6829546 + @summary tests that an always-on-top modal dialog doesn't make any windows always-on-top + @author artem.ananiev: area=awt.modal + @library ../../regtesthelpers + @build Util + @run main MakeWindowAlwaysOnTop +*/ + +import java.awt.*; +import java.awt.event.*; + +import test.java.awt.regtesthelpers.Util; + +public class MakeWindowAlwaysOnTop +{ + private static Frame f; + private static Dialog d; + + public static void main(String[] args) throws Exception + { + Robot r = Util.createRobot(); + Util.waitForIdle(r); + + // Frame + f = new Frame("Test frame"); + f.setBounds(100, 100, 400, 300); + f.setBackground(Color.RED); + f.setVisible(true); + r.delay(100); + Util.waitForIdle(r); + + // Dialog + d = new Dialog(null, "Modal dialog", Dialog.ModalityType.APPLICATION_MODAL); + d.setBounds(500, 500, 160, 160); + d.setAlwaysOnTop(true); + EventQueue.invokeLater(new Runnable() + { + public void run() + { + d.setVisible(true); + } + }); + // Wait until the dialog is shown + EventQueue.invokeAndWait(new Runnable() + { + public void run() + { + // Empty + } + }); + r.delay(100); + Util.waitForIdle(r); + + // Click on the frame to trigger modality + Point p = f.getLocationOnScreen(); + r.mouseMove(p.x + f.getWidth() / 2, p.y + f.getHeight() / 2); + Util.waitForIdle(r); + r.mousePress(InputEvent.BUTTON1_MASK); + Util.waitForIdle(r); + r.mouseRelease(InputEvent.BUTTON1_MASK); + Util.waitForIdle(r); + + r.delay(100); + Util.waitForIdle(r); + + // Dispose dialog + d.dispose(); + r.delay(100); + Util.waitForIdle(r); + + // Show another frame at the same location + Frame t = new Frame("Check"); + t.setBounds(100, 100, 400, 300); + t.setBackground(Color.BLUE); + t.setVisible(true); + r.delay(100); + Util.waitForIdle(r); + + // Bring it above the first frame + t.toFront(); + r.delay(100); + Util.waitForIdle(r); + + Color c = r.getPixelColor(p.x + f.getWidth() / 2, p.y + f.getHeight() / 2); + System.out.println("Color = " + c); + System.out.flush(); + // If the color is RED, then the first frame is now always-on-top + if (Color.RED.equals(c)) + { + throw new RuntimeException("Test FAILED: the frame is always-on-top"); + } + else if (!Color.BLUE.equals(c)) + { + throw new RuntimeException("Test FAILED: unknown window is on top of the frame"); + } + else + { + System.out.println("Test PASSED"); + System.out.flush(); + } + + // Dispose all the windows + t.dispose(); + f.dispose(); + } +} From 3ba822a482cc0ad03ff280ea59587dd2ae2de0e2 Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Tue, 5 Oct 2010 18:13:52 +0400 Subject: [PATCH 045/722] 6828273: javax/swing/system/6799345/TestShutdown.java test fails with RuntimeException Reviewed-by: anthony, dcherepanov --- .../solaris/classes/sun/awt/X11/XToolkit.java | 32 +++++++++---------- .../swing/system/6799345/TestShutdown.java | 3 +- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java index 192a8f568e9..ad92d2e9c00 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java @@ -377,22 +377,22 @@ public final class XToolkit extends UNIXToolkit implements Runnable { init(); XWM.init(); SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME); - toolkitThread = new Thread(this, "AWT-XAWT"); - toolkitThread.setPriority(Thread.NORM_PRIORITY + 1); - toolkitThread.setDaemon(true); - ThreadGroup mainTG = (ThreadGroup)AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - ThreadGroup currentTG = - Thread.currentThread().getThreadGroup(); - ThreadGroup parentTG = currentTG.getParent(); - while (parentTG != null) { - currentTG = parentTG; - parentTG = currentTG.getParent(); - } - return currentTG; - } - }); + + PrivilegedAction action = new PrivilegedAction() { + public Thread run() { + ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); + ThreadGroup parentTG = currentTG.getParent(); + while (parentTG != null) { + currentTG = parentTG; + parentTG = currentTG.getParent(); + } + Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT"); + thread.setPriority(Thread.NORM_PRIORITY + 1); + thread.setDaemon(true); + return thread; + } + }; + toolkitThread = AccessController.doPrivileged(action); toolkitThread.start(); } } diff --git a/jdk/test/javax/swing/system/6799345/TestShutdown.java b/jdk/test/javax/swing/system/6799345/TestShutdown.java index 0ca7643754e..bccfe3a4a83 100644 --- a/jdk/test/javax/swing/system/6799345/TestShutdown.java +++ b/jdk/test/javax/swing/system/6799345/TestShutdown.java @@ -59,7 +59,7 @@ public class TestShutdown while (!appcontextInitDone) { - Thread.sleep(500); + Thread.sleep(1000); } targetAppContext.dispose(); @@ -146,7 +146,6 @@ public class TestShutdown startGUI(); } }); - stk.realSync(); // start multiple SwingWorkers while (!Thread.interrupted()) From c5191a8103fe9b77528b0ef3b7d37cf5d5e6e4e5 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Tue, 5 Oct 2010 08:57:20 -0700 Subject: [PATCH 046/722] 6979458: VM crashes when -XX:ObjectAlignmentInBytes is too big Set upper limit 256 for ObjectAlignmentInBytes value. Reviewed-by: never, iveresov --- hotspot/src/share/vm/runtime/arguments.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index a49559de5b1..6d8cd6912a1 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -1261,12 +1261,30 @@ bool verify_object_alignment() { // Object alignment. if (!is_power_of_2(ObjectAlignmentInBytes)) { jio_fprintf(defaultStream::error_stream(), - "error: ObjectAlignmentInBytes=%d must be power of 2", (int)ObjectAlignmentInBytes); + "error: ObjectAlignmentInBytes=%d must be power of 2\n", + (int)ObjectAlignmentInBytes); return false; } if ((int)ObjectAlignmentInBytes < BytesPerLong) { jio_fprintf(defaultStream::error_stream(), - "error: ObjectAlignmentInBytes=%d must be greater or equal %d", (int)ObjectAlignmentInBytes, BytesPerLong); + "error: ObjectAlignmentInBytes=%d must be greater or equal %d\n", + (int)ObjectAlignmentInBytes, BytesPerLong); + return false; + } + // It does not make sense to have big object alignment + // since a space lost due to alignment will be greater + // then a saved space from compressed oops. + if ((int)ObjectAlignmentInBytes > 256) { + jio_fprintf(defaultStream::error_stream(), + "error: ObjectAlignmentInBytes=%d must not be greater then 256\n", + (int)ObjectAlignmentInBytes); + return false; + } + // In case page size is very small. + if ((int)ObjectAlignmentInBytes >= os::vm_page_size()) { + jio_fprintf(defaultStream::error_stream(), + "error: ObjectAlignmentInBytes=%d must be less then page size %d\n", + (int)ObjectAlignmentInBytes, os::vm_page_size()); return false; } return true; From 84e48aee057da4da92dab0c97de30b0f3c37877a Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Tue, 5 Oct 2010 11:16:12 -0700 Subject: [PATCH 047/722] 6988018: dtrace/hotspot/MethodInvocation/MethodInvocation002 crashes with client compiler Reviewed-by: iveresov, kvn, kamg --- hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp | 3 ++- hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp index 143cd93f17e..7d10f9ba013 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp @@ -420,7 +420,8 @@ int LIR_Assembler::emit_unwind_handler() { } if (compilation()->env()->dtrace_method_probes()) { - jobject2reg(method()->constant_encoding(), O0); + __ mov(G2_thread, O0); + jobject2reg(method()->constant_encoding(), O1); __ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), relocInfo::runtime_call_type); __ delayed()->nop(); } diff --git a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp index 7e1be01c322..63aebf2094a 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @@ -488,7 +488,9 @@ int LIR_Assembler::emit_unwind_handler() { } if (compilation()->env()->dtrace_method_probes()) { - __ movoop(Address(rsp, 0), method()->constant_encoding()); + __ get_thread(rax); + __ movptr(Address(rsp, 0), rax); + __ movoop(Address(rsp, sizeof(void*)), method()->constant_encoding()); __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit))); } From 5967ec228df2cef6da1851f0929f18648422f879 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 5 Oct 2010 11:34:43 -0700 Subject: [PATCH 048/722] 6988836: A new JavacElements is created for each round of annotation processing Reviewed-by: darcy --- .../sun/tools/javac/model/JavacElements.java | 14 +-- .../com/sun/tools/javac/model/JavacTypes.java | 14 +-- .../JavacProcessingEnvironment.java | 22 ++--- .../environment/round/TestContext.java | 96 +++++++++++++++++++ 4 files changed, 112 insertions(+), 34 deletions(-) create mode 100644 langtools/test/tools/javac/processing/environment/round/TestContext.java diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java b/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java index e56681a4e4e..62bd0b16e17 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java +++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java @@ -66,32 +66,26 @@ public class JavacElements implements Elements { private Types types; private Enter enter; - private static final Context.Key KEY = - new Context.Key(); - public static JavacElements instance(Context context) { - JavacElements instance = context.get(KEY); - if (instance == null) { + JavacElements instance = context.get(JavacElements.class); + if (instance == null) instance = new JavacElements(context); - context.put(KEY, instance); - } return instance; } /** * Public for use only by JavacProcessingEnvironment */ - // TODO JavacElements constructor should be protected - public JavacElements(Context context) { + protected JavacElements(Context context) { setContext(context); } /** * Use a new context. May be called from outside to update * internal state for a new annotation-processing round. - * This instance is *not* then registered with the new context. */ public void setContext(Context context) { + context.put(JavacElements.class, this); javaCompiler = JavaCompiler.instance(context); syms = Symtab.instance(context); names = Names.instance(context); diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java b/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java index 7499c2d79ee..5ca201b5129 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java +++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java @@ -47,32 +47,26 @@ public class JavacTypes implements javax.lang.model.util.Types { private Symtab syms; private Types types; - private static final Context.Key KEY = - new Context.Key(); - public static JavacTypes instance(Context context) { - JavacTypes instance = context.get(KEY); - if (instance == null) { + JavacTypes instance = context.get(JavacTypes.class); + if (instance == null) instance = new JavacTypes(context); - context.put(KEY, instance); - } return instance; } /** * Public for use only by JavacProcessingEnvironment */ - // TODO JavacTypes constructor should be protected - public JavacTypes(Context context) { + protected JavacTypes(Context context) { setContext(context); } /** * Use a new context. May be called from outside to update * internal state for a new annotation-processing round. - * This instance is *not* then registered with the new context. */ public void setContext(Context context) { + context.put(JavacTypes.class, this); syms = Symtab.instance(context); types = Types.instance(context); } diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java index 49ca742a580..7b7f362413b 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java +++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java @@ -173,12 +173,12 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea platformAnnotations = initPlatformAnnotations(); foundTypeProcessors = false; - // Initialize services before any processors are initialzied + // Initialize services before any processors are initialized // in case processors use them. filer = new JavacFiler(context); messager = new JavacMessager(context, this); - elementUtils = new JavacElements(context); - typeUtils = new JavacTypes(context); + elementUtils = JavacElements.instance(context); + typeUtils = JavacTypes.instance(context); processorOptions = initProcessorOptions(context); unmatchedProcessorOptions = initUnmatchedProcessorOptions(); messages = JavacMessages.instance(context); @@ -865,8 +865,6 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea this(prev.nextContext(), prev.number+1, prev.compiler.log.nwarnings); this.genClassFiles = prev.genClassFiles; - updateProcessingState(); - List parsedFiles = compiler.parseFiles(newSourceFiles); roots = cleanTrees(prev.roots).appendList(parsedFiles); @@ -1029,15 +1027,6 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea log.reportDeferredDiagnostics(kinds); } - /** Update the processing state for the current context. */ - private void updateProcessingState() { - filer.newRound(context); - messager.newRound(context); - - elementUtils.setContext(context); - typeUtils.setContext(context); - } - /** Print info about this round. */ private void printRoundInfo(boolean lastRound) { if (printRounds || verbose) { @@ -1100,6 +1089,11 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea JavaCompiler nextCompiler = JavaCompiler.instance(next); nextCompiler.initRound(oldCompiler); + filer.newRound(next); + messager.newRound(next); + elementUtils.setContext(next); + typeUtils.setContext(next); + JavacTaskImpl task = context.get(JavacTaskImpl.class); if (task != null) { next.put(JavacTaskImpl.class, task); diff --git a/langtools/test/tools/javac/processing/environment/round/TestContext.java b/langtools/test/tools/javac/processing/environment/round/TestContext.java new file mode 100644 index 00000000000..ddcba25fe80 --- /dev/null +++ b/langtools/test/tools/javac/processing/environment/round/TestContext.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6988836 + * @summary A new JavacElements is created for each round of annotation processing + * @library ../../../lib + * @build JavacTestingAbstractProcessor TestContext + * @compile/process -processor TestContext -XprintRounds TestContext + */ + +import java.io.*; +import java.util.*; +import javax.annotation.processing.*; +import javax.lang.model.element.*; +import javax.tools.*; +import static javax.tools.Diagnostic.Kind.*; + +import com.sun.source.util.Trees; +import com.sun.tools.javac.api.JavacTrees; +import com.sun.tools.javac.model.JavacElements; +import com.sun.tools.javac.model.JavacTypes; +import com.sun.tools.javac.processing.JavacProcessingEnvironment; +import com.sun.tools.javac.util.Context; + +public class TestContext extends JavacTestingAbstractProcessor { + + Trees treeUtils; + int round = 0; + + @Override + public void init(ProcessingEnvironment pEnv) { + super.init(pEnv); + treeUtils = Trees.instance(processingEnv); + } + + @Override + public boolean process(Set annotations, RoundEnvironment roundEnv) { + round++; + + JavacProcessingEnvironment jpe = (JavacProcessingEnvironment) processingEnv; + Context c = jpe.getContext(); + check(c.get(JavacElements.class), eltUtils); + check(c.get(JavacTypes.class), typeUtils); + check(c.get(JavacTrees.class), treeUtils); + + final int MAXROUNDS = 3; + if (round < MAXROUNDS) + generateSource("Gen" + round); + + return true; + } + + void check(T actual, T expected) { +// messager.printMessage(NOTE, "expect: " + expected); +// messager.printMessage(NOTE, "actual: " + actual); + + if (actual != expected) { + messager.printMessage(ERROR, + "round " + round + " unexpected value for " + expected.getClass().getName() + ": " + actual); + } + } + + void generateSource(String name) { + String text = "class " + name + " { }\n"; + + try (Writer out = filer.createSourceFile(name).openWriter()) { + out.write(text); + } catch (IOException e) { + throw new Error(e); + } + } + +} + From ec3cd6e3f01d12f4d5067caebb4b7d80c2d153a9 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 5 Oct 2010 17:37:31 -0700 Subject: [PATCH 049/722] 6893932: javah help screen lists -h and -? but does not accept them Reviewed-by: darcy --- .../com/sun/tools/javah/JavahTask.java | 2 +- langtools/test/tools/javah/TestHelpOpts.java | 79 +++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javah/TestHelpOpts.java diff --git a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java index 0e885815dc2..8a6a4d19b2e 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java +++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java @@ -173,7 +173,7 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask { } }, - new Option(false, "-help", "--help", "-?") { + new Option(false, "-h", "-help", "--help", "-?") { void process(JavahTask task, String opt, String arg) { task.help = true; } diff --git a/langtools/test/tools/javah/TestHelpOpts.java b/langtools/test/tools/javah/TestHelpOpts.java new file mode 100644 index 00000000000..c4311674298 --- /dev/null +++ b/langtools/test/tools/javah/TestHelpOpts.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6893932 + * @summary javah help screen lists -h and -? but does not accept them + */ + +import java.io.*; +import java.util.*; + +public class TestHelpOpts { + public static void main(String... args) throws Exception { + new TestHelpOpts().run(); + } + + void run() throws Exception { + Locale prev = Locale.getDefault(); + try { + Locale.setDefault(Locale.ENGLISH); + + String[] opts = { "-h", "-help", "-?", "--help" }; + for (String opt: opts) + test(opt); + } finally { + Locale.setDefault(prev); + } + + if (errors > 0) + throw new Exception(errors + " errors occurred"); + } + + void test(String opt) { + System.err.println("test " + opt); + String[] args = { opt }; + + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + int rc = com.sun.tools.javah.Main.run(args, pw); + pw.close(); + String out = sw.toString(); + if (!out.isEmpty()) + System.err.println(out); + if (rc != 0) + error("Unexpected exit: rc=" + rc); + + String flat = out.replaceAll("\\s+", " "); // canonicalize whitespace + if (!flat.contains("Usage: javah [options] where [options] include:")) + error("expected text not found"); + } + + void error(String msg) { + System.err.println(msg); + errors++; + } + + int errors; +} From f3c22cd1e243019157c42c6fa7694d048b6b461c Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Tue, 5 Oct 2010 17:38:40 -0700 Subject: [PATCH 050/722] 6989736: fix mapfile warnings on solaris Reviewed-by: kvn, iveresov, jcoomes --- hotspot/make/linux/adlc_updater | 3 +- hotspot/make/solaris/adlc_updater | 3 +- .../solaris/makefiles/reorder_COMPILER1_i486 | 166 - .../solaris/makefiles/reorder_COMPILER1_sparc | 105 - .../solaris/makefiles/reorder_TIERED_amd64 | 2738 ----------------- .../solaris/makefiles/reorder_TIERED_i486 | 249 -- .../solaris/makefiles/reorder_TIERED_sparc | 119 - .../solaris/makefiles/reorder_TIERED_sparcv9 | 270 -- 8 files changed, 4 insertions(+), 3649 deletions(-) diff --git a/hotspot/make/linux/adlc_updater b/hotspot/make/linux/adlc_updater index b54f783d6ee..6d31b792c05 100644 --- a/hotspot/make/linux/adlc_updater +++ b/hotspot/make/linux/adlc_updater @@ -15,5 +15,6 @@ fix_lines() { ' F2=$2 mv $1+ $1 } -[ -f $3/$1 ] && (fix_lines $2/$1 $3/$1; cmp -s $2/$1 $3/$1) || \ +fix_lines $2/$1 $3/$1 +[ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \ ( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 ) diff --git a/hotspot/make/solaris/adlc_updater b/hotspot/make/solaris/adlc_updater index b54f783d6ee..6d31b792c05 100644 --- a/hotspot/make/solaris/adlc_updater +++ b/hotspot/make/solaris/adlc_updater @@ -15,5 +15,6 @@ fix_lines() { ' F2=$2 mv $1+ $1 } -[ -f $3/$1 ] && (fix_lines $2/$1 $3/$1; cmp -s $2/$1 $3/$1) || \ +fix_lines $2/$1 $3/$1 +[ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \ ( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 ) diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486 b/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486 index e920dcefec7..47553eb36cc 100644 --- a/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486 +++ b/hotspot/make/solaris/makefiles/reorder_COMPILER1_i486 @@ -18,7 +18,6 @@ text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: compilationPolicy.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: compileBroker.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: fprofiler.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: genCollectedHeap.o; -text: .text%__1cTAssertIsPermClosure2t6M_v_: genCollectedHeap.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: generateOopMap.o; text: .text%__1cNCellTypeStateLmake_bottom6F_0_: generateOopMap.o; text: .text%__1cNCellTypeStateImake_any6Fi_0_: generateOopMap.o; @@ -34,23 +33,15 @@ text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: jvmtiTagMap.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: management.o; text: .text%__1cJTimeStamp2t6M_v_: management.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: markSweep.o; -text: .text%__1cJMarkSweepSMarkAndPushClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepRFollowRootClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepSFollowStackClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepOIsAliveClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepQKeepAliveClosure2t6M_v_: markSweep.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: memoryService.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: oopMap.o; -text: .text%__1cQDoNothingClosure2t6M_v_: oopMap.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: parGCAllocBuffer.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psMarkSweep.o; -text: .text%__1cTPSAlwaysTrueClosure2t6M_v_: psMarkSweep.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psScavenge.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: relocInfo.o; text: .text%__1cQRelocationHolder2t6M_v_: relocInfo.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: runtimeService.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: sharedHeap.o; -text: .text%__1cTAssertIsPermClosure2t6M_v_: sharedHeap.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: vmStructs.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: vm_version.o; text: .text%__1cTAbstract_VM_VersionKvm_release6F_pkc_; @@ -94,7 +85,6 @@ text: .text%__1cCosXnon_memory_address_word6F_pc_; text: .text%__1cCosHSolarisOlibthread_init6F_v_; text: .text%__1cRlwp_priocntl_init6F_i_: os_solaris.o; text: .text%__1cNpriocntl_stub6FinGidtype_lipc_l_: os_solaris.o; -text: .text%__1cOresolve_symbol6Fpkc_pC_: os_solaris.o; text: .text%__1cCosHSolarisQsignal_sets_init6F_v_; text: .text%__1cCosHSolarisPinit_signal_mem6F_v_; text: .text%__1cCosHSolarisXinstall_signal_handlers6F_v_; @@ -107,7 +97,6 @@ text: .text%__1cSThreadLocalStorageEinit6F_v_; text: .text%__1cSThreadLocalStorageHpd_init6F_v_; text: .text%__1cCosbDallocate_thread_local_storage6F_i_; text: .text%__1cSThreadLocalStoragebCgenerate_code_for_get_thread6F_v_; -text: .text%__1cRAllocateTLSOffset6F_v_: threadLS_solaris_x86.o; text: .text%__1cPvm_init_globals6F_v_; text: .text%__1cScheck_ThreadShadow6F_v_; text: .text%__1cNeventlog_init6F_v_; @@ -119,17 +108,8 @@ text: .text%__1cPperfMemory_init6F_v_; text: .text%__1cKPerfMemoryKinitialize6F_v_; text: .text%__1cCosZvm_allocation_granularity6F_i_; text: .text%__1cKPerfMemoryUcreate_memory_region6FI_v_; -text: .text%__1cUcreate_shared_memory6FI_pc_: perfMemory_solaris.o; -text: .text%__1cSmmap_create_shared6FI_pc_: perfMemory_solaris.o; text: .text%__1cCosScurrent_process_id6F_i_; -text: .text%__1cNget_user_name6Fl_pc_: perfMemory_solaris.o; -text: .text%__1cQget_user_tmp_dir6Fpkc_pc_: perfMemory_solaris.o; text: .text%__1cCosSget_temp_directory6F_pkc_; -text: .text%__1cWget_sharedmem_filename6Fpkci_pc_: perfMemory_solaris.o; -text: .text%__1cbBcleanup_sharedmem_resources6Fpkc_v_: perfMemory_solaris.o; -text: .text%lstat: perfMemory_solaris.o; -text: .text%__1cPfilename_to_pid6Fpkc_l_: perfMemory_solaris.o; -text: .text%__1cbAcreate_sharedmem_resources6Fpkc1I_i_: perfMemory_solaris.o; text: .text%__1cGThread2t6M_v_; text: .text%__1cFArena2t6M_v_; text: .text%__1cFChunk2n6FII_pv_; @@ -161,7 +141,6 @@ text: .text%__1cCosRinitialize_thread6F_v_; text: .text%__1cNReservedSpaceUpage_align_size_down6FI_I_; text: .text%__1cCosHSolarisVinit_thread_fpu_state6F_v_; text: .text%__1cOJNIHandleBlockOallocate_block6FpnGThread__p0_; -text: .text%__1cQcreate_os_thread6FpnGThread_I_pnIOSThread__: os_solaris.o; text: .text%__1cIOSThread2t6MpFpv_i1_v_; text: .text%__1cIOSThreadNpd_initialize6M_v_; text: .text%__1cCosHSolarisPhotspot_sigmask6FpnGThread__v_; @@ -186,7 +165,6 @@ text: .text%__1cNThreadServiceEinit6F_v_; text: .text%__1cPPerfDataManagerTcreate_long_counter6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnPPerfLongCounter__; text: .text%__1cORuntimeServiceEinit6F_v_; text: .text%__1cTClassLoadingServiceEinit6F_v_; -text: .text%__1cKvtune_init6F_v_; text: .text%__1cObytecodes_init6F_v_; text: .text%__1cJBytecodesKinitialize6F_v_; text: .text%__1cJBytecodesNpd_initialize6F_v_; @@ -200,7 +178,6 @@ text: .text%__1cKHandleMark2T6M_v_; text: .text%__1cLClassLoaderbBsetup_bootstrap_search_path6F_v_; text: .text%__1cCosGstrdup6Fpkc_pc_; text: .text%__1cCosEstat6FpkcpnEstat__i_; -text: .text%stat: os_solaris.o; text: .text%JVM_RawMonitorCreate; text: .text%JVM_NativePath; text: .text%JVM_RawMonitorEnter; @@ -216,7 +193,6 @@ text: .text%__1cNReservedSpace2t6MI_v_; text: .text%__1cMVirtualSpaceQuncommitted_size6kM_I_; text: .text%__1cMVirtualSpaceNreserved_size6kM_I_; text: .text%__1cMVirtualSpaceOcommitted_size6kM_I_; -text: .text%__1cSalign_to_page_size6FI_I_: heap.o; text: .text%__1cICodeHeapFclear6M_v_; text: .text%__1cICodeHeapTmark_segmap_as_free6MII_v_; text: .text%__1cNMemoryServiceZadd_code_heap_memory_pool6FpnICodeHeap__v_; @@ -244,9 +220,7 @@ text: .text%__1cKMemoryPoolYrecord_peak_memory_usage6M_v_; text: .text%__1cMCodeHeapPoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cMCodeHeapPoolNused_in_bytes6M_I_: memoryPool.o; text: .text%__1cICodeHeapSallocated_capacity6kM_I_; -text: .text%__1cKMemoryPoolImax_size6kM_I_: memoryPool.o; text: .text%__1cXresource_allocate_bytes6FI_pc_; -text: .text%__1cKCodeBuffer2t6MpCi_v_; text: .text%__1cRAbstractAssembler2t6MpnKCodeBuffer__v_; text: .text%__1cYVM_Version_StubGeneratorTgenerate_getPsrInfo6M_pC_: vm_version_x86.o; text: .text%__1cMStubCodeMark2t6MpnRStubCodeGenerator_pkc4_v_; @@ -269,10 +243,8 @@ text: .text%__1cJAssemblerDret6Mi_v_; text: .text%__1cMStubCodeMark2T6M_v_; text: .text%__1cRAbstractAssemblerFflush6M_v_; text: .text%__1cRStubCodeGeneratorLstub_epilog6MpnMStubCodeDesc__v_; -text: .text%__1cFVTuneNregister_stub6FpkcpC3_v_; text: .text%__1cFForteNregister_stub6FpkcpC3_v_; text: .text%__1cKVM_VersionWget_processor_features6F_v_; -text: .text%__1cVcheck_for_sse_support6F_v_: os_solaris_x86.o; text: .text%jio_snprintf; text: .text%jio_vsnprintf; text: .text%__1cPlocal_vsnprintf6FpcIpkcpv_i_; @@ -651,7 +623,6 @@ text: .text%__1cZInterpreterMacroAssemblerWprofile_switch_default6MpnMRegisterIm text: .text%__1cNTemplateTableMlookupswitch6F_v_; text: .text%__1cNTemplateTableH_return6FnITosState__v_; text: .text%__1cNTemplateTableJgetstatic6Fi_v_; -text: .text%__1cNTemplateTableXresolve_cache_and_index6FipnMRegisterImpl_2_v_; text: .text%__1cJAssemblerHfistp_d6MnHAddress__v_; text: .text%__1cNTemplateTableJputstatic6Fi_v_; text: .text%__1cOMacroAssemblerLstore_check6MpnMRegisterImpl_nHAddress__v_; @@ -735,7 +706,6 @@ text: .text%__1cbBBlockOffsetArrayContigSpaceQalloc_block_work6MpnIHeapWord_2_v_ text: .text%__1cLsymbolKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cLsymbolKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: symbolKlass.o; text: .text%__1cLsymbolKlassOset_alloc_size6MI_v_: symbolKlass.o; -text: .text%__1cKoopFactoryKnew_symbol6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cLSymbolTableGlookup6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cJHashtableLhash_symbol6Fpkci_I_: symbolTable.o; text: .text%__1cLSymbolTableGlookup6MipkciI_pnNsymbolOopDesc__; @@ -806,7 +776,6 @@ text: .text%__1cQSystemDictionaryRload_shared_class6FnMsymbolHandle_nGHandle_pnG text: .text%__1cQSystemDictionaryRfind_shared_class6FnMsymbolHandle__pnMklassOopDesc__; text: .text%__1cQSystemDictionaryRload_shared_class6FnTinstanceKlassHandle_nGHandle_pnGThread__1_; text: .text%__1cLClassLoaderOload_classfile6FnMsymbolHandle_pnGThread__nTinstanceKlassHandle__; -text: .text%__1cFVTuneQstart_class_load6F_v_; text: .text%__1cJEventMark2t6MpkcE_v_: classLoader.o; text: .text%__1cSThreadProfilerMark2t6Mn0AGRegion__v_; text: .text%__1cMstringStream2t6MI_v_; @@ -854,7 +823,6 @@ text: .text%__1cPClassFileParserYparse_checked_exceptions6MpHInSconstantPoolHand text: .text%__1cPClassFileStreamHskip_u26MipnGThread__v_; text: .text%__1cSconstMethodOopDescbEchecked_exceptions_length_addr6kM_pH_; text: .text%__1cSconstMethodOopDescYchecked_exceptions_start6kM_pnXCheckedExceptionElement__; -text: .text%__1cXcopy_u2_with_conversion6FpH0i_v_: classFileParser.o; text: .text%__1cPClassFileParserbDcompute_transitive_interfaces6MnTinstanceKlassHandle_nOobjArrayHandle_pnGThread__2_; text: .text%__1cPClassFileParserMsort_methods6MnOobjArrayHandle_111pnGThread__nPtypeArrayHandle__; text: .text%method_compare: methodOop.o; @@ -862,9 +830,6 @@ text: .text%__1cLklassVtableQget_num_mirandas6FpnMklassOopDesc_pnPobjArrayOopDes text: .text%__1cLklassVtableMget_mirandas6FpnNGrowableArray4CpnNmethodOopDesc___pnMklassOopDesc_pnPobjArrayOopDesc_8_v_; text: .text%__1cLklassItableTcompute_itable_size6FnOobjArrayHandle__i_; text: .text%__1cUvisit_all_interfaces6FpnPobjArrayOopDesc_pnXInterfaceVisiterClosure__v_; -text: .text%__1cPClassFileParserUcompute_oop_map_size6MnTinstanceKlassHandle_ii_i_; -text: .text%__1cKoopFactoryRnew_instanceKlass6FiiiinNReferenceType_pnGThread__pnMklassOopDesc__; -text: .text%__1cSinstanceKlassKlassXallocate_instance_klass6MiiiinNReferenceType_pnGThread__pnMklassOopDesc__; text: .text%__1cNinstanceKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: instanceKlass.o; text: .text%__1cNinstanceKlassOset_alloc_size6MI_v_: instanceKlass.o; text: .text%__1cNinstanceKlassQinit_implementor6M_v_; @@ -878,7 +843,6 @@ text: .text%__1cNinstanceKlassYcompute_secondary_supers6MipnGThread__pnPobjArray text: .text%__1cLklassItableZsetup_itable_offset_table6FnTinstanceKlassHandle__v_; text: .text%__1cFKlassKsuperklass6kM_pnNinstanceKlass__; text: .text%__1cPClassFileParserVset_precomputed_flags6MnTinstanceKlassHandle__v_; -text: .text%__1cFKlassNlookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cNinstanceKlassWuncached_lookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cNinstanceKlassLfind_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cNinstanceKlassLfind_method6FpnPobjArrayOopDesc_pnNsymbolOopDesc_4_pnNmethodOopDesc__; @@ -893,7 +857,6 @@ text: .text%__1cQPackageHashtableMcompute_hash6Mpkci_I_: classLoader.o; text: .text%__1cQPackageHashtableJget_entry6MiIpkcI_pnLPackageInfo__: classLoader.o; text: .text%__1cMstringStream2T6M_v_; text: .text%__1cSThreadProfilerMark2T6M_v_; -text: .text%__1cFVTuneOend_class_load6F_v_; text: .text%__1cQSystemDictionaryVdefine_instance_class6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cVLoaderConstraintTableWfind_loader_constraint6MnMsymbolHandle_nGHandle__ppnVLoaderConstraintEntry__; text: .text%__1cQSystemDictionaryQadd_to_hierarchy6FnTinstanceKlassHandle_pnGThread__v_; @@ -970,8 +933,6 @@ text: .text%__1cbBjava_lang_ref_SoftReferenceJset_clock6Fx_v_; text: .text%__1cQjni_handles_init6F_v_; text: .text%__1cKJNIHandlesKinitialize6F_v_; text: .text%__1cOvmStructs_init6F_v_; -text: .text%__1cIFrameMapEinit6F_v_; -text: .text%__1cIRuntime1Kinitialize6F_v_; text: .text%__1cIRuntime1Ninitialize_pd6F_v_; text: .text%__1cNSharedRuntimeTgenerate_deopt_blob6F_v_; text: .text%__1cJOopMapSet2t6M_v_; @@ -996,7 +957,6 @@ text: .text%__1cJOopMapSetJheap_size6kM_i_; text: .text%__1cGOopMapJheap_size6kM_i_; text: .text%__1cJOopMapSetHcopy_to6MpC_v_; text: .text%__1cGOopMapHcopy_to6MpC_v_; -text: .text%__1cIRuntime1Rgenerate_blob_for6Fn0AGStubID__v_; text: .text%__1cLOopRecorder2t6MpnFArena__v_; text: .text%__1cIRuntime1Iname_for6Fn0AGStubID__pkc_; text: .text%__1cLRuntimeStub2n6FII_pv_; @@ -1004,7 +964,6 @@ text: .text%__1cNStubAssemblerHcall_RT6MpnMRegisterImpl_2pC2_i_; text: .text%__1cNStubAssemblerHcall_RT6MpnMRegisterImpl_2pCi_i_; text: .text%__1cJStubFrame2T6M_v_; text: .text%__1cOMacroAssemblerLtlab_refill6MrnFLabel_22_v_; -text: .text%__1cLlog2_intptr6Fi_i_: assembler_x86.o; text: .text%__1cOMacroAssemblerNeden_allocate6MpnMRegisterImpl_2i2rnFLabel__v_; text: .text%__1cOMacroAssemblerLverify_tlab6M_v_; text: .text%__1cOMacroAssemblerNtlab_allocate6MpnMRegisterImpl_2i22rnFLabel__v_; @@ -1033,7 +992,6 @@ text: .text%__1cPICStubInterfaceRcode_size_to_size6kMi_i_: icBuffer.o; text: .text%__1cPICStubInterfaceKinitialize6MpnEStub_i_v_: icBuffer.o; text: .text%__1cTcompilerOracle_init6F_v_; text: .text%__1cOCompilerOraclePparse_from_file6F_v_; -text: .text%__1cHcc_file6F_pkc_: compilerOracle.o; text: .text%__1cWcompilationPolicy_init6F_v_; text: .text%__1cNinstanceKlassGvtable6kM_pnLklassVtable__; text: .text%__1cNinstanceKlassKjava_super6kM_pnMklassOopDesc__: instanceKlass.o; @@ -1076,18 +1034,14 @@ text: .text%__1cNinstanceKlassKlink_class6MpnGThread__v_; text: .text%__1cNinstanceKlassNrewrite_class6MpnGThread__v_; text: .text%__1cIRewriterHrewrite6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cYconstantPoolCacheOopDescKinitialize6MrnIintArray__v_; -text: .text%__1cWConstantPoolCacheEntryRset_initial_state6Mi_v_; text: .text%__1cTAbstractInterpreterLmethod_kind6FnMmethodHandle__n0AKMethodKind__; text: .text%__1cMNativeLookupTbase_library_lookup6Fpkc22_pC_; text: .text%__1cMNativeLookupNpure_jni_name6FnMmethodHandle__pc_; text: .text%__1cMoutputStreamFprint6MpkcE_v_; text: .text%__1cNmethodOopDescKklass_name6kM_pnNsymbolOopDesc__; -text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc__v_: nativeLookup.o; -text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o; text: .text%__1cMoutputStreamDput6Mc_v_; text: .text%__1cCosYprint_jni_name_prefix_on6FpnMoutputStream_i_v_; text: .text%__1cCosYprint_jni_name_suffix_on6FpnMoutputStream_i_v_; -text: .text%__1cVlookup_special_native6Fpc_pC_: nativeLookup.o; text: .text%__1cbEinitialize_converter_functions6F_v_; text: .text%__1cIUniverseWupdate_heap_info_at_gc6F_v_; text: .text%__1cQGenCollectedHeapIcapacity6kM_I_; @@ -1137,7 +1091,6 @@ text: .text%__1cCosMstart_thread6FpnGThread__v_; text: .text%__1cCosPpd_start_thread6FpnGThread__v_; text: .text%__1cCosTset_native_priority6FpnGThread_i_nIOSReturn__; text: .text%__1cQset_lwp_priority6Fiii_i_; -text: .text%__1cVscale_to_lwp_priority6Fiii_i_: os_solaris.o; text: .text%__1cIVMThreadDrun6M_v_; text: .text%__1cIVMThreadEloop6M_v_; text: .text%__1cQVMOperationQdDueueLremove_next6M_pnMVM_Operation__; @@ -1154,7 +1107,6 @@ text: .text%__1cNinstanceKlassRclass_initializer6M_pnNmethodOopDesc__; text: .text%__1cJJavaCallsEcall6FpnJJavaValue_nMmethodHandle_pnRJavaCallArguments_pnGThread__v_; text: .text%__1cCosUos_exception_wrapper6FpFpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v2468_v_; text: .text%__1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_; -text: .text%__1cRruntime_type_from6FpnJJavaValue__nJBasicType__: javaCalls.o; text: .text%__1cTAbstractInterpreterbFsize_top_interpreter_activation6FpnNmethodOopDesc__i_; text: .text%__1cPJavaCallWrapper2t6MnMmethodHandle_nGHandle_pnJJavaValue_pnGThread__v_; text: .text%__1cRJavaCallArgumentsKparameters6M_pi_; @@ -1192,7 +1144,6 @@ text: .text%__1cXSignatureHandlerLibraryLset_handler6FpnKCodeBuffer__pC_; text: .text%__1cXSignatureHandlerLibraryOpd_set_handler6FpC_v_; text: .text%jni_RegisterNatives: jni.o; text: .text%__1cPjava_lang_ClassLas_klassOop6FpnHoopDesc__pnMklassOopDesc__; -text: .text%__1cLSymbolTableFprobe6Fpkci_pnNsymbolOopDesc__; text: .text%__1cPJavaCallWrapper2T6M_v_; text: .text%__1cOJNIHandleBlockNrelease_block6Fp0pnGThread__v_; text: .text%__1cNinstanceKlassbJset_initialization_state_and_notify6Mn0AKClassState_pnGThread__v_; @@ -1206,7 +1157,6 @@ text: .text%__1cPFieldAccessInfoDset6MnLKlassHandle_nMsymbolHandle_iinJBasicType text: .text%__1cWConstantPoolCacheEntryOset_bytecode_26MnJBytecodesECode__v_; text: .text%__1cSInterpreterRuntimeE_new6FpnKJavaThread_pnTconstantPoolOopDesc_i_v_; text: .text%__1cMLinkResolverVresolve_invokespecial6FrnICallInfo_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cWConstantPoolCacheEntryPbytecode_number6FnJBytecodesECode__i_: cpCacheOop.o; text: .text%__1cNSignatureInfoJdo_object6Mii_v_: bytecode.o; text: .text%__1cNSignatureInfoHdo_long6M_v_: bytecode.o; text: .text%JVM_CurrentTimeMillis; @@ -1225,8 +1175,6 @@ text: .text%__1cQjava_lang_StringbBcreate_tenured_from_unicode6FpHipnGThread__nG text: .text%__1cKoopFactoryXnew_permanent_charArray6FipnGThread__pnQtypeArrayOopDesc__; text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_533pnGThread__v_; text: .text%__1cNmethodOopDescIbci_from6kMpC_i_; -text: .text%__1cPBytecode_invokeJsignature6kM_pnNsymbolOopDesc__; -text: .text%__1cPBytecode_invokeFindex6kM_i_; text: .text%__1cNmethodOopDescIbcp_from6kMi_pC_; text: .text%__1cFframebGinterpreter_callee_receiver_addr6MnMsymbolHandle__ppnHoopDesc__; text: .text%__1cMLinkResolverVresolve_invokevirtual6FrnICallInfo_nGHandle_nSconstantPoolHandle_ipnGThread__v_; @@ -1258,7 +1206,6 @@ text: .text%jni_GetStringUTFChars: jni.o; text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc__pc_; text: .text%__1cHUNICODEHas_utf86FpHi_pc_; text: .text%__1cHUNICODELutf8_length6FpHi_i_; -text: .text%__1cKutf8_write6FpCH_0_: utf8.o; text: .text%JVM_FindPrimitiveClass; text: .text%__1cJname2type6Fpkc_nJBasicType__; text: .text%jni_ReleaseStringUTFChars; @@ -1300,7 +1247,6 @@ text: .text%__1cKJavaThreadRthread_main_inner6M_v_; text: .text%__1cMthread_entry6FpnKJavaThread_pnGThread__v_: jvm.o; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_; -text: .text%__1cIBytecodeIset_code6MnJBytecodesECode__v_; text: .text%__1cNFingerprinterHdo_long6M_v_: dump.o; text: .text%JVM_MonitorWait; text: .text%__1cQjava_lang_ThreadRget_thread_status6FpnHoopDesc__n0AMThreadStatus__; @@ -1314,23 +1260,19 @@ text: .text%__1cNmethodOopDescKjmethod_id6M_pnK_jmethodID__; text: .text%jni_NewStringUTF: jni.o; text: .text%jni_CallObjectMethod: jni.o; text: .text%__1cRSignatureIterator2t6MpnGThread_pnNsymbolOopDesc__v_; -text: .text%__1cUjni_invoke_nonstatic6FpnHJNIEnv__pnJJavaValue_pnI_jobject_nLJNICallType_pnK_jmethodID_pnSJNI_ArgumentPusher_pnGThread__v_: jni.o; text: .text%__1cXJNI_ArgumentPusherVaArgHiterate6MX_v_: jni.o; text: .text%__1cXJNI_ArgumentPusherVaArgKget_object6M_v_: jni.o; text: .text%jni_ExceptionOccurred: jni.o; -text: .text%__1cbAjni_check_async_exceptions6FpnKJavaThread__v_: jni.o; text: .text%jni_DeleteLocalRef: jni.o; text: .text%__1cOJNIHandleBlockRrebuild_free_list6M_v_; text: .text%jni_EnsureLocalCapacity; text: .text%jni_GetStaticMethodID: jni.o; text: .text%jni_CallStaticObjectMethodV: jni.o; -text: .text%__1cRjni_invoke_static6FpnHJNIEnv__pnJJavaValue_pnI_jobject_nLJNICallType_pnK_jmethodID_pnSJNI_ArgumentPusher_pnGThread__v_: jni.o; text: .text%__1cMLinkResolverbHlookup_instance_method_in_klasses6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%jni_ExceptionCheck: jni.o; text: .text%jni_NewString: jni.o; text: .text%__1cQjava_lang_StringXcreate_oop_from_unicode6FpHipnGThread__pnHoopDesc__; text: .text%JVM_InitProperties; -text: .text%__1cMset_property6FnGHandle_pkc2pnGThread__v_: jvm.o; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_533pnGThread__v_; text: .text%__1cYNoJvmtiVMObjectAllocMark2t6M_v_; text: .text%__1cYNoJvmtiVMObjectAllocMark2T6M_v_; @@ -1394,7 +1336,6 @@ text: .text%__1cRLowMemoryDetectorbLdetect_low_memory_for_collected_pools6F_v_: text: .text%jni_GetStringUTFLength: jni.o; text: .text%__1cQjava_lang_StringLutf8_length6FpnHoopDesc__i_; text: .text%jni_GetStringLength: jni.o; -text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_; text: .text%jni_GetStringUTFRegion: jni.o; text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_; text: .text%JVM_FindClassFromClassLoader; @@ -1445,13 +1386,9 @@ text: .text%Unsafe_FreeMemory; text: .text%__1cNSignatureInfoIdo_float6M_v_: bytecode.o; text: .text%__1cFJNIidEfind6Mi_p0_; text: .text%jni_NewObjectV: jni.o; -text: .text%__1cMalloc_object6FpnH_jclass_pnGThread__pnPinstanceOopDesc__: jni.o; text: .text%jni_GetStringRegion: jni.o; -text: .text%__1cQjava_lang_StringGoffset6FpnHoopDesc__i_; -text: .text%__1cQjava_lang_StringFvalue6FpnHoopDesc__pnQtypeArrayOopDesc__; text: .text%jni_GetObjectField: jni.o; text: .text%jni_GetStringCritical: jni.o; -text: .text%__1cJGC_lockerNlock_critical6FpnKJavaThread__v_: jni.o; text: .text%jni_ReleaseStringCritical: jni.o; text: .text%JVM_LoadLibrary; text: .text%JVM_FindLibraryEntry; @@ -1496,10 +1433,7 @@ text: .text%__1cNobjArrayKlassIallocate6MipnGThread__pnPobjArrayOopDesc__; text: .text%jni_SetObjectArrayElement: jni.o; text: .text%jni_GetObjectArrayElement: jni.o; text: .text%__1cQSimpleCompPolicyXmethod_invocation_event6MnMmethodHandle_pnGThread__v_; -text: .text%__1cRCompilationPolicybIreset_counter_for_invocation_event6MnMmethodHandle__v_; text: .text%__1cRInvocationCounterJset_carry6M_v_; -text: .text%__1cNCompileBrokerOcompile_method6FnMmethodHandle_i1ipkcpnGThread__pnHnmethod__; -text: .text%__1cQSimpleCompPolicyRcompilation_level6MnMmethodHandle_i_i_; text: .text%__1cNobjArrayKlassKcopy_array6MpnMarrayOopDesc_i2iipnGThread__v_; text: .text%__1cLJvmtiExportQenter_live_phase6F_v_; text: .text%__1cLJvmtiExportTpost_vm_initialized6F_v_; @@ -1512,7 +1446,6 @@ text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMs text: .text%__1cCosOsignal_init_pd6F_v_; text: .text%__1cQjava_lang_ThreadKset_daemon6FpnHoopDesc__v_; text: .text%__1cICompiler2t6M_v_; -text: .text%__1cNCompileBrokerVinit_compiler_threads6Fi_v_; text: .text%__1cQCompilerCounters2t6MpkcipnGThread__v_; text: .text%__1cNCompileBrokerUmake_compiler_thread6FpkcpnMCompileQdDueue_pnQCompilerCounters_pnGThread__pnOCompilerThread__; text: .text%__1cOCompilerThread2t6MpnMCompileQdDueue_pnQCompilerCounters__v_; @@ -1570,10 +1503,7 @@ text: .text%__1cTjava_lang_ThrowableTfill_in_stack_trace6FnGHandle_pnGThread__v_ text: .text%__1cTjava_lang_ThrowableNset_backtrace6FpnHoopDesc_2_v_; text: .text%__1cTjava_lang_ThrowableQclear_stacktrace6FpnHoopDesc__v_; text: .text%__1cVPreserveExceptionMark2T6M_v_; -text: .text%__1cKExceptionsG_throw6FpnGThread_pkcinGHandle__v_; text: .text%__1cSInterpreterRuntimeXthrow_pending_exception6FpnKJavaThread__v_; -text: .text%__1cNSharedRuntimebKexception_handler_for_return_address6FpC_1_; -text: .text%__1cNSharedRuntimebOraw_exception_handler_for_return_address6FpC_1_; text: .text%__1cSInterpreterRuntimebFexception_handler_for_exception6FpnKJavaThread_pnHoopDesc__pC_; text: .text%__1cNmethodOopDescbEfast_exception_handler_bci_for6MnLKlassHandle_ipnGThread__i_; text: .text%__1cSInterpreterRuntimePset_bcp_and_mdp6FpCpnKJavaThread__v_; @@ -1588,7 +1518,6 @@ text: .text%__1cNCompileBrokerZinvoke_compiler_on_method6FpnLCompileTask__v_; text: .text%__1cNCompileBrokerVpush_jni_handle_block6F_v_; text: .text%__1cPciObjectFactory2t6MpnFArena_i_v_; text: .text%__1cPciObjectFactoryTinit_shared_objects6M_v_; -text: .text%__1cIciSymbol2t6MnMsymbolHandle__v_; text: .text%__1cIciObject2t6MnGHandle__v_; text: .text%__1cPciObjectFactoryEfind6MpnHoopDesc_pnNGrowableArray4CpnIciObject____i_; text: .text%__1cPciObjectFactoryNinit_ident_of6MpnIciObject__v_; @@ -1675,14 +1604,12 @@ text: .text%__1cOGenerateOopMapYrewrite_refval_conflicts6M_v_; text: .text%__1cOGenerateOopMapNreport_result6M_v_; text: .text%__1cLCompilationJbuild_hir6M_v_; text: .text%__1cCIR2t6MpnLCompilation_pnIciMethod_i_v_; -text: .text%__1cJValueTypeKinitialize6F_v_; text: .text%__1cMciNullObjectEmake6F_p0_; text: .text%__1cMGraphBuilderKinitialize6F_v_; text: .text%__1cJXHandlers2t6MpnIciMethod__v_; text: .text%__1cIciMethodJload_code6M_v_; text: .text%__1cHIRScopeLbuild_graph6MpnLCompilation_i_pnKBlockBegin__; text: .text%__1cQBlockListBuilderLset_leaders6M_v_; -text: .text%__1cKValueStack2t6MpnHIRScope_ii_v_; text: .text%__1cMGraphBuilderPpush_root_scope6MpnHIRScope_pnJBlockList_pnKBlockBegin__v_; text: .text%__1cMGraphBuilderJScopeDataJset_scope6MpnHIRScope__v_; text: .text%__1cIValueMap2t6M_v_; @@ -1690,7 +1617,6 @@ text: .text%__1cMGraphBuilderJScopeDataQadd_to_work_list6MpnKBlockBegin__v_; text: .text%__1cNResourceArrayGexpand6MIiri_v_; text: .text%__1cMGraphBuilderJScopeDataVremove_from_work_list6M_pnKBlockBegin__; text: .text%__1cIValueMapIkill_all6M_v_; -text: .text%__1cKValueStackEcopy6M_p0_; text: .text%__1cGValuesIpush_all6Mpk0_v_: c1_ValueStack.o; text: .text%__1cMGraphBuilderbBiterate_bytecodes_for_block6Mi_pnIBlockEnd__; text: .text%__1cMGraphBuilderJScopeDataIblock_at6Mi_pnKBlockBegin__; @@ -1709,8 +1635,6 @@ text: .text%__1cHciFieldPinitialize_from6MpnPfieldDescriptor__v_; text: .text%__1cMas_ValueType6FnJBasicType__pnJValueType__; text: .text%__1cMLinkResolverXresolve_klass_no_update6FrnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; text: .text%__1cTconstantPoolOopDescbCklass_ref_at_if_loaded_check6FnSconstantPoolHandle_ipnGThread__pnMklassOopDesc__; -text: .text%__1cMGraphBuilderKlock_stack6M_pnKValueStack__; -text: .text%__1cKValueStackKcopy_locks6M_p0_; text: .text%__1cJLoadFieldFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerMdo_LoadField6MpnJLoadField__v_; text: .text%__1cJLoadFieldEhash6kM_i_: c1_Instruction.o; @@ -1738,7 +1662,6 @@ text: .text%__1cMGraphBuilderNmethod_return6MpnLInstruction__v_; text: .text%__1cGReturnFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerJdo_Return6MpnGReturn__v_; text: .text%__1cGReturnJas_Return6M_p0_: c1_GraphBuilder.o; -text: .text%__1cKValueStackMcaller_state6kM_p0_; text: .text%__1cQSystemDictionarybOfind_constrained_instance_or_array_klass6FnMsymbolHandle_nGHandle_pnGThread__pnMklassOopDesc__; text: .text%__1cMGraphBuilderHif_same6MpnJValueType_nLInstructionJCondition__v_; text: .text%__1cNCanonicalizerNdo_StoreField6MpnKStoreField__v_; @@ -1781,24 +1704,17 @@ text: .text%__1cTNullCheckEliminatorLiterate_one6MpnKBlockBegin__v_; text: .text%__1cGBitMapIset_from6M0_v_; text: .text%__1cQNullCheckVisitorNdo_BlockBegin6MpnKBlockBegin__v_; text: .text%__1cQNullCheckVisitorHdo_Base6MpnEBase__v_; -text: .text%__1cKStateSplitPinput_values_do6MpFppnLInstruction__v_v_: c1_Canonicalizer.o; text: .text%__1cQNullCheckVisitorHdo_Goto6MpnEGoto__v_; -text: .text%__1cTNullCheckEliminatorIdo_value6FppnLInstruction__v_; -text: .text%__1cFLocalPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cFLocalFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorIdo_Local6MpnFLocal__v_; -text: .text%__1cLAccessFieldPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorMdo_LoadField6MpnJLoadField__v_; text: .text%__1cTNullCheckEliminatorShandle_AccessField6MpnLAccessField__v_; -text: .text%__1cCIfPinput_values_do6MpFppnLInstruction__v_v_: c1_Canonicalizer.o; -text: .text%__1cIConstantPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorLdo_Constant6MpnIConstant__v_; text: .text%__1cQNullCheckVisitorFdo_If6MpnCIf__v_; text: .text%__1cQNullCheckVisitorPdo_ArithmeticOp6MpnMArithmeticOp__v_; text: .text%__1cQNullCheckVisitorOdo_LoadIndexed6MpnLLoadIndexed__v_; text: .text%__1cTNullCheckEliminatorShandle_LoadIndexed6MpnLLoadIndexed__v_; text: .text%__1cQNullCheckVisitorNdo_StoreField6MpnKStoreField__v_; -text: .text%__1cGReturnPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorJdo_Return6MpnGReturn__v_; text: .text%__1cGBitMapQset_intersection6M0_v_; text: .text%__1cLInstructionJas_Invoke6M_pnGInvoke__: c1_Canonicalizer.o; @@ -1811,11 +1727,7 @@ text: .text%__1cKStateSplitFscope6kM_pnHIRScope__; text: .text%__1cIBlockEndOsubstitute_sux6MpnKBlockBegin_2_v_; text: .text%__1cCIRMcompute_code6M_v_; text: .text%__1cJBlockListJblocks_do6MpFpnKBlockBegin__v_v_; -text: .text%__1cQUseCountComputerXbasic_compute_use_count6FpnKBlockBegin__v_: c1_IR.o; -text: .text%__1cQUseCountComputerQupdate_use_count6FppnLInstruction__v_: c1_IR.o; text: .text%__1cFLocalIas_Local6M_p0_: c1_GraphBuilder.o; -text: .text%__1cKStateSplitPstate_values_do6MpFppnLInstruction__v_v_; -text: .text%__1cKValueStackJvalues_do6MpFppnLInstruction__v_v_; text: .text%__1cLCompilationIemit_lir6M_v_; text: .text%__1cLInstructionGas_Phi6M_pnDPhi__: c1_Canonicalizer.o; text: .text%__1cMas_BasicType6FpnJValueType__nJBasicType__; @@ -1888,14 +1800,11 @@ text: .text%__1cLOopRecorderIoop_size6M_i_; text: .text%__1cYDebugInformationRecorderIpcs_size6M_i_; text: .text%__1cYDebugInformationRecorderJdata_size6M_i_; text: .text%__1cHnmethod2n6FIi_pv_; -text: .text%__1cHnmFlagsFclear6M_v_; text: .text%__1cYDebugInformationRecorderHcopy_to6MpnHnmethod__v_; -text: .text%__1cLOopRecorderHcopy_to6MpnICodeBlob__v_; text: .text%__1cIUniverseMnon_oop_word6F_pv_; text: .text%__1cHnmethodQcopy_scopes_data6MpCi_v_; text: .text%__1cGPcDesc2t6Miii_v_; text: .text%__1cJCodeCacheGcommit6FpnICodeBlob__v_; -text: .text%__1cFVTuneOcreate_nmethod6FpnHnmethod__v_; text: .text%__1cWImplicitExceptionTableHcopy_to6MpnHnmethod__v_; text: .text%__1cKNativeJumpbEcheck_verified_entry_alignment6FpC1_v_; text: .text%__1cFciEnvKcompile_id6M_I_; @@ -1938,8 +1847,6 @@ text: .text%__1cNCanonicalizerOdo_NewInstance6MpnLNewInstance__v_; text: .text%__1cKValueStackMclear_locals6M_v_; text: .text%__1cMGraphBuilderIstack_op6MnJBytecodesECode__v_; text: .text%__1cMGraphBuilderGinvoke6MnJBytecodesECode__v_; -text: .text%__1cFciEnvTget_method_by_index6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; -text: .text%__1cFciEnvYget_method_by_index_impl6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; text: .text%__1cFciEnvbTget_instance_klass_for_declared_method_holder6FpnHciKlass__pnPciInstanceKlass__; text: .text%__1cPciObjectFactoryTget_unloaded_method6MpnPciInstanceKlass_pnIciSymbol_4_pnIciMethod__; text: .text%__1cIciMethod2t6MpnPciInstanceKlass_pnIciSymbol_4_v_; @@ -1951,18 +1858,13 @@ text: .text%__1cKValueStackNpop_arguments6Mi_pnGValues__; text: .text%__1cGInvokeFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerJdo_Invoke6MpnGInvoke__v_; text: .text%__1cGInvokeJas_Invoke6M_p0_: c1_Instruction.o; -text: .text%__1cFThrowFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerIdo_Throw6MpnFThrow__v_; -text: .text%__1cFThrowIas_Throw6M_p0_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorOdo_NewInstance6MpnLNewInstance__v_; text: .text%__1cTNullCheckEliminatorShandle_NewInstance6MpnLNewInstance__v_; -text: .text%__1cGInvokePinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorJdo_Invoke6MpnGInvoke__v_; text: .text%__1cTNullCheckEliminatorNhandle_Invoke6MpnGInvoke__v_; -text: .text%__1cFThrowPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorIdo_Throw6MpnFThrow__v_; text: .text%__1cLInstructionGnegate6Fn0AJCondition__1_; -text: .text%__1cFThrowPstate_values_do6MpFppnLInstruction__v_v_; text: .text%__1cIVoidTypeLas_VoidType6M_p0_: c1_ValueType.o; text: .text%__1cLNewInstanceKexact_type6kM_pnGciType__; text: .text%__1cLNewInstanceOas_NewInstance6M_p0_: c1_Instruction.o; @@ -1975,7 +1877,6 @@ text: .text%__1cPNewInstanceStubEinfo6kM_pnMCodeEmitInfo__: c1_CodeStubs_x86.o; text: .text%__1cNLIR_AssemblerJemit_call6MpnOLIR_OpJavaCall__v_; text: .text%__1cNLIR_AssemblerKalign_call6MnILIR_Code__v_; text: .text%__1cICodeStubEinfo6kM_pnMCodeEmitInfo__: c1_CodeStubs_x86.o; -text: .text%__1cNLIR_AssemblerEcall6MpCnJrelocInfoJrelocType_pnMCodeEmitInfo__v_; text: .text%__1cbBopt_virtual_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cYinternal_word_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cJrelocInfoKset_format6Mi_v_; @@ -2021,9 +1922,6 @@ text: .text%__1cMGraphBuilderUclear_inline_bailout6M_v_; text: .text%__1cMGraphBuilderWrecursive_inline_level6kMpnIciMethod__i_; text: .text%__1cPciObjectFactoryMvm_symbol_at6Fi_pnIciSymbol__; text: .text%__1cNCanonicalizerMdo_NullCheck6MpnJNullCheck__v_; -text: .text%__1cKValueStackKpush_scope6MpnHIRScope__p0_; -text: .text%__1cHIRScopeXcompute_lock_stack_size6M_v_; -text: .text%__1cMGraphBuilderJScopeDataRcaller_stack_size6kM_i_; text: .text%__1cMGraphBuilderJScopeDataLnum_returns6M_i_; text: .text%__1cMGraphBuilderJScopeDataXset_inline_cleanup_info6MpnKBlockBegin_pnLInstruction_pnKValueStack__v_; text: .text%__1cMGraphBuilderJScopeDataQincr_num_returns6M_v_; @@ -2033,12 +1931,8 @@ text: .text%__1cFciEnvVnotice_inlined_method6MpnIciMethod__v_; text: .text%__1cMLinkResolverbCresolve_special_call_or_null6FnLKlassHandle_nMsymbolHandle_21_nMmethodHandle__; text: .text%__1cMGraphBuilderOinline_bailout6Mpkc_v_; text: .text%__1cLInstructionEprev6MpnKBlockBegin__p0_; -text: .text%__1cKBlockBeginPblock_values_do6MpFppnLInstruction__v_v_; -text: .text%__1cIConstantPother_values_do6MpFppnLInstruction__v_v_; -text: .text%__1cIBlockEndPother_values_do6MpFppnLInstruction__v_v_; text: .text%__1cQNullCheckVisitorMdo_NullCheck6MpnJNullCheck__v_; text: .text%__1cTNullCheckEliminatorQhandle_NullCheck6MpnJNullCheck__v_; -text: .text%__1cHIRScopeNtop_scope_bci6kM_i_; text: .text%__1cNSharedRuntimeQfind_callee_info6FpnKJavaThread_rnJBytecodesECode_rnICallInfo_pnGThread__nGHandle__; text: .text%__1cGPcDescHreal_pc6kMpknHnmethod__pC_; text: .text%__1cLPcDescCacheLadd_pc_desc6MpnGPcDesc__v_; @@ -2055,14 +1949,11 @@ text: .text%__1cKNativeCallXset_destination_mt_safe6MpC_v_; text: .text%__1cNmethodOopDescTverified_code_entry6M_pC_; text: .text%jni_GetByteArrayRegion: jni.o; text: .text%JVM_DefineClassWithSource; -text: .text%__1cXjvm_define_class_common6FpnHJNIEnv__pkcpnI_jobject_pkWi53pnGThread__pnH_jclass__: jvm.o; -text: .text%__1cQSystemDictionaryTresolve_from_stream6FnMsymbolHandle_nGHandle_2pnPClassFileStream_pnGThread__pnMklassOopDesc__; text: .text%__1cPClassFileParserbDverify_legal_method_signature6MnMsymbolHandle_1pnGThread__i_; text: .text%__1cPClassFileParserXverify_legal_class_name6MnMsymbolHandle_pnGThread__v_; text: .text%__1cQSystemDictionarybAvalidate_protection_domain6FnTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cKDictionaryVadd_protection_domain6MiInTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cPDictionaryEntryVadd_protection_domain6MpnHoopDesc__v_; -text: .text%__1cUverify_byte_codes_fn6F_pv_: verifier.o; text: .text%JVM_GetClassCPEntriesCount; text: .text%JVM_GetClassCPTypes; text: .text%JVM_GetClassNameUTF; @@ -2124,7 +2015,6 @@ text: .text%__1cIOSThread2T6M_v_; text: .text%__1cIOSThreadKpd_destroy6M_v_; text: .text%jni_DestroyJavaVM; text: .text%jni_AttachCurrentThread; -text: .text%attach_current_thread: jni.o; text: .text%__1cKJavaThreadVinvoke_shutdown_hooks6M_v_; text: .text%__1cLbefore_exit6FpnKJavaThread__v_; text: .text%__1cNWatcherThreadEstop6F_v_; @@ -2139,7 +2029,6 @@ text: .text%__1cCosXterminate_signal_thread6F_v_; text: .text%__1cCosNsigexitnum_pd6F_i_; text: .text%__1cCosNsignal_notify6Fi_v_; text: .text%__1cQprint_statistics6F_v_; -text: .text%__1cFVTuneEexit6F_v_; text: .text%__1cIVMThreadXwait_for_vm_thread_exit6F_v_; text: .text%__1cUSafepointSynchronizeFbegin6F_v_; text: .text%__1cORuntimeServiceWrecord_safepoint_begin6F_v_; @@ -2158,7 +2047,6 @@ text: .text%__1cQSystemDictionaryRnumber_of_classes6F_i_; text: .text%__1cQSystemDictionaryStry_get_next_class6F_pnMklassOopDesc__; text: .text%__1cKDictionaryStry_get_next_class6M_pnMklassOopDesc__; text: .text%__1cNinstanceKlassKmethods_do6MpFpnNmethodOopDesc__v_v_; -text: .text%__1cONMethodSweeperFsweep6F_v_; text: .text%__1cNCompileBrokerQset_should_block6F_v_; text: .text%__1cHVM_ExitbJwait_for_threads_in_native_to_block6F_i_; text: .text%__1cIVMThreadHdestroy6F_v_; @@ -2171,8 +2059,6 @@ text: .text%__1cPPerfDataManagerHdestroy6F_v_; text: .text%__1cIPerfData2T6M_v_; text: .text%__1cKPerfMemoryHdestroy6F_v_; text: .text%__1cKPerfMemoryUdelete_memory_region6F_v_; -text: .text%__1cUdelete_shared_memory6FpcI_v_: perfMemory_solaris.o; -text: .text%__1cLremove_file6Fpkc_v_: perfMemory_solaris.o; text: .text%__1cMostream_exit6F_v_; text: .text%__SLIP.DELETER__C: ostream.o; text: .text%JVM_Halt; @@ -2206,14 +2092,10 @@ text: .text%jni_IsAssignableFrom: jni.o; text: .text%__1cOGenerateOopMapGdo_ldc6Mii_v_; text: .text%__1cQComputeCallStackIdo_array6Mii_v_: generateOopMap.o; text: .text%__1cMGraphBuilderNload_constant6M_v_; -text: .text%__1cQciBytecodeStreamSget_constant_index6kM_i_; -text: .text%__1cFciEnvVget_constant_by_index6MpnPciInstanceKlass_i_nKciConstant__; -text: .text%__1cFciEnvbAget_constant_by_index_impl6MpnPciInstanceKlass_i_nKciConstant__; text: .text%__1cMLinkResolverbBresolve_static_call_or_null6FnLKlassHandle_nMsymbolHandle_21_nMmethodHandle__; text: .text%__1cJValueTypeLas_VoidType6M_pnIVoidType__: c1_Canonicalizer.o; text: .text%__1cWstatic_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cRComputeEntryStackIdo_array6Mii_v_: generateOopMap.o; -text: .text%__1cEIfOpPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cEIfOpFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorHdo_IfOp6MpnEIfOp__v_; text: .text%__1cOGenerateOopMapMdo_checkcast6M_v_; @@ -2223,12 +2105,10 @@ text: .text%__1cNCanonicalizerNdo_InstanceOf6MpnKInstanceOf__v_; text: .text%__1cKInstanceOfNas_InstanceOf6M_p0_: c1_GraphBuilder.o; text: .text%__1cMGraphBuilderKcheck_cast6Mi_v_; text: .text%__1cNCanonicalizerMdo_CheckCast6MpnJCheckCast__v_; -text: .text%__1cJTypeCheckPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorNdo_InstanceOf6MpnKInstanceOf__v_; text: .text%__1cQNullCheckVisitorMdo_CheckCast6MpnJCheckCast__v_; text: .text%__1cTSimpleExceptionStubFvisit6MpnQLIR_OpVisitState__v_: c1_CodeStubs_x86.o; text: .text%__1cNLIR_AssemblerQemit_opTypeCheck6MpnPLIR_OpTypeCheck__v_; -text: .text%__1cIciObjectIencoding6M_pnI_jobject__; text: .text%__1cTSimpleExceptionStubEinfo6kM_pnMCodeEmitInfo__: c1_CodeStubs_x86.o; text: .text%__1cTSimpleExceptionStubJemit_code6MpnNLIR_Assembler__v_; text: .text%__1cJLoadFieldMas_LoadField6M_p0_: c1_Instruction.o; @@ -2266,8 +2146,6 @@ text: .text%__1cHConvertEname6kM_pkc_: c1_GraphBuilder.o; text: .text%__1cMGraphBuilderNstore_indexed6MnJBasicType__v_; text: .text%__1cIValueMapKkill_array6MpnJValueType__v_; text: .text%__1cNCanonicalizerPdo_StoreIndexed6MpnMStoreIndexed__v_; -text: .text%__1cLAccessFieldPother_values_do6MpFppnLInstruction__v_v_; -text: .text%__1cHConvertPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorKdo_LogicOp6MpnHLogicOp__v_; text: .text%__1cQNullCheckVisitorKdo_Convert6MpnHConvert__v_; text: .text%__1cQNullCheckVisitorPdo_StoreIndexed6MpnMStoreIndexed__v_; @@ -2294,10 +2172,8 @@ text: .text%__1cMGraphBuilderOnew_type_array6M_v_; text: .text%__1cMNewTypeArrayFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerPdo_NewTypeArray6MpnMNewTypeArray__v_; text: .text%__1cNCanonicalizerMdo_Intrinsic6MpnJIntrinsic__v_; -text: .text%__1cLAccessArrayPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorOdo_ArrayLength6MpnLArrayLength__v_; text: .text%__1cTNullCheckEliminatorShandle_ArrayLength6MpnLArrayLength__v_; -text: .text%__1cINewArrayPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorPdo_NewTypeArray6MpnMNewTypeArray__v_; text: .text%__1cTNullCheckEliminatorPhandle_NewArray6MpnINewArray__v_; text: .text%__1cQNullCheckVisitorMdo_Intrinsic6MpnJIntrinsic__v_; @@ -2309,7 +2185,6 @@ text: .text%__1cMNewTypeArrayKexact_type6kM_pnGciType__; text: .text%__1cLArrayLengthOas_ArrayLength6M_p0_: c1_GraphBuilder.o; text: .text%__1cILIR_ListUunsigned_shift_right6MpnLLIR_OprDesc_222_v_; text: .text%__1cQNewTypeArrayStubFvisit6MpnQLIR_OpVisitState__v_: c1_CodeStubs_x86.o; -text: .text%__1cNLIR_AssemblerHic_call6MpCpnMCodeEmitInfo__v_; text: .text%__1cXvirtual_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cNLIR_AssemblerQemit_alloc_array6MpnQLIR_OpAllocArray__v_; text: .text%__1cNLIR_AssemblerSarray_element_size6kMnJBasicType__nHAddressLScaleFactor__; @@ -2335,8 +2210,6 @@ text: .text%__1cRInlineCacheBufferLnew_ic_stub6F_pnGICStub__; text: .text%JVM_NewArray; text: .text%__1cKReflectionRreflect_new_array6FpnHoopDesc_ipnGThread__pnMarrayOopDesc__; text: .text%__1cSInterpreterRuntimeOmultianewarray6FpnKJavaThread_pi_v_; -text: .text%__1cNinstanceKlassSlookup_osr_nmethod6kMkpnNmethodOopDesc_i_pnHnmethod__; -text: .text%__1cQSimpleCompPolicyYmethod_back_branch_event6MnMmethodHandle_iipnGThread__v_; text: .text%__1cMGraphBuilderQnew_object_array6M_v_; text: .text%__1cONewObjectArrayFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerRdo_NewObjectArray6MpnONewObjectArray__v_; @@ -2349,7 +2222,6 @@ text: .text%__1cHShiftOpEhash6kM_i_: c1_GraphBuilder.o; text: .text%__1cHShiftOpEname6kM_pkc_: c1_GraphBuilder.o; text: .text%__1cLLoadIndexedOas_LoadIndexed6M_p0_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorRdo_NewObjectArray6MpnONewObjectArray__v_; -text: .text%__1cDOp2Pinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorKdo_ShiftOp6MpnHShiftOp__v_; text: .text%__1cHciKlassMaccess_flags6M_i_; text: .text%__1cPciObjArrayKlassEmake6FpnHciKlass__p0_; @@ -2413,7 +2285,6 @@ text: .text%__1cQDefNewGenerationTallocate_from_space6MI_pnIHeapWord__; text: .text%__1cPVM_GC_OperationZacquire_pending_list_lock6M_v_; text: .text%__1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_; text: .text%__1cbAVM_GenCollectForAllocationEdoit6M_v_; -text: .text%__1cPGCMemoryManagerIgc_begin6M_v_; text: .text%__1cKManagementJtimestamp6F_x_; text: .text%__1cTContiguousSpacePoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cTContiguousSpacePoolNused_in_bytes6M_I_: memoryPool.o; @@ -2441,11 +2312,7 @@ text: .text%__1cKSharedHeapbAchange_strong_roots_parity6M_v_; text: .text%__1cPFastScanClosureGdo_oop6MppnHoopDesc__v_: defNewGeneration.o; text: .text%__1cKJNIHandlesHoops_do6FpnKOopClosure__v_; text: .text%__1cOJNIHandleBlockHoops_do6MpnKOopClosure__v_; -text: .text%__1cHThreadsHoops_do6FpnKOopClosure__v_; -text: .text%__1cKJavaThreadHoops_do6MpnKOopClosure__v_; -text: .text%__1cGThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cKHandleAreaHoops_do6MpnKOopClosure__v_; -text: .text%__1cNchunk_oops_do6FpnKOopClosure_pnFChunk_pc_I_: handles.o; text: .text%__1cFframeVinterpreter_frame_bci6kM_i_; text: .text%__1cFframebDinterpreter_frame_monitor_end6kM_pnPBasicObjectLock__; text: .text%__1cFframebFinterpreter_frame_monitor_begin6kM_pnPBasicObjectLock__; @@ -2483,7 +2350,6 @@ text: .text%__1cQComputeCallStackHdo_long6M_v_: generateOopMap.o; text: .text%__1cOGenerateOopMapOdo_monitorexit6Mi_v_; text: .text%__1cOGenerateOopMapLmonitor_pop6M_nNCellTypeState__; text: .text%__1cRComputeEntryStackHdo_long6M_v_: generateOopMap.o; -text: .text%__1cIVMThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cQVMOperationQdDueueHoops_do6MpnKOopClosure__v_; text: .text%__1cQVMOperationQdDueueNqueue_oops_do6MipnKOopClosure__v_; text: .text%__1cSObjectSynchronizerHoops_do6FpnKOopClosure__v_; @@ -2584,7 +2450,6 @@ text: .text%__1cUGenGCEpilogueClosureNdo_generation6MpnKGeneration__v_: genColle text: .text%__1cRTenuredGenerationPupdate_counters6M_v_; text: .text%__1cUCompactingPermGenGenPupdate_counters6M_v_; text: .text%__1cXTraceMemoryManagerStats2T6M_v_; -text: .text%__1cPGCMemoryManagerGgc_end6M_v_; text: .text%__1cRLowMemoryDetectorWdetect_after_gc_memory6FpnKMemoryPool__v_; text: .text%__1cNJvmtiGCMarker2T6M_v_; text: .text%__1cPVM_GC_OperationNdoit_epilogue6M_v_; @@ -2597,7 +2462,6 @@ text: .text%jni_PopLocalFrame: jni.o; text: .text%__1cMGraphBuilderJnegate_op6MpnJValueType__v_; text: .text%__1cINegateOpFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerLdo_NegateOp6MpnINegateOp__v_; -text: .text%__1cINegateOpPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorLdo_NegateOp6MpnINegateOp__v_; text: .text%__1cILIR_ListLstore_check6MpnLLIR_OprDesc_2222pnMCodeEmitInfo__v_; text: .text%__1cXArrayStoreExceptionStub2t6MpnMCodeEmitInfo__v_; @@ -2637,7 +2501,6 @@ text: .text%__1cYjava_lang_reflect_MethodLreturn_type6FpnHoopDesc__2_; text: .text%JVM_IsInterrupted; text: .text%__1cTresource_free_bytes6FpcI_v_; text: .text%__1cRComputeEntryStackHdo_bool6M_v_: generateOopMap.o; -text: .text%__1cMArithmeticOpKlock_stack6kM_pnKValueStack__: c1_Instruction.o; text: .text%__1cJAssemblerGfist_s6MnHAddress__v_; text: .text%__1cNLIR_AssemblerJreset_FPU6M_v_; text: .text%__1cNLIR_AssemblerIemit_op36MpnHLIR_Op3__v_; @@ -2659,7 +2522,6 @@ text: .text%__1cUBytecode_tableswitchOdest_offset_at6kMi_i_; text: .text%__1cMGraphBuilderMtable_switch6M_v_; text: .text%__1cLTableSwitchFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerOdo_TableSwitch6MpnLTableSwitch__v_; -text: .text%__1cGSwitchPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorOdo_TableSwitch6MpnLTableSwitch__v_; text: .text%__1cWstatic_call_RelocationLstatic_stub6M_pC_; text: .text%__1cSCompiledStaticCallMset_to_clean6M_v_; @@ -2672,7 +2534,6 @@ text: .text%__1cNFingerprinterHdo_byte6M_v_: dump.o; text: .text%Unsafe_SetMemory; text: .text%__1cNSharedRuntimeElrem6Fxx_x_; text: .text%Unsafe_DefineClass1; -text: .text%__1cSUnsafe_DefineClass6FpnHJNIEnv__pnI_jstring_pnL_jbyteArray_iipnI_jobject_7_pnH_jclass__: unsafe.o; text: .text%JVM_DefineClass; text: .text%__1cVLoaderConstraintTableYextend_loader_constraint6MpnVLoaderConstraintEntry_nGHandle_pnMklassOopDesc__v_; text: .text%__1cVLoaderConstraintTablebHensure_loader_constraint_capacity6MpnVLoaderConstraintEntry_i_v_; @@ -2680,7 +2541,6 @@ text: .text%__1cIRuntime1Tprimitive_arraycopy6FpnIHeapWord_2i_v_; text: .text%__1cRComputeEntryStackHdo_char6M_v_: generateOopMap.o; text: .text%jni_NewDirectByteBuffer; text: .text%lookupDirectBufferClasses: jni.o; -text: .text%__1cJlookupOne6FpnHJNIEnv__pkcpnGThread__pnH_jclass__: jni.o; text: .text%__1cHJNIEnv_JNewObject6MpnH_jclass_pnK_jmethodID_E_pnI_jobject__: jni.o; text: .text%jni_GetDoubleArrayRegion: jni.o; text: .text%__1cNSignatureInfoJdo_double6M_v_: bytecode.o; @@ -2701,7 +2561,6 @@ text: .text%JVM_GetCPFieldModifiers; text: .text%__1cPClassFileParserUverify_constantvalue6MiinSconstantPoolHandle_pnGThread__v_; text: .text%JVM_MonitorNotify; text: .text%__1cSObjectSynchronizerGnotify6FnGHandle_pnGThread__v_; -text: .text%__1cKValueStackElock6MpnHIRScope_pnLInstruction__i_; text: .text%__1cKValueStackGunlock6M_i_; text: .text%__1cQMonitorEnterStubFvisit6MpnQLIR_OpVisitState__v_: c1_CodeStubs_x86.o; text: .text%__1cNLIR_AssemblerJemit_lock6MpnKLIR_OpLock__v_; @@ -2726,8 +2585,6 @@ text: .text%__1cbCOneContigSpaceCardGenerationLused_region6kM_nJMemRegion__; text: .text%__1cMGenMarkSweepPallocate_stacks6F_v_; text: .text%__1cQGenCollectedHeapOgather_scratch6MpnKGeneration_I_pnMScratchBlock__; text: .text%__1cQDefNewGenerationScontribute_scratch6MrpnMScratchBlock_pnKGeneration_I_v_; -text: .text%__1cRsort_scratch_list6FrpnMScratchBlock__v_: genCollectedHeap.o; -text: .text%__1cVremoveSmallestScratch6FppnMScratchBlock__1_: genCollectedHeap.o; text: .text%__1cJMarkSweepRFollowRootClosureGdo_oop6MppnHoopDesc__v_: markSweep.o; text: .text%__1cParrayKlassKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cLklassVtableToop_follow_contents6M_v_; @@ -2784,12 +2641,6 @@ text: .text%__1cbCOneContigSpaceCardGenerationWfirst_compaction_space6kM_pnQComp text: .text%__1cMGenMarkSweepRmark_sweep_phase36Fi_v_; text: .text%__1cUCompactingPermGenGenTpre_adjust_pointers6M_v_; text: .text%__1cJMarkSweepUAdjustPointerClosureGdo_oop6MppnHoopDesc__v_: markSweep.o; -text: .text%__1cJCodeCacheHoops_do6FpnKOopClosure__v_; -text: .text%__1cKBufferBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cSDeoptimizationBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cLRuntimeStubHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cNSafepointBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cHnmethodHoops_do6MpnKOopClosure__v_; text: .text%__1cJHashtableHoops_do6MpnKOopClosure__v_; text: .text%__1cJMarkSweepMadjust_marks6F_v_; text: .text%__1cYGenAdjustPointersClosureNdo_generation6MpnKGeneration__v_: genMarkSweep.o; @@ -2840,7 +2691,6 @@ text: .text%Unsafe_CompareAndSwapObject; text: .text%__1cMLinkResolverbEvtable_index_of_miranda_method6FnLKlassHandle_nMsymbolHandle_2pnGThread__i_; text: .text%__1cLklassVtableQindex_of_miranda6MpnNsymbolOopDesc_2_i_; text: .text%__1cRPrivilegedElementHoops_do6MpnKOopClosure__v_; -text: .text%__1cFframeRoops_code_blob_do6MpnKOopClosure_pknLRegisterMap__v_; text: .text%__1cMOopMapStream2t6MpnGOopMap_i_v_; text: .text%__1cQComputeCallStackIdo_float6M_v_: generateOopMap.o; text: .text%jni_DeleteWeakGlobalRef: jni.o; @@ -2849,7 +2699,6 @@ text: .text%JVM_IsSameClassPackage; text: .text%__1cNCanonicalizerPdo_MonitorEnter6MpnMMonitorEnter__v_; text: .text%__1cLMonitorExitFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerOdo_MonitorExit6MpnLMonitorExit__v_; -text: .text%__1cNAccessMonitorPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorPdo_MonitorEnter6MpnMMonitorEnter__v_; text: .text%__1cTNullCheckEliminatorUhandle_AccessMonitor6MpnNAccessMonitor__v_; text: .text%__1cQNullCheckVisitorOdo_MonitorExit6MpnLMonitorExit__v_; @@ -2867,7 +2716,6 @@ text: .text%Unsafe_AllocateInstance; text: .text%jni_AllocObject: jni.o; text: .text%__1cQinstanceRefKlassUoop_oop_iterate_nv_m6MpnHoopDesc_pnQFilteringClosure_nJMemRegion__i_; text: .text%__1cNCanonicalizerMset_constant6Mi_v_: c1_Canonicalizer.o; -text: .text%__1cJTypeCheckPother_values_do6MpFppnLInstruction__v_v_; text: .text%__1cNLIR_AssemblerMcheck_icache6M_i_; text: .text%__1cNLIR_AssemblerZjobject2reg_with_patching6MpnMRegisterImpl_pnMCodeEmitInfo__v_; text: .text%__1cIRuntime1Mnew_instance6FpnKJavaThread_pnMklassOopDesc__v_; @@ -2878,7 +2726,6 @@ text: .text%__1cNFloatConstantQas_FloatConstant6M_p0_: c1_Canonicalizer.o; text: .text%__1cJFloatTypeMas_FloatType6M_p0_: c1_Canonicalizer.o; text: .text%__1cRAbstractAssemblerGa_long6Mi_v_; text: .text%__1cNObjectMonitorGnotify6MpnGThread__v_; -text: .text%__1cINewArrayPother_values_do6MpFppnLInstruction__v_v_; text: .text%__1cIRuntime1Mmonitorenter6FpnKJavaThread_pnHoopDesc_pnPBasicObjectLock__v_; text: .text%__1cIRuntime1Lmonitorexit6FpnKJavaThread_pnPBasicObjectLock__v_; text: .text%__1cNVM_DeoptimizeEdoit6M_v_; @@ -2887,14 +2734,8 @@ text: .text%__1cHThreadsbFdeoptimized_wrt_marked_nmethods6F_v_; text: .text%__1cKJavaThreadbFdeoptimized_wrt_marked_nmethods6M_v_; text: .text%__1cJCodeCachebGmake_marked_nmethods_not_entrant6F_v_; text: .text%__1cJCodeCacheNalive_nmethod6FpnICodeBlob__pnHnmethod__; -text: .text%__1cHnmethodbAmake_not_entrant_or_zombie6Mi_v_; text: .text%__1cKNativeJumpUpatch_verified_entry6FpC11_v_; text: .text%__1cHnmethodVmark_as_seen_on_stack6M_v_; -text: .text%__1cHThreadsLnmethods_do6F_v_; -text: .text%__1cKJavaThreadLnmethods_do6M_v_; -text: .text%__1cGThreadLnmethods_do6M_v_; -text: .text%__1cFframeLnmethods_do6M_v_; -text: .text%__1cFframeVnmethods_code_blob_do6M_v_; text: .text%__1cONMethodSweeperPprocess_nmethod6FpnHnmethod__v_; text: .text%__1cHnmethodVcleanup_inline_caches6M_v_; text: .text%__1cKCompiledIC2t6MpnKRelocation__v_; @@ -2902,14 +2743,9 @@ text: .text%JVM_HoldsLock; text: .text%__1cTMaskFillerForNativeIpass_int6M_v_: oopMapCache.o; text: .text%__1cNSharedRuntimeDf2l6Ff_x_; text: .text%__1cMGraphBuilderKcompare_op6MpnJValueType_nJBytecodesECode__v_; -text: .text%__1cJCompareOpFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerMdo_CompareOp6MpnJCompareOp__v_; -text: .text%__1cJCompareOpEhash6kM_i_: c1_Instruction.o; -text: .text%__1cJCompareOpEname6kM_pkc_: c1_Instruction.o; -text: .text%__1cJCompareOpMas_CompareOp6M_p0_: c1_Instruction.o; text: .text%__1cHnmethodSflush_dependencies6MpnRBoolObjectClosure__v_; text: .text%__1cNinstanceKlassYremove_dependent_nmethod6MpnHnmethod__v_; -text: .text%__1cFVTuneOdelete_nmethod6FpnHnmethod__v_; text: .text%__1cQPlaceholderEntryHoops_do6MpnKOopClosure__v_; text: .text%__1cHnmethodFflush6M_v_; text: .text%__1cICodeBlobFflush6M_v_; @@ -2951,9 +2787,7 @@ text: .text%__1cNCanonicalizerPdo_UnsafeGetRaw6MpnMUnsafeGetRaw__v_; text: .text%__1cMGraphBuilderNlookup_switch6M_v_; text: .text%__1cMLookupSwitchFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerPdo_LookupSwitch6MpnMLookupSwitch__v_; -text: .text%__1cMUnsafePutRawPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorPdo_UnsafePutRaw6MpnMUnsafePutRaw__v_; -text: .text%__1cLUnsafeRawOpPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorPdo_UnsafeGetRaw6MpnMUnsafeGetRaw__v_; text: .text%__1cQNullCheckVisitorPdo_LookupSwitch6MpnMLookupSwitch__v_; text: .text%__1cNSharedRuntimeEldiv6Fxx_x_; diff --git a/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc b/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc index 541227310a6..45c02b4e690 100644 --- a/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc +++ b/hotspot/make/solaris/makefiles/reorder_COMPILER1_sparc @@ -135,7 +135,6 @@ text: .text%__1cNThreadServiceEinit6F_v_; text: .text%__1cPPerfDataManagerTcreate_long_counter6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnPPerfLongCounter__; text: .text%__1cORuntimeServiceEinit6F_v_; text: .text%__1cTClassLoadingServiceEinit6F_v_; -text: .text%__1cKvtune_init6F_v_; text: .text%__1cObytecodes_init6F_v_; text: .text%__1cJBytecodesKinitialize6F_v_; text: .text%__1cJBytecodesNpd_initialize6F_v_; @@ -181,9 +180,7 @@ text: .text%__1cKMemoryPoolYrecord_peak_memory_usage6M_v_; text: .text%__1cMCodeHeapPoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cMCodeHeapPoolNused_in_bytes6M_I_: memoryPool.o; text: .text%__1cICodeHeapSallocated_capacity6kM_I_; -text: .text%__1cKMemoryPoolImax_size6kM_I_: memoryPool.o; text: .text%__1cXresource_allocate_bytes6FI_pc_; -text: .text%__1cKCodeBuffer2t6MpCi_v_; text: .text%__1cRAbstractAssembler2t6MpnKCodeBuffer__v_; text: .text%__1cTICacheStubGeneratorVgenerate_icache_flush6MppFpCii_i_v_; text: .text%__1cMStubCodeMark2t6MpnRStubCodeGenerator_pkc4_v_; @@ -194,7 +191,6 @@ text: .text%__1cMStubCodeMark2T6M_v_; text: .text%__1cRAbstractAssemblerFflush6M_v_; text: .text%__1cOAbstractICacheQinvalidate_range6FpCi_v_; text: .text%__1cRStubCodeGeneratorLstub_epilog6MpnMStubCodeDesc__v_; -text: .text%__1cFVTuneNregister_stub6FpkcpC3_v_; text: .text%__1cFForteNregister_stub6FpkcpC3_v_; text: .text%__1cPVM_Version_init6F_v_; text: .text%jio_snprintf; @@ -314,10 +310,8 @@ text: .text%__1cLReadClosureGdo_ptr6MppnIHeapWord__v_: restore.o; text: .text%__1cLReadClosureGdo_ptr6Mppv_v_: restore.o; text: .text%__1cLReadClosureJdo_size_t6MpI_v_: restore.o; text: .text%__1cLReadClosureGdo_oop6MppnHoopDesc__v_: restore.o; -text: .text%__1cJCodeCacheHoops_do6FpnKOopClosure__v_; text: .text%__1cICodeHeapLfirst_block6kM_pnJHeapBlock__; text: .text%__1cICodeHeapJnext_free6kMpnJHeapBlock__pv_; -text: .text%__1cKBufferBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cICodeHeapLblock_start6kMpv_pnJHeapBlock__; text: .text%__1cICodeHeapKfind_start6kMpv_1_; text: .text%__1cICodeHeapKnext_block6kMpnJHeapBlock__2_; @@ -334,7 +328,6 @@ text: .text%__1cbCAbstractInterpreterGenerator2t6MpnJStubQdDueue__v_; text: .text%__1cbCAbstractInterpreterGeneratorMgenerate_all6M_v_; text: .text%__1cJStubQdDueueHrequest6Mi_pnEStub__; text: .text%__1cJStubQdDueueGcommit6Mi_v_; -text: .text%__1cZInterpreterMacroAssemblerbAget_cache_and_index_at_bcp6MpnMRegisterImpl_2i_v_; text: .text%__1cZInterpreterMacroAssemblerZget_2_byte_integer_at_bcp6MipnMRegisterImpl_2n0ALsignedOrNot_n0AKsetCCOrNot__v_; text: .text%__1cZInterpreterMacroAssemblerNdispatch_next6MnITosState_i_v_; text: .text%__1cOMacroAssemblerKverify_FPU6Mipkc_v_; @@ -357,7 +350,6 @@ text: .text%__1cZInterpreterMacroAssemblerNunlock_object6MpnMRegisterImpl__v_; text: .text%__1cQRelocationHolderEplus6kMi_0_; text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpnMRegisterImpl_pC222_v_; text: .text%__1cOMacroAssemblerNset_vm_result6MpnMRegisterImpl__v_; -text: .text%__1cZInterpreterMacroAssemblerSsuper_call_VM_leaf6MpnMRegisterImpl_pC2_v_; text: .text%__1cOMacroAssemblerRcall_VM_leaf_base6MpnMRegisterImpl_pCi_v_; text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_method_entry6MnTAbstractInterpreterKMethodKind__pC_; text: .text%__1cUInterpreterGeneratorVgenerate_counter_incr6MpnFLabel_22_v_; @@ -513,7 +505,6 @@ text: .text%__1cZInterpreterMacroAssemblerWprofile_switch_default6MpnMRegisterIm text: .text%__1cNTemplateTableMlookupswitch6F_v_; text: .text%__1cNTemplateTableH_return6FnITosState__v_; text: .text%__1cNTemplateTableJgetstatic6Fi_v_; -text: .text%__1cNTemplateTableXresolve_cache_and_index6FipnMRegisterImpl_2_v_; text: .text%__1cNTemplateTableJputstatic6Fi_v_; text: .text%__1cNTemplateTableIgetfield6Fi_v_; text: .text%__1cOMacroAssemblerKnull_check6MpnMRegisterImpl_i_v_; @@ -521,7 +512,6 @@ text: .text%__1cNTemplateTableIputfield6Fi_v_; text: .text%__1cNTemplateTableNinvokevirtual6Fi_v_; text: .text%__1cNTemplateTableTinvokevfinal_helper6FpnMRegisterImpl_2_v_; text: .text%__1cZInterpreterMacroAssemblerSprofile_final_call6MpnMRegisterImpl__v_; -text: .text%__1cZInterpreterMacroAssemblerUprofile_virtual_call6MpnMRegisterImpl_2_v_; text: .text%__1cNTemplateTableUgenerate_vtable_call6FpnMRegisterImpl_22_v_; text: .text%__1cNTemplateTableNinvokespecial6Fi_v_; text: .text%__1cZInterpreterMacroAssemblerMprofile_call6MpnMRegisterImpl__v_; @@ -629,8 +619,6 @@ text: .text%__1cQjni_handles_init6F_v_; text: .text%__1cOvmStructs_init6F_v_; text: .text%__1cMRegisterImplEname6kM_pkc_; text: .text%__1cRFloatRegisterImplEname6kM_pkc_; -text: .text%__1cIFrameMapEinit6F_v_; -text: .text%__1cIRuntime1Kinitialize6F_v_; text: .text%__1cIRuntime1Ninitialize_pd6F_v_; text: .text%__1cNSharedRuntimeTgenerate_deopt_blob6F_v_; text: .text%__1cOMacroAssemblerZtotal_frame_size_in_bytes6Mi_i_; @@ -689,7 +677,6 @@ text: .text%__1cEUTF8Sconvert_to_unicode6FpkcpHi_v_; text: .text%__1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__; text: .text%__1cTjava_lang_ThrowableLset_message6FpnHoopDesc_2_v_; text: .text%__1cMNativeLookupTbase_library_lookup6Fpkc22_pC_; -text: .text%__1cKoopFactoryKnew_symbol6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cLSymbolTableGlookup6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cNinstanceKlassWuncached_lookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cMstringStream2t6MI_v_; @@ -788,8 +775,6 @@ text: .text%__1cXSignatureHandlerLibraryOpd_set_handler6FpC_v_; text: .text%__1cNmethodOopDescVset_signature_handler6MpC_v_; text: .text%jni_RegisterNatives: jni.o; text: .text%__1cPjava_lang_ClassLas_klassOop6FpnHoopDesc__pnMklassOopDesc__; -text: .text%__1cLSymbolTableFprobe6Fpkci_pnNsymbolOopDesc__; -text: .text%__1cFKlassNlookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cOJNIHandleBlockNrelease_block6Fp0pnGThread__v_; text: .text%__1cSObjectSynchronizerJnotifyall6FnGHandle_pnGThread__v_; text: .text%__1cSInterpreterRuntimeJanewarray6FpnKJavaThread_pnTconstantPoolOopDesc_ii_v_; @@ -829,7 +814,6 @@ text: .text%__1cbBcreate_initial_thread_group6FpnGThread__nGHandle__: thread.o; text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_; text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_533pnGThread__v_; text: .text%__1cNmethodOopDescIbci_from6kMpC_i_; -text: .text%__1cPBytecode_invokeJsignature6kM_pnNsymbolOopDesc__; text: .text%__1cNmethodOopDescIbcp_from6kMi_pC_; text: .text%__1cFframebGinterpreter_callee_receiver_addr6MnMsymbolHandle__ppnHoopDesc__; text: .text%__1cRSignatureIteratorSiterate_parameters6M_v_; @@ -983,7 +967,6 @@ text: .text%jni_GetStringUTFLength: jni.o; text: .text%__1cQjava_lang_StringLutf8_length6FpnHoopDesc__i_; text: .text%__1cHUNICODELutf8_length6FpHi_i_; text: .text%jni_GetStringLength: jni.o; -text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_; text: .text%jni_GetStringUTFRegion: jni.o; text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_; text: .text%JVM_FindClassFromClassLoader; @@ -1022,7 +1005,6 @@ text: .text%__1cbDjava_lang_reflect_ConstructorEslot6FpnHoopDesc__i_; text: .text%__1cbIjava_lang_reflect_AccessibleObjectIoverride6FpnHoopDesc__C_; text: .text%__1cbDjava_lang_reflect_ConstructorPparameter_types6FpnHoopDesc__2_; text: .text%__1cLClassLoaderOload_classfile6FnMsymbolHandle_pnGThread__nTinstanceKlassHandle__; -text: .text%__1cFVTuneQstart_class_load6F_v_; text: .text%__1cJEventMark2t6MpkcE_v_: classLoader.o; text: .text%__1cSThreadProfilerMark2t6Mn0AGRegion__v_; text: .text%__1cRClassPathZipEntryLopen_stream6Mpkc_pnPClassFileStream__; @@ -1060,8 +1042,6 @@ text: .text%__1cPClassFileParserMsort_methods6MnOobjArrayHandle_111pnGThread__nP text: .text%method_compare: methodOop.o; text: .text%__1cLklassItableTcompute_itable_size6FnOobjArrayHandle__i_; text: .text%__1cUvisit_all_interfaces6FpnPobjArrayOopDesc_pnXInterfaceVisiterClosure__v_; -text: .text%__1cKoopFactoryRnew_instanceKlass6FiiiinNReferenceType_pnGThread__pnMklassOopDesc__; -text: .text%__1cSinstanceKlassKlassXallocate_instance_klass6MiiiinNReferenceType_pnGThread__pnMklassOopDesc__; text: .text%__1cNinstanceKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: instanceKlass.o; text: .text%__1cNinstanceKlassOset_alloc_size6MI_v_: instanceKlass.o; text: .text%__1cNinstanceKlassQinit_implementor6M_v_; @@ -1077,7 +1057,6 @@ text: .text%__1cPClassFileParserVset_precomputed_flags6MnTinstanceKlassHandle__v text: .text%__1cPClassFileParserbCcheck_super_interface_access6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cPClassFileParserbBcheck_final_method_override6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cSThreadProfilerMark2T6M_v_; -text: .text%__1cFVTuneOend_class_load6F_v_; text: .text%__1cIRewriterHrewrite6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cYconstantPoolCacheOopDescKinitialize6MrnIintArray__v_; text: .text%JVM_MaxMemory; @@ -1091,15 +1070,11 @@ text: .text%Unsafe_FreeMemory; text: .text%__1cNSignatureInfoIdo_float6M_v_: bytecode.o; text: .text%jni_NewObjectV: jni.o; text: .text%jni_GetStringRegion: jni.o; -text: .text%__1cQjava_lang_StringGoffset6FpnHoopDesc__i_; -text: .text%__1cQjava_lang_StringFvalue6FpnHoopDesc__pnQtypeArrayOopDesc__; text: .text%jni_GetObjectField: jni.o; text: .text%jni_GetStringCritical: jni.o; text: .text%jni_ReleaseStringCritical: jni.o; text: .text%__1cQSimpleCompPolicyXmethod_invocation_event6MnMmethodHandle_pnGThread__v_; text: .text%__1cRInvocationCounterJset_carry6M_v_; -text: .text%__1cNCompileBrokerOcompile_method6FnMmethodHandle_i1ipkcpnGThread__pnHnmethod__; -text: .text%__1cQSimpleCompPolicyRcompilation_level6MnMmethodHandle_i_i_; text: .text%__1cNinstanceKlassUfind_interface_field6kMpnNsymbolOopDesc_2pnPfieldDescriptor__pnMklassOopDesc__; text: .text%JVM_LoadLibrary; text: .text%JVM_FindLibraryEntry; @@ -1153,7 +1128,6 @@ text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMs text: .text%__1cCosOsignal_init_pd6F_v_; text: .text%__1cQjava_lang_ThreadKset_daemon6FpnHoopDesc__v_; text: .text%__1cICompiler2t6M_v_; -text: .text%__1cNCompileBrokerVinit_compiler_threads6Fi_v_; text: .text%__1cQCompilerCounters2t6MpkcipnGThread__v_; text: .text%__1cNCompileBrokerUmake_compiler_thread6FpkcpnMCompileQdDueue_pnQCompilerCounters_pnGThread__pnOCompilerThread__; text: .text%__1cTsignal_thread_entry6FpnKJavaThread_pnGThread__v_: os.o; @@ -1188,7 +1162,6 @@ text: .text%__1cRLowMemoryDetectorbGlow_memory_detector_thread_entry6FpnKJavaThr text: .text%__1cKPerfStringKset_string6Mpkc_v_; text: .text%__1cPciObjectFactory2t6MpnFArena_i_v_; text: .text%__1cPciObjectFactoryTinit_shared_objects6M_v_; -text: .text%__1cIciSymbol2t6MnMsymbolHandle__v_; text: .text%__1cIciObject2t6MnGHandle__v_; text: .text%__1cIciObjectJset_ident6MI_v_; text: .text%__1cGciType2t6MnJBasicType__v_; @@ -1267,7 +1240,6 @@ text: .text%__1cOGenerateOopMapYrewrite_refval_conflicts6M_v_; text: .text%__1cOGenerateOopMapNreport_result6M_v_; text: .text%__1cLCompilationJbuild_hir6M_v_; text: .text%__1cCIR2t6MpnLCompilation_pnIciMethod_i_v_; -text: .text%__1cJValueTypeKinitialize6F_v_; text: .text%__1cMciNullObjectEmake6F_p0_; text: .text%__1cMGraphBuilderKinitialize6F_v_; text: .text%__1cJXHandlers2t6MpnIciMethod__v_; @@ -1275,13 +1247,11 @@ text: .text%__1cIciMethodJload_code6M_v_; text: .text%__1cLCompilationTdebug_info_recorder6kM_pnYDebugInformationRecorder__; text: .text%__1cHIRScopeLbuild_graph6MpnLCompilation_i_pnKBlockBegin__; text: .text%__1cQBlockListBuilderLset_leaders6M_v_; -text: .text%__1cKValueStack2t6MpnHIRScope_ii_v_; text: .text%__1cLciSignatureHtype_at6kMi_pnGciType__; text: .text%__1cMas_ValueType6FnJBasicType__pnJValueType__; text: .text%__1cIValueMap2t6M_v_; text: .text%__1cNResourceArrayGexpand6MIiri_v_; text: .text%__1cIValueMapIkill_all6M_v_; -text: .text%__1cKValueStackEcopy6M_p0_; text: .text%__1cMGraphBuilderbBiterate_bytecodes_for_block6Mi_pnIBlockEnd__; text: .text%__1cMGraphBuilderJScopeDataIblock_at6Mi_pnKBlockBegin__; text: .text%__1cMGraphBuilderKload_local6MpnJValueType_i_v_; @@ -1322,7 +1292,6 @@ text: .text%__1cPciInstanceKlassLfield_cache6M_pnTciConstantPoolCache__; text: .text%__1cHciField2t6MpnPciInstanceKlass_i_v_; text: .text%__1cHciFieldPinitialize_from6MpnPfieldDescriptor__v_; text: .text%__1cTconstantPoolOopDescbCklass_ref_at_if_loaded_check6FnSconstantPoolHandle_ipnGThread__pnMklassOopDesc__; -text: .text%__1cKValueStackKcopy_locks6M_p0_; text: .text%__1cJLoadFieldFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerMdo_LoadField6MpnJLoadField__v_; text: .text%__1cJLoadFieldEhash6kM_i_: c1_Instruction.o; @@ -1365,27 +1334,18 @@ text: .text%__1cTNullCheckEliminatorLiterate_one6MpnKBlockBegin__v_; text: .text%__1cGBitMapIset_from6M0_v_; text: .text%__1cQNullCheckVisitorNdo_BlockBegin6MpnKBlockBegin__v_; text: .text%__1cQNullCheckVisitorHdo_Base6MpnEBase__v_; -text: .text%__1cKStateSplitPinput_values_do6MpFppnLInstruction__v_v_: c1_Canonicalizer.o; text: .text%__1cEGotoFvisit6MpnSInstructionVisitor__v_: c1_Canonicalizer.o; text: .text%__1cQNullCheckVisitorHdo_Goto6MpnEGoto__v_; -text: .text%__1cCIfPinput_values_do6MpFppnLInstruction__v_v_: c1_Canonicalizer.o; -text: .text%__1cTNullCheckEliminatorIdo_value6FppnLInstruction__v_; -text: .text%__1cFLocalPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cFLocalFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorIdo_Local6MpnFLocal__v_; text: .text%__1cQNullCheckVisitorFdo_If6MpnCIf__v_; -text: .text%__1cGReturnPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; -text: .text%__1cIConstantPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorLdo_Constant6MpnIConstant__v_; text: .text%__1cQNullCheckVisitorJdo_Return6MpnGReturn__v_; -text: .text%__1cJTypeCheckPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorNdo_InstanceOf6MpnKInstanceOf__v_; text: .text%__1cQNullCheckVisitorMdo_CheckCast6MpnJCheckCast__v_; -text: .text%__1cLAccessFieldPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorMdo_LoadField6MpnJLoadField__v_; text: .text%__1cTNullCheckEliminatorShandle_AccessField6MpnLAccessField__v_; text: .text%__1cQNullCheckVisitorPdo_ArithmeticOp6MpnMArithmeticOp__v_; -text: .text%__1cLAccessArrayPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorOdo_ArrayLength6MpnLArrayLength__v_; text: .text%__1cTNullCheckEliminatorShandle_ArrayLength6MpnLArrayLength__v_; text: .text%__1cQNullCheckVisitorOdo_LoadIndexed6MpnLLoadIndexed__v_; @@ -1403,16 +1363,12 @@ text: .text%__1cIBlockEndOsubstitute_sux6MpnKBlockBegin_2_v_; text: .text%__1cCIRMcompute_code6M_v_; text: .text%__1cLInstructionGnegate6Fn0AJCondition__1_; text: .text%__1cJBlockListJblocks_do6MpFpnKBlockBegin__v_v_; -text: .text%__1cQUseCountComputerQupdate_use_count6FppnLInstruction__v_: c1_IR.o; -text: .text%__1cKStateSplitPstate_values_do6MpFppnLInstruction__v_v_; -text: .text%__1cKValueStackJvalues_do6MpFppnLInstruction__v_v_; text: .text%__1cFLocalIas_Local6M_p0_: c1_GraphBuilder.o; text: .text%__1cLCompilationIemit_lir6M_v_; text: .text%__1cLInstructionGas_Phi6M_pnDPhi__: c1_Canonicalizer.o; text: .text%__1cMas_BasicType6FpnJValueType__nJBasicType__; text: .text%__1cJValueTypeRas_ObjectConstant6M_pnOObjectConstant__: c1_Canonicalizer.o; text: .text%__1cLLIR_OprFactKvalue_type6FpnJValueType__pnLLIR_OprDesc__; -text: .text%__1cKValueStackMcaller_state6kM_p0_; text: .text%__1cJArrayTypeMas_ArrayType6M_p0_: c1_ValueType.o; text: .text%__1cILIR_ListKshift_left6MpnLLIR_OprDesc_222_v_; text: .text%__1cJValueTypeLas_VoidType6M_pnIVoidType__: c1_Canonicalizer.o; @@ -1442,7 +1398,6 @@ text: .text%__1cNLIR_AssemblerNemit_opBranch6MpnMLIR_OpBranch__v_; text: .text%__1cNLIR_AssemblerKemit_delay6MpnLLIR_OpDelay__v_; text: .text%__1cNLIR_AssemblerLcode_offset6kM_i_; text: .text%__1cNLIR_AssemblerQemit_opTypeCheck6MpnPLIR_OpTypeCheck__v_; -text: .text%__1cIciObjectIencoding6M_pnI_jobject__; text: .text%__1cOoop_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cNLIR_AssemblerEload6MpnMRegisterImpl_i2nJBasicType_pnMCodeEmitInfo__i_; text: .text%__1cNLIR_AssemblerIemit_op16MpnHLIR_Op1__v_; @@ -1477,7 +1432,6 @@ text: .text%__1cYDebugInformationRecorderJdata_size6M_i_; text: .text%__1cNRelocIteratorTadvance_over_prefix6M_v_; text: .text%__1cOoop_RelocationLunpack_data6M_v_; text: .text%__1cYDebugInformationRecorderHcopy_to6MpnHnmethod__v_; -text: .text%__1cLOopRecorderHcopy_to6MpnICodeBlob__v_; text: .text%__1cIUniverseMnon_oop_word6F_pv_; text: .text%__1cCosXnon_memory_address_word6F_pc_; text: .text%__1cHnmethodQcopy_scopes_data6MpCi_v_; @@ -1487,7 +1441,6 @@ text: .text%__1cODataRelocationJset_value6MpC_v_: relocInfo.o; text: .text%__1cOoop_RelocationGoffset6M_i_: relocInfo.o; text: .text%__1cKRelocationRpd_set_data_value6MpCi_v_; text: .text%__1cJCodeCacheGcommit6FpnICodeBlob__v_; -text: .text%__1cFVTuneOcreate_nmethod6FpnHnmethod__v_; text: .text%__1cWImplicitExceptionTableHcopy_to6MpnHnmethod__v_; text: .text%__1cLCompilation2T6M_v_; text: .text%__1cFArena2T6M_v_; @@ -1512,7 +1465,6 @@ text: .text%__1cTjava_lang_ThrowableTfill_in_stack_trace6FnGHandle_pnGThread__v_ text: .text%__1cVPreserveExceptionMark2T6M_v_; text: .text%__1cSInterpreterRuntimeXthrow_pending_exception6FpnKJavaThread__v_; text: .text%__1cSThreadLocalStorageGthread6F_pnGThread__: assembler_sparc.o; -text: .text%__1cNSharedRuntimebKexception_handler_for_return_address6FpC_1_; text: .text%__1cSInterpreterRuntimebFexception_handler_for_exception6FpnKJavaThread_pnHoopDesc__pC_; text: .text%__1cNmethodOopDescbEfast_exception_handler_bci_for6MnLKlassHandle_ipnGThread__i_; text: .text%__1cFframeZinterpreter_frame_set_bcp6MpC_v_; @@ -1530,8 +1482,6 @@ text: .text%__1cPciInstanceKlassYprotection_domain_handle6M_pnI_jobject__; text: .text%__1cLNewInstanceFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerOdo_NewInstance6MpnLNewInstance__v_; text: .text%__1cMGraphBuilderGinvoke6MnJBytecodesECode__v_; -text: .text%__1cFciEnvTget_method_by_index6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; -text: .text%__1cFciEnvYget_method_by_index_impl6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; text: .text%__1cPciObjectFactoryTget_unloaded_method6MpnPciInstanceKlass_pnIciSymbol_4_pnIciMethod__; text: .text%__1cIciMethod2t6MpnPciInstanceKlass_pnIciSymbol_4_v_; text: .text%__1cNciMethodKlassEmake6F_p0_; @@ -1542,16 +1492,11 @@ text: .text%__1cKValueStackNpop_arguments6Mi_pnGValues__; text: .text%__1cGInvokeFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerJdo_Invoke6MpnGInvoke__v_; text: .text%__1cGInvokeJas_Invoke6M_p0_: c1_Instruction.o; -text: .text%__1cFThrowFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerIdo_Throw6MpnFThrow__v_; -text: .text%__1cFThrowIas_Throw6M_p0_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorOdo_NewInstance6MpnLNewInstance__v_; -text: .text%__1cGInvokePinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorJdo_Invoke6MpnGInvoke__v_; text: .text%__1cTNullCheckEliminatorNhandle_Invoke6MpnGInvoke__v_; -text: .text%__1cFThrowPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorIdo_Throw6MpnFThrow__v_; -text: .text%__1cFThrowPstate_values_do6MpFppnLInstruction__v_v_; text: .text%__1cIVoidTypeLas_VoidType6M_p0_: c1_ValueType.o; text: .text%__1cLNewInstanceKexact_type6kM_pnGciType__; text: .text%__1cLNewInstanceOas_NewInstance6M_p0_: c1_Instruction.o; @@ -1562,7 +1507,6 @@ text: .text%__1cPNewInstanceStubEinfo6kM_pnMCodeEmitInfo__: c1_CodeStubs_sparc.o text: .text%__1cNLIR_AssemblerJemit_call6MpnOLIR_OpJavaCall__v_; text: .text%__1cNLIR_AssemblerKalign_call6MnILIR_Code__v_; text: .text%__1cICodeStubEinfo6kM_pnMCodeEmitInfo__: c1_CodeStubs_sparc.o; -text: .text%__1cNLIR_AssemblerEcall6MpCnJrelocInfoJrelocType_pnMCodeEmitInfo__v_; text: .text%__1cbBopt_virtual_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cYinternal_word_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cMPatchingStubJemit_code6MpnNLIR_Assembler__v_; @@ -1586,8 +1530,6 @@ text: .text%__1cFciEnvNlookup_method6MpnNinstanceKlass_2pnNsymbolOopDesc_4nJByte text: .text%__1cMLinkResolverbCresolve_virtual_call_or_null6FnLKlassHandle_1nMsymbolHandle_21_nMmethodHandle__; text: .text%__1cPciObjectFactoryMvm_symbol_at6Fi_pnIciSymbol__; text: .text%__1cNCanonicalizerMdo_NullCheck6MpnJNullCheck__v_; -text: .text%__1cKValueStackKpush_scope6MpnHIRScope__p0_; -text: .text%__1cHIRScopeXcompute_lock_stack_size6M_v_; text: .text%__1cMGraphBuilderJScopeDataLnum_returns6M_i_; text: .text%__1cNCanonicalizerHdo_Goto6MpnEGoto__v_; text: .text%__1cMGraphBuilderJScopeDataQincr_num_returns6M_v_; @@ -1596,10 +1538,7 @@ text: .text%__1cLCompilationVnotice_inlined_method6MpnIciMethod__v_; text: .text%__1cFciEnvVnotice_inlined_method6MpnIciMethod__v_; text: .text%__1cMLinkResolverbCresolve_special_call_or_null6FnLKlassHandle_nMsymbolHandle_21_nMmethodHandle__; text: .text%__1cLInstructionEprev6MpnKBlockBegin__p0_; -text: .text%__1cIConstantPother_values_do6MpFppnLInstruction__v_v_; -text: .text%__1cIBlockEndPother_values_do6MpFppnLInstruction__v_v_; text: .text%__1cQNullCheckVisitorMdo_NullCheck6MpnJNullCheck__v_; -text: .text%__1cHIRScopeNtop_scope_bci6kM_i_; text: .text%__1cIFrameMapQmake_new_address6kMi_nHAddress__; text: .text%__1cNLIR_AssemblerFstore6MpnMRegisterImpl_2inJBasicType_pnMCodeEmitInfo__v_; text: .text%__1cNLIR_AssemblerJstack2reg6MpnLLIR_OprDesc_2nJBasicType__v_; @@ -1610,7 +1549,6 @@ text: .text%__1cXNativeSignatureIteratorIdo_float6M_v_: interpreterRT_sparc.o; text: .text%JVM_IsNaN; text: .text%__1cXNativeSignatureIteratorJdo_double6M_v_: interpreterRT_sparc.o; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorLpass_double6M_v_; -text: .text%__1cEIfOpPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; text: .text%__1cEIfOpFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cQNullCheckVisitorHdo_IfOp6MpnEIfOp__v_; text: .text%__1cOGenerateOopMapIcopy_cts6MpnNCellTypeState_2_i_; @@ -1642,8 +1580,6 @@ text: .text%__1cHLogicOpEhash6kM_i_: c1_Instruction.o; text: .text%__1cHLogicOpEname6kM_pkc_: c1_Instruction.o; text: .text%__1cMLinkResolverbBresolve_static_call_or_null6FnLKlassHandle_nMsymbolHandle_21_nMmethodHandle__; text: .text%__1cQNullCheckVisitorNdo_StoreField6MpnKStoreField__v_; -text: .text%__1cINewArrayPinput_values_do6MpFppnLInstruction__v_v_: c1_Instruction.o; -text: .text%__1cHConvertPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorKdo_Convert6MpnHConvert__v_; text: .text%__1cQNullCheckVisitorPdo_NewTypeArray6MpnMNewTypeArray__v_; text: .text%__1cJLoadFieldMas_LoadField6M_p0_: c1_Instruction.o; @@ -1665,7 +1601,6 @@ text: .text%__1cRC1_MacroAssemblerPallocate_object6MpnMRegisterImpl_222ii2rnFLab text: .text%__1cNLIR_AssemblerOmembar_release6M_v_; text: .text%__1cNLIR_AssemblerGmembar6M_v_; text: .text%__1cNLIR_AssemblerOmembar_acquire6M_v_; -text: .text%__1cNLIR_AssemblerHic_call6MpCpnMCodeEmitInfo__v_; text: .text%__1cNLIR_AssemblerCpc6kM_pC_; text: .text%__1cXvirtual_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cNLIR_AssemblerIlogic_op6MnILIR_Code_pnLLIR_OprDesc_33_v_; @@ -1675,7 +1610,6 @@ text: .text%__1cXvirtual_call_RelocationLunpack_data6M_v_; text: .text%__1cNinstanceKlassVadd_dependent_nmethod6MpnHnmethod__v_; text: .text%__1cGPcDescHreal_pc6kMpknHnmethod__pC_; text: .text%__1cNSharedRuntimeXfind_callee_info_helper6FpnKJavaThread_rnMvframeStream_rnJBytecodesECode_rnICallInfo_pnGThread__nGHandle__; -text: .text%__1cPBytecode_invokeFindex6kM_i_; text: .text%__1cLRegisterMapIpd_clear6M_v_; text: .text%__1cPBytecode_invokeNstatic_target6MpnGThread__nMmethodHandle__; text: .text%__1cMLinkResolverOresolve_method6FrnMmethodHandle_rnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; @@ -1690,8 +1624,6 @@ text: .text%__1cKNativeCallXset_destination_mt_safe6MpC_v_; text: .text%__1cNmethodOopDescTverified_code_entry6M_pC_; text: .text%__1cOGenerateOopMapGdo_ldc6Mii_v_; text: .text%__1cMGraphBuilderNload_constant6M_v_; -text: .text%__1cFciEnvVget_constant_by_index6MpnPciInstanceKlass_i_nKciConstant__; -text: .text%__1cFciEnvbAget_constant_by_index_impl6MpnPciInstanceKlass_i_nKciConstant__; text: .text%__1cWstatic_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cKExceptionsL_throw_args6FpnGThread_pkcinMsymbolHandle_5pnRJavaCallArguments__v_; text: .text%__1cMPeriodicTaskOreal_time_tick6FI_v_; @@ -1700,7 +1632,6 @@ text: .text%jni_GetArrayLength: jni.o; text: .text%JVM_Read; text: .text%jni_GetByteArrayRegion: jni.o; text: .text%JVM_DefineClassWithSource; -text: .text%__1cQSystemDictionaryTresolve_from_stream6FnMsymbolHandle_nGHandle_2pnPClassFileStream_pnGThread__pnMklassOopDesc__; text: .text%__1cPClassFileParserbDverify_legal_method_signature6MnMsymbolHandle_1pnGThread__i_; text: .text%__1cPClassFileParserXverify_legal_class_name6MnMsymbolHandle_pnGThread__v_; text: .text%__1cQSystemDictionarybAvalidate_protection_domain6FnTinstanceKlassHandle_nGHandle_2pnGThread__v_; @@ -1780,7 +1711,6 @@ text: .text%__1cUJvmtiEventControllerIvm_death6F_v_; text: .text%__1cCosXterminate_signal_thread6F_v_; text: .text%__1cCosNsigexitnum_pd6F_i_; text: .text%__1cCosNsignal_notify6Fi_v_; -text: .text%__1cFVTuneEexit6F_v_; text: .text%__1cIVMThreadXwait_for_vm_thread_exit6F_v_; text: .text%__1cUSafepointSynchronizeFbegin6F_v_; text: .text%__1cORuntimeServiceWrecord_safepoint_begin6F_v_; @@ -1795,7 +1725,6 @@ text: .text%__1cQSystemDictionaryRnumber_of_classes6F_i_; text: .text%__1cQSystemDictionaryStry_get_next_class6F_pnMklassOopDesc__; text: .text%__1cKDictionaryStry_get_next_class6M_pnMklassOopDesc__; text: .text%__1cNinstanceKlassKmethods_do6MpFpnNmethodOopDesc__v_v_; -text: .text%__1cONMethodSweeperFsweep6F_v_; text: .text%__1cNCompileBrokerQset_should_block6F_v_; text: .text%__1cHVM_ExitbJwait_for_threads_in_native_to_block6F_i_; text: .text%__1cIVMThreadHdestroy6F_v_; @@ -1839,7 +1768,6 @@ text: .text%__1cMGraphBuilderNstore_indexed6MnJBasicType__v_; text: .text%__1cIValueMapKkill_array6MpnJValueType__v_; text: .text%__1cNCanonicalizerPdo_StoreIndexed6MpnMStoreIndexed__v_; text: .text%__1cQNullCheckVisitorPdo_StoreIndexed6MpnMStoreIndexed__v_; -text: .text%__1cKValueStackElock6MpnHIRScope_pnLInstruction__i_; text: .text%__1cKValueStackGunlock6M_i_; text: .text%__1cQMonitorEnterStubFvisit6MpnQLIR_OpVisitState__v_: c1_CodeStubs_sparc.o; text: .text%__1cNLIR_AssemblerJemit_lock6MpnKLIR_OpLock__v_; @@ -1859,7 +1787,6 @@ text: .text%__1cTconstantPoolOopDescbCverify_constant_pool_resolve6FnSconstantPo text: .text%__1cNCanonicalizerMdo_Intrinsic6MpnJIntrinsic__v_; text: .text%__1cMas_ValueType6FnKciConstant__pnJValueType__; text: .text%__1cQNullCheckVisitorMdo_Intrinsic6MpnJIntrinsic__v_; -text: .text%__1cDOp2Pinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorKdo_ShiftOp6MpnHShiftOp__v_; text: .text%__1cILIR_ListLshift_right6MpnLLIR_OprDesc_222_v_; text: .text%__1cMNewTypeArrayKexact_type6kM_pnGciType__; @@ -1876,7 +1803,6 @@ text: .text%__1cYciExceptionHandlerStreamEnext6M_v_: c1_IR.o; text: .text%__1cLInstructionGmirror6Fn0AJCondition__1_; text: .text%__1cKBlockBeginVadd_exception_handler6Mp0_v_; text: .text%__1cIciObjectEhash6M_i_; -text: .text%__1cLAccessFieldPother_values_do6MpFppnLInstruction__v_v_; text: .text%__1cFChunk2n6FII_pv_; text: .text%jni_CallStaticVoidMethodV: jni.o; text: .text%JVM_GetLastErrorString; @@ -1899,8 +1825,6 @@ text: .text%__1cWCountInterfacesClosureEdoit6MpnMklassOopDesc_i_v_: klassVtable. text: .text%__1cPfieldDescriptorRint_initial_value6kM_i_; text: .text%__1cSSetupItableClosureEdoit6MpnMklassOopDesc_i_v_: klassVtable.o; text: .text%__1cSInterpreterRuntimeOmultianewarray6FpnKJavaThread_pi_v_; -text: .text%__1cNinstanceKlassSlookup_osr_nmethod6kMkpnNmethodOopDesc_i_pnHnmethod__; -text: .text%__1cQSimpleCompPolicyYmethod_back_branch_event6MnMmethodHandle_iipnGThread__v_; text: .text%__1cMGraphBuilderQnew_object_array6M_v_; text: .text%__1cONewObjectArrayFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerRdo_NewObjectArray6MpnONewObjectArray__v_; @@ -1919,7 +1843,6 @@ text: .text%__1cUBytecode_tableswitchOdest_offset_at6kMi_i_; text: .text%__1cMGraphBuilderMtable_switch6M_v_; text: .text%__1cLTableSwitchFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerOdo_TableSwitch6MpnLTableSwitch__v_; -text: .text%__1cGSwitchPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorOdo_TableSwitch6MpnLTableSwitch__v_; text: .text%__1cSCompiledStaticCallNcompute_entry6FnMmethodHandle_rnOStaticCallInfo__v_; text: .text%__1cSCompiledStaticCallDset6MrknOStaticCallInfo__v_; @@ -1972,7 +1895,6 @@ text: .text%jni_GetStaticObjectField: jni.o; text: .text%__1cXJNI_ArgumentPusherVaArgIget_long6M_v_: jni.o; text: .text%__1cINegateOpFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerLdo_NegateOp6MpnINegateOp__v_; -text: .text%__1cINegateOpPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorLdo_NegateOp6MpnINegateOp__v_; text: .text%__1cILIR_ListLstore_check6MpnLLIR_OprDesc_2222pnMCodeEmitInfo__v_; text: .text%__1cXArrayStoreExceptionStub2t6MpnMCodeEmitInfo__v_; @@ -2008,13 +1930,11 @@ text: .text%__1cYjava_lang_reflect_MethodEslot6FpnHoopDesc__i_; text: .text%__1cYjava_lang_reflect_MethodPparameter_types6FpnHoopDesc__2_; text: .text%__1cYjava_lang_reflect_MethodLreturn_type6FpnHoopDesc__2_; text: .text%JVM_IsInterrupted; -text: .text%__1cMArithmeticOpKlock_stack6kM_pnKValueStack__: c1_Instruction.o; text: .text%__1cNLIR_AssemblerIemit_op36MpnHLIR_Op3__v_; text: .text%__1cNLIR_AssemblerbCadd_debug_info_for_div0_here6MpnMCodeEmitInfo__v_; text: .text%__1cNDivByZeroStubEinfo6kM_pnMCodeEmitInfo__: c1_CodeStubs_sparc.o; text: .text%__1cNDivByZeroStubJemit_code6MpnNLIR_Assembler__v_; text: .text%__1cIFrameMapLnr2floatreg6Fi_pnRFloatRegisterImpl__; -text: .text%__1cRCompilationPolicybIreset_counter_for_invocation_event6MnMmethodHandle__v_; text: .text%Unsafe_EnsureClassInitialized; text: .text%__1cPClassFileParserYparse_checked_exceptions6MpHInSconstantPoolHandle_pnGThread__1_; text: .text%__1cPClassFileStreamHskip_u26MipnGThread__v_; @@ -2070,7 +1990,6 @@ text: .text%jni_NewIntArray: jni.o; text: .text%__1cKGenerationInext_gen6kM_p0_; text: .text%__1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_; text: .text%__1cbAVM_GenCollectForAllocationEdoit6M_v_; -text: .text%__1cPGCMemoryManagerIgc_begin6M_v_; text: .text%__1cKManagementJtimestamp6F_x_; text: .text%__1cTContiguousSpacePoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cTContiguousSpacePoolNused_in_bytes6M_I_: memoryPool.o; @@ -2094,8 +2013,6 @@ text: .text%__1cKSharedHeapbAchange_strong_roots_parity6M_v_; text: .text%__1cPFastScanClosureGdo_oop6MppnHoopDesc__v_: defNewGeneration.o; text: .text%__1cPContiguousSpaceIallocate6MI_pnIHeapWord__; text: .text%__1cKJNIHandlesHoops_do6FpnKOopClosure__v_; -text: .text%__1cHThreadsHoops_do6FpnKOopClosure__v_; -text: .text%__1cKJavaThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cOJNIHandleBlockHoops_do6MpnKOopClosure__v_; text: .text%__1cKHandleAreaHoops_do6MpnKOopClosure__v_; text: .text%__1cFframeVinterpreter_frame_bci6kM_i_; @@ -2124,8 +2041,6 @@ text: .text%__1cTMaskFillerForNative2t6MnMmethodHandle_pIi_v_: oopMapCache.o; text: .text%__1cTMaskFillerForNativeLpass_object6M_v_: oopMapCache.o; text: .text%__1cTMaskFillerForNativeJpass_long6M_v_: oopMapCache.o; text: .text%__1cRComputeEntryStackHdo_long6M_v_: generateOopMap.o; -text: .text%__1cIVMThreadHoops_do6MpnKOopClosure__v_; -text: .text%__1cGThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cSObjectSynchronizerHoops_do6FpnKOopClosure__v_; text: .text%__1cMFlatProfilerHoops_do6FpnKOopClosure__v_; text: .text%__1cKManagementHoops_do6FpnKOopClosure__v_; @@ -2221,7 +2136,6 @@ text: .text%__1cUGenGCEpilogueClosureNdo_generation6MpnKGeneration__v_: genColle text: .text%__1cRTenuredGenerationPupdate_counters6M_v_; text: .text%__1cUCompactingPermGenGenPupdate_counters6M_v_; text: .text%__1cXTraceMemoryManagerStats2T6M_v_; -text: .text%__1cPGCMemoryManagerGgc_end6M_v_; text: .text%__1cRLowMemoryDetectorWdetect_after_gc_memory6FpnKMemoryPool__v_; text: .text%__1cNJvmtiGCMarker2T6M_v_; text: .text%__1cPVM_GC_OperationNdoit_epilogue6M_v_; @@ -2232,7 +2146,6 @@ text: .text%__1cLklassVtableQindex_of_miranda6MpnNsymbolOopDesc_2_i_; text: .text%__1cNCanonicalizerPdo_MonitorEnter6MpnMMonitorEnter__v_; text: .text%__1cLMonitorExitFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerOdo_MonitorExit6MpnLMonitorExit__v_; -text: .text%__1cNAccessMonitorPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorPdo_MonitorEnter6MpnMMonitorEnter__v_; text: .text%__1cQNullCheckVisitorOdo_MonitorExit6MpnLMonitorExit__v_; text: .text%__1cMLongConstantPas_LongConstant6M_p0_: c1_Canonicalizer.o; @@ -2246,10 +2159,7 @@ text: .text%__1cRComputeEntryStackIdo_short6M_v_: generateOopMap.o; text: .text%Unsafe_AllocateInstance; text: .text%jni_AllocObject: jni.o; text: .text%__1cNCanonicalizerMset_constant6Mi_v_: c1_Canonicalizer.o; -text: .text%__1cJTypeCheckPother_values_do6MpFppnLInstruction__v_v_; -text: .text%__1cIBytecodeIset_code6MnJBytecodesECode__v_; text: .text%__1cQComputeCallStackIdo_float6M_v_: generateOopMap.o; -text: .text%__1cFframeRoops_code_blob_do6MpnKOopClosure_pknLRegisterMap__v_; text: .text%__1cMOopMapStreamJfind_next6M_v_; text: .text%__1cQinstanceRefKlassSoop_oop_iterate_nv6MpnHoopDesc_pnQFilteringClosure__i_; text: .text%__1cQinstanceRefKlassUoop_oop_iterate_nv_m6MpnHoopDesc_pnQFilteringClosure_nJMemRegion__i_; @@ -2284,7 +2194,6 @@ text: .text%__1cLsymbolKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cQinstanceRefKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cQconstMethodKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cFJNIidHoops_do6MpnKOopClosure__v_; -text: .text%__1cHnmethodHoops_do6MpnKOopClosure__v_; text: .text%__1cQSystemDictionaryValways_strong_oops_do6FpnKOopClosure__v_; text: .text%__1cKDictionaryYalways_strong_classes_do6MpnKOopClosure__v_; text: .text%__1cVLoaderConstraintTableYalways_strong_classes_do6MpnKOopClosure__v_; @@ -2341,9 +2250,6 @@ text: .text%__1cVcompiledICHolderKlassOklass_oop_size6kM_i_: compiledICHolderKla text: .text%__1cJHashtableHoops_do6MpnKOopClosure__v_; text: .text%__1cQSystemDictionaryYalways_strong_classes_do6FpnKOopClosure__v_; text: .text%__1cQSystemDictionaryPplaceholders_do6FpnKOopClosure__v_; -text: .text%__1cSDeoptimizationBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cLRuntimeStubHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cNSafepointBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cJMarkSweepMadjust_marks6F_v_; text: .text%__1cYGenAdjustPointersClosureNdo_generation6MpnKGeneration__v_: genMarkSweep.o; text: .text%__1cKGenerationPadjust_pointers6M_v_; @@ -2379,32 +2285,24 @@ text: .text%__1cIRuntime1Onew_type_array6FpnKJavaThread_pnMklassOopDesc_i_v_; text: .text%__1cVcompiledICHolderKlassRoop_oop_iterate_m6MpnHoopDesc_pnKOopClosure_nJMemRegion__i_; text: .text%__1cNObjectMonitorGnotify6MpnGThread__v_; text: .text%__1cOMacroAssemblerEmult6MpnMRegisterImpl_22_v_; -text: .text%__1cINewArrayPother_values_do6MpFppnLInstruction__v_v_; text: .text%__1cJValueTypeLas_LongType6M_pnILongType__: c1_Canonicalizer.o; text: .text%__1cNVM_DeoptimizeEdoit6M_v_; text: .text%__1cODeoptimizationVdeoptimize_dependents6F_i_; text: .text%__1cHThreadsbFdeoptimized_wrt_marked_nmethods6F_v_; text: .text%__1cKJavaThreadbFdeoptimized_wrt_marked_nmethods6M_v_; text: .text%__1cJCodeCachebGmake_marked_nmethods_not_entrant6F_v_; -text: .text%__1cHnmethodbAmake_not_entrant_or_zombie6Mi_v_; text: .text%__1cKNativeJumpUpatch_verified_entry6FpC11_v_; text: .text%signalHandler; text: .text%JVM_handle_solaris_signal; text: .text%JVM_HoldsLock; text: .text%__1cQinstanceRefKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: instanceRefKlass.o; text: .text%__1cJCodeCacheFfirst6F_pnICodeBlob__; -text: .text%__1cHThreadsLnmethods_do6F_v_; -text: .text%__1cFframeLnmethods_do6M_v_; text: .text%__1cJCodeCacheEnext6FpnICodeBlob__2_; text: .text%__1cONewObjectArrayKexact_type6kM_pnGciType__; text: .text%__1cPciObjArrayKlassNelement_klass6M_pnHciKlass__; text: .text%__1cIRuntime1Noop_arraycopy6FpnIHeapWord_2i_v_; text: .text%__1cMGraphBuilderKcompare_op6MpnJValueType_nJBytecodesECode__v_; -text: .text%__1cJCompareOpFvisit6MpnSInstructionVisitor__v_: c1_Instruction.o; text: .text%__1cNCanonicalizerMdo_CompareOp6MpnJCompareOp__v_; -text: .text%__1cJCompareOpEhash6kM_i_: c1_Instruction.o; -text: .text%__1cJCompareOpEname6kM_pkc_: c1_Instruction.o; -text: .text%__1cJCompareOpMas_CompareOp6M_p0_: c1_Instruction.o; text: .text%__1cJValueTypeOas_IntConstant6M_pnLIntConstant__: c1_Canonicalizer.o; text: .text%__1cHIntTypeKas_IntType6M_p0_: c1_Canonicalizer.o; text: .text%__1cNSharedRuntimeDf2l6Ff_x_; @@ -2422,7 +2320,6 @@ text: .text%__1cRComputeEntryStackIdo_float6M_v_: generateOopMap.o; text: .text%__1cTMaskFillerForNativeIpass_int6M_v_: oopMapCache.o; text: .text%__1cHnmethodSflush_dependencies6MpnRBoolObjectClosure__v_; text: .text%__1cNinstanceKlassYremove_dependent_nmethod6MpnHnmethod__v_; -text: .text%__1cFVTuneOdelete_nmethod6FpnHnmethod__v_; text: .text%__1cLCardTableRSFclear6MnJMemRegion__v_: cardTableRS.o; text: .text%__1cRCardTableModRefBSFclear6MnJMemRegion__v_; text: .text%__1cHnmethodFflush6M_v_; @@ -2445,9 +2342,7 @@ text: .text%__1cNCanonicalizerPdo_UnsafeGetRaw6MpnMUnsafeGetRaw__v_; text: .text%__1cMGraphBuilderNlookup_switch6M_v_; text: .text%__1cMLookupSwitchFvisit6MpnSInstructionVisitor__v_: c1_GraphBuilder.o; text: .text%__1cNCanonicalizerPdo_LookupSwitch6MpnMLookupSwitch__v_; -text: .text%__1cMUnsafePutRawPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorPdo_UnsafePutRaw6MpnMUnsafePutRaw__v_; -text: .text%__1cLUnsafeRawOpPinput_values_do6MpFppnLInstruction__v_v_: c1_GraphBuilder.o; text: .text%__1cQNullCheckVisitorPdo_UnsafeGetRaw6MpnMUnsafeGetRaw__v_; text: .text%__1cQNullCheckVisitorPdo_LookupSwitch6MpnMLookupSwitch__v_; text: .text%__1cIRuntime1Mnew_instance6FpnKJavaThread_pnMklassOopDesc__v_; diff --git a/hotspot/make/solaris/makefiles/reorder_TIERED_amd64 b/hotspot/make/solaris/makefiles/reorder_TIERED_amd64 index 4531671c613..8aa944c7adf 100644 --- a/hotspot/make/solaris/makefiles/reorder_TIERED_amd64 +++ b/hotspot/make/solaris/makefiles/reorder_TIERED_amd64 @@ -4,38 +4,22 @@ text = LOAD ?RXO; text: .text%__1cECopyRpd_disjoint_words6FpnIHeapWord_2L_v_; text: .text%__1cSPSPromotionManagerWcopy_to_survivor_space6MpnHoopDesc__2_; -text: .text%__1cNinstanceKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cJMarkSweepO_mark_and_push6FppnHoopDesc__v_; text: .text%__1cNinstanceKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cNinstanceKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cOtypeArrayKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cOtypeArrayKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cQIndexSetIteratorEnext6M_I_; -text: .text%__1cJMarkSweepPmark_and_follow6FppnHoopDesc__v_; -text: .text%__1cCosOjavaTimeMillis6F_x_; -text: .text%__1cNRelocIteratorEnext6M_i_; text: .text%__1cQIndexSetIteratorQadvance_and_next6M_I_; text: .text%__1cIUniverseMnon_oop_word6F_pv_; -text: .text%__1cNobjArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNobjArrayKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cNobjArrayKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cQObjectStartArrayMobject_start6kMpnIHeapWord__2_; text: .text%__1cJMarkSweepUAdjustPointerClosureGdo_oop6MppnHoopDesc__v_; -text: .text%__1cJMarkSweepOIsAliveClosureLdo_object_b6MpnHoopDesc__i_; -text: .text%__1cENodeGis_Phi6M_pnHPhiNode__; text: .text%__1cIPhaseIFGIadd_edge6MII_i_; -text: .text%__1cPBoundRelocationLunpack_data6MnJrelocInfoJrelocType__v_; -text: .text%__1cIMachNodeHis_Mach6M_p0_; -text: .text%__1cENodeHis_Copy6kM_I_; -text: .text%__1cUCompressedReadStreamIread_int6M_i_; text: .text%__1cQIndexSetIterator2t6MpnIIndexSet__v_; text: .text%__1cOPhaseIdealLoopOidom_no_update6kMpnENode__2_; -text: .text%__1cHnmethodKcan_unload6MpnRBoolObjectClosure_pnKOopClosure_ppnHoopDesc_i_i_; -text: .text%__1cIMachNodeNrematerialize6kM_i_; -text: .text%__1cHRegMaskFis_UP6kM_i_; text: .text%__1cXresource_allocate_bytes6FL_pc_; text: .text%__1cNRelocIteratorFreloc6M_pnKRelocation__; -text: .text%__1cENodeHis_Mach6M_pnIMachNode__; text: .text%__1cHRegMaskESize6kM_I_; text: .text%__1cIIndexSetLalloc_block6M_pn0AIBitBlock__; text: .text%__1cWConstantPoolCacheEntryPadjust_pointers6M_v_; @@ -48,7 +32,6 @@ text: .text%__1cLsymbolKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cLsymbolKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cYPSPromotionFailedClosureJdo_object6MpnHoopDesc__v_; text: .text%__1cENodeEjvms6kM_pnIJVMState__; -text: .text%__1cKRelocationSfix_oop_relocation6M_v_; text: .text%__1cIIndexSetWalloc_block_containing6MI_pn0AIBitBlock__; text: .text%__1cENodeHdel_out6Mp0_v_; text: .text%__1cKRelocationLunpack_data6M_v_; @@ -56,18 +39,11 @@ text: .text%__1cIMachNodeJideal_reg6kM_I_; text: .text%__1cJAssemblerOlocate_operand6FpCn0AMWhichOperand__1_; text: .text%__1cKRelocationSpd_address_in_code6M_ppC_; text: .text%__1cOoop_RelocationIoop_addr6M_ppnHoopDesc__; -text: .text%__1cRMachSpillCopyNodeMis_SpillCopy6M_p0_; text: .text%__1cOPhaseIdealLoopSget_ctrl_no_update6kMpnENode__2_; text: .text%__1cJCProjNodeNis_block_proj6kM_pknENode__; -text: .text%__1cENodeGis_CFG6kM_i_; -text: .text%__1cKRelocationNunpack_2_ints6Mri1_v_; text: .text%__1cETypeDcmp6Fpk02_i_; -text: .text%__1cQObjectStartArrayWobject_starts_in_range6kMpnIHeapWord_2_i_; text: .text%__1cOoop_RelocationLunpack_data6M_v_; text: .text%__1cHRegMaskJis_bound16kM_i_; -text: .text%__1cENodeHis_Proj6M_pnIProjNode__; -text: .text%__1cENodeMis_SpillCopy6M_pnRMachSpillCopyNode__; -text: .text%__1cOtypeArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cHRegMaskJis_bound26kM_i_; text: .text%__1cRmethodDataOopDescHdata_at6Mi_pnLProfileData__; text: .text%__1cNGrowableArray4CI_Hat_grow6MirkI_I_; @@ -78,126 +54,74 @@ text: .text%__1cQconstMethodKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cQconstMethodKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cLmethodKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cRmethodDataOopDescJnext_data6MpnLProfileData__2_; -text: .text%__1cMOopTaskQdDueueOpop_local_slow6MInOTaskQdDueueSuperDAge__i_; -text: .text%__1cRMachSpillCopyNodeHis_Copy6kM_I_; -text: .text%__1cENodeGpinned6kM_i_; text: .text%__1cOoop_RelocationJoop_value6M_pnHoopDesc__; text: .text%__1cJrRegPOperEtype6kM_pknEType__; text: .text%__1cECopyQpd_fill_to_words6FpnIHeapWord_LI_v_; -text: .text%__1cMOopTaskQdDueueKpop_global6MrpnHoopDesc__i_; -text: .text%__1cPOopTaskQdDueueSetPsteal_best_of_26MipirpnHoopDesc__i_; text: .text%__1cJVectorSet2R6MI_rnDSet__; text: .text%__1cNRelocIteratorTadvance_over_prefix6M_v_; -text: .text%__1cSPSPromotionManagerUflush_prefetch_queue6M_v_; -text: .text%__1cIProjNodeHis_Proj6M_p0_; text: .text%__1cPDictionaryEntrybDprotection_domain_set_oops_do6MpnKOopClosure__v_; text: .text%__1cMOopMapStreamJfind_next6M_v_; -text: .text%__1cMloadConPNodePoper_input_base6kM_I_; -text: .text%__1cMloadConPNodeHtwo_adr6kM_I_; text: .text%__1cMloadConPNodeErule6kM_I_; -text: .text%__1cHPhiNodeGis_Phi6M_p0_; text: .text%__1cITypeNodeLbottom_type6kM_pknEType__; -text: .text%__1cENodeGis_Cmp6kM_pknHCmpNode__; text: .text%__1cDff16FI_i_; -text: .text%__1cENodeNrematerialize6kM_i_; text: .text%__1cRLowMemoryDetectorbLdetect_low_memory_for_collected_pools6F_v_; -text: .text%__1cFframeVoopmapreg_to_location6kMipknLRegisterMap__ppnHoopDesc__; text: .text%__1cIIndexSetKinitialize6MI_v_; -text: .text%__1cENodeJis_Region6kM_pknKRegionNode__; text: .text%__1cMMutableSpaceMcas_allocate6ML_pnIHeapWord__; text: .text%__1cIMachNodeGOpcode6kM_i_; -text: .text%__1cMget_live_bit6Fpii_i_: buildOopMap.o; -text: .text%__1cNSafePointNodeGis_CFG6kM_i_; -text: .text%__1cIMachNodeQis_MachNullCheck6M_pnRMachNullCheckNode__; text: .text%__1cENodeHadd_req6Mp0_v_; text: .text%__1cENodeIout_grow6MI_v_; -text: .text%__1cMset_live_bit6Fpii_v_: buildOopMap.o; text: .text%__1cKTypeOopPtrFklass6kM_pnHciKlass__; text: .text%__1cIIndexSetKfree_block6MI_v_; -text: .text%__1cJCProjNodeGis_CFG6kM_i_; text: .text%__1cETypeFuhash6Fpk0_i_; text: .text%__1cJrRegIOperEtype6kM_pknEType__; text: .text%__1cMPhaseChaitinLskip_copies6MpnENode__2_; -text: .text%__1cIMachNodeMcisc_operand6kM_i_; -text: .text%__1cVCompressedWriteStreamJwrite_int6Mi_v_; text: .text%__1cICallNodeKmatch_edge6kMI_I_; -text: .text%__1cENodeHis_Call6M_pnICallNode__; text: .text%__1cNCollectedHeapbDcheck_for_bad_heap_word_value6MpnIHeapWord_L_v_; -text: .text%__1cEDictGInsert6Mpv1i_1_; text: .text%JVM_CurrentTimeMillis; -text: .text%__1cINodeHashLhash_delete6MpknENode__i_; -text: .text%__1cETypeJtype_dict6F_pnEDict__; text: .text%__1cOPSPromotionLABKinitialize6MnJMemRegion__v_; text: .text%__1cOPSPromotionLABFflush6M_v_; -text: .text%__1cIrc_class6Fi_nCRC__: ad_amd64.o; text: .text%__1cMPhaseChaitinTinterfere_with_live6MIpnIIndexSet__v_; text: .text%__1cINodeHashQhash_find_insert6MpnENode__2_; -text: .text%__1cNCollectedHeapbAcommon_mem_allocate_noinit6FLipnGThread__pnIHeapWord__; -text: .text%__1cENodeHis_Load6M_pnILoadNode__; -text: .text%__1cFArenaIcontains6kMpkv_i_; -text: .text%__1cJMultiNodeGis_CFG6kM_i_; text: .text%__1cHPhiNodeGOpcode6kM_i_; -text: .text%__1cMPhaseChaitinKelide_copy6MpnENode_ipnFBlock_rnJNode_List_6i_i_; text: .text%__1cKjmpDirNodeNis_block_proj6kM_pknENode__; -text: .text%__1cIProjNodeGis_CFG6kM_i_; text: .text%__1cRMachSpillCopyNodeJideal_reg6kM_I_; text: .text%__1cETypeIhashcons6M_pk0_; text: .text%__1cENodeEhash6kM_I_; -text: .text%__1cNMachIdealNodeMideal_Opcode6kM_i_; -text: .text%__1cOlower_pressure6FpnDLRG_IpnFBlock_pI4_v_: ifg.o; -text: .text%__1cPOopTaskQdDueueSetFsteal6MipirpnHoopDesc__i_; -text: .text%__1cENodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cKRegionNodeGis_CFG6kM_i_; -text: .text%__1cHCompileRvalid_bundle_info6MpknENode__i_; text: .text%__1cIProjNodeGOpcode6kM_i_; -text: .text%__1cENodeLis_MergeMem6M_pnMMergeMemNode__; text: .text%__1cOoop_RelocationSfix_oop_relocation6M_v_; text: .text%__1cPClassFileStreamGget_u26MpnGThread__H_; -text: .text%__1cENodeIis_Store6kM_pknJStoreNode__; text: .text%__1cPVirtualCallDataKcell_count6M_i_; -text: .text%__1cIProjNodeGpinned6kM_i_; text: .text%__1cENodeMcisc_operand6kM_i_; text: .text%__1cRInterpreterOopMapLoop_iterate6MpnKOopClosure__v_; text: .text%__1cMMachCallNodeKin_RegMask6kMI_rknHRegMask__; -text: .text%__1cMloadConINodePoper_input_base6kM_I_; -text: .text%__1cMloadConINodeHtwo_adr6kM_I_; text: .text%__1cHNTarjanEEVAL6M_p0_; text: .text%__1cNMachIdealNodeErule6kM_I_; text: .text%__1cKHandleMarkKinitialize6MpnGThread__v_; text: .text%__1cKHandleMark2T6M_v_; -text: .text%__1cETypeLisa_oop_ptr6kM_i_; -text: .text%__1cOPhaseIdealLoopUbuild_loop_late_post6MpnENode_pk0_v_; text: .text%__1cENode2t6MI_v_; text: .text%__1cJloadPNodeErule6kM_I_; -text: .text%__1cIMachNodeLis_MachCall6M_pnMMachCallNode__; text: .text%__1cMloadConINodeErule6kM_I_; text: .text%__1cICodeHeapKfind_start6kMpv_1_; text: .text%__1cWShouldNotReachHereNodeNis_block_proj6kM_pknENode__; -text: .text%__1cHTypeIntCeq6kMpknEType__i_; text: .text%__1cLProfileDataPfollow_contents6M_v_; text: .text%__1cLProfileDataPadjust_pointers6M_v_; -text: .text%__1cIMachNodeQis_MachSafePoint6M_pnRMachSafePointNode__; text: .text%__1cHRegMaskMClearToPairs6M_v_; text: .text%__1cJPhaseLiveLadd_liveout6MpnFBlock_IrnJVectorSet__v_; text: .text%__1cLemit_opcode6FrnKCodeBuffer_i_v_; text: .text%__1cIPhaseIFGQeffective_degree6kMI_i_; -text: .text%__1cENodeIis_Catch6kM_pknJCatchNode__; text: .text%__1cFArenaIArealloc6MpvLL_1_; text: .text%__1cGIfNodeGOpcode6kM_i_; text: .text%__1cHTypePtrEhash6kM_i_; text: .text%__1cIPhaseIFGLremove_node6MI_pnIIndexSet__; text: .text%__1cIPhaseIFGJre_insert6MI_v_; text: .text%__1cRMachSpillCopyNodeLbottom_type6kM_pknEType__; -text: .text%__1cMclr_live_bit6Fpii_v_: buildOopMap.o; text: .text%__1cETypeEmeet6kMpk0_2_; -text: .text%__1cMPhaseChaitinQis_high_pressure6MpnFBlock_pnDLRG_I_i_; text: .text%__1cKBranchDataKcell_count6M_i_; text: .text%__1cNCollectedHeapOarray_allocate6FnLKlassHandle_iipnGThread__pnHoopDesc__; text: .text%__1cOPhaseIdealLoopYsplit_if_with_blocks_pre6MpnENode__2_; text: .text%__1cNIdealLoopTreeJis_member6kMpk0_i_; text: .text%__1cOPhaseIdealLoopZsplit_if_with_blocks_post6MpnENode__v_; text: .text%__1cDfh16FI_i_; -text: .text%__1cJraw_score6Fdd_d_: chaitin.o; text: .text%__1cDLRGFscore6kM_d_; text: .text%__1cKTypeOopPtrEhash6kM_i_; text: .text%__1cIAddPNodeGOpcode6kM_i_; @@ -205,11 +129,8 @@ text: .text%__1cKIfTrueNodeGOpcode6kM_i_; text: .text%__1cMPhaseChaitinMchoose_color6MrnDLRG_i_i_; text: .text%__1cMPhaseIterGVNNtransform_old6MpnENode__2_; text: .text%__1cGcmpkey6Fpkv1_i_; -text: .text%__1cETypeJsingleton6kM_i_; text: .text%__1cIMachNodeKin_RegMask6kMI_rknHRegMask__; -text: .text%__1cSPSPromotionManagerMdrain_stacks6M_v_; text: .text%__1cHConNodeGOpcode6kM_i_; -text: .text%__1cITypeLongCeq6kMpknEType__i_; text: .text%__1cUParallelScavengeHeapVlarge_typearray_limit6M_L_; text: .text%__1cOtypeArrayKlassIallocate6MipnGThread__pnQtypeArrayOopDesc__; text: .text%__1cKoopFactoryNnew_typeArray6FnJBasicType_ipnGThread__pnQtypeArrayOopDesc__; @@ -220,133 +141,90 @@ text: .text%__1cICodeHeapLblock_start6kMpv_pnJHeapBlock__; text: .text%__1cJCodeCacheEnext6FpnICodeBlob__2_; text: .text%__1cRMachSpillCopyNodeKin_RegMask6kMI_rknHRegMask__; text: .text%__1cMMachProjNodeLbottom_type6kM_pknEType__; -text: .text%__1cLOptoRuntimeXdeoptimize_caller_frame6FpnKJavaThread_i_v_; text: .text%__1cSCallStaticJavaNodeGOpcode6kM_i_; text: .text%__1cYCallStaticJavaDirectNodeMideal_Opcode6kM_i_; text: .text%__1cJCodeCacheFalive6FpnICodeBlob__2_; -text: .text%__1cHRegMaskQis_aligned_Pairs6kM_i_; -text: .text%__1cSis_single_register6FI_i_: postaloc.o; text: .text%__1cRMachSpillCopyNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMPhaseIterGVNWadd_users_to_worklist06MpnENode__v_; text: .text%__1cECopyYconjoint_words_to_higher6FpnIHeapWord_2L_v_; text: .text%__1cILRG_ListGextend6MII_v_; text: .text%__1cWstatic_stub_RelocationLunpack_data6M_v_; -text: .text%__1cIciObjectGequals6Mp0_i_; text: .text%__1cJPhaseLiveGgetset6MpnFBlock__pnIIndexSet__; text: .text%__1cIConINodeGOpcode6kM_i_; -text: .text%__1cENodeRis_cisc_alternate6kM_i_; text: .text%__1cLIfFalseNodeGOpcode6kM_i_; text: .text%__1cKNode_ArrayGinsert6MIpnENode__v_; text: .text%__1cLCounterDataKcell_count6M_i_; -text: .text%__1cWThreadLocalAllocBufferFreset6M_v_; text: .text%__1cMMachProjNodeGOpcode6kM_i_; text: .text%__1cENodeEgrow6MI_v_; text: .text%__1cIMachNodePcompute_padding6kMi_i_; -text: .text%__1cKup_one_dom6FpnENode__1_: ifnode.o; text: .text%__1cIMachNodeSalignment_required6kM_i_; text: .text%__1cOPhaseIdealLoopEsort6MpnNIdealLoopTree_2_2_; -text: .text%__1cFframeOis_entry_frame6kM_i_; text: .text%__1cNCollectedHeapXallocate_from_tlab_slow6FpnGThread_L_pnIHeapWord__; -text: .text%__1cUParallelScavengeHeapVunsafe_max_tlab_alloc6kM_L_; text: .text%__1cHNTarjanICOMPRESS6M_v_; text: .text%__1cWThreadLocalAllocBufferXclear_before_allocation6M_v_; -text: .text%__1cFMutexGunlock6M_v_; -text: .text%__1cJMultiNodeIis_Multi6M_p0_; text: .text%__1cIBoolNodeGOpcode6kM_i_; text: .text%__1cSInterpreterRuntimeInewarray6FpnKJavaThread_nJBasicType_i_v_; text: .text%__1cUParallelScavengeHeapRallocate_new_tlab6ML_pnIHeapWord__; -text: .text%__1cKSharedHeapXfill_region_with_object6FnJMemRegion__v_; text: .text%__1cWThreadLocalAllocBufferKinitialize6MpnIHeapWord_22_v_; text: .text%__1cYNoJvmtiVMObjectAllocMark2t6M_v_; text: .text%__1cWThreadLocalAllocBufferEfill6MpnIHeapWord_2L_v_; text: .text%__1cYNoJvmtiVMObjectAllocMark2T6M_v_; -text: .text%__1cKTypeOopPtrCeq6kMpknEType__i_; -text: .text%__1cHTypePtrCeq6kMpknEType__i_; text: .text%__1cRMachSpillCopyNodePoper_input_base6kM_I_; text: .text%__1cIIndexSetFclear6M_v_; -text: .text%__1cHTypeIntJsingleton6kM_i_; text: .text%__1cJPhaseLiveLadd_liveout6MpnFBlock_pnIIndexSet_rnJVectorSet__v_; text: .text%__1cECopyXconjoint_words_to_lower6FpnIHeapWord_2L_v_; text: .text%__1cNRelocIteratorKset_limits6MpC1_v_; -text: .text%__1cNRelocIteratorKinitialize6MlpnICodeBlob_pC3_v_; text: .text%__1cNinstanceKlassGvtable6kM_pnLklassVtable__; text: .text%__1cSinstanceKlassKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cITypeNodeJideal_reg6kM_I_; -text: .text%__1cFframeUis_interpreted_frame6kM_i_; text: .text%__1cHTypeIntEhash6kM_i_; text: .text%__1cIPhaseGVNJtransform6MpnENode__2_; text: .text%__1cNinstanceKlassGitable6kM_pnLklassItable__; text: .text%__1cLklassItable2t6MnTinstanceKlassHandle__v_; -text: .text%__1cIMachNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cIciObjectEhash6M_i_; -text: .text%__1cENodeIis_Multi6M_pnJMultiNode__; -text: .text%__1cFState2T6M_v_; -text: .text%__1cPVirtualCallDataPfollow_contents6M_v_; -text: .text%__1cPVirtualCallDataPadjust_pointers6M_v_; -text: .text%__1cENodeGis_Con6kM_I_; -text: .text%__1cJrRegIOperJnum_edges6kM_I_; -text: .text%__1cENodeIget_long6kM_x_; text: .text%__1cNCellTypeStateFmerge6kM0i_0_; text: .text%__1cOPhaseIdealLoopUbuild_loop_tree_impl6MpnENode_i_i_; text: .text%__1cWNode_Backward_IteratorEnext6M_pnENode__; text: .text%__1cHemit_rm6FrnKCodeBuffer_iii_v_; -text: .text%__1cHPhiNodeGpinned6kM_i_; text: .text%__1cITypeNodeEhash6kM_I_; text: .text%__1cIIndexSetKinitialize6MIpnFArena__v_; text: .text%__1cJPhaseLiveKgetfreeset6M_pnIIndexSet__; text: .text%__1cMMachProjNodeJideal_reg6kM_I_; text: .text%__1cHPhiNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cIParmNodeGis_CFG6kM_i_; text: .text%__1cENodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cNCollectedHeapMobj_allocate6FnLKlassHandle_ipnGThread__pnHoopDesc__; text: .text%__1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__; text: .text%__1cKRegionNodeGOpcode6kM_i_; text: .text%__1cMMachProjNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_; text: .text%__1cOBytecodeStreamEnext6M_nJBytecodesECode__; text: .text%__1cIProjNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cIJVMStateOis_monitor_use6kMI_i_; text: .text%__1cLTypeInstPtrEhash6kM_i_; -text: .text%__1cLuse_dom_lca6FpnFBlock_pnENode_3rnLBlock_Array__1_: gcm.o; text: .text%__1cITypeLongEhash6kM_i_; -text: .text%__1cIBoolNodeHis_Bool6M_p0_; text: .text%__1cOPhaseIdealLoopOget_early_ctrl6MpnENode__2_; text: .text%__1cOPhaseIdealLoopOset_early_ctrl6MpnENode__v_; -text: .text%__1cENodeHis_Loop6M_pnILoopNode__; text: .text%__1cIJumpDataKcell_count6M_i_; text: .text%__1cHNTarjanELINK6Mp01_v_; text: .text%__1cENodeIIdentity6MpnOPhaseTransform__p0_; -text: .text%__1cIMachNode2t6M_v_; -text: .text%__1cFStateRMachOperGenerator6MipnIMachNode_pnHCompile__pnIMachOper__; text: .text%__1cRPSOldPromotionLABFflush6M_v_; -text: .text%__1cICallNodeHis_Call6M_p0_; -text: .text%__1cENodeFIdeal6MpnIPhaseGVN_i_p0_; text: .text%__1cENodeRraise_bottom_type6MpknEType__v_; text: .text%__1cOJNIHandleBlockPallocate_handle6MpnHoopDesc__pnI_jobject__; text: .text%__1cENodeNis_block_proj6kM_pk0_; -text: .text%__1cUParallelScavengeHeapPis_in_permanent6kMpkv_i_; -text: .text%__1cHdom_lca6FpnFBlock_1_1_: gcm.o; text: .text%__1cOPhaseIdealLoopThas_local_phi_input6MpnENode__2_; text: .text%__1cJVectorSet2F6kMI_i_; text: .text%__1cIMachOperDreg6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cICallNodeLbottom_type6kM_pknEType__; text: .text%JVM_ArrayCopy; -text: .text%__1cOtypeArrayKlassQoop_is_typeArray6kM_i_; text: .text%__1cOtypeArrayKlassKcopy_array6MpnMarrayOopDesc_i2iipnGThread__v_; text: .text%__1cIMachNodeLbottom_type6kM_pknEType__; -text: .text%__1cPClassFileParserOcheck_property6MipkcipnGThread__v_; text: .text%__1cFState2t6M_v_; -text: .text%__1cFStateDDFA6MipknENode__i_; text: .text%__1cJPhaseLiveHfreeset6MpknFBlock__v_; text: .text%__1cOPhaseIdealLoopbIdom_lca_for_get_late_ctrl_internal6MpnENode_22_2_; -text: .text%__1cKRegionNodeGpinned6kM_i_; text: .text%__1cPjava_lang_ClassLas_klassOop6FpnHoopDesc__pnMklassOopDesc__; text: .text%__1cRSignatureIteratorGexpect6Mc_v_; text: .text%__1cIProjNodeEhash6kM_I_; text: .text%__1cENodeFclone6kM_p0_; text: .text%__1cILocationIwrite_on6MpnUDebugInfoWriteStream__v_; text: .text%__1cIPhaseCCPOtransform_once6MpnENode__2_; -text: .text%__1cHCompileMFillLocArray6MpnENode_pnNGrowableArray4CpnKScopeValue____i_; text: .text%__1cHRegMaskPfind_first_pair6kM_i_; text: .text%__1cENodeKmatch_edge6kMI_I_; text: .text%__1cKJNIHandlesKmake_local6FpnHJNIEnv__pnHoopDesc__pnI_jobject__; @@ -355,41 +233,27 @@ text: .text%__1cNPhaseRegAllocKreg2offset6kMi_i_; text: .text%__1cNPhaseRegAllocUreg2offset_unchecked6kMi_i_; text: .text%__1cbAfinal_graph_reshaping_impl6FpnENode_rnUFinal_Reshape_Counts__v_: compile.o; text: .text%__1cETypeFxmeet6kMpk0_2_; -text: .text%__1cENodeFis_If6M_pnGIfNode__; text: .text%__1cJStartNodeLbottom_type6kM_pknEType__; text: .text%__1cICmpPNodeGOpcode6kM_i_; text: .text%__1cOMethodLivenessKBasicBlockXcompute_gen_kill_single6MpnQciBytecodeStream__v_; text: .text%__1cKjmpDirNodeMideal_Opcode6kM_i_; text: .text%__1cOPhaseIdealLoopZremix_address_expressions6MpnENode__2_; -text: .text%__1cFMutexElock6MpnGThread__v_; -text: .text%__1cILoadNodeHis_Load6M_p0_; text: .text%__1cGciTypeEmake6FnJBasicType__p0_; text: .text%__1cQUnique_Node_ListGremove6MpnENode__v_; text: .text%__1cKNode_Array2t6MpnFArena__v_; text: .text%__1cRMachSafePointNodeEjvms6kM_pnIJVMState__; text: .text%__1cNinstanceKlassMclass_loader6kM_pnHoopDesc__; text: .text%__1cOPhaseIdealLoopNget_late_ctrl6MpnENode_2_2_; -text: .text%__1cRMachSpillCopyNodeOimplementation6kMpnKCodeBuffer_pnNPhaseRegAlloc_i_I_; text: .text%__1cKTypeAryPtrEhash6kM_i_; text: .text%__1cIIndexSet2t6Mp0_v_; text: .text%__1cNrFlagsRegOperEtype6kM_pknEType__; text: .text%__1cHTypeInt2t6Miii_v_; -text: .text%__1cTconstantPoolOopDescbAname_and_type_ref_index_at6Mi_i_; text: .text%__1cMPhaseChaitinSuse_prior_register6MpnENode_I2pnFBlock_rnJNode_List_6_i_; -text: .text%__1cIGraphKitHstopped6M_i_; -text: .text%__1cKTypeOopPtrJsingleton6kM_i_; text: .text%__1cENodeQIdeal_DU_postCCP6MpnIPhaseCCP__p0_; -text: .text%__1cNSafePointNodeGpinned6kM_i_; -text: .text%__1cQCompressedStream2t6MpCi_v_; text: .text%__1cIConLNodeGOpcode6kM_i_; text: .text%__1cHPhiNodeEhash6kM_I_; -text: .text%__1cGIfNodeGpinned6kM_i_; -text: .text%__1cOis_diamond_phi6FpnENode__i_: cfgnode.o; -text: .text%__1cLTypeInstPtrCeq6kMpknEType__i_; text: .text%__1cENodeHsize_of6kM_I_; -text: .text%__1cENodeSremove_dead_region6MpnIPhaseGVN_i_i_; text: .text%__1cHRegMaskMSmearToPairs6M_v_; -text: .text%__1cSCallStaticJavaNodeEhash6kM_I_; text: .text%jni_GetObjectField: jni.o; text: .text%__1cJMarkSweepXrevisit_weak_klass_link6FpnFKlass__v_; text: .text%__1cKklassKlassToop_follow_contents6MpnHoopDesc__v_; @@ -398,53 +262,33 @@ text: .text%__1cFKlassXfollow_weak_klass_links6MpnRBoolObjectClosure_pnKOopClosu text: .text%__1cKNode_ArrayEgrow6MI_v_; text: .text%__1cLklassVtableToop_adjust_pointers6M_v_; text: .text%__1cLklassVtableToop_follow_contents6M_v_; -text: .text%__1cCosOis_interrupted6FpnGThread_i_i_; text: .text%__1cICmpINodeGOpcode6kM_i_; -text: .text%__1cHMatcherKLabel_Root6MpknENode_pnFState_p16_6_; text: .text%__1cMPhaseChaitinHnew_lrg6MpknENode_I_v_; text: .text%__1cFframeYinterpreter_frame_method6kM_pnNmethodOopDesc__; text: .text%__1cUGenericGrowableArrayMraw_allocate6Mi_pv_; text: .text%__1cJMarkSweepNpreserve_mark6FpnHoopDesc_pnLmarkOopDesc__v_; text: .text%__1cIMachNodeKconst_size6kM_i_; -text: .text%__1cGIfNodeFis_If6M_p0_; text: .text%__1cINodeHashLhash_insert6MpnENode__v_; -text: .text%__1cOPhaseIdealLoopMis_dominator6MpnENode_2_i_; -text: .text%__1cKTypeOopPtrLxadd_offset6kMi_i_; text: .text%JVM_Read; text: .text%__1cDhpiEread6FipvI_L_; -text: .text%__1cIMachNodeIpeephole6MpnFBlock_ipnNPhaseRegAlloc_ri_p0_; text: .text%__1cMPhaseIterGVNVadd_users_to_worklist6MpnENode__v_; -text: .text%__1cIHaltNodeGis_CFG6kM_i_; -text: .text%__1cENodeKis_PCTable6kM_pknLPCTableNode__; text: .text%__1cPClassFileStreamGget_u16MpnGThread__C_; text: .text%__1cMMergeMemNodeGOpcode6kM_i_; text: .text%__1cPciObjectFactoryEfind6MpnHoopDesc_pnNGrowableArray4CpnIciObject____i_; -text: .text%__1cJCodeCacheQfind_blob_unsafe6Fpv_pnICodeBlob__; text: .text%__1cHemit_d86FrnKCodeBuffer_i_v_; -text: .text%__1cKCodeBuffer2t6MiiiiiipnKBufferBlob_pnJrelocInfo_pnORelocateBuffer_ipnLOopRecorder_pkcii_v_; text: .text%__1cLOopRecorder2t6MpnFArena__v_; text: .text%__1cKCodeBuffer2T6M_v_; -text: .text%__1cKCodeBufferQalloc_relocation6MI_v_; text: .text%__1cIMachNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cIMachNodeJemit_size6kMpnNPhaseRegAlloc__I_; -text: .text%__1cLTypeInstPtr2t6MnHTypePtrDPTR_pnHciKlass_ipnIciObject_i_v_; -text: .text%__1cLOptoRuntimeKjbyte_copy6FpW1L_v_; text: .text%__1cJloadINodeErule6kM_I_; text: .text%__1cMOopMapStream2t6MpnGOopMap_i_v_; -text: .text%__1cPciObjectFactoryLis_found_at6MipnHoopDesc_pnNGrowableArray4CpnIciObject____i_; text: .text%__1cIMachOperDreg6kMpnNPhaseRegAlloc_pknENode__i_; text: .text%__1cIAddINodeGOpcode6kM_i_; text: .text%__1cWShouldNotReachHereNodeMideal_Opcode6kM_i_; -text: .text%__1cOmatch_into_reg6FpnENode_iii1_i_: matcher.o; -text: .text%__1cENodeJis_Branch6kM_I_; -text: .text%__1cITypeLong2t6Mxxi_v_; text: .text%__1cRconstantPoolKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cIJVMStateIof_depth6kMi_p0_; -text: .text%__1cFMutexElock6M_v_; text: .text%__1cJrRegLOperEtype6kM_pknEType__; text: .text%__1cENode2t6Mp0_v_; -text: .text%__1cLTypeInstPtrEmake6FnHTypePtrDPTR_pnHciKlass_ipnIciObject_i_pk0_; -text: .text%__1cJStartNodeGpinned6kM_i_; text: .text%__1cHhashptr6Fpkv_i_; text: .text%__1cLklassItableToop_adjust_pointers6M_v_; text: .text%__1cLklassItableToop_follow_contents6M_v_; @@ -455,62 +299,39 @@ text: .text%__1cSinstanceKlassKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cNinstanceKlassXfollow_weak_klass_links6MpnRBoolObjectClosure_pnKOopClosure__v_; text: .text%__1cNinstanceKlassUadjust_static_fields6M_v_; text: .text%__1cNinstanceKlassUfollow_static_fields6M_v_; -text: .text%__1cFBlockLis_uncommon6kMrnLBlock_Array__i_; text: .text%__1cEDict2F6kMpkv_pv_; text: .text%__1cIProjNodeLbottom_type6kM_pknEType__; text: .text%__1cNCatchProjNodeGOpcode6kM_i_; text: .text%__1cJCodeCacheJfind_blob6Fpv_pnICodeBlob__; text: .text%__1cICallNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cJdo_method6FpnNmethodOopDesc__v_: recompilationMonitor.o; text: .text%__1cWconstantPoolCacheKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cKjmpConNodeMideal_Opcode6kM_i_; text: .text%__1cJLoadPNodeGOpcode6kM_i_; text: .text%__1cLSymbolTableGlookup6MipkciI_pnNsymbolOopDesc__; text: .text%__1cWconstantPoolCacheKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cWconstantPoolCacheKlassToop_adjust_pointers6MpnHoopDesc__i_; -text: .text%__1cOindOffset8OperJnum_edges6kM_I_; -text: .text%__1cKBufferBlobIis_alive6kM_i_; -text: .text%__1cFframeGsender6kMpnLRegisterMap_pnICodeBlob__0_; -text: .text%__1cJTypeTupleJsingleton6kM_i_; -text: .text%__1cKTypeAryPtrCeq6kMpknEType__i_; text: .text%__1cHPhiNodeKin_RegMask6kMI_rknHRegMask__; -text: .text%__1cETypeKhas_memory6kM_i_; -text: .text%__1cHMatcherKReduceOper6MpnFState_ipnIMachNode_rpnENode__v_; text: .text%__1cGIfNodeLbottom_type6kM_pknEType__; text: .text%__1cENodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIMachNodeFreloc6kM_i_; text: .text%__1cPciObjectFactoryDget6MpnHoopDesc__pnIciObject__; text: .text%__1cOThreadCritical2T6M_v_; text: .text%__1cOThreadCritical2t6M_v_; -text: .text%__1cFframeOis_first_frame6kM_i_; -text: .text%__1cICodeBlobOis_osr_adapter6kM_i_; -text: .text%__1cHConNodeGis_Con6kM_I_; text: .text%__1cIAddPNodeKmatch_edge6kMI_I_; text: .text%__1cILoadNodeEhash6kM_I_; text: .text%__1cRMachSpillCopyNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cICodeBlobTfix_oop_relocations6MpC1_v_; -text: .text%__1cICodeBlobTfix_oop_relocations6M_v_; text: .text%__1cIimmIOperIconstant6kM_l_; -text: .text%__1cHCmpNodeGis_Cmp6kM_pk0_; -text: .text%__1cFMutexbClock_without_safepoint_check6M_v_; text: .text%__1cENodeHdel_req6MI_v_; text: .text%__1cJCProjNodeEhash6kM_I_; -text: .text%__1cHCompileJcan_alias6MpknHTypePtr_i_i_; text: .text%__1cJMultiNodeEhash6kM_I_; text: .text%__1cRSignatureIteratorKparse_type6M_i_; -text: .text%__1cHnmethodIis_alive6kM_i_; text: .text%__1cIHaltNodeGOpcode6kM_i_; -text: .text%__1cMMergeMemNodeLis_MergeMem6M_p0_; -text: .text%__1cUPSMarkSweepDecoratorQinsert_deadspace6MrlpnIHeapWord_L_i_; text: .text%__1cHPhiNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cMPhaseIterGVNZremove_globally_dead_node6MpnENode__v_; text: .text%__1cETypeEhash6kM_i_; text: .text%__1cJHashtableLhash_symbol6Fpkci_I_; -text: .text%__1cKTypeAryPtrEmake6FnHTypePtrDPTR_pnIciObject_pknHTypeAry_pnHciKlass_ii_pk0_; -text: .text%__1cYDebugInformationRecorderLcheck_phase6Mn0AFPhase__v_; text: .text%__1cOMachReturnNodeKin_RegMask6kMI_rknHRegMask__; text: .text%__1cFframeVinterpreter_frame_bcp6kM_pC_; -text: .text%__1cICodeBlobKis_nmethod6kM_i_; text: .text%__1cICmpUNodeGOpcode6kM_i_; text: .text%__1cJOopMapSetSfind_map_at_offset6kMi_pnGOopMap__; text: .text%__1cICodeBlobbAoop_map_for_return_address6MpC_pnGOopMap__; @@ -519,91 +340,53 @@ text: .text%__1cIMachNodeHtwo_adr6kM_I_; text: .text%__1cIParmNodeGOpcode6kM_i_; text: .text%__1cTconvI2L_reg_regNodeErule6kM_I_; text: .text%__1cHTypeIntFxmeet6kMpknEType__3_; -text: .text%__1cLAdapterInfoFequal6kMp0_i_; -text: .text%__1cGOopMapbEmap_compiler_reg_to_oopmap_reg6Miii_i_; -text: .text%__1cTconstantPoolOopDescSklass_ref_index_at6Mi_i_; text: .text%__1cLSymbolTableGlookup6FpkcipnGThread__pnNsymbolOopDesc__; -text: .text%__1cKoopFactoryKnew_symbol6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cMloadConINodeMideal_Opcode6kM_i_; text: .text%__1cGTarjanEEVAL6M_p0_; -text: .text%__1cKRelocationYindex_to_runtime_address6Fl_pC_; text: .text%__1cYexternal_word_RelocationLunpack_data6M_v_; text: .text%__1cJCatchNodeGOpcode6kM_i_; text: .text%__1cZPhaseConservativeCoalesceIcoalesce6MpnFBlock__v_; -text: .text%__1cITypeLongJsingleton6kM_i_; -text: .text%__1cNencode_RegMem6FrnKCodeBuffer_iiiiii_v_; -text: .text%__1cFBlockGselect6MrnJNode_List_rnLBlock_Array_pirnJVectorSet_IrnNGrowableArray4CI___pnENode__; -text: .text%__1cGOopMapHset_xxx6MinLOopMapValueJoop_types_iii_v_; -text: .text%__1cFMutexNowned_by_self6kM_i_; text: .text%__1cTCreateExceptionNodeErule6kM_I_; text: .text%__1cIJVMStateLdebug_start6kM_I_; -text: .text%__1cRCardTableModRefBSEkind6M_nKBarrierSetEName__; text: .text%__1cMloadConPNodeMideal_Opcode6kM_i_; text: .text%__1cIMachNodeNoperand_index6kMI_i_; -text: .text%__1cKMachIfNodeJis_MachIf6kM_pk0_; text: .text%__1cFBlockIis_Empty6kM_i_; text: .text%__1cMMachTypeNodeLbottom_type6kM_pknEType__; text: .text%__1cIAddPNodeLbottom_type6kM_pknEType__; text: .text%__1cFBlockOcode_alignment6M_I_; -text: .text%__1cKRegionNodeJis_Region6kM_pk0_; text: .text%__1cGBitMapUclear_range_of_words6MLL_v_; -text: .text%__1cGBitMapFclear6M_v_; -text: .text%__1cSinstanceKlassKlassMoop_is_klass6kM_i_; text: .text%__1cJrRegIOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cKCastPPNodeGOpcode6kM_i_; text: .text%__1cIPhaseIFGMtest_edge_sq6kMII_i_; -text: .text%__1cFframeQoops_do_internal6MpnKOopClosure_pnLRegisterMap_i_v_; text: .text%__1cNinstanceKlassLfind_method6FpnPobjArrayOopDesc_pnNsymbolOopDesc_4_pnNmethodOopDesc__; text: .text%__1cFStateRMachNodeGenerator6MipnHCompile__pnIMachNode__; text: .text%__1cHMatcherKReduceInst6MpnFState_irpnENode__pnIMachNode__; -text: .text%__1cENodeOis_CountedLoop6M_pnPCountedLoopNode__; text: .text%__1cPClassFileStreamHskip_u16MipnGThread__v_; -text: .text%__1cMMachCallNodeGpinned6kM_i_; -text: .text%__1cHnmethodJis_zombie6kM_i_; text: .text%__1cMMergeMemNodeLbottom_type6kM_pknEType__; text: .text%__1cNinstanceKlassLfind_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; -text: .text%__1cKTypeAryPtrKadd_offset6kMi_pknHTypePtr__; -text: .text%__1cKCodeBufferIrelocate6MpCrknQRelocationHolder_i_v_; text: .text%__1cILoadNodeLbottom_type6kM_pknEType__; text: .text%__1cLConvI2LNodeGOpcode6kM_i_; text: .text%__1cHTypeIntEmake6Fi_pk0_; -text: .text%__1cbFCompressedLineNumberWriteStreamKwrite_pair6Mii_v_; text: .text%__1cJMultiNodeIproj_out6kMI_pnIProjNode__; -text: .text%__1cFKlassMoop_is_array6kM_i_; text: .text%__1cIBoolNodeEhash6kM_I_; text: .text%__1cIimmPOperEtype6kM_pknEType__; text: .text%__1cMloadConPNodeLbottom_type6kM_pknEType__; -text: .text%__1cJrRegPOperJnum_edges6kM_I_; text: .text%__1cOrFlagsRegUOperEtype6kM_pknEType__; text: .text%__1cGIfNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cNsymbolOopDescLas_C_string6kM_pc_; text: .text%__1cNsymbolOopDescLas_C_string6kMpci_1_; -text: .text%__1cGOopMapJset_value6Miii_v_; text: .text%__1cITypeLongFxmeet6kMpknEType__3_; text: .text%__1cNCollectedHeapbHcheck_for_non_bad_heap_word_value6MpnIHeapWord_L_v_; -text: .text%__1cHMatcherTReduceInst_Interior6MpnFState_ipnIMachNode_IrpnENode__I_; -text: .text%__1cNsymbolOopDescGequals6kMpkci_i_; text: .text%__1cMPhaseChaitinLinsert_proj6MpnFBlock_IpnENode_I_v_; -text: .text%__1cKjmpConNodeGpinned6kM_i_; -text: .text%__1cNSafePointNodebBneeds_polling_address_input6F_i_; text: .text%__1cHCompileRprobe_alias_cache6MpknHTypePtr__pn0APAliasCacheEntry__; -text: .text%__1cHnmethodOis_not_entrant6kM_i_; -text: .text%__1cIAddPNodeHis_AddP6M_p0_; -text: .text%__1cNobjArrayKlassQarray_klass_impl6MiipnGThread__pnMklassOopDesc__; -text: .text%__1cNobjArrayKlassQarray_klass_impl6FnTobjArrayKlassHandle_iipnGThread__pnMklassOopDesc__; -text: .text%__1cIMachNodeGExpand6MpnFState_rnJNode_List__p0_; text: .text%__1cXInterpreterFrameClosureJoffset_do6Mi_v_; -text: .text%__1cNinstanceKlassQarray_klass_impl6FnTinstanceKlassHandle_iipnGThread__pnMklassOopDesc__; -text: .text%__1cNinstanceKlassQarray_klass_impl6MiipnGThread__pnMklassOopDesc__; text: .text%__1cENodeIdestruct6M_v_; text: .text%__1cIAddPNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cPClassFileParserbEparse_constant_pool_utf8_entry6MnSconstantPoolHandle_ipnGThread__v_; text: .text%__1cPClassFileParserRverify_legal_utf86MpkCipnGThread__v_; text: .text%__1cMMachHaltNodeEjvms6kM_pnIJVMState__; text: .text%__1cKoopFactoryMnew_objArray6FpnMklassOopDesc_ipnGThread__pnPobjArrayOopDesc__; text: .text%__1cNinstanceKlassRallocate_objArray6MiipnGThread__pnPobjArrayOopDesc__; text: .text%__1cGBitMapJset_union6M0_v_; -text: .text%__1cPciInstanceKlassMis_interface6M_i_; text: .text%__1cHTypeIntEmake6Fiii_pk0_; text: .text%__1cJTypeTupleEhash6kM_i_; text: .text%__1cFParsePdo_one_bytecode6M_v_; @@ -614,27 +397,14 @@ text: .text%__1cUParallelScavengeHeapWpermanent_mem_allocate6ML_pnIHeapWord__; text: .text%__1cJPSPermGenSallocate_permanent6ML_pnIHeapWord__; text: .text%__1cPmethodDataKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cIHaltNodeKmatch_edge6kMI_I_; -text: .text%__1cENodeOis_block_start6kM_i_; -text: .text%__1cHMatcherQis_save_on_entry6Mi_i_; -text: .text%__1cLsymbolKlassNoop_is_symbol6kM_i_; -text: .text%__1cITypeLongEmake6Fxxi_pk0_; text: .text%__1cPmethodDataKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cPmethodDataKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cMPhaseIterGVNKis_IterGVN6M_p0_; text: .text%__1cGBitMap2t6MpLL_v_; -text: .text%__1cLOptoRuntimePnew_typeArray_C6FnJBasicType_ipnKJavaThread__v_; -text: .text%__1cHCompilePfind_alias_type6MpknHTypePtr_i_pn0AJAliasType__; text: .text%__1cNnew_loc_value6FpnNPhaseRegAlloc_inILocationEType__pnNLocationValue__: output.o; -text: .text%__1cKjmpDirNodePoper_input_base6kM_I_; -text: .text%__1cMMachCallNodeLis_MachCall6M_p0_; -text: .text%__1cHPhiNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cXjava_lang_ref_ReferenceNreferent_addr6FpnHoopDesc__p2_; text: .text%__1cOindOffset8OperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cOindOffset8OperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cZPhaseConservativeCoalesceJcopy_copy6MpnENode_2pnFBlock_I_i_; -text: .text%__1cKutf8_write6FpCH_0_: utf8.o; text: .text%__1cKNode_ArrayGremove6MI_v_; -text: .text%__1cTconstantPoolOopDescQsignature_ref_at6Mi_pnNsymbolOopDesc__; text: .text%__1cHPhiNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cRSignatureIterator2t6MnMsymbolHandle__v_; text: .text%__1cJloadPNodeMideal_Opcode6kM_i_; @@ -642,17 +412,11 @@ text: .text%__1cPSignatureStreamEnext6M_v_; text: .text%__1cOindOffset8OperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cLjmpConUNodeMideal_Opcode6kM_i_; text: .text%__1cFBlockJfind_node6kMpknENode__I_; -text: .text%__1cOis_range_check6FpnENode_r12ri_i_: ifnode.o; -text: .text%__1cENodeIis_Start6M_pnJStartNode__; text: .text%__1cHhashkey6Fpkv_i_; text: .text%__1cNLoadRangeNodeGOpcode6kM_i_; text: .text%__1cJLoadINodeGOpcode6kM_i_; -text: .text%__1cKis_x2logic6FpnIPhaseGVN_pnENode__3_: cfgnode.o; -text: .text%__1cHAbsNodeLis_absolute6FpnIPhaseGVN_pnENode__4_; text: .text%__1cGTarjanICOMPRESS6M_v_; text: .text%__1cTconstantPoolOopDescNklass_at_impl6FnSconstantPoolHandle_ipnGThread__pnMklassOopDesc__; -text: .text%__1cENodeHis_Goto6kM_I_; -text: .text%__1cLPCTableNodeGpinned6kM_i_; text: .text%JVM_ReleaseUTF; text: .text%__1cHSubNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cFChunk2t6ML_v_; @@ -662,7 +426,6 @@ text: .text%__1cMCreateExNodeGOpcode6kM_i_; text: .text%__1cFframebCsender_for_interpreter_frame6kMpnLRegisterMap__0_; text: .text%__1cFChunk2k6Fpv_v_; text: .text%__1cOMachReturnNodeIadr_type6kM_pknHTypePtr__; -text: .text%__1cJrelocInfo2t6Mn0AJrelocType_ii_v_; text: .text%__1cHMatcherKmatch_tree6MpknENode__pnIMachNode__; text: .text%__1cLTypeInstPtrFxmeet6kMpknEType__3_; text: .text%__1cKjmpConNodePoper_input_base6kM_I_; @@ -670,84 +433,45 @@ text: .text%__1cIJVMState2t6MpnIciMethod_p0_v_; text: .text%__1cMciMethodDataHdata_at6Mi_pnLProfileData__; text: .text%__1cJrelocInfoNfinish_prefix6Mph_p0_; text: .text%__1cIProjNodeHsize_of6kM_I_; -text: .text%__1cENodeHis_AddP6M_pnIAddPNode__; -text: .text%__1cLTypeInstPtrKadd_offset6kMi_pknHTypePtr__; text: .text%__1cHBitDataKcell_count6M_i_; -text: .text%__1cFframeZsender_for_compiled_frame6kMpnLRegisterMap_pnICodeBlob__0_; text: .text%__1cFArenaEgrow6ML_pv_; -text: .text%__1cNCollectedHeapWpermanent_obj_allocate6FnLKlassHandle_ipnGThread__pnHoopDesc__; text: .text%__1cMPhaseIterGVNMsubsume_node6MpnENode_2_v_; -text: .text%__1cLBoxLockNodeNrematerialize6kM_i_; -text: .text%__1cRMachSafePointNodeQis_MachSafePoint6M_p0_; text: .text%__1cJloadBNodeErule6kM_I_; -text: .text%__1cITypeNodeRraise_bottom_type6MpknEType__v_; text: .text%__1cHConNodeEhash6kM_I_; -text: .text%__1cICodeBlobLlink_offset6M_i_; text: .text%__1cENodeRdisconnect_inputs6Mp0_i_; text: .text%__1cIHaltNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cICodeBlobOis_i2c_adapter6kM_i_; text: .text%__1cTconstantPoolOopDescWsignature_ref_index_at6Mi_i_; -text: .text%__1cIJVMStateNclone_shallow6kM_p0_; text: .text%__1cRMachSpillCopyNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cGOopMapQset_callee_saved6Miiii_v_; text: .text%__1cKRegionNodeLbottom_type6kM_pknEType__; -text: .text%__1cJOopMapSetTupdate_register_map6FpknFframe_pnICodeBlob_pnLRegisterMap__v_; text: .text%__1cIJVMStateJdebug_end6kM_I_; -text: .text%__1cXjava_lang_ref_ReferenceJnext_addr6FpnHoopDesc__p2_; text: .text%__1cENode2t6Mp011_v_; -text: .text%__1cENodeMis_SafePoint6M_pnNSafePointNode__; -text: .text%__1cHMatcherTcollect_null_checks6MpnENode__v_; -text: .text%__1cNSafePointNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cHMemNodeMIdeal_common6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cGBitMapGat_put6MLi_v_; -text: .text%__1cFciEnvIis_in_vm6F_i_; text: .text%__1cNSafePointNodeHsize_of6kM_I_; -text: .text%__1cMgetTimeNanos6F_x_; -text: .text%__1cKciTypeFlowLStateVectorSapply_one_bytecode6MpnQciBytecodeStream__i_; text: .text%__1cKPSScavengeUoop_promotion_failed6FpnHoopDesc_pnLmarkOopDesc__v_; text: .text%__1cHTypePtrLmeet_offset6kMi_i_; -text: .text%__1cOMergeMemStreamOnext_non_empty6Mi_i_; -text: .text%__1cNPhaseRegAllocGis_oop6kMpknENode__i_; text: .text%__1cSPSPromotionManagerUoop_promotion_failed6MpnHoopDesc_pnLmarkOopDesc__2_; -text: .text%__1cIMachOperLdisp_is_oop6kM_i_; text: .text%__1cRSignatureIteratorSiterate_parameters6M_v_; text: .text%__1cNmethodOopDescIbci_from6kMpC_i_; -text: .text%__1cICodeBlobYcaller_must_gc_arguments6kMpnKJavaThread__i_; text: .text%__1cLLShiftLNodeGOpcode6kM_i_; text: .text%__1cOMethodLivenessKBasicBlockIload_one6Mi_v_; -text: .text%__1cJTypeTupleCeq6kMpknEType__i_; text: .text%__1cHCmpNodeLbottom_type6kM_pknEType__; text: .text%__1cFDictI2i6M_v_; -text: .text%__1cPjava_lang_ClassMis_primitive6FpnHoopDesc__i_; text: .text%JVM_GetMethodIxExceptionTableLength; -text: .text%__1cKC2IAdapterIis_alive6kM_i_; text: .text%__1cENodeHget_int6kM_i_; text: .text%__1cMMachCallNodeLbottom_type6kM_pknEType__; text: .text%__1cOGenerateOopMapHinterp16MpnOBytecodeStream__v_; -text: .text%__1cIAddPNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cMloadConINodeLbottom_type6kM_pknEType__; text: .text%__1cPCheckCastPPNodeGOpcode6kM_i_; text: .text%__1cMloadConINodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cENodeXis_iteratively_computed6M_i_; -text: .text%__1cNloadConI0NodePoper_input_base6kM_I_; -text: .text%__1cNinstanceKlassPoop_is_instance6kM_i_; text: .text%__1cENodeKreplace_by6Mp0_v_; text: .text%__1cHPhiNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cIBoolTestKcc2logical6kMpknEType__3_; text: .text%__1cIBoolNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cJrelocInfoKset_format6Mi_v_; text: .text%__1cXruntime_call_RelocationEtype6M_nJrelocInfoJrelocType__; -text: .text%__1cKRelocationJpack_data6M_i_; -text: .text%__1cXjava_lang_ref_ReferencePdiscovered_addr6FpnHoopDesc__p2_; text: .text%__1cNPhaseCoalesceRcombine_these_two6MpnENode_2_v_; text: .text%__1cNtestP_regNodeMideal_Opcode6kM_i_; -text: .text%__1cETypeFempty6kM_i_; -text: .text%__1cHMemNodeGis_Mem6M_p0_; -text: .text%__1cZload_can_see_stored_value6FpnILoadNode_pnENode_pnOPhaseTransform__3_: memnode.o; text: .text%__1cICallNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cICodeBlobJis_zombie6kM_i_; text: .text%__1cJTypeTupleGfields6FI_ppknEType__; -text: .text%__1cOGenerateOopMapPjump_targets_do6MpnOBytecodeStream_pFp0ipi_v4_i_; text: .text%__1cPClassFileParserUassemble_annotations6MpCi1ipnGThread__nPtypeArrayHandle__; text: .text%method_compare: methodOop.o; text: .text%__1cMMergeMemNodeEhash6kM_I_; @@ -755,47 +479,30 @@ text: .text%__1cJloadPNodePoper_input_base6kM_I_; text: .text%__1cILoadNodeKmatch_edge6kMI_I_; text: .text%__1cFBlockUneeded_for_next_call6MpnENode_rnJVectorSet_rnLBlock_Array__v_; text: .text%__1cIIndexSetSpopulate_free_list6F_v_; -text: .text%__1cGIfNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cCosPelapsed_counter6F_x_; text: .text%__1cIAddPNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cIemit_d326FrnKCodeBuffer_i_v_; -text: .text%__1cNloadConI0NodeHtwo_adr6kM_I_; text: .text%__1cJStoreNodeKmatch_edge6kMI_I_; text: .text%__1cITypeNodeDcmp6kMrknENode__I_; text: .text%__1cMPhaseChaitinFUnion6MpknENode_3_v_; -text: .text%__1cFKlassMoop_is_klass6kM_i_; text: .text%__1cRSignatureIteratorTcheck_signature_end6M_v_; text: .text%__1cRSignatureIteratorSiterate_returntype6M_v_; text: .text%__1cNinstanceKlassWuncached_lookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; -text: .text%__1cHnmethodKis_nmethod6kM_i_; text: .text%__1cILoadNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cNSafePointNodeKmatch_edge6kMI_I_; text: .text%__1cPClassFileStreamGget_u46MpnGThread__I_; -text: .text%__1cSCallStaticJavaNodeRis_CallStaticJava6kM_pk0_; text: .text%__1cKarrayKlassLobject_size6kMi_i_; -text: .text%__1cPciInstanceKlassRis_instance_klass6M_i_; -text: .text%__1cOno_flip_branch6FpnFBlock__i_: block.o; text: .text%__1cKarrayKlassGvtable6kM_pnLklassVtable__; text: .text%__1cYCallStaticJavaDirectNodePoper_input_base6kM_I_; text: .text%__1cOGenerateOopMapEpush6MnNCellTypeState__v_; -text: .text%__1cKjmpDirNodeGpinned6kM_i_; -text: .text%__1cTconstantPoolOopDescLname_ref_at6Mi_pnNsymbolOopDesc__; -text: .text%__1cKjmpDirNodeHtwo_adr6kM_I_; text: .text%__1cPciInstanceKlassGloader6M_pnHoopDesc__; -text: .text%__1cJrRegLOperJnum_edges6kM_I_; text: .text%__1cOGenerateOopMapDpop6M_nNCellTypeState__; -text: .text%__1cNGrowableArray4CpnKScopeValue__2t6Mii_v_; text: .text%__1cYDebugInformationRecorderWserialize_scope_values6MpnNGrowableArray4CpnKScopeValue____i_; text: .text%__1cYDebugInformationRecorderTcreate_scope_values6MpnNGrowableArray4CpnKScopeValue____pnKDebugToken__; text: .text%__1cITypeNodeHsize_of6kM_I_; text: .text%__1cILoadNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cPPerfLongVariantGsample6M_v_; text: .text%__1cNloadConI0NodeErule6kM_I_; -text: .text%__1cJCodeCacheIcontains6Fpv_i_; text: .text%__1cQciBytecodeStreamMreset_to_bci6Mi_v_; -text: .text%__1cJOopMapSetGall_do6FpknFframe_pnICodeBlob_pknLRegisterMap_pnKOopClosure_pFppnHoopDesc_9E_v9B9B_v_; -text: .text%__1cFframeRoops_code_blob_do6MpnKOopClosure_pknLRegisterMap__v_; -text: .text%__1cJOopMapSetHoops_do6FpknFframe_pnICodeBlob_pknLRegisterMap_pnKOopClosure__v_; text: .text%__1cHPhiNodeHsize_of6kM_I_; text: .text%__1cSInterpreterRuntimeJanewarray6FpnKJavaThread_pnTconstantPoolOopDesc_ii_v_; text: .text%__1cMPhaseChaitinNFind_compress6MI_I_; @@ -804,92 +511,55 @@ text: .text%__1cLOopMapCacheIentry_at6kMi_pnQOopMapCacheEntry__; text: .text%__1cOGenerateOopMapKcheck_type6MnNCellTypeState_1_v_; text: .text%__1cPciInstanceKlassRprotection_domain6M_pnHoopDesc__; text: .text%__1cSobjArrayKlassKlassIoop_size6kMpnHoopDesc__i_; -text: .text%__1cILoadNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cMPhaseIterGVNbGregister_new_node_with_optimizer6MpnENode__2_; -text: .text%__1cKBufferBlobMdo_unloading6MpnRBoolObjectClosure_pnKOopClosure_i_v_; -text: .text%__1cKBufferBlobHoops_do6MpnKOopClosure__v_; text: .text%__1cLRegisterMapFclear6M_v_; text: .text%__1cIBoolNodeLbottom_type6kM_pknEType__; text: .text%__1cITypeNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cKRegionNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cLBlock_Array2t6MpnFArena__v_; -text: .text%__1cPSignatureStreamHis_done6kM_i_; -text: .text%__1cNrFlagsRegOperJnum_edges6kM_I_; -text: .text%__1cLPhaseValuesGintcon6Mi_pnIConINode__; text: .text%__1cKStoreINodeGOpcode6kM_i_; -text: .text%__1cLRegisterMap2t6MpnKJavaThread_i_v_; -text: .text%__1cNmethodOopDescPis_empty_method6kM_i_; text: .text%__1cJcmpOpOperJnum_edges6kM_I_; text: .text%__1cNExceptionMark2t6MrpnGThread__v_; text: .text%__1cNExceptionMark2T6M_v_; text: .text%__1cCosMvm_page_size6F_i_; -text: .text%__1cJloadPNodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cOcompU_rRegNodePoper_input_base6kM_I_; -text: .text%__1cNmethodOopDescLis_accessor6kM_i_; -text: .text%__1cPloadConUL32NodePoper_input_base6kM_I_; text: .text%__1cMPhaseChaitinSget_spillcopy_wide6MpnENode_2I_2_; -text: .text%__1cKI2CAdapterIis_alive6kM_i_; -text: .text%__1cHnmethodHoops_do6MpnKOopClosure__v_; text: .text%__1cIGraphKitJsync_jvms6kM_pnIJVMState__; text: .text%__1cFframebFinterpreter_frame_monitor_begin6kM_pnPBasicObjectLock__; -text: .text%__1cENodeGis_Mem6M_pnHMemNode__; -text: .text%__1cQSystemDictionaryXcheck_signature_loaders6FnMsymbolHandle_nGHandle_2ipnGThread__v_; -text: .text%__1cIGraphKitEstop6M_v_; text: .text%__1cNidealize_test6FpnIPhaseGVN_pnGIfNode__3_: ifnode.o; -text: .text%__1cPloadConUL32NodeHtwo_adr6kM_I_; text: .text%__1cNSafePointNodeLbottom_type6kM_pknEType__; text: .text%__1cPTwoOopHashtableMcompute_hash6MnMsymbolHandle_nGHandle__I_; text: .text%__1cRSignatureIterator2t6MpnNsymbolOopDesc__v_; text: .text%__1cKStorePNodeGOpcode6kM_i_; -text: .text%__1cHMonitorKnotify_all6M_i_; text: .text%__1cFframeVinterpreter_frame_bci6kM_i_; text: .text%__1cHRetNodeNis_block_proj6kM_pknENode__; text: .text%__1cMPhaseChaitinMyank_if_dead6MpnENode_pnFBlock_pnJNode_List_6_i_; text: .text%__1cENodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cFBlockLfind_remove6MpknENode__v_; text: .text%__1cOGenerateOopMapRdo_exception_edge6MpnOBytecodeStream__v_; -text: .text%__1cKOopClosureLdo_nmethods6kM_ki_; -text: .text%__1cGOopMapHset_oop6Miii_v_; text: .text%__1cNSafePointNodeSset_next_exception6Mp0_v_; text: .text%__1cPloadConUL32NodeErule6kM_I_; text: .text%__1cFChunkEchop6M_v_; text: .text%__1cMciMethodDataJnext_data6MpnLProfileData__2_; text: .text%__1cJStoreNodeLbottom_type6kM_pknEType__; -text: .text%__1cPciObjectFactorySget_unloaded_klass6MpnHciKlass_pnIciSymbol_i_2_; text: .text%__1cLBlock_StackXmost_frequent_successor6MpnFBlock__I_; text: .text%__1cFBlockScall_catch_cleanup6MrnLBlock_Array__v_; -text: .text%__1cFBlockOschedule_local6MrnHMatcher_rnLBlock_Array_pirnJVectorSet_rnNGrowableArray4CI___i_; text: .text%__1cXPhaseAggressiveCoalesceIcoalesce6MpnFBlock__v_; text: .text%__1cOGenerateOopMapFppop16MnNCellTypeState__v_; text: .text%__1cKstorePNodePoper_input_base6kM_I_; -text: .text%__1cMPhaseIterGVNFwiden6kMpknEType_3_3_; -text: .text%__1cKRegionNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cNmethodOopDescRis_not_compilable6kMi_i_; -text: .text%__1cLis_cond_add6FpnIPhaseGVN_pnHPhiNode__pnENode__; text: .text%__1cPsplit_flow_path6FpnIPhaseGVN_pnHPhiNode__pnENode__: cfgnode.o; text: .text%__1cKRegionNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cGTarjanELINK6Mp01_v_; -text: .text%__1cKTypeRawPtrKadd_offset6kMi_pknHTypePtr__; -text: .text%__1cWMutableSpaceUsedHelperLtake_sample6M_x_; -text: .text%__1cIBoolNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cIsplit_if6FpnGIfNode_pnMPhaseIterGVN__pnENode__: ifnode.o; -text: .text%__1cTremove_useless_bool6FpnGIfNode_pnIPhaseGVN__pnENode__: ifnode.o; text: .text%__1cMPhaseChaitinNFind_compress6MpknENode__I_; text: .text%__1cRInterpreterOopMapKinitialize6M_v_; text: .text%__1cJTypeTupleEmake6FIppknEType__pk0_; -text: .text%__1cYCallStaticJavaDirectNodeHtwo_adr6kM_I_; text: .text%__1cKDictionaryJget_entry6MiInMsymbolHandle_nGHandle__pnPDictionaryEntry__; text: .text%__1cLLShiftINodeGOpcode6kM_i_; text: .text%__1cQResultTypeFinderDset6MinJBasicType__v_; -text: .text%__1cHnmethodMdo_unloading6MpnRBoolObjectClosure_pnKOopClosure_i_v_; text: .text%__1cNmethodOopDescLresult_type6kM_nJBasicType__; text: .text%__1cIMachOperOindex_position6kM_i_; -text: .text%__1cKReflectionTverify_field_access6FpnMklassOopDesc_22nLAccessFlags_ii_i_; text: .text%__1cOemit_d32_reloc6FrnKCodeBuffer_irknQRelocationHolder_i_v_; text: .text%__1cLjmpConUNodePoper_input_base6kM_I_; text: .text%__1cHAddNodeEhash6kM_I_; -text: .text%__1cNtestP_regNodePoper_input_base6kM_I_; -text: .text%__1cHSubNodeGis_Sub6M_p0_; text: .text%__1cPcheckCastPPNodePoper_input_base6kM_I_; text: .text%__1cIRootNodeGOpcode6kM_i_; text: .text%__1cFframebDinterpreter_frame_monitor_end6kM_pnPBasicObjectLock__; @@ -900,20 +570,14 @@ text: .text%__1cRInterpreterOopMap2T6M_v_; text: .text%__1cRInterpreterOopMapNresource_copy6MpnQOopMapCacheEntry__v_; text: .text%__1cLOopMapCacheGlookup6MnMmethodHandle_ipnRInterpreterOopMap__v_; text: .text%__1cRInterpreterOopMap2t6M_v_; -text: .text%__1cFframeToops_interpreted_do6MpnKOopClosure_pknLRegisterMap_i_v_; text: .text%__1cSInterpreterRuntimeLcache_entry6FpnKJavaThread__pnWConstantPoolCacheEntry__; text: .text%__1cOindOffset8OperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cOJNIHandleBlockHoops_do6MpnKOopClosure__v_; text: .text%__1cKstorePNodeMideal_Opcode6kM_i_; text: .text%__1cFChunkJnext_chop6M_v_; text: .text%__1cENode2t6Mp0111_v_; -text: .text%__1cITypeLongEmake6Fx_pk0_; -text: .text%__1cLjmpConUNodeGpinned6kM_i_; text: .text%__1cPciObjectFactoryNfind_non_perm6MpnHoopDesc__rpn0ANNonPermObject__; text: .text%__1cHCmpNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cKTypeRawPtrJsingleton6kM_i_; -text: .text%__1cNGCTaskManagerNresource_flag6MI_i_; -text: .text%__1cNGCTaskManagerYshould_release_resources6MI_i_; text: .text%__1cIAddINodeLbottom_type6kM_pknEType__; text: .text%__1cNloadRangeNodeErule6kM_I_; text: .text%__1cNrFlagsRegOperKin_RegMask6kMi_pknHRegMask__; @@ -923,9 +587,7 @@ text: .text%__1cYciExceptionHandlerStreamEnext6M_v_; text: .text%__1cOBasicHashtableJnew_entry6MI_pnTBasicHashtableEntry__; text: .text%__1cJHashtableJnew_entry6MIpnHoopDesc__pnOHashtableEntry__; text: .text%__1cSCountedLoopEndNodeGOpcode6kM_i_; -text: .text%__1cTOopMapForCacheEntryRpossible_gc_point6MpnOBytecodeStream__i_; text: .text%__1cKstoreINodePoper_input_base6kM_I_; -text: .text%__1cNtestP_regNodeHtwo_adr6kM_I_; text: .text%__1cCosVcurrent_stack_pointer6F_pC_; text: .text%__1cMMergeMemNodePiteration_setup6Mpk0_v_; text: .text%__1cRMachSafePointNodeKin_RegMask6kMI_rknHRegMask__; @@ -933,13 +595,8 @@ text: .text%__1cJStoreNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cMMergeMemNodeJmemory_at6kMI_pnENode__; text: .text%__1cJloadSNodeErule6kM_I_; text: .text%__1cLLShiftLNodeLbottom_type6kM_pknEType__; -text: .text%__1cMBasicAdapterHoops_do6MpnKOopClosure__v_; -text: .text%__1cKjmpConNodeJnum_opnds6kM_I_; -text: .text%__1cLOptoRuntimeOnew_objArray_C6FpnMklassOopDesc_ipnKJavaThread__v_; text: .text%__1cTconstantPoolOopDescSklass_at_if_loaded6FnSconstantPoolHandle_i_pnMklassOopDesc__; -text: .text%__1cFciEnvXget_klass_by_index_impl6MpnPciInstanceKlass_iri_pnHciKlass__; text: .text%__1cKjmpDirNodeHsize_of6kM_I_; -text: .text%__1cJloadPNodeJnum_opnds6kM_I_; text: .text%__1cJCProjNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJMultiNodeFmatch6MpknIProjNode_pknHMatcher__pnENode__; text: .text%__1cHOopFlowNcompute_reach6MpnNPhaseRegAlloc_ipnEDict__v_; @@ -952,127 +609,88 @@ text: .text%__1cLGCTaskQdDueueHenqueue6MpnGGCTask__v_; text: .text%__1cNGCTaskManagerWincrement_busy_workers6M_I_; text: .text%__1cLGCTaskQdDueueHdequeue6M_pnGGCTask__; text: .text%__1cNGCTaskManagerPnote_completion6MI_v_; -text: .text%__1cHMatcherXadjust_outgoing_stk_arg6Miiri_i_; text: .text%__1cTCreateExceptionNodeMideal_Opcode6kM_i_; text: .text%__1cKIfTrueNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cXvirtual_call_RelocationLunpack_data6M_v_; -text: .text%__1cMBasicAdapterMdo_unloading6MpnRBoolObjectClosure_pnKOopClosure_i_v_; text: .text%__1cXindIndexScaleOffsetOperJnum_edges6kM_I_; text: .text%__1cLRShiftINodeGOpcode6kM_i_; -text: .text%__1cJStoreNodeIis_Store6kM_pk0_; text: .text%Unsafe_CompareAndSwapLong; text: .text%__1cNinstanceKlassRprotection_domain6M_pnHoopDesc__; text: .text%__1cNtestI_regNodeMideal_Opcode6kM_i_; text: .text%__1cTAbstractInterpreterLmethod_kind6FnMmethodHandle__n0AKMethodKind__; text: .text%__1cJStoreNodeEhash6kM_I_; -text: .text%__1cOcompI_rRegNodePoper_input_base6kM_I_; text: .text%__1cKmethodOperGmethod6kM_l_; -text: .text%__1cHTypeAryRary_must_be_exact6kM_i_; text: .text%__1cKstoreINodeMideal_Opcode6kM_i_; text: .text%__1cGGCTask2t6M_v_; -text: .text%__1cOcompU_rRegNodeHtwo_adr6kM_I_; text: .text%__1cNSafePointNodeOnext_exception6kM_p0_; text: .text%__1cOindOffset8OperNbase_position6kM_i_; text: .text%__1cOindOffset8OperNconstant_disp6kM_i_; -text: .text%__1cKjmpDirNodeHis_Goto6kM_I_; text: .text%__1cENodeHset_req6MIp0_v_; text: .text%__1cTconstantPoolOopDescNklass_name_at6Mi_pnNsymbolOopDesc__; -text: .text%__1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_; text: .text%__1cSObjectSynchronizerJfast_exit6FpnHoopDesc_pnJBasicLock_pnGThread__v_; text: .text%__1cWShouldNotReachHereNodePoper_input_base6kM_I_; -text: .text%__1cMMergeMemNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cGThreadLis_in_stack6kMpC_i_; text: .text%__1cLIfFalseNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cKJavaThreadNis_lock_owned6kMpC_i_; text: .text%__1cXAdaptiveWeightedAverageYcompute_adaptive_average6Mff_f_; text: .text%__1cOcompU_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cJloadPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cTconvI2L_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cSPSPromotionManagerbBgc_thread_promotion_manager6Fi_p0_; -text: .text%__1cNmethodOopDescMintrinsic_id6kM_nMvmIntrinsicsCID__; -text: .text%__1cKstorePNodeJnum_opnds6kM_I_; text: .text%__1cQinstanceRefKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cQinstanceRefKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cMMergeMemNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cLciSignatureLreturn_type6kM_pnGciType__; -text: .text%__1cMMergeMemNodeQclone_all_memory6FpnENode__p0_; text: .text%__1cIGraphKitJclone_map6M_pnNSafePointNode__; text: .text%__1cLMachNopNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cJchar2type6Fc_nJBasicType__; text: .text%__1cJFieldTypeKbasic_type6FpnNsymbolOopDesc__nJBasicType__; text: .text%__1cKRelocationLspec_simple6FnJrelocInfoJrelocType__nQRelocationHolder__; -text: .text%__1cICallNodeLis_CallLeaf6kM_pknMCallLeafNode__; -text: .text%__1cLrecord_bias6FpknIPhaseIFG_ii_v_: coalesce.o; text: .text%__1cJrRegPOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cMObjectLocker2t6MnGHandle_pnGThread__v_; text: .text%__1cMObjectLocker2T6M_v_; text: .text%__1cNloadRangeNodeMideal_Opcode6kM_i_; -text: .text%__1cRMachSafePointNodeRis_safepoint_node6kM_i_; -text: .text%__1cHTypeIntFempty6kM_i_; text: .text%__1cRInvocationCounterJset_state6Mn0AFState__v_; text: .text%__1cRInvocationCounterFreset6M_v_; -text: .text%__1cKTypeOopPtrWmake_from_klass_common6FpnHciKlass_ii_pk0_; text: .text%__1cRInvocationCounterEinit6M_v_; text: .text%__1cNSafePointNodeEjvms6kM_pnIJVMState__; text: .text%__1cNSignatureInfoJdo_object6Mii_v_; -text: .text%__1cLPhaseValuesFwiden6kMpknEType_3_3_; text: .text%__1cTconstantPoolOopDescRname_ref_index_at6Mi_i_; text: .text%__1cIHaltNodeLbottom_type6kM_pknEType__; -text: .text%__1cRRawBytecodeStreamMset_interval6Mii_v_; -text: .text%__1cNtestI_regNodeHtwo_adr6kM_I_; text: .text%__1cSsafePoint_pollNodeMideal_Opcode6kM_i_; -text: .text%__1cLOopRecorderOallocate_index6MpnI_jobject__i_; -text: .text%__1cYDebugInformationRecorderNappend_handle6MpnI_jobject__i_; text: .text%__1cYCallStaticJavaDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cYCallStaticJavaDirectNodeSalignment_required6kM_i_; text: .text%__1cMloadConPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cGPcDescHreal_pc6kMpknHnmethod__pC_; text: .text%__1cKRegionNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cOPhaseIdealLoopIsplit_up6MpnENode_22_i_; -text: .text%__1cWConstantPoolCacheEntryRset_initial_state6Mi_v_; text: .text%__1cKNativeCallGverify6M_v_; text: .text%__1cNCompileBrokerLmaybe_block6F_v_; text: .text%__1cFPhase2t6Mn0ALPhaseNumber__v_; text: .text%__1cJloadINodeMideal_Opcode6kM_i_; text: .text%__1cNLoadKlassNodeGOpcode6kM_i_; text: .text%__1cIBoolNodeKmatch_edge6kMI_I_; -text: .text%__1cITypeLongEmake6Fxx_pk0_; -text: .text%__1cKRegionNodeOis_block_start6kM_i_; text: .text%__1cCosGmalloc6FL_pv_; text: .text%__1cXAdaptiveWeightedAverageGsample6Mf_v_; text: .text%__1cFStateM_sub_Op_RegP6MpknENode__v_; text: .text%__1cPcheckCastPPNodeHtwo_adr6kM_I_; -text: .text%__1cRMachNullCheckNodeQis_MachNullCheck6M_p0_; text: .text%__1cOGenerateOopMapGppush16MnNCellTypeState__v_; text: .text%__1cGBitMapOset_difference6M0_v_; text: .text%__1cMvalue_of_loc6FppnHoopDesc__l_; text: .text%__1cRmethodDataOopDescTbytecode_cell_count6FnJBytecodesECode__i_; text: .text%__1cRmethodDataOopDescRcompute_data_size6FpnOBytecodeStream__i_; text: .text%__1cRmethodDataOopDescPinitialize_data6MpnOBytecodeStream_i_i_; -text: .text%__1cOcompI_rRegNodeHtwo_adr6kM_I_; text: .text%__1cLSymbolTableJbasic_add6MipCiIpnGThread__pnNsymbolOopDesc__; text: .text%__1cLsymbolKlassPallocate_symbol6MpCipnGThread__pnNsymbolOopDesc__; text: .text%__1cNGrowableArray4CpnKciTypeFlowFBlock__2t6MpnFArena_iirk2_v_; -text: .text%__1cLPhaseValuesHlongcon6Mx_pnIConLNode__; text: .text%__1cKDictionaryEfind6MiInMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; text: .text%__1cOcompI_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cKTypeAryPtrFxmeet6kMpknEType__3_; -text: .text%__1cMPhaseChaitinJsplit_USE6MpnENode_pnFBlock_2IIiinNGrowableArray4CI__i_I_; -text: .text%__1cNCatchProjNodeMis_CatchProj6kM_pk0_; text: .text%__1cOcompU_rRegNodeMcisc_operand6kM_i_; text: .text%__1cNSafePointNodeGOpcode6kM_i_; -text: .text%__1cTconvI2L_reg_regNodePoper_input_base6kM_I_; text: .text%__1cMTypeKlassPtrEhash6kM_i_; -text: .text%__1cMLinkResolverOresolve_method6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_43ipnGThread__v_; text: .text%__1cMLinkResolverYlookup_method_in_klasses6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%__1cMciMethodDataLbci_to_data6Mi_pnLProfileData__; text: .text%JVM_GetCPMethodSignatureUTF; text: .text%__1cPfieldDescriptorKinitialize6MpnMklassOopDesc_i_v_; -text: .text%__1cIciMethodbCinterpreter_invocation_count6M_i_; text: .text%__1cMMergeMemNodeNset_memory_at6MIpnENode__v_; text: .text%JVM_CurrentThread; -text: .text%__1cPClassFileParserbLparse_constant_pool_nameandtype_entry6MnSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cKstoreINodeJnum_opnds6kM_I_; text: .text%__1cHTypeAryEhash6kM_i_; text: .text%JVM_GetClassModifiers; text: .text%JVM_GetClassAccessFlags; @@ -1088,38 +706,24 @@ text: .text%__1cParrayKlassKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cParrayKlassKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cMrax_RegPOperEtype6kM_pknEType__; text: .text%__1cKTypeRawPtrEhash6kM_i_; -text: .text%__1cLmethodKlassNoop_is_method6kM_i_; text: .text%__1cXindIndexScaleOffsetOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cPSignatureStreamJis_object6kM_i_; text: .text%__1cVCompressedWriteStream2t6Mi_v_; text: .text%__1cENode2t6Mp01_v_; text: .text%__1cHAddNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cJStartNodeIis_Start6M_p0_; text: .text%__1cMURShiftINodeGOpcode6kM_i_; -text: .text%__1cNGrowableArray4CpnMMonitorValue__2t6Mii_v_; -text: .text%__1cYDebugInformationRecorderOdescribe_scope6MpnIciMethod_ipnKDebugToken_44_v_; text: .text%__1cYDebugInformationRecorderVcreate_monitor_values6MpnNGrowableArray4CpnMMonitorValue____pnKDebugToken__; text: .text%__1cYDebugInformationRecorderYserialize_monitor_values6MpnNGrowableArray4CpnMMonitorValue____i_; text: .text%__1cMloadConINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIMachNodeIadr_type6kM_pknHTypePtr__; -text: .text%__1cKReflectionTverify_class_access6FpnMklassOopDesc_2i_i_; text: .text%__1cOMethodLivenessKBasicBlockWcompute_gen_kill_range6MpnQciBytecodeStream__v_; text: .text%__1cJAssemblerJemit_data6MirknQRelocationHolder_i_v_; text: .text%__1cIMachOperMdisp_as_type6kM_pknHTypePtr__; -text: .text%__1cKCompiledICWis_in_transition_state6kM_i_; -text: .text%__1cRInlineCacheBufferIcontains6FpC_i_; text: .text%__1cOcompU_rRegNodeErule6kM_I_; text: .text%__1cRMemBarReleaseNodeGOpcode6kM_i_; text: .text%__1cKRelocationEtype6M_nJrelocInfoJrelocType__; text: .text%__1cETypeOget_const_type6FpnGciType__pk0_; text: .text%__1cMPhaseChaitinPset_was_spilled6MpnENode__v_; -text: .text%__1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__; -text: .text%__1cLCounterDataOis_CounterData6M_i_; -text: .text%__1cRCompilationPolicyNcanBeCompiled6FnMmethodHandle__i_; -text: .text%__1cOcompU_rRegNodeJnum_opnds6kM_I_; text: .text%__1cKcmpOpUOperJnum_edges6kM_I_; -text: .text%__1cOrFlagsRegUOperJnum_edges6kM_I_; -text: .text%__1cKCastPPNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cIGraphKitMsaved_ex_oop6FpnNSafePointNode__pnENode__; text: .text%__1cMtlsLoadPNodeErule6kM_I_; text: .text%__1cIGraphKitGmemory6MI_pnENode__; @@ -1129,45 +733,22 @@ text: .text%__1cOGenerateOopMapFppush6MpnNCellTypeState__v_; text: .text%__1cSobjArrayKlassKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cSobjArrayKlassKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cQciBytecodeStreamPget_field_index6M_i_; -text: .text%__1cGThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cKHandleAreaHoops_do6MpnKOopClosure__v_; -text: .text%__1cNchunk_oops_do6FpnKOopClosure_pnFChunk_pc_L_: handles.o; text: .text%__1cKCompiledIC2t6MpnKRelocation__v_; -text: .text%__1cMUniverseOperFclone6kM_pnIMachOper__; -text: .text%__1cJlabelOperFclone6kM_pnIMachOper__; text: .text%__1cRaddI_rReg_immNodeMideal_Opcode6kM_i_; -text: .text%__1cLPhaseValuesHmakecon6MpknEType__pnHConNode__; text: .text%__1cENodeHins_req6MIp0_v_; text: .text%__1cIGraphKitLclean_stack6Mi_v_; text: .text%__1cKRegionNodeHhas_phi6kM_pnHPhiNode__; text: .text%__1cNloadRangeNodePoper_input_base6kM_I_; -text: .text%__1cOMachReturnNodeNis_MachReturn6M_p0_; -text: .text%__1cNaddI_rRegNodePoper_input_base6kM_I_; -text: .text%__1cQPreserveJVMState2t6MpnIGraphKit_i_v_; -text: .text%__1cNtestP_regNodeMcisc_operand6kM_i_; -text: .text%__1cKjmpConNodeHtwo_adr6kM_I_; -text: .text%__1cPClassFileParserbJparse_constant_pool_methodref_entry6MnSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cFKlassNoop_is_symbol6kM_i_; -text: .text%__1cWConstantPoolCacheEntryLis_resolved6kMnJBytecodesECode__i_; text: .text%__1cWConstantPoolCacheEntryPbytecode_number6FnJBytecodesECode__i_; -text: .text%__1cMPhaseChaitinVmay_be_copy_of_callee6kMpnENode__i_; text: .text%__1cNtestP_regNodeErule6kM_I_; -text: .text%__1cUThreadSafepointStateXexamine_state_of_thread6Mi_v_; -text: .text%__1cUSafepointSynchronizeOsafepoint_safe6FpnKJavaThread_nPJavaThreadState__i_; text: .text%__1cFStateM_sub_Op_ConI6MpknENode__v_; text: .text%__1cUArgumentSizeComputerDset6MinJBasicType__v_; -text: .text%__1cOcompU_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cHPhiNodeEmake6FpnENode_2pknEType_pknHTypePtr__p0_; -text: .text%__1cKCodeBufferOadd_stub_reloc6MpCrknQRelocationHolder_i_v_; -text: .text%__1cKCodeBufferOalloc_relocate6M_pnORelocateBuffer__; text: .text%__1cNtestI_regNodeErule6kM_I_; text: .text%__1cOGenerateOopMapbAget_basic_block_containing6kMi_pnKBasicBlock__; -text: .text%__1cFParseKensure_phi6Mii_pnHPhiNode__; text: .text%__1cMLinkResolverZcheck_klass_accessability6FnLKlassHandle_1pnGThread__v_; text: .text%__1cOGenerateOopMapSget_basic_block_at6kMi_pnKBasicBlock__; -text: .text%__1cHAddress2t6MpCnJrelocInfoJrelocType__v_; -text: .text%__1cFciEnvSget_klass_by_index6MpnPciInstanceKlass_iri_pnHciKlass__; -text: .text%__1cKJavaThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cFStateM_sub_Op_AddP6MpknENode__v_; text: .text%__1cICallNodeFmatch6MpknIProjNode_pknHMatcher__pnENode__; text: .text%__1cOcompI_rRegNodeMcisc_operand6kM_i_; @@ -1178,53 +759,24 @@ text: .text%__1cLMachNopNodeMideal_Opcode6kM_i_; text: .text%__1cKJNIHandlesKmake_local6FpnHoopDesc__pnI_jobject__; text: .text%__1cITypeFuncEhash6kM_i_; text: .text%__1cOcompI_rRegNodeErule6kM_I_; -text: .text%__1cIciMethodPliveness_at_bci6Mi_nGBitMap__; -text: .text%__1cOMethodLivenessPget_liveness_at6Mi_nGBitMap__; -text: .text%__1cOMethodLivenessKBasicBlockPget_liveness_at6MpnIciMethod_i_nGBitMap__; -text: .text%__1cITypeLongFempty6kM_i_; -text: .text%__1cMTypeKlassPtrCeq6kMpknEType__i_; text: .text%__1cJAssemblerJemit_data6MinJrelocInfoJrelocType_i_v_; text: .text%__1cJLoadSNodeGOpcode6kM_i_; text: .text%__1cRMemBarAcquireNodeGOpcode6kM_i_; -text: .text%__1cIGraphKitObasic_plus_adr6MpnENode_2l_2_; text: .text%__1cJVectorSet2L6MI_rnDSet__; text: .text%__1cJVectorSetEgrow6MI_v_; -text: .text%__1cLCastP2LNodeGOpcode6kM_i_; -text: .text%__1cFKlassNlookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; -text: .text%__1cJAssemblerEcall6MpCnJrelocInfoJrelocType__v_; text: .text%__1cPcheckCastPPNodeMideal_Opcode6kM_i_; text: .text%__1cJLoadLNodeGOpcode6kM_i_; text: .text%__1cMLinkResolverNresolve_klass6FrnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; text: .text%__1cTconstantPoolOopDescMklass_ref_at6MipnGThread__pnMklassOopDesc__; -text: .text%__1cRCompilationPolicyOmustBeCompiled6FnMmethodHandle__i_; text: .text%__1cIAndINodeGOpcode6kM_i_; -text: .text%__1cKklassKlassMoop_is_klass6kM_i_; -text: .text%__1cUParallelScavengeHeapNtlab_capacity6kM_L_; text: .text%__1cTCreateExceptionNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cIPhaseCCPFwiden6kMpknEType_3_3_; -text: .text%__1cHTypePtrJsingleton6kM_i_; text: .text%__1cNArgumentCountDset6MinJBasicType__v_; -text: .text%__1cWShouldNotReachHereNodeGpinned6kM_i_; -text: .text%__1cNsubI_rRegNodePoper_input_base6kM_I_; -text: .text%__1cNtestI_regNodePoper_input_base6kM_I_; text: .text%__1cLBoxLockNodeGOpcode6kM_i_; -text: .text%__1cWShouldNotReachHereNodeHtwo_adr6kM_I_; -text: .text%__1cQMachCallJavaNodePis_MachCallJava6M_p0_; text: .text%__1cKStoreBNodeGOpcode6kM_i_; -text: .text%__1cJAssemblerMemit_operand6MpnMRegisterImpl_22nHAddressLScaleFactor_ipCrknQRelocationHolder__v_; -text: .text%__1cJAssemblerMemit_operand6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cOGenerateOopMapHget_var6Mi_nNCellTypeState__; -text: .text%__1cITypeFuncCeq6kMpknEType__i_; -text: .text%__1cMloadConLNodePoper_input_base6kM_I_; -text: .text%__1cMPhaseIterGVNHmakecon6MpknEType__pnHConNode__; text: .text%__1cWShouldNotReachHereNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cHoopDescGverify6M_v_; -text: .text%__1cQconstMethodKlassSoop_is_constMethod6kM_i_; -text: .text%__1cRconstantPoolKlassToop_is_constantPool6kM_i_; -text: .text%__1cOcompP_rRegNodePoper_input_base6kM_I_; text: .text%__1cHTypePtrHget_con6kM_l_; -text: .text%__1cHMatcherWis_short_branch_offset6Mi_i_; -text: .text%__1cMloadConLNodeHtwo_adr6kM_I_; text: .text%__1cMTypeKlassPtr2t6MnHTypePtrDPTR_pnHciKlass_i_v_; text: .text%__1cYCallStaticJavaDirectNodeKmethod_set6Ml_v_; text: .text%__1cWMachCallStaticJavaNodePret_addr_offset6M_i_; @@ -1232,31 +784,20 @@ text: .text%__1cYCallStaticJavaDirectNodePcompute_padding6kMi_i_; text: .text%__1cJVectorSet2t6MpnFArena__v_; text: .text%__1cFStateM_sub_Op_RegI6MpknENode__v_; text: .text%__1cICmpPNodeDsub6kMpknEType_3_3_; -text: .text%__1cNloadConP0NodePoper_input_base6kM_I_; text: .text%__1cOAbstractICachePinvalidate_word6FpC_v_; text: .text%__1cRNativeInstructionFwrote6Mi_v_; text: .text%__1cMURShiftLNodeGOpcode6kM_i_; text: .text%__1cOrFlagsRegUOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cIciMethodLscale_count6Mi_i_; -text: .text%__1cLjmpConUNodeJnum_opnds6kM_I_; text: .text%__1cQciBytecodeStreamQget_method_index6M_i_; text: .text%__1cFciEnvbTget_instance_klass_for_declared_method_holder6FpnHciKlass__pnPciInstanceKlass__; -text: .text%__1cPSignatureStream2t6MnMsymbolHandle_i_v_; text: .text%JVM_GetMethodIxLocalsCount; text: .text%__1cJlabelOperFlabel6kM_pnFLabel__; text: .text%__1cGOopMapJheap_size6kM_i_; text: .text%__1cLOopMapCacheLoop_iterate6MpnKOopClosure__v_; text: .text%__1cMloadConLNodeErule6kM_I_; -text: .text%__1cOMacroAssemblerZneeds_explicit_null_check6Fi_i_; -text: .text%__1cNSafePointNode2t6MIpnIJVMState__v_; text: .text%__1cLas_TosState6FnJBasicType__nITosState__; text: .text%__1cNloadKlassNodeMideal_Opcode6kM_i_; -text: .text%__1cWConstantPoolCacheEntryIas_flags6MnITosState_iiiii_i_; -text: .text%__1cNloadConP0NodeHtwo_adr6kM_I_; text: .text%__1cWThreadLocalAllocBufferVinitialize_statistics6M_v_; -text: .text%__1cWThreadLocalAllocBufferFclear6M_v_; -text: .text%__1cWThreadLocalAllocBufferVaccumulate_statistics6MLi_v_; -text: .text%__1cWThreadLocalAllocBufferImax_size6F_L_; text: .text%__1cWThreadLocalAllocBufferGresize6M_v_; text: .text%__1cJloadINodePoper_input_base6kM_I_; text: .text%__1cIRootNodeLbottom_type6kM_pknEType__; @@ -1264,10 +805,8 @@ text: .text%__1cWConstantPoolCacheEntryGverify6kMpnMoutputStream__v_; text: .text%__1cHCompileYout_preserve_stack_slots6F_I_; text: .text%__1cFParsePload_state_from6Mpn0AFBlock__v_; text: .text%__1cFParseMmerge_common6Mpn0AFBlock_i_v_; -text: .text%__1cNloadRangeNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cIGraphKitQkill_dead_locals6M_v_; text: .text%__1cKMemBarNodeLbottom_type6kM_pknEType__; -text: .text%__1cKimmL32OperJconstantL6kM_x_; text: .text%__1cIciObject2t6MnGHandle__v_; text: .text%__1cITypeFuncEmake6FpknJTypeTuple_3_pk0_; text: .text%__1cLConvI2LNodeFValue6kMpnOPhaseTransform__pknEType__; @@ -1276,30 +815,18 @@ text: .text%__1cRaddP_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cLBoxLockNodeJideal_reg6kM_I_; text: .text%__1cPClassFileParserYverify_legal_method_name6MnMsymbolHandle_pnGThread__v_; text: .text%__1cICHeapObj2n6FL_pv_; -text: .text%__1cFframeUentry_frame_is_first6kM_i_; text: .text%__1cKInlineTreeJcallee_at6kMipnIciMethod__p0_; text: .text%__1cOFastUnlockNodeGOpcode6kM_i_; text: .text%__1cFStateM_sub_Op_ConL6MpknENode__v_; -text: .text%__1cIHaltNodeGpinned6kM_i_; text: .text%__1cMTypeKlassPtrEmake6FnHTypePtrDPTR_pnHciKlass_i_pk0_; text: .text%__1cOoop_RelocationEtype6M_nJrelocInfoJrelocType__; text: .text%__1cOCallRelocationFvalue6M_pC_; -text: .text%__1cKRelocationXpd_set_call_destination6MpCl_v_; -text: .text%__1cOCallRelocationWfix_relocation_at_move6Ml_v_; -text: .text%__1cKRelocationTpd_call_destination6M_pC_; -text: .text%__1cOCallRelocationPset_destination6MpCl_v_; -text: .text%__1cHcommute6FpnENode_ii_i_: addnode.o; -text: .text%__1cENodeHis_Root6M_pnIRootNode__; -text: .text%__1cENodeQlatency_from_use6kMrnLBlock_Array_rnNGrowableArray4CI__pk0p0_i_; -text: .text%__1cHAddNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cNinstanceKlassQfind_local_field6kMpnNsymbolOopDesc_2pnPfieldDescriptor__i_; text: .text%__1cMmerge_region6FpnKRegionNode_pnIPhaseGVN__pnENode__: cfgnode.o; text: .text%__1cNloadConP0NodeErule6kM_I_; text: .text%__1cIGraphKitMreset_memory6M_pnENode__; text: .text%__1cPciObjectFactoryRcreate_new_object6MpnHoopDesc__pnIciObject__; text: .text%__1cNloadRangeNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNloadConI0NodeMideal_Opcode6kM_i_; -text: .text%__1cJloadPNodeHtwo_adr6kM_I_; text: .text%__1cNSignatureInfoGdo_int6M_v_; text: .text%__1cKjmpDirNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cPThreadRootsTaskFdo_it6MpnNGCTaskManager_I_v_; @@ -1311,49 +838,31 @@ text: .text%__1cJrRegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cIAddLNodeGOpcode6kM_i_; text: .text%__1cJLoadPNodeJideal_reg6kM_I_; text: .text%__1cNinstanceKlassKfind_field6kMpnNsymbolOopDesc_2pnPfieldDescriptor__pnMklassOopDesc__; -text: .text%__1cOkill_dead_code6FpnENode_pnMPhaseIterGVN__i_: node.o; -text: .text%__1cKjmpDirNodeFclone6kM_pnENode__; -text: .text%__1cOcompI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cFParseFBlockRsuccessor_for_bci6Mi_p1_; text: .text%__1cNGrowableArray4CpnOMethodLivenessKBasicBlock__2t6MpnFArena_iirk2_v_; text: .text%__1cQSystemDictionaryEfind6FnMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; text: .text%__1cNtestP_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNincI_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cICallInfoDset6MnLKlassHandle_1nMmethodHandle_2ipnGThread__v_; text: .text%__1cHOrINodeGOpcode6kM_i_; -text: .text%__1cOcompI_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cMPhaseChaitinJsplit_DEF6MpnENode_pnFBlock_iIp25nNGrowableArray4CI__i_I_; -text: .text%__1cENodeHis_Type6M_pnITypeNode__; -text: .text%__1cNSafePointNodeMis_SafePoint6M_p0_; text: .text%__1cICHeapObj2k6Fpv_v_; text: .text%__1cRaddP_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cICmpINodeDsub6kMpknEType_3_3_; -text: .text%__1cENode2n6FLi_pv_; -text: .text%__1cJTraceTime2t6MpkcpnMelapsedTimer_iipnMoutputStream__v_; text: .text%__1cIAddINodeGadd_id6kM_pknEType__; text: .text%__1cKStoreCNodeGOpcode6kM_i_; text: .text%__1cTconvI2L_reg_regNodeMcisc_operand6kM_i_; text: .text%__1cHMemNodeQIdeal_DU_postCCP6MpnIPhaseCCP__pnENode__; -text: .text%__1cSvframeStreamCommonPfill_from_frame6M_i_; -text: .text%__1cILoadNodeRraise_bottom_type6MpknEType__v_; -text: .text%__1cJStoreNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cNFingerprinterLfingerprint6M_L_; -text: .text%__1cLConvI2LNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cOGenerateOopMapGppload6MpnNCellTypeState_i_v_; -text: .text%__1cIGraphKitRnull_check_common6MpnENode_nJBasicType_i_2_; text: .text%__1cKBlock_ListGremove6MI_v_; text: .text%__1cKMemoryPoolYrecord_peak_memory_usage6M_v_; text: .text%__1cKciTypeFlowGJsrSetJcopy_into6Mp1_v_; text: .text%__1cICmpLNodeGOpcode6kM_i_; -text: .text%__1cLklassVtableTupdate_super_vtable6MpnNinstanceKlass_pnNmethodOopDesc_i_i_; -text: .text%__1cLcastP2LNodePoper_input_base6kM_I_; -text: .text%__1cQStackFrameStream2t6MpnKJavaThread_i_v_; text: .text%__1cTciConstantPoolCacheEfind6Mi_i_; text: .text%__1cOPhaseIdealLoopGspinup6MpnENode_2222pnLsmall_cache__2_; text: .text%__1cMVirtualSpaceOcommitted_size6kM_L_; text: .text%__1cNGrowableArray4CpnIciObject__Praw_at_put_grow6Mirk14_v_; text: .text%__1cIRootNodeNis_block_proj6kM_pknENode__; -text: .text%__1cHOopFlowEmake6FpnFArena_i_p0_; text: .text%__1cJloadLNodeErule6kM_I_; text: .text%__1cNloadConI0NodeLbottom_type6kM_pknEType__; text: .text%__1cJimmI0OperIconstant6kM_l_; @@ -1362,105 +871,57 @@ text: .text%__1cLBoxLockNodeLbottom_type6kM_pknEType__; text: .text%__1cNaddI_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cOPhaseIdealLoopKhandle_use6MpnENode_2pnLsmall_cache_22222_v_; text: .text%__1cOPhaseIdealLoopOfind_use_block6MpnENode_22222_2_; -text: .text%__1cNmethodOopDescbGupdate_compiled_code_entry_point6Mi_v_; text: .text%__1cJStoreNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cNSignatureInfoHdo_void6M_v_; -text: .text%__1cLAdapterInfoKhash_value6kM_l_; text: .text%JVM_GetCPMethodClassNameUTF; text: .text%__1cHOopFlowFclone6Mp0i_v_; text: .text%__1cRSignatureIteratorSiterate_parameters6ML_v_; -text: .text%__1cILoopNodeHis_Loop6M_p0_; text: .text%__1cPindOffset32OperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cPindOffset32OperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cMCallLeafNodeGOpcode6kM_i_; -text: .text%__1cNmethodOopDescPis_final_method6kM_i_; -text: .text%__1cSComputeAdapterInfoHcompute6Mplii_v_; -text: .text%__1cLAdapterInfoHcompute6MnMmethodHandle_i_v_; -text: .text%__1cLAdapterInfo2T6M_v_; -text: .text%__1cSComputeAdapterInfoLreturn_type6MnJBasicType__i_; -text: .text%__1cSComputeAdapterInfoMsize_in_bits6FnMmethodHandle__i_; -text: .text%__1cMAdapterCacheGlookup6MpnLAdapterInfo__pnMBasicAdapter__; -text: .text%__1cJloadINodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cPadd_derived_oop6FppnHoopDesc_2_v_: oopMap.o; text: .text%__1cTDerivedPointerTableDadd6FppnHoopDesc_3_v_; text: .text%__1cFParseFBlockJinit_node6Mp0i_v_; text: .text%__1cFParseFBlockKinit_graph6Mp0_v_; -text: .text%__1cOcompP_rRegNodeHtwo_adr6kM_I_; text: .text%__1cSObjectSynchronizerKslow_enter6FnGHandle_pnJBasicLock_pnGThread__v_; text: .text%__1cKjmpDirNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cMLinkResolverbFlinktime_resolve_virtual_method6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_43ipnGThread__v_; -text: .text%__1cKJavaThreadOis_Java_thread6kM_i_; -text: .text%__1cKCastPPNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cJTraceTime2T6M_v_; -text: .text%__1cKciTypeFlowNmake_range_at6Mi_pn0AFRange__; text: .text%__1cNmethodOopDescbAcompute_size_of_parameters6MpnGThread__v_; -text: .text%__1cKoopFactoryKnew_method6FinLAccessFlags_iiipnGThread__pnNmethodOopDesc__; -text: .text%__1cNmethodOopDescLobject_size6Fi_i_; text: .text%__1cSconstMethodOopDescLobject_size6Fiiii_i_; -text: .text%__1cLklassVtableWneeds_new_vtable_entry6FpnNmethodOopDesc_pnMklassOopDesc_pnHoopDesc_pnNsymbolOopDesc_nLAccessFlags__i_; text: .text%__1cSconstMethodOopDescZset_inlined_tables_length6Miii_v_; text: .text%__1cLmethodKlassIallocate6MnRconstMethodHandle_nLAccessFlags_pnGThread__pnNmethodOopDesc__; -text: .text%__1cQconstMethodKlassIallocate6MiiiipnGThread__pnSconstMethodOopDesc__; -text: .text%__1cNmethodOopDescJinit_code6M_v_; -text: .text%__1cKoopFactoryPnew_constMethod6FiiiipnGThread__pnSconstMethodOopDesc__; -text: .text%__1cPClassFileParserMparse_method6MnSconstantPoolHandle_ipnLAccessFlags_pnPtypeArrayHandle_55pnGThread__nMmethodHandle__; -text: .text%__1cFBlockUhoist_LCA_above_defs6Mp01IrnLBlock_Array__1_; -text: .text%__1cScompI_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cPciInstanceKlassLfield_cache6M_pnTciConstantPoolCache__; -text: .text%__1cHciFieldJwill_link6MpnPciInstanceKlass_nJBytecodesECode__i_; text: .text%__1cFciEnvXget_field_by_index_impl6MpnPciInstanceKlass_i_pnHciField__; -text: .text%__1cQciBytecodeStreamJget_field6Mri_pnHciField__; text: .text%__1cFciEnvSget_field_by_index6MpnPciInstanceKlass_i_pnHciField__; -text: .text%__1cKTypeOopPtrFempty6kM_i_; text: .text%__1cWConstantPoolCacheEntryOset_bytecode_16MnJBytecodesECode__v_; -text: .text%__1cKCastPPNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cMMergeMemNodeNgrow_to_match6Mpk0_v_; -text: .text%__1cFKlassPoop_is_objArray6kM_i_; text: .text%__1cTCreateExceptionNodePoper_input_base6kM_I_; text: .text%__1cPciInstanceKlassYunique_concrete_subklass6M_p0_; text: .text%__1cLStringTableGlookup6MipHiI_pnHoopDesc__; text: .text%__1cLBoxLockNodeHsize_of6kM_I_; -text: .text%__1cIciObjectIencoding6M_pnI_jobject__; -text: .text%__1cPClassFileParserbDverify_legal_method_modifiers6MiinMsymbolHandle_pnGThread__v_; text: .text%__1cIPhaseGVNUtransform_no_reclaim6MpnENode__2_; -text: .text%__1cIRewriterOrewrite_method6FnMmethodHandle_rnIintArray_pnGThread__1_; -text: .text%__1cNmethodOopDescLlink_method6FnMmethodHandle__v_; text: .text%__1cNloadKlassNodePoper_input_base6kM_I_; text: .text%__1cNObjectMonitorEexit6MpnGThread__v_; -text: .text%__1cPClassFileParserZskip_over_field_signature6MpciIpnGThread__1_; text: .text%__1cMMergeMemNode2t6MpnENode__v_; text: .text%__1cMMergeMemNodeRmake_empty_memory6F_pnENode__; -text: .text%__1cNinstanceKlassVshould_be_initialized6kM_i_; -text: .text%__1cNtestP_regNodeJnum_opnds6kM_I_; -text: .text%__1cJStartNodeGis_CFG6kM_i_; -text: .text%__1cRaddI_rReg_immNodePoper_input_base6kM_I_; -text: .text%__1cPVirtualCallDataSis_VirtualCallData6M_i_; text: .text%__1cMindIndexOperJnum_edges6kM_I_; text: .text%__1cRInterpretedRFrameKtop_method6kM_nMmethodHandle__; -text: .text%__1cKGCStatInfoMset_gc_usage6MinLMemoryUsage_i_v_; text: .text%__1cXmembar_acquire_lockNodeLbottom_type6kM_pknEType__; text: .text%__1cQPreserveJVMState2T6M_v_; -text: .text%__1cLRuntimeStubIis_alive6kM_i_; -text: .text%__1cMWarmCallInfoHis_cold6kM_i_; text: .text%__1cNObjectMonitorFenter6MpnGThread__v_; text: .text%__1cKjmpConNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cIemit_d646FrnKCodeBuffer_l_v_; text: .text%__1cFParseFmerge6Mi_v_; text: .text%__1cOPhaseIdealLoopIset_idom6MpnENode_2I_v_; -text: .text%__1cIAddINodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cFParseMdo_one_block6M_v_; text: .text%__1cFParseFBlockMrecord_state6Mp0_v_; -text: .text%__1cNtestP_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cNCollectedHeapYpermanent_array_allocate6FnLKlassHandle_iipnGThread__pnHoopDesc__; -text: .text%__1cJloadLNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cIPhaseIFGFUnion6MII_v_; -text: .text%__1cNloadRangeNodeJnum_opnds6kM_I_; text: .text%__1cWConstantPoolCacheEntryOset_bytecode_26MnJBytecodesECode__v_; text: .text%__1cOcompP_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cIBoolNodeJideal_reg6kM_I_; text: .text%__1cHCmpNodeJideal_reg6kM_I_; text: .text%__1cFStateM_sub_Op_Bool6MpknENode__v_; -text: .text%__1cJCatchNodeIis_Catch6kM_pk0_; text: .text%__1cJLoadBNodeGOpcode6kM_i_; text: .text%__1cENodeHlatency6MI_I_; text: .text%__1cIGraphKit2t6MpnIJVMState__v_; @@ -1468,67 +929,42 @@ text: .text%__1cKTypeAryPtrFklass6kM_pnHciKlass__; text: .text%__1cTciConstantPoolCacheDget6Mi_pv_; text: .text%__1cNmethodOopDescIbcp_from6kMi_pC_; text: .text%__1cKTypeOopPtrHget_con6kM_l_; -text: .text%__1cMPhaseChaitinKprompt_use6MpnFBlock_I_i_; text: .text%__1cIJVMStateLdebug_depth6kM_I_; -text: .text%__1cIGraphKitTadd_safepoint_edges6MpnNSafePointNode_i_v_; text: .text%__1cENodeNadd_req_batch6Mp0I_v_; -text: .text%__1cIJVMStateKclone_deep6kM_p0_; text: .text%__1cFStateK_sub_Op_If6MpknENode__v_; text: .text%__1cXindIndexScaleOffsetOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cXindIndexScaleOffsetOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cGBitMapVset_union_with_result6M0_i_; -text: .text%__1cNSafePointNodeEhash6kM_I_; text: .text%__1cMelapsedTimerFstart6M_v_; text: .text%__1cJStartNodeGOpcode6kM_i_; text: .text%__1cMelapsedTimerEstop6M_v_; text: .text%__1cOPhaseIdealLoopQconditional_move6MpnENode__2_; text: .text%__1cJloadLNodeMideal_Opcode6kM_i_; text: .text%__1cOMethodLivenessKBasicBlockJstore_one6Mi_v_; -text: .text%__1cTC2IAdapterGeneratorXlazy_std_verified_entry6FnMmethodHandle__pC_; -text: .text%__1cPindOffset32OperJnum_edges6kM_I_; text: .text%__1cPFieldAccessInfoDset6MnLKlassHandle_nMsymbolHandle_iinJBasicType_nLAccessFlags__v_; -text: .text%__1cMLinkResolverNresolve_field6FrnPFieldAccessInfo_nSconstantPoolHandle_inJBytecodesECode_iipnGThread__v_; text: .text%__1cMLinkResolverZcheck_field_accessability6FnLKlassHandle_11rnPfieldDescriptor_pnGThread__v_; text: .text%__1cNsubI_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cTCreateExceptionNodeHtwo_adr6kM_I_; text: .text%__1cPindOffset32OperFscale6kM_i_; text: .text%__1cHAddNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cICmpPNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cbFCompressedLineNumberWriteStream2t6Mi_v_; -text: .text%__1cPClassFileParserWparse_linenumber_table6MIIpipnGThread__pC_; text: .text%__1cSconstMethodOopDescbBcompressed_linenumber_table6kM_pC_; text: .text%__1cHTypePtrLdual_offset6kM_i_; text: .text%__1cNMachIdealNodePoper_input_base6kM_I_; text: .text%__1cSObjectSynchronizerOinflate_helper6FpnHoopDesc__pnNObjectMonitor__; text: .text%__1cKciTypeFlowIblock_at6Mipn0AGJsrSet_n0AMCreateOption__pn0AFBlock__; -text: .text%__1cKciTypeFlowFRangeNget_block_for6Mpn0AGJsrSet_n0AMCreateOption__pn0AFBlock__; -text: .text%__1cSvframeStreamCommonbBfill_from_interpreter_frame6M_v_; -text: .text%__1cHMonitorEwait6Mil_i_; -text: .text%__1cLcastP2LNodeMideal_Opcode6kM_i_; -text: .text%__1cNloadKlassNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cSObjectSynchronizerJslow_exit6FpnHoopDesc_pnJBasicLock_pnGThread__v_; text: .text%__1cPJavaCallWrapperHoops_do6MpnKOopClosure__v_; text: .text%__1cFframeNoops_entry_do6MpnKOopClosure_pknLRegisterMap__v_; text: .text%__1cXindIndexScaleOffsetOperFscale6kM_i_; -text: .text%__1cQciBytecodeStreamKget_method6Mri_pnIciMethod__; -text: .text%__1cFciEnvTget_method_by_index6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; -text: .text%__1cFciEnvYget_method_by_index_impl6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; text: .text%__1cFciEnvNlookup_method6MpnNinstanceKlass_2pnNsymbolOopDesc_4nJBytecodesECode__pnNmethodOopDesc__; text: .text%__1cYinternal_word_RelocationLunpack_data6M_v_; text: .text%__1cNstoreImmBNodePoper_input_base6kM_I_; text: .text%__1cNLoadRangeNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cITypeFuncEmake6FpnIciMethod__pk0_; -text: .text%__1cMindirectOperJnum_edges6kM_I_; text: .text%__1cKCompiledICOic_destination6kM_pC_; text: .text%__1cTconvI2L_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cICmpUNodeDsub6kMpknEType_3_3_; text: .text%__1cPSignatureStreamJas_symbol6MpnGThread__pnNsymbolOopDesc__; text: .text%__1cRshrL_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cIGraphKitRcreate_and_map_if6MpnENode_2ff_pnGIfNode__; -text: .text%__1cPClassFileParserbFparse_constant_pool_class_entry6MnSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cOMethodLivenessKBasicBlockMmerge_normal6MnGBitMap__i_; -text: .text%__1cTleaPIdxScaleOffNodeHtwo_adr6kM_I_; -text: .text%__1cETypeFwiden6kMpk0_2_; text: .text%__1cKciTypeFlowLStateVector2t6Mp0_v_; text: .text%__1cNCatchProjNodeLbottom_type6kM_pknEType__; text: .text%__1cOcompU_rRegNodeLout_RegMask6kM_rknHRegMask__; @@ -1536,40 +972,26 @@ text: .text%__1cNCatchProjNodeHsize_of6kM_I_; text: .text%__1cNCatchProjNodeEhash6kM_I_; text: .text%__1cSvframeStreamCommonEnext6M_v_; text: .text%__1cFKlassIsubklass6kM_p0_; -text: .text%__1cKciTypeFlowFBlockPis_simpler_than6Mp1_i_; text: .text%__1cJimmI8OperIconstant6kM_l_; -text: .text%__1cIAddPNodeQmach_bottom_type6FpknIMachNode__pknEType__; text: .text%__1cILoadNodeHsize_of6kM_I_; -text: .text%__1cHMatcherVReduceInst_Chain_Rule6MpnFState_ipnIMachNode_rpnENode__v_; text: .text%__1cURethrowExceptionNodeNis_block_proj6kM_pknENode__; -text: .text%__1cNincI_rRegNodePoper_input_base6kM_I_; -text: .text%__1cLjmpConUNodeHtwo_adr6kM_I_; -text: .text%__1cHMatcherScalling_convention6FpnLOptoRegPair_Ii_v_; text: .text%__1cKPerfStringKset_string6Mpkc_v_; text: .text%__1cENodeLnonnull_req6kM_p0_; -text: .text%__1cICmpINodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cHTypeAryCeq6kMpknEType__i_; text: .text%__1cQSystemDictionaryKfind_class6FiInMsymbolHandle_nGHandle__pnMklassOopDesc__; text: .text%__1cKDictionaryKfind_class6MiInMsymbolHandle_nGHandle__pnMklassOopDesc__; text: .text%__1cQUnique_Node_ListEpush6MpnENode__v_; text: .text%__1cILoopNodeGOpcode6kM_i_; text: .text%__1cIGraphKitTadd_exception_state6MpnNSafePointNode__v_; text: .text%__1cJloadPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cICallNodeSis_CallInterpreter6kM_pknTCallInterpreterNode__; text: .text%__1cOPhaseIdealLoopRregister_new_node6MpnENode_2_v_; text: .text%__1cQPSGenerationPoolImax_size6kM_L_; text: .text%__1cQPSGenerationPoolNused_in_bytes6M_L_; text: .text%__1cQPSGenerationPoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cOMethodLivenessNwork_list_get6M_pn0AKBasicBlock__; text: .text%__1cNinstanceKlassKmethods_do6MpFpnNmethodOopDesc__v_v_; -text: .text%__1cICallNodeOis_CallRuntime6kM_pknPCallRuntimeNode__; text: .text%__1cHTypeAryFxmeet6kMpknEType__3_; text: .text%__1cNstoreImmBNodeMideal_Opcode6kM_i_; -text: .text%__1cKciTypeFlowLStateVectorEmeet6Mpk1_i_; -text: .text%__1cIMachNodeTmay_be_short_branch6kM_i_; -text: .text%__1cJloadINodeJnum_opnds6kM_I_; text: .text%__1cNaddI_rRegNodeMcisc_operand6kM_i_; -text: .text%__1cRMachSafePointNode2t6M_v_; text: .text%__1cHMatcherKmatch_sfpt6MpnNSafePointNode__pnIMachNode__; text: .text%__1cOcompP_rRegNodeMcisc_operand6kM_i_; text: .text%__1cMPhaseChaitinKFind_const6kMpknENode__I_; @@ -1591,62 +1013,41 @@ text: .text%__1cKciTypeFlowLStateVectorOpush_translate6MpnGciType__v_; text: .text%__1cOGenerateOopMapJdo_method6Miiii_v_; text: .text%__1cMloadConPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIimmPOperIconstant6kM_l_; -text: .text%__1cIimmPOperPconstant_is_oop6kM_i_; -text: .text%__1cOleaPIdxOffNodeHtwo_adr6kM_I_; text: .text%__1cHGCCauseJto_string6Fn0AFCause__pkc_; text: .text%__1cTleaPIdxScaleOffNodeErule6kM_I_; text: .text%JVM_IsNaN; -text: .text%__1cXinsert_anti_dependences6FrpnFBlock_pnENode_rnLBlock_Array__i_: gcm.o; -text: .text%__1cLOptoRuntimebCcomplete_monitor_unlocking_C6FpnHoopDesc_pnJBasicLock__v_; text: .text%__1cJloadINodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cLOptoRuntimebAcomplete_monitor_locking_C6FpnHoopDesc_pnJBasicLock_pnKJavaThread__v_; -text: .text%__1cHCompileKTracePhase2t6MpkcpnMelapsedTimer_i_v_; text: .text%__1cHCompileKTracePhase2T6M_v_; text: .text%__1cOGenerateOopMapTmerge_state_into_bb6MpnKBasicBlock__v_; text: .text%__1cHMatcherPc_frame_pointer6kM_i_; text: .text%__1cFBlockKsched_call6MrnHMatcher_rnLBlock_Array_IrnJNode_List_pipnMMachCallNode_rnJVectorSet__I_; -text: .text%__1cMMachCallNode2t6M_v_; text: .text%__1cICallNodeJideal_reg6kM_I_; text: .text%__1cOleaPIdxOffNodeErule6kM_I_; text: .text%__1cOGenerateOopMapEppop6MpnNCellTypeState__v_; text: .text%__1cSCallLeafDirectNodeMideal_Opcode6kM_i_; text: .text%__1cOcompP_rRegNodeErule6kM_I_; -text: .text%__1cMany_RegPOperJnum_edges6kM_I_; -text: .text%__1cIGraphKitbLset_predefined_input_for_runtime_call6MpnNSafePointNode__v_; text: .text%__1cMany_RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cScompI_rReg_immNodeErule6kM_I_; text: .text%__1cLBoxLockNodeKin_RegMask6kMI_rknHRegMask__; text: .text%__1cIGraphKitOset_all_memory6MpnENode__v_; text: .text%__1cLRegisterMap2t6Mpk0_v_; text: .text%__1cGvframe2t6MpknFframe_pknLRegisterMap_pnKJavaThread__v_; -text: .text%__1cNmethodOopDescWwas_executed_more_than6kMi_i_; text: .text%__1cKstoreCNodePoper_input_base6kM_I_; text: .text%__1cVjava_lang_ClassLoaderbBnon_reflection_class_loader6FpnHoopDesc__2_; text: .text%__1cHi2sNodeErule6kM_I_; text: .text%__1cIMulLNodeGOpcode6kM_i_; -text: .text%__1cOPhaseIdealLoopHdom_lca6kMpnENode_2_2_; -text: .text%__1cMPrefetchNodeGOpcode6kM_i_; -text: .text%__1cSReferenceProcessorSdiscover_reference6MpnHoopDesc_nNReferenceType__i_; -text: .text%__1cSReferenceProcessorTget_discovered_list6MnNReferenceType__ppnHoopDesc__; -text: .text%__1cXjava_lang_ref_ReferenceIset_next6FpnHoopDesc_2_v_; text: .text%__1cKciTypeFlowGJsrSet2t6MpnFArena_i_v_; -text: .text%__1cNtestI_regNodeJnum_opnds6kM_I_; text: .text%__1cIAddINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cIMachOperNconstant_disp6kM_i_; text: .text%__1cIMachOperFscale6kM_i_; -text: .text%__1cFframeNis_java_frame6kM_i_; text: .text%__1cOMethodLivenessKBasicBlockJpropagate6Mp0_v_; text: .text%__1cQSystemDictionaryStry_get_next_class6F_pnMklassOopDesc__; text: .text%__1cKDictionaryStry_get_next_class6M_pnMklassOopDesc__; text: .text%__1cNloadKlassNodeErule6kM_I_; -text: .text%__1cIciMethodRhas_compiled_code6M_i_; -text: .text%__1cOoop_RelocationJpack_data6M_i_; text: .text%__1cKCompiledICKcached_oop6kM_pnHoopDesc__; text: .text%__1cGOopMap2t6Mii_v_; text: .text%__1cJOopMapSetKadd_gc_map6MipnGOopMap__v_; text: .text%__1cNincI_rRegNodeErule6kM_I_; -text: .text%__1cRMachSafePointNodePis_MachCallLeaf6M_pnQMachCallLeafNode__; -text: .text%__1cRMachSafePointNodeLset_oop_map6MpnGOopMap__v_; text: .text%__1cYDebugInformationRecorderNadd_safepoint6MipnGOopMap__v_; text: .text%__1cHCompileTProcess_OopMap_Node6MpnIMachNode_i_v_; text: .text%__1cYDebugInformationRecorderKadd_oopmap6MipnGOopMap__v_; @@ -1660,44 +1061,24 @@ text: .text%__1cHRetNodeMideal_Opcode6kM_i_; text: .text%__1cGvframeKnew_vframe6FpknFframe_pknLRegisterMap_pnKJavaThread__p0_; text: .text%__1cNsubI_rRegNodeErule6kM_I_; text: .text%__1cRaddP_rReg_immNodeErule6kM_I_; -text: .text%__1cPClassFileParserbGparse_constant_pool_string_entry6MnSconstantPoolHandle_ipnGThread__v_; text: .text%__1cJloadLNodePoper_input_base6kM_I_; -text: .text%__1cRshrL_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cITypeLongFxdual6kM_pknEType__; -text: .text%__1cRMachSafePointNodeSis_MachCallRuntime6M_pnTMachCallRuntimeNode__; -text: .text%__1cNaddI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cENodeJset_req_X6MIp0pnMPhaseIterGVN__v_; -text: .text%__1cOcompP_rRegNodeJnum_opnds6kM_I_; text: .text%__1cSInterpreterRuntimePresolve_get_put6FpnKJavaThread_nJBytecodesECode__v_; -text: .text%__1cMLinkResolverNresolve_field6FrnPFieldAccessInfo_nSconstantPoolHandle_inJBytecodesECode_ipnGThread__v_; -text: .text%__1cWConstantPoolCacheEntryJset_field6MnJBytecodesECode_2nLKlassHandle_iinITosState_ii_v_; text: .text%__1cIAndLNodeGOpcode6kM_i_; text: .text%__1cMindIndexOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cOtypeArrayKlassSallocate_permanent6MipnGThread__pnQtypeArrayOopDesc__; text: .text%__1cOGenerateOopMapCpp6MpnNCellTypeState_2_v_; -text: .text%__1cMCallJavaNodeLis_CallJava6kM_pk0_; -text: .text%__1cICallNodeScalling_convention6kMpnLOptoRegPair_I_v_; text: .text%__1cHCompileSflatten_alias_type6kMpknHTypePtr__3_; -text: .text%__1cRcmpFastUnlockNodePoper_input_base6kM_I_; text: .text%__1cYCallStaticJavaDirectNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cOcompP_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cFStateW_sub_Op_CallStaticJava6MpknENode__v_; -text: .text%__1cWMachCallStaticJavaNodeVis_MachCallStaticJava6M_p0_; -text: .text%__1cRaddP_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cICallInfoDset6MnLKlassHandle_nMmethodHandle_pnGThread__v_; -text: .text%__1cSComputeAdapterInfoJdo_object6Mii_v_; -text: .text%__1cRMachSafePointNodeWis_MachCallInterpreter6M_pnXMachCallInterpreterNode__; text: .text%__1cIGraphKitbDtransfer_exceptions_into_jvms6M_pnIJVMState__; text: .text%__1cLConvL2INodeGOpcode6kM_i_; text: .text%__1cOcompI_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQSystemDictionarybEresolve_instance_class_or_null6FnMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; text: .text%__1cNaddI_rRegNodeErule6kM_I_; -text: .text%__1cHConNodeEmake6FpknEType__p0_; -text: .text%__1cScompI_rReg_immNodePoper_input_base6kM_I_; -text: .text%__1cJLoadCNodeGOpcode6kM_i_; text: .text%__1cYCallStaticJavaDirectNodeFreloc6kM_i_; text: .text%__1cRcmpFastUnlockNodeMideal_Opcode6kM_i_; -text: .text%__1cJTraceTime2t6MpkciipnMoutputStream__v_; text: .text%__1cWstatic_stub_RelocationEtype6M_nJrelocInfoJrelocType__; text: .text%__1cIGraphKitQset_saved_ex_oop6FpnNSafePointNode_pnENode__v_; text: .text%__1cIGraphKitUmake_exception_state6MpnENode__pnNSafePointNode__; @@ -1705,33 +1086,16 @@ text: .text%__1cJloadBNodeMideal_Opcode6kM_i_; text: .text%__1cMLinkResolverOresolve_invoke6FrnICallInfo_nGHandle_nSconstantPoolHandle_inJBytecodesECode_pnGThread__v_; text: .text%__1cMLinkResolverMresolve_pool6FrnLKlassHandle_rnMsymbolHandle_42nSconstantPoolHandle_ipnGThread__v_; text: .text%__1cGOopMapHcopy_to6MpC_v_; -text: .text%__1cNstoreImmBNodeJnum_opnds6kM_I_; text: .text%__1cVLoaderConstraintTableWfind_loader_constraint6MnMsymbolHandle_nGHandle__ppnVLoaderConstraintEntry__; -text: .text%__1cJTimeStampJupdate_to6Mx_v_; text: .text%__1cJTimeStampGupdate6M_v_; text: .text%__1cFframeZinterpreter_frame_set_bcx6Ml_v_; -text: .text%__1cCosFsleep6FpnGThread_xi_i_; -text: .text%__1cNgetTimeMillis6F_x_; -text: .text%__1cRaddP_rReg_immNodeLbottom_type6kM_pknEType__; -text: .text%__1cIos_sleep6Fxi_i_: os_solaris.o; -text: .text%__1cLPhaseValuesHzerocon6MnJBasicType__pnHConNode__; text: .text%__1cMCreateExNodeKmatch_edge6kMI_I_; -text: .text%__1cTconvI2L_reg_regNodeJnum_opnds6kM_I_; -text: .text%__1cIGraphKitNuncommon_trap6MipnHciKlass_pkci_v_; -text: .text%__1cILoadNodeEmake6FpnENode_22pknHTypePtr_pknEType_nJBasicType__p0_; -text: .text%__1cIGraphKitJmake_load6MpnENode_2pknEType_nJBasicType_i_2_; -text: .text%__1cTconvI2L_reg_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cTno_rax_rbx_RegPOperJnum_edges6kM_I_; text: .text%__1cLPCTableNodeLbottom_type6kM_pknEType__; text: .text%__1cLOptoRuntimeSuncommon_trap_Type6F_pknITypeFunc__; text: .text%__1cIHaltNode2t6MpnENode_2_v_; text: .text%__1cNSafePointNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cNaddI_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cGPcDesc2t6Mii_v_; -text: .text%__1cHnmethodKcopy_pc_at6MipnGPcDesc__v_; text: .text%__1cKciTypeFlowLStateVectorJcopy_into6kMp1_v_; text: .text%__1cXmembar_release_lockNodeMideal_Opcode6kM_i_; -text: .text%__1cOcompL_rRegNodePoper_input_base6kM_I_; text: .text%__1cMoutputStreamPupdate_position6MpkcL_v_; text: .text%__1cMstringStreamFwrite6MpkcL_v_; text: .text%__1cKciTypeFlowQadd_to_work_list6Mpn0AFBlock__v_; @@ -1741,87 +1105,57 @@ text: .text%__1cKciTypeFlowOwork_list_next6M_pn0AFBlock__; text: .text%__1cIPipelineXfunctional_unit_latency6kMIpk0_I_; text: .text%__1cMPhaseIterGVNJtransform6MpnENode__2_; text: .text%__1cQSystemDictionarybCfind_instance_or_array_klass6FnMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; -text: .text%__1cSCompareAndSwapNodeGis_CFG6kM_i_; -text: .text%__1cNGrowableArray4CpnOMethodLivenessKBasicBlock__Icontains6kMrk2_i_; -text: .text%__1cKciTypeFlowFBlock2t6Mp0pn0AFRange_pn0AGJsrSet__v_; text: .text%__1cNGrowableArray4CpnKciTypeFlowJJsrRecord__2t6MpnFArena_iirk2_v_; -text: .text%__1cKstoreCNodeJnum_opnds6kM_I_; text: .text%__1cNmodI_rRegNodeErule6kM_I_; -text: .text%__1cKInlineTreeWfind_subtree_from_root6Fp0pnIJVMState_pnIciMethod_i_1_; text: .text%__1cNGrowableArray4CpnPciInstanceKlass__2t6MpnFArena_iirk1_v_; text: .text%__1cKciTypeFlowFBlockScompute_exceptions6M_v_; text: .text%__1cYciExceptionHandlerStreamFcount6M_i_; text: .text%__1cINodeHashJhash_find6MpknENode__p1_; -text: .text%__1cFParsePdo_field_access6Mii_v_; text: .text%__1cPThreadLocalNodeLbottom_type6kM_pknEType__; -text: .text%__1cOMethodLivenessNmake_block_at6Mipn0AKBasicBlock__2_; -text: .text%__1cKstorePNodeHtwo_adr6kM_I_; text: .text%__1cKciTypeFlowPflow_successors6MpnNGrowableArray4Cpn0AFBlock___pn0ALStateVector__v_; -text: .text%__1cGciTypeMis_classless6kM_i_; text: .text%__1cRsalI_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cJloadFNodeErule6kM_I_; -text: .text%__1cKBranchDataNis_BranchData6M_i_; -text: .text%__1cIJumpDataLis_JumpData6M_i_; text: .text%__1cSMemBarCPUOrderNodeGOpcode6kM_i_; text: .text%__1cLklassVtableNput_method_at6MpnNmethodOopDesc_i_v_; text: .text%__1cHi2sNodeMideal_Opcode6kM_i_; text: .text%__1cKstoreCNodeMideal_Opcode6kM_i_; text: .text%__1cRshrI_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cNloadConI0NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNloadKlassNodeJnum_opnds6kM_I_; text: .text%__1cHCompileKalias_type6MpnHciField__pn0AJAliasType__; text: .text%__1cLStringTableGintern6FnGHandle_pHipnGThread__pnHoopDesc__; text: .text%__1cLStringTableLhash_string6FpHi_i_; -text: .text%__1cMCreateExNodeGpinned6kM_i_; -text: .text%__1cFciEnvWget_klass_by_name_impl6MpnHciKlass_pnIciSymbol_i_2_; text: .text%__1cNloadKlassNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRScavengeRootsTaskEname6M_pc_; text: .text%__1cRScavengeRootsTaskFdo_it6MpnNGCTaskManager_I_v_; -text: .text%__1cNtestP_regNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cKstoreINodeHtwo_adr6kM_I_; text: .text%__1cSInterpreterRuntimeOresolve_invoke6FpnKJavaThread_nJBytecodesECode__v_; text: .text%__1cPCountedLoopNodeGOpcode6kM_i_; -text: .text%__1cHTypeIntEmake6Fii_pk0_; -text: .text%__1cRcmpFastUnlockNodeHtwo_adr6kM_I_; text: .text%__1cJloadSNodeMideal_Opcode6kM_i_; -text: .text%__1cPDictionaryEntrybAcontains_protection_domain6kMpnHoopDesc__i_; text: .text%__1cIregFOperEtype6kM_pknEType__; text: .text%__1cLLShiftLNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%JVM_GetCPMethodNameUTF; -text: .text%__1cMLinkResolverbNlinktime_resolve_virtual_method_or_null6FnLKlassHandle_nMsymbolHandle_21i_nMmethodHandle__; -text: .text%__1cNsubI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cLTypeInstPtrFxdual6kM_pknEType__; -text: .text%__1cNsubI_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cIGraphKitOreplace_in_map6MpnENode_2_v_; text: .text%__1cMPhaseChaitinLclone_projs6MpnFBlock_IpnENode_4rI_i_; text: .text%__1cTconstantPoolOopDescbCverify_constant_pool_resolve6FnSconstantPoolHandle_nLKlassHandle_pnGThread__v_; -text: .text%__1cLcastP2LNodeJnum_opnds6kM_I_; text: .text%__1cOMethodLivenessNwork_list_add6Mpn0AKBasicBlock__v_; text: .text%__1cFParseFBlockNlocal_type_at6kMi_pknEType__; text: .text%__1cWConstantPoolCacheEntryKset_method6MnJBytecodesECode_nMmethodHandle_i_v_; text: .text%__1cHTypeIntFxdual6kM_pknEType__; text: .text%__1cEUTF8Hstrrchr6FpWiW_1_; text: .text%__1cQConstantIntValueIwrite_on6MpnUDebugInfoWriteStream__v_; -text: .text%__1cQSystemDictionaryPresolve_or_fail6FnMsymbolHandle_nGHandle_2ipnGThread__pnMklassOopDesc__; text: .text%__1cNLoadKlassNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cHCompileZintrinsic_insertion_index6MpnIciMethod_i_i_; -text: .text%__1cIciObjectSis_obj_array_klass6M_i_; text: .text%__1cJVectorSetFClear6M_v_; text: .text%__1cMMergeMemNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKMemoryPoolHoops_do6MpnKOopClosure__v_; text: .text%__1cICodeHeapSallocated_capacity6kM_L_; -text: .text%__1cICodeBlobRis_at_poll_return6MpC_i_; text: .text%__1cIMachOperEtype6kM_pknEType__; text: .text%__1cLjmpConUNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cQSystemDictionarybOfind_constrained_instance_or_array_klass6FnMsymbolHandle_nGHandle_pnGThread__pnMklassOopDesc__; text: .text%__1cNCallGenerator2t6MpnIciMethod__v_; -text: .text%__1cSHighResTimeSamplerLtake_sample6M_x_; -text: .text%__1cRis_error_reported6F_i_; text: .text%__1cLStatSamplerLsample_data6FpnMPerfDataList__v_; text: .text%__1cPStatSamplerTaskEtask6M_v_; text: .text%__1cMPeriodicTaskMtime_to_wait6F_L_; text: .text%__1cMPeriodicTaskOreal_time_tick6FL_v_; -text: .text%__1cNWatcherThreadRis_Watcher_thread6kM_i_; text: .text%__1cLStatSamplerOcollect_sample6F_v_; text: .text%__1cJloadBNodePoper_input_base6kM_I_; text: .text%__1cMVM_OperationPevaluation_mode6kM_n0AEMode__; @@ -1829,98 +1163,62 @@ text: .text%__1cIGraphKit2t6M_v_; text: .text%__1cOemit_d64_reloc6FrnKCodeBuffer_lnJrelocInfoJrelocType_i_v_; text: .text%__1cNinstanceKlassKlink_class6MpnGThread__v_; text: .text%__1cIGraphKitNset_map_clone6MpnNSafePointNode__v_; -text: .text%__1cRRawBytecodeStream2t6MnMmethodHandle__v_; text: .text%__1cENodeHget_ptr6kM_l_; text: .text%__1cFStateM_sub_Op_ConP6MpknENode__v_; text: .text%__1cJloadPNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cKI2CAdapterOis_i2c_adapter6kM_i_; text: .text%__1cOcompU_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cNinstanceKlassPinitialize_impl6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cQciBytecodeStreamWget_field_holder_index6M_i_; text: .text%__1cQciBytecodeStreamZget_declared_field_holder6M_pnPciInstanceKlass__; text: .text%__1cRinterpretedVFrameGmethod6kM_pnNmethodOopDesc__; -text: .text%__1cMorI_rRegNodePoper_input_base6kM_I_; -text: .text%__1cIciSymbol2t6MnMsymbolHandle__v_; -text: .text%__1cFParseRensure_memory_phi6Mii_pnHPhiNode__; text: .text%__1cNdecI_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cJLoadINodeJideal_reg6kM_I_; -text: .text%__1cKRelocationWfix_relocation_at_move6Ml_v_; text: .text%__1cPindOffset32OperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cHAddNodePadd_of_identity6kMpknEType_3_3_; text: .text%__1cMFastLockNodeGOpcode6kM_i_; -text: .text%__1cScompU_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cHCompilebAallow_range_check_smearing6kM_i_; text: .text%__1cLBuildCutout2T6M_v_; text: .text%__1cLBuildCutout2t6MpnIGraphKit_pnENode_ff_v_; text: .text%__1cTconstantPoolOopDescOstring_at_impl6FnSconstantPoolHandle_ipnGThread__pnHoopDesc__; -text: .text%__1cQjava_lang_StringQbasic_create_oop6FpnQtypeArrayOopDesc_ipnGThread__pnHoopDesc__; text: .text%__1cICodeHeapIcapacity6kM_L_; text: .text%__1cKMemoryPoolImax_size6kM_L_; text: .text%__1cMCodeHeapPoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cMCodeHeapPoolNused_in_bytes6M_L_; -text: .text%__1cMPhaseChaitinTsplit_Rematerialize6MpnENode_pnFBlock_IrInNGrowableArray4CI__ipIp2i_2_; text: .text%__1cJcmpOpOperFccode6kM_i_; -text: .text%__1cKjmpDirNodeTmay_be_short_branch6kM_i_; -text: .text%__1cKjmpDirNodeOis_pc_relative6kM_i_; text: .text%__1cPClassFileParserXverify_legal_field_name6MnMsymbolHandle_pnGThread__v_; text: .text%__1cPClassFileParserbCverify_legal_field_signature6MnMsymbolHandle_1pnGThread__v_; text: .text%__1cEUTF8Enext6FpkcpH_pc_; text: .text%__1cOcompL_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cbAPSEvacuateFollowersClosureHdo_void6M_v_; -text: .text%__1cFParseKdo_get_xxx6MpknHTypePtr_pnENode_pnHciField_i_v_; -text: .text%__1cTInlineCallGeneratorJis_inline6kM_i_; text: .text%__1cHMulNodeEhash6kM_I_; text: .text%__1cGRFrame2t6MnFframe_pnKJavaThread_p0_v_; -text: .text%__1cTconvI2L_reg_regNodeHtwo_adr6kM_I_; text: .text%__1cOGenerateOopMapLbb_mark_fct6Fp0ipi_v_; text: .text%__1cScompU_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cNFingerprinterJdo_object6Mii_v_; -text: .text%__1cMloadConFNodePoper_input_base6kM_I_; -text: .text%__1cOGenerateOopMapTmerge_state_vectors6MpnNCellTypeState_2_i_; -text: .text%__1cMloadConFNodeHtwo_adr6kM_I_; -text: .text%__1cICallNodeSis_CallDynamicJava6kM_pknTCallDynamicJavaNode__; -text: .text%__1cRcmpFastUnlockNodeJnum_opnds6kM_I_; text: .text%__1cEUTF8Sconvert_to_unicode6FpkcpHi_v_; -text: .text%__1cUParallelScavengeHeapMmem_allocate6MLii_pnIHeapWord__; text: .text%__1cNinstanceKlassbBallocate_permanent_instance6MpnGThread__pnPinstanceOopDesc__; text: .text%__1cKjmpConNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOMethodLivenessKBasicBlockQcompute_gen_kill6MpnIciMethod__v_; text: .text%__1cOMethodLivenessKBasicBlock2t6Mp0ii_v_; text: .text%__1cMloadConFNodeErule6kM_I_; -text: .text%__1cLcastP2LNodeHtwo_adr6kM_I_; text: .text%__1cIMachOperIconstant6kM_l_; -text: .text%__1cJloadSNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cPcheckCastPPNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMTypeKlassPtrKadd_offset6kMi_pknHTypePtr__; text: .text%__1cUEdenMutableSpacePoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cYSurvivorMutableSpacePoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cYSurvivorMutableSpacePoolImax_size6kM_L_; text: .text%__1cUEdenMutableSpacePoolNused_in_bytes6M_L_; text: .text%__1cUEdenMutableSpacePoolImax_size6kM_L_; text: .text%__1cYSurvivorMutableSpacePoolNused_in_bytes6M_L_; -text: .text%__1cKjmpConNodeTmay_be_short_branch6kM_i_; -text: .text%__1cKjmpConNodeOis_pc_relative6kM_i_; text: .text%__1cHConNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKCodeBufferKend_a_stub6M_v_; text: .text%__1cTemit_java_to_interp6FrnKCodeBuffer__v_; -text: .text%__1cKCodeBufferMstart_a_stub6M_v_; -text: .text%__1cFParseUprofile_taken_branch6Mi_v_; text: .text%__1cKciTypeFlowGJsrSetNapply_control6Mp0pnQciBytecodeStream_pn0ALStateVector__v_; -text: .text%__1cKReturnNodeGis_CFG6kM_i_; text: .text%__1cRSignatureIteratorSskip_optional_size6M_v_; text: .text%__1cRaddI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHTypeIntFwiden6kMpknEType__3_; text: .text%__1cTCompareAndSwapLNodeGOpcode6kM_i_; -text: .text%__1cNmethodOopDescbHhas_unloaded_classes_in_signature6FnMmethodHandle_pnGThread__i_; -text: .text%__1cIciObjectRis_instance_klass6M_i_; text: .text%__1cOGenerateOopMapRsigchar_to_effect6McipnNCellTypeState__2_; text: .text%__1cOGenerateOopMapIdo_field6Miiii_v_; text: .text%__1cPloadConUL32NodeMideal_Opcode6kM_i_; text: .text%__1cEUTF8Ounicode_length6Fpkci_i_; text: .text%__1cIciMethodRget_flow_analysis6M_pnKciTypeFlow__; -text: .text%__1cICodeBlobLoop_addr_at6kMi_ppnHoopDesc__; -text: .text%__1cNloadRangeNodeHtwo_adr6kM_I_; -text: .text%__1cJloadLNodeJnum_opnds6kM_I_; text: .text%__1cSmembar_acquireNodeMideal_Opcode6kM_i_; text: .text%__1cSObjectSynchronizerXidentity_hash_value_for6FnGHandle__l_; text: .text%__1cHoopDescSslow_identity_hash6M_l_; @@ -1928,38 +1226,23 @@ text: .text%__1cKMemBarNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cOGenerateOopMapLmerge_state6Fp0ipi_v_; text: .text%__1cIMachNodeOpipeline_class6F_pknIPipeline__; text: .text%__1cIMachNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cJloadCNodeErule6kM_I_; -text: .text%__1cKOSRAdapterIis_alive6kM_i_; -text: .text%__1cQjava_lang_StringMbasic_create6FpnQtypeArrayOopDesc_ipnGThread__nGHandle__; text: .text%__1cRMachNullCheckNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cGThreadXclear_pending_exception6M_v_; text: .text%__1cXindIndexScaleOffsetOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cOcompL_rRegNodeHtwo_adr6kM_I_; text: .text%__1cTconstantPoolOopDescbBbasic_type_for_signature_at6Mi_nJBasicType__; text: .text%__1cETypeRget_typeflow_type6FpnGciType__pk0_; text: .text%__1cLStringTableGintern6FpnNsymbolOopDesc_pnGThread__pnHoopDesc__; text: .text%__1cNsymbolOopDescKas_unicode6kMri_pH_; -text: .text%__1cKciTypeFlowLStateVectorJdo_invoke6MpnQciBytecodeStream_i_v_; text: .text%__1cKstorePNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKReturnNodeKmatch_edge6kMI_I_; -text: .text%__1cKRegionNodeJideal_reg6kM_I_; -text: .text%__1cJloadINodeHtwo_adr6kM_I_; -text: .text%__1cQmark_inner_loops6FpnIPhaseCFG_pnFBlock__v_: block.o; text: .text%__1cIHaltNodeJideal_reg6kM_I_; text: .text%__1cFStateM_sub_Op_Halt6MpknENode__v_; text: .text%__1cWShouldNotReachHereNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKReturnNodeGOpcode6kM_i_; text: .text%__1cJTypeTupleKmake_range6FpnLciSignature__pk0_; text: .text%__1cKStoreLNodeGOpcode6kM_i_; -text: .text%__1cPCountedLoopNodeOis_CountedLoop6M_p0_; text: .text%__1cJTypeTupleLmake_domain6FpnPciInstanceKlass_pnLciSignature__pk0_; -text: .text%__1cPClassFileParserWparse_field_attributes6MnSconstantPoolHandle_iHpHpi2pnPtypeArrayHandle_pnGThread__v_; -text: .text%__1cPClassFileParserbCverify_legal_field_modifiers6MiipnGThread__v_; text: .text%__1cMindirectOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cMindirectOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cMLinkResolverUresolve_virtual_call6FrnICallInfo_nGHandle_nLKlassHandle_4nMsymbolHandle_54iipnGThread__v_; -text: .text%__1cMLinkResolverbEruntime_resolve_virtual_method6FrnICallInfo_nMmethodHandle_nLKlassHandle_nGHandle_4ipnGThread__v_; -text: .text%__1cFKlassXcan_be_statically_bound6FpnNmethodOopDesc__i_; text: .text%__1cLProfileDataOtranslate_from6Mp0_v_; text: .text%__1cKstorePNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cKstoreINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -1967,59 +1250,36 @@ text: .text%__1cSPSKeepAliveClosureGdo_oop6MppnHoopDesc__v_; text: .text%__1cNloadConI0NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTconvI2L_reg_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cMWarmCallInfoKalways_hot6F_p0_; -text: .text%__1cMWarmCallInfoGis_hot6kM_i_; text: .text%__1cNprefetchwNodeMideal_Opcode6kM_i_; text: .text%__1cIAddINodeJideal_reg6kM_I_; -text: .text%__1cNCatchProjNode2t6MpnENode_Ii_v_; -text: .text%__1cENodeHis_Bool6M_pnIBoolNode__; text: .text%__1cLBoxLockNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNmulL_rRegNodePoper_input_base6kM_I_; -text: .text%__1cKciTypeFlowIcan_trap6MrnQciBytecodeStream__i_; -text: .text%__1cQVMOperationQdDueueLqueue_empty6Mi_i_; text: .text%__1cIProjNodeDcmp6kMrknENode__I_; -text: .text%__1cSComputeAdapterInfoGdo_int6M_v_; text: .text%__1cNCatchProjNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%JVM_GetCPFieldSignatureUTF; -text: .text%__1cIGraphKitTtoo_many_recompiles6MnODeoptimizationLDeoptReason__i_; text: .text%__1cHCompileFstart6kM_pnJStartNode__; text: .text%__1cNmulL_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cLPCTableNodeEhash6kM_I_; text: .text%__1cIGraphKitZadd_exception_states_from6MpnIJVMState__v_; -text: .text%__1cJStartNodeOis_block_start6kM_i_; text: .text%__1cQComputeCallStackHdo_void6M_v_; text: .text%__1cNaddI_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cIGraphKitOtoo_many_traps6MnODeoptimizationLDeoptReason__i_; -text: .text%__1cNciCallProfileRapply_prof_factor6Mf_v_; text: .text%__1cIciMethodTcall_profile_at_bci6Mi_nNciCallProfile__; -text: .text%__1cHCompileOcall_generator6MpnIciMethod_ipnIJVMState_if_pnNCallGenerator__; -text: .text%__1cHCompileOfind_intrinsic6MpnIciMethod_i_pnNCallGenerator__; text: .text%__1cMindIndexOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cMindIndexOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%jni_GetPrimitiveArrayCritical: jni.o; text: .text%jni_ReleasePrimitiveArrayCritical: jni.o; -text: .text%__1cSInterpreterRuntimeDldc6FpnKJavaThread_i_v_; -text: .text%__1cPClassFileParserbIparse_constant_pool_fieldref_entry6MnSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cNdecI_rRegNodePoper_input_base6kM_I_; -text: .text%__1cFKlassOis_subclass_of6kMpnMklassOopDesc__i_; -text: .text%__1cNGrowableArray4Cl_2t6Mii_v_; -text: .text%__1cNinstanceKlassSlookup_osr_nmethod6kMpnNmethodOopDesc_i_pnHnmethod__; text: .text%__1cIAddINodeIadd_ring6kMpknEType_3_3_; -text: .text%__1cLPCTableNodeKis_PCTable6kM_pk0_; text: .text%__1cLPCTableNodeHsize_of6kM_I_; text: .text%__1cNincI_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKJNIHandlesKmake_local6FpnGThread_pnHoopDesc__pnI_jobject__; text: .text%__1cQciBytecodeStreamXget_method_holder_index6M_i_; text: .text%__1cMorI_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cLimmUL32OperJconstantL6kM_x_; text: .text%__1cIGraphKitWround_double_arguments6MpnIciMethod__v_; text: .text%__1cFParseHdo_call6M_v_; text: .text%__1cIGraphKitTround_double_result6MpnIciMethod__v_; -text: .text%__1cFParseZcan_not_compile_call_site6MpnIciMethod_pnPciInstanceKlass__i_; text: .text%__1cQciBytecodeStreambAget_declared_method_holder6M_pnHciKlass__; text: .text%__1cFParseMprofile_call6MpnENode__v_; text: .text%__1cScompP_mem_rRegNodePoper_input_base6kM_I_; text: .text%__1cICodeHeapLheader_size6F_L_; -text: .text%__1cJloadBNodeJnum_opnds6kM_I_; text: .text%__1cENodeLbottom_type6kM_pknEType__; text: .text%__1cXindIndexScaleOffsetOperNconstant_disp6kM_i_; text: .text%__1cSindIndexOffsetOperJnum_edges6kM_I_; @@ -2033,11 +1293,9 @@ text: .text%__1cIBoolNodeHsize_of6kM_I_; text: .text%__1cLLShiftINodeLbottom_type6kM_pknEType__; text: .text%jni_DeleteLocalRef: jni.o; text: .text%__1cJloadSNodePoper_input_base6kM_I_; -text: .text%__1cPno_rax_RegPOperJnum_edges6kM_I_; text: .text%__1cOcompI_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%jni_SetIntField: jni.o; text: .text%__1cMURShiftLNodeLbottom_type6kM_pknEType__; -text: .text%__1cMMutableSpaceFclear6M_v_; text: .text%__1cNtestI_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQjava_lang_StringbBcreate_tenured_from_unicode6FpHipnGThread__nGHandle__; text: .text%__1cKoopFactoryXnew_permanent_charArray6FipnGThread__pnQtypeArrayOopDesc__; @@ -2048,46 +1306,26 @@ text: .text%__1cHMulNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cVExceptionHandlerTableJadd_entry6MnRHandlerTableEntry__v_; text: .text%__1cPsalI_rReg_1NodeMideal_Opcode6kM_i_; text: .text%__1cRaddP_rReg_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMLinkResolverbFlinktime_resolve_special_method6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_43ipnGThread__v_; -text: .text%__1cMLinkResolverUresolve_special_call6FrnICallInfo_nLKlassHandle_nMsymbolHandle_43ipnGThread__v_; -text: .text%__1cMLinkResolverbEruntime_resolve_special_method6FrnICallInfo_nMmethodHandle_nLKlassHandle_4ipnGThread__v_; text: .text%__1cQComputeCallStackJdo_object6Mii_v_; -text: .text%__1cIGraphKitNcast_not_null6MpnENode__2_; text: .text%__1cTconvL2I_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cKPSYoungGenNused_in_bytes6kM_L_; -text: .text%__1cOCompilerOracleOshould_exclude6FnMmethodHandle__i_; text: .text%__1cOGenerateOopMapHset_var6MinNCellTypeState__v_; -text: .text%__1cPcheckCastPPNodeJnum_opnds6kM_I_; -text: .text%__1cLLShiftLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cGIfNodeHsize_of6kM_I_; text: .text%__1cPciInstanceKlassFsuper6M_p0_; text: .text%__1cOcompL_rRegNodeMcisc_operand6kM_i_; text: .text%__1cLLShiftINodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cScompI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMMergeMemNodeJideal_reg6kM_I_; -text: .text%__1cNandL_rRegNodePoper_input_base6kM_I_; -text: .text%__1cIciMethodWwas_executed_more_than6Mi_i_; -text: .text%__1cSReferenceProcessorbAprocess_discovered_reflist6MppnHoopDesc_pnPReferencePolicy_i_v_; -text: .text%__1cSReferenceProcessorOprocess_phase36MppnHoopDesc_ipnRBoolObjectClosure_pnKOopClosure_pnLVoidClosure__v_; -text: .text%__1cSReferenceProcessorOprocess_phase26MppnHoopDesc_pnRBoolObjectClosure_pnKOopClosure__v_; -text: .text%__1cSReferenceProcessorbAenqueue_discovered_reflist6MpnHoopDesc_p2_v_; text: .text%__1cTleaPIdxScaleOffNodeMideal_Opcode6kM_i_; text: .text%__1cTleaPIdxScaleOffNodePoper_input_base6kM_I_; -text: .text%__1cFLabelJadd_patch6Mi_v_; text: .text%__1cKMemBarNodeEhash6kM_I_; text: .text%__1cOcompP_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNloadConL0NodePoper_input_base6kM_I_; text: .text%__1cNsubI_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cJMarkSweepSMarkAndPushClosureLdo_nmethods6kM_ki_; text: .text%__1cIXorINodeGOpcode6kM_i_; -text: .text%__1cTStackWalkCompPolicyRcompilation_level6MnMmethodHandle_i_i_; text: .text%__1cMoutputStreamDput6Mc_v_; text: .text%__1cPindOffset32OperNbase_position6kM_i_; text: .text%__1cPindOffset32OperNconstant_disp6kM_i_; text: .text%__1cOcompU_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNloadConL0NodeHtwo_adr6kM_I_; -text: .text%__1cPBytecode_invokeFindex6kM_i_; -text: .text%__1cFframeNis_glue_frame6kM_i_; text: .text%__1cLRShiftINodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cZPhaseConservativeCoalesceKupdate_ifg6MIIpnIIndexSet_2_v_; text: .text%__1cZPhaseConservativeCoalesceMunion_helper6MpnENode_2II222pnFBlock_I_v_; @@ -2095,37 +1333,24 @@ text: .text%__1cIIndexSetEswap6Mp0_v_; text: .text%__1cOPhaseIdealLoopIsink_use6MpnENode_2_v_; text: .text%__1cRshrL_rReg_immNodeErule6kM_I_; text: .text%__1cKInlineTreeMok_to_inline6MpnIciMethod_pnIJVMState_rnNciCallProfile_pnMWarmCallInfo__8_; -text: .text%__1cTpass_initial_checks6FpnIciMethod_i1_i_; -text: .text%__1cKInlineTreeMshouldInline6kMpnIciMethod_irnNciCallProfile_pnMWarmCallInfo__pkc_; -text: .text%__1cOCompilerOracleNshould_inline6FnMmethodHandle__i_; -text: .text%__1cKInlineTreeNtry_to_inline6MpnIciMethod_irnNciCallProfile_pnMWarmCallInfo__pkc_; -text: .text%__1cIciMethodbAinterpreter_throwout_count6kM_i_; -text: .text%__1cIciMethodNshould_inline6M_i_; -text: .text%__1cIciMethodOshould_exclude6M_i_; text: .text%__1cScompU_rReg_immNodeErule6kM_I_; text: .text%__1cKjmpDirNodeJlabel_set6MrnFLabel_I_v_; -text: .text%__1cKjmpDirNodeJis_Branch6kM_I_; text: .text%__1cKjmpDirNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMindirectOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cILoadNodeDcmp6kMrknENode__I_; text: .text%__1cLTypeInstPtrQcast_to_ptr_type6kMnHTypePtrDPTR__pknEType__; text: .text%__1cIGraphKitHjava_bc6kM_nJBytecodesECode__; -text: .text%__1cFLabelSpatch_instructions6MpnRAbstractAssembler__v_; -text: .text%__1cRAbstractAssemblerHbind_to6MrnFLabel_i_v_; text: .text%__1cRAbstractAssemblerEbind6MrnFLabel__v_; text: .text%__1cNloadConL0NodeErule6kM_I_; text: .text%__1cJStoreNodeSIdeal_masked_input6MpnIPhaseGVN_I_pnENode__; text: .text%__1cIGraphKitNbuiltin_throw6MnODeoptimizationLDeoptReason_pnENode__v_; text: .text%__1cbBopt_virtual_call_RelocationEtype6M_nJrelocInfoJrelocType__; -text: .text%__1cJrRegIOperFclone6kM_pnIMachOper__; text: .text%__1cMindIndexOperFscale6kM_i_; text: .text%__1cScompP_mem_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cFKlassPoop_is_instance6kM_i_; text: .text%__1cHciFieldPinitialize_from6MpnPfieldDescriptor__v_; text: .text%__1cRandI_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cMMachProjNodeHsize_of6kM_I_; text: .text%__1cJStoreNodeZIdeal_sign_extended_input6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cScompP_mem_rRegNodeHtwo_adr6kM_I_; text: .text%__1cTconvF2D_reg_memNodeErule6kM_I_; text: .text%__1cPindOffset32OperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cFStateM_sub_Op_CmpP6MpknENode__v_; @@ -2134,38 +1359,24 @@ text: .text%__1cMloadConLNodeMideal_Opcode6kM_i_; text: .text%__1cSCompiledStaticCallJfind_stub6M_pC_; text: .text%__1cIciSymbolEmake6Fpkc_p0_; text: .text%__1cIciSymbolJmake_impl6Fpkc_p0_; -text: .text%__1cScompU_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cKimmL32OperIconstant6kM_l_; -text: .text%__1cHi2sNodePoper_input_base6kM_I_; text: .text%__1cKimmL32OperJnum_edges6kM_I_; -text: .text%__1cMMonitorValue2t6MpnKScopeValue_nILocation__v_; text: .text%__1cMMonitorValueIwrite_on6MpnUDebugInfoWriteStream__v_; text: .text%__1cLBoxLockNodeKstack_slot6FpnENode__i_; -text: .text%__1cLBoxLockNodeKis_BoxLock6kM_pk0_; text: .text%__1cIBoolNodeDcmp6kMrknENode__I_; text: .text%__1cNSignatureInfoIdo_array6Mii_v_; -text: .text%__1cKDataLayoutPneeds_array_len6FC_i_; text: .text%__1cKDataLayoutKinitialize6MCHi_v_; text: .text%__1cJloadLNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFframebHnext_monitor_in_interpreter_frame6kMpnPBasicObjectLock__2_; -text: .text%__1cLRuntimeStubHoops_do6MpnKOopClosure__v_; -text: .text%__1cFParseRbranch_prediction6Mrf_f_; text: .text%__1cPshrI_rReg_1NodeMideal_Opcode6kM_i_; -text: .text%__1cHciKlassNis_subtype_of6Mp0_i_; text: .text%__1cOcompL_rRegNodeErule6kM_I_; text: .text%__1cNGrowableArray4Cpv_Praw_at_put_grow6Mirk03_v_; text: .text%__1cNGrowableArray4Cl_Praw_at_put_grow6Mirkl2_v_; text: .text%__1cISubINodeLbottom_type6kM_pknEType__; -text: .text%__1cIGraphKitZset_all_rewritable_memory6MpnENode__v_; -text: .text%__1cIGraphKitTset_all_memory_call6MpnENode__v_; text: .text%__1cMtlsLoadPNodeLbottom_type6kM_pknEType__; text: .text%__1cJAssemblerEmovq6MnHAddress_pnMRegisterImpl__v_; -text: .text%__1cRsalI_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cNloadRangeNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cICodeBlobPis_runtime_stub6kM_i_; text: .text%__1cGRFrameMset_distance6Mi_v_; -text: .text%__1cICodeBlobOis_c2i_adapter6kM_i_; -text: .text%__1cFframeTis_first_java_frame6kM_i_; text: .text%__1cFframeLreal_sender6kMpnLRegisterMap__0_; text: .text%__1cGRFrameGcaller6M_p0_; text: .text%__1cTStackWalkCompPolicyIsenderOf6MpnGRFrame_pnNGrowableArray4C2___2_; @@ -2174,51 +1385,31 @@ text: .text%__1cKstoreLNodePoper_input_base6kM_I_; text: .text%__1cTconstantPoolOopDescMklass_at_put6MipnMklassOopDesc__v_; text: .text%__1cNFingerprinterGdo_int6M_v_; text: .text%__1cNSafepointBlobbDpreserve_callee_argument_oops6MnFframe_pknLRegisterMap_pnKOopClosure__v_; -text: .text%__1cRaddI_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cRshrL_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cHPhiNodeEmake6FpnENode_2_p0_; -text: .text%__1cScompI_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cENodeIis_CMove6M_pnJCMoveNode__; text: .text%__1cWstatic_call_RelocationLstatic_stub6M_pC_; -text: .text%__1cLRethrowNodeGis_CFG6kM_i_; text: .text%__1cIciObjectFklass6M_pnHciKlass__; text: .text%__1cNloadConP0NodeMideal_Opcode6kM_i_; text: .text%__1cOPhaseIdealLoopOsplit_thru_phi6MpnENode_2i_2_; -text: .text%__1cNGCTaskManagerRset_resource_flag6MIi_v_; -text: .text%__1cRshrI_rReg_immNodePoper_input_base6kM_I_; -text: .text%__1cUmembar_cpu_orderNodeMideal_Opcode6kM_i_; text: .text%__1cLklassVtableIindex_of6kMpnNmethodOopDesc_i_i_; text: .text%__1cKEntryPointFentry6kMnITosState__pC_; -text: .text%__1cJloadCNodeMideal_Opcode6kM_i_; text: .text%__1cKJavaThreadJframes_do6MpFpnFframe_pknLRegisterMap__v_v_; text: .text%__1cNMemoryManagerHoops_do6MpnKOopClosure__v_; text: .text%__1cRInvocationCounterJset_carry6M_v_; -text: .text%__1cKTypeAryPtrEmake6FnHTypePtrDPTR_pknHTypeAry_pnHciKlass_ii_pk0_; text: .text%__1cFStateM_sub_Op_RegL6MpknENode__v_; text: .text%__1cNdecI_rRegNodeErule6kM_I_; -text: .text%__1cKjmpConNodeJis_Branch6kM_I_; text: .text%__1cKjmpConNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPcmpFastLockNodeMideal_Opcode6kM_i_; text: .text%__1cKjmpConNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cJttyLockerbCbreak_tty_lock_for_safepoint6Fl_v_; -text: .text%__1cNCallGeneratorJis_inline6kM_i_; text: .text%__1cUSafepointSynchronizeFblock6FpnKJavaThread__v_; text: .text%__1cCosRcurrent_thread_id6F_l_; text: .text%__1cKciTypeFlowLStateVectorMdo_getstatic6MpnQciBytecodeStream__v_; text: .text%__1cNSignatureInfoHdo_bool6M_v_; text: .text%__1cLLShiftLNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cKstoreLNodeMideal_Opcode6kM_i_; -text: .text%__1cNloadKlassNodeHtwo_adr6kM_I_; -text: .text%__1cFParseYprofile_not_taken_branch6M_v_; text: .text%__1cHPhiNodeMslice_memory6kMpknHTypePtr__p0_; -text: .text%__1cOcompL_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cLRuntimeStubMdo_unloading6MpnRBoolObjectClosure_pnKOopClosure_i_v_; -text: .text%__1cLSymbolTableFprobe6Fpkci_pnNsymbolOopDesc__; -text: .text%__1cOcompL_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cPcmpFastLockNodePoper_input_base6kM_I_; -text: .text%__1cNCallGeneratorKis_virtual6kM_i_; -text: .text%__1cKInlineTreePshouldNotInline6kMpnIciMethod_pnMWarmCallInfo__pkc_; -text: .text%__1cLcastP2LNodeErule6kM_I_; text: .text%__1cNinstanceKlassKjava_super6kM_pnMklassOopDesc__; text: .text%__1cNPhaseRegAllocKoffset2reg6kMi_i_; text: .text%__1cQjmpCon_shortNodeMideal_Opcode6kM_i_; @@ -2226,88 +1417,53 @@ text: .text%__1cQjmpCon_shortNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cRInterpretedRFrame2t6MnFframe_pnKJavaThread_pnGRFrame__v_; text: .text%__1cTconvI2L_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJloadINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cENodeRlatency_from_uses6kMrnLBlock_Array_rnNGrowableArray4CI___i_; text: .text%__1cNGrowableArray4CI_Praw_at_put_grow6MirkI2_v_; -text: .text%__1cFParseFdo_if6MpnENode_2nIBoolTestEmask_2_v_; text: .text%__1cXmembar_acquire_lockNodeMideal_Opcode6kM_i_; text: .text%__1cKklassKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cXindIndexScaleOffsetOperOindex_position6kM_i_; text: .text%__1cXindIndexScaleOffsetOperNbase_position6kM_i_; -text: .text%__1cPsalI_rReg_1NodePoper_input_base6kM_I_; text: .text%__1cIGraphKitJpush_node6MnJBasicType_pnENode__v_; -text: .text%__1cISubINodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cSconstMethodOopDescbEchecked_exceptions_length_addr6kM_pH_; text: .text%__1cPThreadLocalNodeGOpcode6kM_i_; text: .text%__1cRsubI_rReg_memNodePoper_input_base6kM_I_; -text: .text%__1cJloadCNodePoper_input_base6kM_I_; text: .text%__1cSThreadLocalStoragePget_thread_slow6F_pnGThread__; text: .text%__1cCosXthread_local_storage_at6Fi_pv_; -text: .text%__1cLRuntimeStubYcaller_must_gc_arguments6kMpnKJavaThread__i_; text: .text%__1cIAddPNodeJideal_reg6kM_I_; -text: .text%__1cTleaPIdxScaleOffNodeJnum_opnds6kM_I_; text: .text%__1cRaddI_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cFParseNthrow_to_exit6MpnNSafePointNode__v_; text: .text%__1cQCallLeafNoFPNodeGOpcode6kM_i_; text: .text%__1cKTypeRawPtrHget_con6kM_l_; text: .text%__1cOClearArrayNodeGOpcode6kM_i_; -text: .text%__1cOoop_RelocationHoops_do6MpFppnHoopDesc__v_v_; -text: .text%__1cIciMethodbHhas_unloaded_classes_in_signature6M_i_; -text: .text%__1cScompP_mem_rRegNodeJnum_opnds6kM_I_; text: .text%__1cFStateM_sub_Op_CmpI6MpknENode__v_; -text: .text%__1cNincI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cJimmP0OperEtype6kM_pknEType__; text: .text%__1cNloadConP0NodeLbottom_type6kM_pknEType__; text: .text%__1cPloadConUL32NodeLbottom_type6kM_pknEType__; text: .text%__1cNloadConI0NodeHsize_of6kM_I_; -text: .text%__1cRaddI_rReg_memNodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cPshrI_rReg_1NodePoper_input_base6kM_I_; text: .text%JVM_handle_solaris_signal; text: .text%signalHandler; text: .text%__1cQJNI_FastGetFieldQfind_slowcase_pc6FpC_1_; -text: .text%__1cMLinkResolverbElinktime_resolve_static_method6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_43ipnGThread__v_; -text: .text%__1cRresolve_and_patch6FppnHoopDesc__v_; text: .text%__1cFStateN_sub_Op_LoadP6MpknENode__v_; text: .text%__1cISubINodeDsub6kMpknEType_3_3_; text: .text%__1cPClassFileParserbDverify_legal_method_signature6MnMsymbolHandle_1pnGThread__i_; text: .text%__1cMLinkResolverVresolve_invokevirtual6FrnICallInfo_nGHandle_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cRInterpretedRFrameOis_interpreted6kM_i_; -text: .text%__1cGRFrameLis_compiled6kM_i_; text: .text%__1cUPSGenerationCountersKupdate_all6M_v_; text: .text%__1cTStackWalkCompPolicyMshouldInline6FnMmethodHandle_fi_pkc_; text: .text%__1cFArenaRdestruct_contents6M_v_; -text: .text%__1cIGraphKitPstore_to_memory6MpnENode_22nJBasicType_i_2_; -text: .text%__1cJStoreNodeEmake6FpnENode_22pknHTypePtr_2nJBasicType__p0_; text: .text%__1cXPhaseAggressiveCoalesceYinsert_copy_with_overlap6MpnFBlock_pnENode_II_v_; text: .text%__1cULinearLeastSquareFitGupdate6Mdd_v_; -text: .text%__1cKciTypeFlowGJsrSetSis_compatible_with6Mp1_i_; text: .text%__1cENodeIadd_prec6Mp0_v_; -text: .text%__1cKOSRAdapterOis_osr_adapter6kM_i_; text: .text%__1cIMulINodeGOpcode6kM_i_; text: .text%__1cLciSignature2t6MpnHciKlass_pnIciSymbol__v_; text: .text%__1cNGrowableArray4CpnGciType__2t6MpnFArena_iirk1_v_; -text: .text%__1cKTypeAryPtrFempty6kM_i_; -text: .text%__1cHTypeAryFempty6kM_i_; -text: .text%__1cJloadCNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cIciMethod2t6MnMmethodHandle__v_; -text: .text%__1cRandI_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cJAssemblerDjcc6Mn0AJCondition_rnFLabel_nJrelocInfoJrelocType__v_; -text: .text%__1cCosRelapsed_frequency6F_x_; -text: .text%__1cNinstanceKlassVis_same_class_package6FpnHoopDesc_pnNsymbolOopDesc_24_i_; text: .text%__1cMelapsedTimerHseconds6kM_d_; text: .text%__1cOJNIHandleBlockOallocate_block6FpnGThread__p0_; -text: .text%__1cJAssemblerDnop6M_v_; -text: .text%__1cDCHANprocess_class6FnLKlassHandle_pnNGrowableArray4n0B___pnNGrowableArray4nMmethodHandle___nMsymbolHandle_6_v_; -text: .text%__1cEUTF8Fequal6FpWi1i_i_; -text: .text%__1cKstoreLNodeJnum_opnds6kM_I_; -text: .text%__1cIjniIdMapHoops_do6MpnKOopClosure__v_; -text: .text%__1cMjniIdMapBaseHoops_do6MpnKOopClosure__v_; text: .text%__1cJArrayDataKcell_count6M_i_; text: .text%__1cGBitMapIset_from6M0_v_; -text: .text%__1cPBytecode_invokeJsignature6kM_pnNsymbolOopDesc__; text: .text%__1cKType_ArrayEgrow6MI_v_; text: .text%JVM_Write; text: .text%__1cDhpiFwrite6FipkvI_L_; -text: .text%__1cMStartC2INodeGOpcode6kM_i_; text: .text%__1cSindIndexOffsetOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cFframebGinterpreter_callee_receiver_addr6MnMsymbolHandle__ppnHoopDesc__; text: .text%__1cIAddLNodeLbottom_type6kM_pknEType__; @@ -2318,33 +1474,21 @@ text: .text%__1cMtlsLoadPNodeMideal_Opcode6kM_i_; text: .text%__1cRshrI_rReg_immNodeErule6kM_I_; text: .text%__1cJcmpOpOperGnegate6M_v_; text: .text%__1cHTypeAryEmake6FpknEType_pknHTypeInt__pk0_; -text: .text%__1cFParseRoptimize_inlining6MpnIciMethod_ipnPciInstanceKlass_24irnKInlineTreeLInlineStyle_r2_v_; -text: .text%__1cQimprove_receiver6FpnPciInstanceKlass_pknLTypeInstPtr_ri_1_; -text: .text%__1cPcmpFastLockNodeHtwo_adr6kM_I_; -text: .text%__1cMLinkResolverTresolve_static_call6FrnICallInfo_rnLKlassHandle_nMsymbolHandle_53iipnGThread__v_; text: .text%__1cPCheckCastPPNodeJideal_reg6kM_I_; -text: .text%__1cKJavaThreadUin_stack_yellow_zone6MpC_i_; -text: .text%__1cFParseSmerge_memory_edges6MpnMMergeMemNode_ii_v_; text: .text%__1cJAssemblerEmovq6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cUSafepointSynchronizebDhandle_polling_page_exception6FpnKJavaThread__v_; text: .text%__1cUThreadSafepointStatebDhandle_polling_page_exception6M_v_; text: .text%__1cLjmpConUNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNandL_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cKcmpOpUOperFccode6kM_i_; -text: .text%__1cLjmpConUNodeTmay_be_short_branch6kM_i_; -text: .text%__1cLjmpConUNodeOis_pc_relative6kM_i_; text: .text%__1cIPipelinePoperand_latency6kMIpk0_I_; text: .text%__1cWCallLeafNoFPDirectNodeMideal_Opcode6kM_i_; text: .text%__1cQPlaceholderTableKfind_entry6MiInMsymbolHandle_nGHandle__pnNsymbolOopDesc__; -text: .text%__1cJTimeStampSticks_since_update6kM_x_; text: .text%__1cURethrowExceptionNodeMideal_Opcode6kM_i_; text: .text%__1cJloadPNodeFreloc6kM_i_; text: .text%__1cTno_rax_rbx_RegPOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cNprefetchwNodeJnum_opnds6kM_I_; text: .text%__1cKjmpConNodeGnegate6M_v_; text: .text%__1cMindirectOperFscale6kM_i_; -text: .text%__1cQSystemDictionaryVadd_loader_constraint6FnMsymbolHandle_nGHandle_2pnGThread__v_; -text: .text%__1cVLoaderConstraintTableJadd_entry6MnMsymbolHandle_pnMklassOopDesc_nGHandle_34pnGThread__i_; text: .text%__1cRsubI_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cTOopMapForCacheEntryZfill_stackmap_for_opcodes6MpnOBytecodeStream_pnNCellTypeState_4i_v_; text: .text%__1cQComputeCallStackGdo_int6M_v_; @@ -2352,7 +1496,6 @@ text: .text%__1cNloadRangeNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cNtestP_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNloadRangeNodeIpipeline6kM_pknIPipeline__; text: .text%__1cPCheckCastPPNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cFParseMvisit_blocks6M_v_; text: .text%__1cQjmpDir_shortNodeMideal_Opcode6kM_i_; text: .text%__1cQjmpDir_shortNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cKciTypeFlowLStateVectorLdo_getfield6MpnQciBytecodeStream__v_; @@ -2361,40 +1504,26 @@ text: .text%__1cScompP_mem_rRegNodeErule6kM_I_; text: .text%__1cPSignatureStreamRas_symbol_or_null6M_pnNsymbolOopDesc__; text: .text%__1cNSafePointNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cJloadSNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKMemBarNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cOjmpLoopEndNodeMideal_Opcode6kM_i_; -text: .text%__1cFBlockTimplicit_null_check6MrnLBlock_Array_rnNGrowableArray4CI__pnENode_6_v_; text: .text%__1cKCastPPNodeQIdeal_DU_postCCP6MpnIPhaseCCP__pnENode__; text: .text%__1cOGenerateOopMapKcopy_state6MpnNCellTypeState_2_v_; -text: .text%__1cGThreadSis_Compiler_thread6kM_i_; text: .text%__1cRCardTableModRefBSPdirty_MemRegion6MnJMemRegion__v_; -text: .text%__1cJloadBNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cQVMOperationQdDueueSqueue_remove_front6Mi_pnMVM_Operation__; text: .text%__1cOcompI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVCompressedWriteStreamEgrow6M_v_; -text: .text%__1cNCompileBrokerYcheck_compilation_result6FnMmethodHandle_iippnHnmethod__i_; -text: .text%__1cKReflectionVis_same_class_package6FpnMklassOopDesc_2_i_; -text: .text%__1cNinstanceKlassVis_same_class_package6MpnMklassOopDesc__i_; text: .text%JVM_RawMonitorEnter; -text: .text%__1cFMutexMjvm_raw_lock6M_v_; text: .text%JVM_RawMonitorExit; -text: .text%__1cFMutexOjvm_raw_unlock6M_v_; text: .text%__1cHUNICODELutf8_length6FpHi_i_; text: .text%__1cRaddP_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cIciMethodLis_accessor6kM_i_; text: .text%__1cPCountedLoopNodeDphi6kM_pnENode__; text: .text%__1cLBoxLockNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cSmembar_releaseNodeMideal_Opcode6kM_i_; -text: .text%__1cQciBytecodeStreamSget_constant_index6kM_i_; -text: .text%__1cOGenerateOopMapOset_bbmark_bit6Mi_v_; text: .text%__1cFParseOreturn_current6MpnENode__v_; text: .text%__1cLConvI2LNodeJideal_reg6kM_I_; text: .text%__1cJStartNodeFmatch6MpknIProjNode_pknHMatcher__pnENode__; text: .text%__1cMorI_rRegNodeMcisc_operand6kM_i_; text: .text%__1cMloadConPNodeFreloc6kM_i_; -text: .text%__1cGThreadMis_VM_thread6kM_i_; text: .text%__1cSPSPromotionManagerFreset6M_v_; -text: .text%__1cNPrefetchQdDueueFclear6M_v_; text: .text%__1cSPSPromotionManagerKflush_labs6M_v_; text: .text%__1cFciEnvVnotice_inlined_method6MpnIciMethod__v_; text: .text%__1cOJNIHandleBlockNrelease_block6Fp0pnGThread__v_; @@ -2407,84 +1536,52 @@ text: .text%__1cJTypeTupleFxdual6kM_pknEType__; text: .text%__1cOcompP_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cHi2sNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJAssemblerKemit_arith6MiipnMRegisterImpl_2_v_; -text: .text%__1cLcastP2LNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRciVirtualCallDataOtranslate_from6MpnLProfileData__v_; text: .text%__1cXinitialize_static_field6FpnPfieldDescriptor_pnGThread__v_: classFileParser.o; text: .text%__1cKstoreCNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cNCompileBrokerXcompilation_is_in_queue6FnMmethodHandle_i_i_; -text: .text%__1cRsubI_rReg_memNodeJnum_opnds6kM_I_; -text: .text%__1cETypeCeq6kMpk0_i_; -text: .text%__1cHMatcherPstack_alignment6F_I_; text: .text%__1cNloadKlassNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cJloadSNodeJnum_opnds6kM_I_; text: .text%__1cJMultiNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cRshrL_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cTconvI2L_reg_memNodeErule6kM_I_; text: .text%__1cMURShiftLNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cRcmpFastUnlockNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSInterpreterRuntimebAfrequency_counter_overflow6FpnKJavaThread_pC_n0AJIcoResult__; text: .text%__1cHSubNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_; text: .text%__1cLRethrowNodeGOpcode6kM_i_; -text: .text%__1cPcmpFastLockNodeJnum_opnds6kM_I_; -text: .text%__1cIciMethodPcan_be_compiled6M_i_; text: .text%__1cFParseQcreate_entry_map6M_pnNSafePointNode__; text: .text%__1cFParseIdo_exits6M_v_; text: .text%__1cFParseLbuild_exits6M_v_; text: .text%__1cFParseLinit_blocks6M_v_; text: .text%__1cFParse2t6MpnIJVMState_pnIciMethod_f_v_; -text: .text%__1cIciMethodVhas_balanced_monitors6M_i_; text: .text%__1cFParseNdo_all_blocks6M_v_; text: .text%__1cOParseGeneratorIgenerate6MpnIJVMState__2_; -text: .text%__1cOParseGeneratorJcan_parse6FpnIciMethod_i_i_; text: .text%__1cFArenaEused6kM_L_; text: .text%__1cRandI_rReg_immNodeErule6kM_I_; text: .text%jni_GetSuperclass: jni.o; text: .text%__1cPno_rax_RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cFStateM_sub_Op_AddI6MpknENode__v_; -text: .text%__1cPClassFileParserUskip_over_field_name6MpciI_1_; text: .text%__1cFParsePdo_method_entry6M_v_; text: .text%__1cNCallGeneratorKfor_inline6FpnIciMethod_f_p0_; -text: .text%__1cKciTypeFlowFBlockPclone_loop_head6Mp0ip1pn0AGJsrSet__3_; text: .text%__1cLOpaque1NodeGOpcode6kM_i_; -text: .text%__1cHciKlassOis_subclass_of6Mp0_i_; -text: .text%__1cbBjava_lang_ref_SoftReferenceFclock6F_x_; text: .text%__1cTAbstractInterpreterbFsize_top_interpreter_activation6FpnNmethodOopDesc__i_; -text: .text%__1cRruntime_type_from6FpnJJavaValue__nJBasicType__: javaCalls.o; -text: .text%__1cCosbCstack_shadow_pages_available6FpnGThread_nMmethodHandle__i_; text: .text%__1cPJavaCallWrapper2t6MnMmethodHandle_nGHandle_pnJJavaValue_pnGThread__v_; text: .text%__1cCosUos_exception_wrapper6FpFpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v2468_v_; text: .text%__1cRJavaCallArgumentsKparameters6M_pl_; text: .text%__1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_; text: .text%__1cJJavaCallsEcall6FpnJJavaValue_nMmethodHandle_pnRJavaCallArguments_pnGThread__v_; -text: .text%__1cLCastP2LNodeLbottom_type6kM_pknEType__; text: .text%__1cPJavaCallWrapper2T6M_v_; text: .text%__1cVPreserveExceptionMark2T6M_v_; text: .text%__1cVPreserveExceptionMark2t6MrpnGThread__v_; -text: .text%__1cMrax_RegPOperJnum_edges6kM_I_; text: .text%__1cMrax_RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cITypeFuncFxdual6kM_pknEType__; -text: .text%__1cIimmLOperJconstantL6kM_x_; -text: .text%__1cIMulLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cLRShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cJloadPNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cNCompileBrokerTcompile_method_base6FnMmethodHandle_ii1ipkcpnGThread__pnHnmethod__; -text: .text%__1cNCompileBrokerOcompile_method6FnMmethodHandle_i1ipkcpnGThread__pnHnmethod__; -text: .text%__1cNmethodOopDescWload_signature_classes6FnMmethodHandle_pnGThread__i_; text: .text%__1cTconstantPoolOopDescbDresolve_string_constants_impl6FnSconstantPoolHandle_pnGThread__v_; -text: .text%__1cYDebugInformationRecorderNadd_dependent6MpnPciInstanceKlass_pnIciMethod__v_; text: .text%__1cHciField2t6MpnPciInstanceKlass_i_v_; text: .text%__1cTconstantPoolOopDescbCklass_ref_at_if_loaded_check6FnSconstantPoolHandle_ipnGThread__pnMklassOopDesc__; text: .text%__1cMLinkResolverXresolve_klass_no_update6FrnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cNaddL_rRegNodePoper_input_base6kM_I_; text: .text%__1cISubINodeGadd_id6kM_pknEType__; text: .text%__1cNsubI_rRegNodeHtwo_adr6kM_I_; text: .text%__1cGciType2t6MnLKlassHandle__v_; -text: .text%__1cMMutableSpaceKinitialize6MnJMemRegion_i_v_; text: .text%__1cHciKlass2t6MnLKlassHandle__v_; -text: .text%__1cKInlineTree2t6MpnHCompile_pk0pnIciMethod_pnIJVMState_if_v_; text: .text%__1cJEventMark2t6MpkcE_v_; -text: .text%__1cJloadCNodeJnum_opnds6kM_I_; text: .text%__1cNaddI_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cQComputeCallStackHdo_long6M_v_; text: .text%__1cMindirectOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; @@ -2492,12 +1589,9 @@ text: .text%__1cRaddI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRLowMemoryDetectorWdetect_after_gc_memory6FpnKMemoryPool__v_; text: .text%__1cQVMOperationQdDueueNqueue_oops_do6MipnKOopClosure__v_; text: .text%__1cMCreateExNodeJideal_reg6kM_I_; -text: .text%__1cMorI_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cMorI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cRmethodDataOopDescLbci_to_data6Mi_pnLProfileData__; text: .text%__1cNSCMemProjNodeGOpcode6kM_i_; text: .text%__1cNSignatureInfoHdo_long6M_v_; -text: .text%__1cLPCTableNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cMCreateExNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cRinterpretedVFrameDbci6kM_i_; text: .text%__1cKInlineTreeYcompute_callee_frequency6kMi_f_; @@ -2511,36 +1605,25 @@ text: .text%__1cNsubI_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cOMethodLivenessKBasicBlockIload_two6Mi_v_; text: .text%__1cFKlassTarray_klass_or_null6Mi_pnMklassOopDesc__; text: .text%__1cNmulL_rRegNodeMcisc_operand6kM_i_; -text: .text%__1cNobjArrayKlassPoop_is_objArray6kM_i_; -text: .text%__1cLklassVtableXvtable_accessibility_at6Mi_n0AKAccessType__; -text: .text%__1cNrFlagsRegOperFclone6kM_pnIMachOper__; text: .text%__1cIGraphKitJpush_pair6MpnENode__v_; text: .text%__1cNCatchProjNodeDcmp6kMrknENode__I_; -text: .text%__1cIGraphKitRmake_slow_call_ex6MpnENode_pnPciInstanceKlass__v_; text: .text%__1cTcompareAndSwapLNodePoper_input_base6kM_I_; text: .text%__1cMloadConINodeHsize_of6kM_I_; text: .text%__1cJAssemblerKemit_arith6MiipnMRegisterImpl_i_v_; -text: .text%__1cRMachSafePointNodeLis_MachCall6M_pnMMachCallNode__; text: .text%__1cNstoreImmINodeMideal_Opcode6kM_i_; -text: .text%__1cJScopeDescGis_top6kM_i_; text: .text%__1cHOrINodeLbottom_type6kM_pknEType__; text: .text%__1cPstoreImmI16NodeMideal_Opcode6kM_i_; text: .text%__1cMindIndexOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cFStateQ_sub_Op_CreateEx6MpknENode__v_; text: .text%__1cRshrL_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cLjmpConUNodeJis_Branch6kM_I_; text: .text%__1cLjmpConUNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLjmpConUNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cRaddI_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cPciInstanceKlass2t6MnLKlassHandle__v_; text: .text%__1cHCompileXin_preserve_stack_slots6M_I_; -text: .text%__1cMMachCallNodeHis_Call6M_pnICallNode__; text: .text%__1cNdecI_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKStoreCNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cLLShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cTtypeArrayKlassKlassIoop_size6kMpnHoopDesc__i_; -text: .text%__1cLklassVtableKis_miranda6FpnNmethodOopDesc_pnPobjArrayOopDesc_pnMklassOopDesc__i_; -text: .text%__1cTconvL2I_reg_regNodePoper_input_base6kM_I_; text: .text%__1cRalign_code_offset6Fi_I_; text: .text%__1cMURShiftINodeLbottom_type6kM_pknEType__; text: .text%__1cMorI_rRegNodeErule6kM_I_; @@ -2551,18 +1634,10 @@ text: .text%__1cTconvL2I_reg_regNodeErule6kM_I_; text: .text%__1cRmethodDataOopDescJbci_to_dp6Mi_pC_; text: .text%__1cIAddLNodeGadd_id6kM_pknEType__; text: .text%__1cRaddL_rReg_immNodeMideal_Opcode6kM_i_; -text: .text%__1cLRShiftINodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cFTypeFEhash6kM_i_; -text: .text%__1cIGraphKitMarray_length6MpnENode__2_; -text: .text%__1cPCallRuntimeNodeEhash6kM_I_; text: .text%__1cPsalI_rReg_1NodeErule6kM_I_; text: .text%__1cIJVMState2t6Mi_v_; -text: .text%__1cNstoreImmBNodeHtwo_adr6kM_I_; -text: .text%__1cLLShiftINodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cScompU_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cNGrowableArray4Cl_Icontains6kMrkl_i_; text: .text%__1cScompU_rReg_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cQjava_lang_StringGequals6FpnHoopDesc_pHi_i_; text: .text%__1cOcompP_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTCreateExceptionNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMURShiftINodeFValue6kMpnOPhaseTransform__pknEType__; @@ -2579,197 +1654,112 @@ text: .text%__1cSsafePoint_pollNodePoper_input_base6kM_I_; text: .text%__1cLRuntimeStubbDpreserve_callee_argument_oops6MnFframe_pknLRegisterMap_pnKOopClosure__v_; text: .text%__1cPshrI_rReg_1NodeErule6kM_I_; text: .text%__1cRmethodDataOopDescKmileage_of6FpnNmethodOopDesc__i_; -text: .text%__1cKManagementJtimestamp6F_x_; -text: .text%__1cbDReferenceProcessorInitializerIis_clean6kM_v_; text: .text%__1cIPSOldGenPupdate_counters6M_v_; -text: .text%__1cNSingletonBlobIis_alive6kM_i_; -text: .text%__1cKTypeRawPtrCeq6kMpknEType__i_; text: .text%__1cIregDOperEtype6kM_pknEType__; -text: .text%__1cQleaPIdxScaleNodeHtwo_adr6kM_I_; text: .text%__1cTStackWalkCompPolicyPshouldNotInline6FnMmethodHandle__pkc_; -text: .text%__1cMPrefetchNodeLbottom_type6kM_pknEType__; text: .text%__1cPcmpFastLockNodeErule6kM_I_; text: .text%__1cFArena2t6M_v_; text: .text%__1cSCallLeafDirectNodePoper_input_base6kM_I_; -text: .text%__1cMCallLeafNodeLis_CallLeaf6kM_pk0_; text: .text%__1cQleaPIdxScaleNodeMideal_Opcode6kM_i_; text: .text%__1cJcmpOpOperFequal6kM_i_; text: .text%__1cScompI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%jni_IsSameObject: jni.o; -text: .text%__1cNmulL_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cNmulL_rRegNodeJnum_opnds6kM_I_; text: .text%__1cIGraphKitYcombine_exception_states6MpnNSafePointNode_2_v_; text: .text%__1cJloadBNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMrcx_RegIOperJnum_edges6kM_I_; -text: .text%__1cFKlassNoop_is_method6kM_i_; text: .text%__1cIMulLNodeLbottom_type6kM_pknEType__; -text: .text%__1cHnmethodPis_locked_by_vm6kM_i_; text: .text%__1cONMethodSweeperPprocess_nmethod6FpnHnmethod__v_; text: .text%__1cRaddP_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cXjava_lang_ref_ReferenceWpending_list_lock_addr6F_ppnHoopDesc__; -text: .text%__1cJloadLNodeHtwo_adr6kM_I_; -text: .text%__1cHMulNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cMrep_stosNodePoper_input_base6kM_I_; text: .text%__1cRsalI_rReg_immNodeErule6kM_I_; text: .text%__1cJFieldTypeSskip_optional_size6FpnNsymbolOopDesc_pi_v_; text: .text%__1cMloadConPNodeHsize_of6kM_I_; -text: .text%__1cSCallLeafDirectNodeHtwo_adr6kM_I_; text: .text%__1cHnmethodVcleanup_inline_caches6M_v_; text: .text%__1cIGraphKitTcreate_and_xform_if6MpnENode_2ff_pnGIfNode__; -text: .text%__1cQsolaris_mprotect6FpcLi_i_: os_solaris.o; text: .text%__1cRaddI_rReg_memNodePoper_input_base6kM_I_; -text: .text%__1cHnmethodLis_unloaded6kM_i_; text: .text%__1cOGenerateOopMapHppstore6MpnNCellTypeState_i_v_; -text: .text%__1cIGraphKitXset_edges_for_java_call6MpnMCallJavaNode_i_v_; -text: .text%__1cTconvI2L_reg_memNodeMideal_Opcode6kM_i_; -text: .text%__1cHi2sNodeJnum_opnds6kM_I_; text: .text%__1cSconstMethodOopDescZchecked_exceptions_length6kM_i_; -text: .text%__1cHMatcherXadjust_incoming_stk_arg6Mi_i_; text: .text%__1cNIdealLoopTreeIset_nest6MI_i_; text: .text%__1cNIdealLoopTreeMcounted_loop6MpnOPhaseIdealLoop__v_; -text: .text%__1cRsubI_rReg_memNodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cIGraphKitZset_results_for_java_call6MpnMCallJavaNode__pnENode__; -text: .text%__1cTconvI2L_reg_memNodePoper_input_base6kM_I_; text: .text%__1cFStateM_sub_Op_CmpU6MpknENode__v_; text: .text%__1cLRethrowNodeKmatch_edge6kMI_I_; -text: .text%__1cKcopy_table6FppC1i_v_: interpreter.o; text: .text%__1cUBytecode_tableswitchOdest_offset_at6kMi_i_; text: .text%__1cNobjArrayKlassKcopy_array6MpnMarrayOopDesc_i2iipnGThread__v_; text: .text%__1cKTypeRawPtrFxmeet6kMpknEType__3_; -text: .text%__1cMVM_OperationVevaluate_at_safepoint6kM_i_; -text: .text%__1cMVM_OperationVevaluate_concurrently6kM_i_; -text: .text%__1cMVM_OperationSis_cheap_allocated6kM_i_; -text: .text%__1cXmembar_release_lockNodePoper_input_base6kM_I_; -text: .text%__1cRaddL_rReg_immNodePoper_input_base6kM_I_; -text: .text%__1cScompP_mem_rRegNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cJFieldTypeOget_array_info6FpnNsymbolOopDesc_pip2pnGThread__nJBasicType__; -text: .text%__1cJFieldTypeYis_valid_array_signature6FpnNsymbolOopDesc__i_; text: .text%__1cNincI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIciObject2t6M_v_; text: .text%__1cPstoreImmI16NodePoper_input_base6kM_I_; -text: .text%__1cNinstanceKlassbDcheck_valid_for_instantiation6MipnGThread__v_; text: .text%__1cPClassFileParserbCverify_legal_class_modifiers6MipnGThread__v_; -text: .text%__1cQLibraryIntrinsicKis_virtual6kM_i_; text: .text%__1cPciObjectFactoryUget_empty_methodData6M_pnMciMethodData__; text: .text%__1cMciMethodData2t6M_v_; -text: .text%__1cPsarI_rReg_1NodePoper_input_base6kM_I_; text: .text%__1cNstoreImmBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cFTypeDEhash6kM_i_; -text: .text%__1cMPrefetchNodeKmatch_edge6kMI_I_; -text: .text%__1cHCompileQcan_generate_C2I6MpnIciMethod_i_i_; text: .text%__1cPloadConUL32NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cPciObjArrayKlassSis_obj_array_klass6M_i_; text: .text%__1cLOpaque1NodeEhash6kM_I_; -text: .text%__1cXmembar_release_lockNodeHtwo_adr6kM_I_; text: .text%JVM_GetMethodIxModifiers; text: .text%__1cJloadBNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cNandL_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cNandL_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cFKlassMset_subklass6MpnMklassOopDesc__v_; text: .text%__1cTCallDynamicJavaNodeGOpcode6kM_i_; text: .text%__1cJloadINodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cKklassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cUCompressedReadStreamMraw_read_int6FrpC_i_; text: .text%__1cIHaltNodeEhash6kM_I_; text: .text%__1cNstoreImmINodePoper_input_base6kM_I_; text: .text%__1cLAccessFlagsPatomic_set_bits6Mi_v_; text: .text%__1cNinstanceKlassWcompute_modifier_flags6kMpnGThread__i_; -text: .text%__1cNinstanceKlassScopy_static_fields6MpnSPSPromotionManager__v_; -text: .text%__1cSinstanceKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cOcompL_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQVMOperationQdDueueLremove_next6M_pnMVM_Operation__; -text: .text%__1cQciTypeArrayKlassTis_type_array_klass6M_i_; text: .text%__1cRsubI_rReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cFStateP_sub_Op_LShiftL6MpknENode__v_; text: .text%__1cLjmpConUNodeGnegate6M_v_; text: .text%__1cKcmpOpUOperGnegate6M_v_; -text: .text%__1cMrax_RegLOperJnum_edges6kM_I_; text: .text%__1cLGCTaskQdDueueKinitialize6M_v_; -text: .text%__1cJStealTask2t6Mi_v_; text: .text%__1cJStealTaskFdo_it6MpnNGCTaskManager_I_v_; text: .text%__1cTOldToYoungRootsTaskEname6M_pc_; text: .text%__1cTOldToYoungRootsTaskFdo_it6MpnNGCTaskManager_I_v_; text: .text%__1cNGCTaskManagerMnote_release6MI_v_; text: .text%__1cJStealTaskEname6M_pc_; text: .text%__1cSCardTableExtensionbAscavenge_contents_parallel6MpnQObjectStartArray_pnMMutableSpace_pnIHeapWord_pnSPSPromotionManager_I_v_; -text: .text%__1cFciEnvbAget_constant_by_index_impl6MpnPciInstanceKlass_i_nKciConstant__; text: .text%__1cQciBytecodeStreamMget_constant6M_nKciConstant__; -text: .text%__1cFciEnvVget_constant_by_index6MpnPciInstanceKlass_i_nKciConstant__; -text: .text%__1cJcmpOpOperFclone6kM_pnIMachOper__; text: .text%__1cMrep_stosNodeMideal_Opcode6kM_i_; -text: .text%__1cEhash6Fpkc1_I_; -text: .text%__1cQput_after_lookup6FnMsymbolHandle_0ppnLNameSigHash__i_; text: .text%__1cKJavaThreadLgc_epilogue6M_v_; text: .text%__1cKJavaThreadLgc_prologue6M_v_; text: .text%__1cTsize_java_to_interp6F_I_; text: .text%__1cUreloc_java_to_interp6F_I_; text: .text%__1cQinit_input_masks6FIrnHRegMask_1_p0_: matcher.o; -text: .text%__1cKOSRAdapterHoops_do6MpnKOopClosure__v_; -text: .text%__1cRCompilationPolicybIreset_counter_for_invocation_event6MnMmethodHandle__v_; text: .text%__1cRitableMethodEntryKinitialize6MpnNmethodOopDesc__v_; text: .text%__1cTcompareAndSwapLNodeMideal_Opcode6kM_i_; -text: .text%__1cNinstanceKlassPlink_class_impl6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cIGraphKitbBset_arguments_for_java_call6MpnMCallJavaNode__v_; text: .text%__1cNCallGeneratorCtf6kM_pknITypeFunc__; text: .text%__1cMloadConLNodeLbottom_type6kM_pknEType__; -text: .text%__1cKStoreBNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cNaddL_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cTcompareAndSwapLNodeJnum_opnds6kM_I_; text: .text%__1cFStateO_sub_Op_StoreI6MpknENode__v_; text: .text%__1cQleaPIdxScaleNodePoper_input_base6kM_I_; -text: .text%__1cNGrowableArray4CpnNmethodOopDesc__2t6Mii_v_; text: .text%__1cLklassVtableMget_mirandas6FpnNGrowableArray4CpnNmethodOopDesc___pnMklassOopDesc_pnPobjArrayOopDesc_8_v_; text: .text%__1cXJNI_ArgumentPusherVaArgKget_object6M_v_; text: .text%__1cNloadConP0NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFKlassKsuperklass6kM_pnNinstanceKlass__; -text: .text%__1cWstatic_stub_RelocationJpack_data6M_i_; -text: .text%__1cNsubL_rRegNodePoper_input_base6kM_I_; -text: .text%__1cbAjni_check_async_exceptions6FpnKJavaThread__v_: jni.o; -text: .text%__1cKJavaThreadbHcheck_and_handle_async_exceptions6Mi_v_; text: .text%__1cRsalI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMindIndexOperNbase_position6kM_i_; text: .text%__1cMindIndexOperOindex_position6kM_i_; text: .text%__1cMindIndexOperNconstant_disp6kM_i_; -text: .text%__1cJLoadSNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cNGrowableArray4CpnOMethodLivenessKBasicBlock__2t6Mii_v_; text: .text%__1cKstoreINodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNCallGeneratorPfor_direct_call6FpnIciMethod__p0_; text: .text%__1cTDirectCallGeneratorIgenerate6MpnIJVMState__2_; text: .text%__1cMWarmCallInfoLalways_cold6F_p0_; text: .text%__1cFframeIpatch_pc6MpnGThread_pC_v_; text: .text%JVM_IsInterface; text: .text%__1cFKlassQset_next_sibling6MpnMklassOopDesc__v_; -text: .text%__1cJMultiNodeUdepends_only_on_test6kM_i_; text: .text%__1cRshrL_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQjmpCon_shortNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQjmpCon_shortNodeJlabel_set6MrnFLabel_I_v_; -text: .text%__1cKjmpConNodeUshort_branch_version6M_pnIMachNode__; -text: .text%__1cQjmpCon_shortNodeJis_Branch6kM_I_; -text: .text%__1cKJavaThreadNpd_last_frame6M_nFframe__; text: .text%__1cTStackWalkCompPolicyVfindTopInlinableFrame6MpnNGrowableArray4CpnGRFrame____2_; text: .text%__1cKJavaThreadQlast_java_vframe6MpnLRegisterMap__pnKjavaVFrame__; text: .text%__1cTStackWalkCompPolicyXmethod_invocation_event6MnMmethodHandle_pnGThread__v_; text: .text%__1cRInterpretedRFrame2t6MnFframe_pnKJavaThread_nMmethodHandle__v_; -text: .text%__1cNGrowableArray4CpnGRFrame__2t6Mii_v_; -text: .text%__1cKjavaVFrameNis_java_frame6kM_i_; -text: .text%__1cIVerifierRshould_verify_for6FpnHoopDesc__i_; -text: .text%__1cQciBytecodeStreamPget_klass_index6M_i_; text: .text%__1cRMachNullCheckNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cRMachNullCheckNode2t6MpnENode_2I_v_; text: .text%__1cRsarI_rReg_immNodeMideal_Opcode6kM_i_; -text: .text%__1cNMachIdealNodeJnum_opnds6kM_I_; -text: .text%__1cRMachSafePointNodePis_MachCallJava6M_pnQMachCallJavaNode__; text: .text%__1cKstorePNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cWImplicitExceptionTableGappend6MII_v_; text: .text%__1cHUNICODEHas_utf86FpHi_pc_; -text: .text%__1cMStartI2CNodeGOpcode6kM_i_; -text: .text%__1cKOSRAdapterMdo_unloading6MpnRBoolObjectClosure_pnKOopClosure_i_v_; -text: .text%__1cSvframeStreamCommonbHskip_method_invoke_and_aux_frames6M_v_; -text: .text%__1cNdecI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cIMinINodeGOpcode6kM_i_; -text: .text%__1cNinstanceKlassbCfind_local_field_from_offset6kMiipnPfieldDescriptor__i_; -text: .text%__1cNinstanceKlassWfind_field_from_offset6kMiipnPfieldDescriptor__i_; -text: .text%__1cPciInstanceKlassTget_field_by_offset6Mii_pnHciField__; text: .text%__1cFArena2T6M_v_; text: .text%__1cKmethodOperJnum_edges6kM_I_; text: .text%__1cSconstMethodOopDescYchecked_exceptions_start6kM_pnXCheckedExceptionElement__; @@ -2780,66 +1770,37 @@ text: .text%__1cRsarL_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cNstoreImmBNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKstorePNodeFreloc6kM_i_; text: .text%__1cYCallStaticJavaDirectNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cYCallStaticJavaDirectNodeJnum_opnds6kM_I_; text: .text%__1cQleaPIdxScaleNodeErule6kM_I_; text: .text%__1cTciConstantPoolCacheGinsert6Mipv_v_; -text: .text%__1cNinstanceKlassXmark_dependent_nmethods6MpnMklassOopDesc__i_; -text: .text%__1cMvframeStream2t6MpnKJavaThread_i_v_; text: .text%__1cIGraphKitTuse_exception_state6MpnNSafePointNode__pnENode__; text: .text%__1cIGraphKitSclear_saved_ex_oop6FpnNSafePointNode__pnENode__; -text: .text%__1cNloadConI0NodeFclone6kM_pnENode__; -text: .text%__1cJimmI0OperFclone6kM_pnIMachOper__; -text: .text%__1cLCastP2LNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cMLinkResolverbBresolve_static_call_or_null6FnLKlassHandle_nMsymbolHandle_21_nMmethodHandle__; text: .text%__1cKcmpOpUOperNgreater_equal6kM_i_; text: .text%__1cPClassFileParserYparse_checked_exceptions6MpHInSconstantPoolHandle_pnGThread__1_; -text: .text%__1cXcopy_u2_with_conversion6FpH0i_v_: classFileParser.o; -text: .text%__1cENodeGis_Sub6M_pnHSubNode__; text: .text%__1cJAssemblerFtestq6MpnMRegisterImpl_2_v_; text: .text%__1cJCMoveNodeLis_cmove_id6FpnOPhaseTransform_pnENode_44pnIBoolNode__4_; text: .text%__1cZresource_reallocate_bytes6FpcLL_0_; text: .text%__1cKstoreINodeFreloc6kM_i_; -text: .text%__1cLsymbolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cQciBytecodeStreamJget_klass6Mri_pnHciKlass__; -text: .text%__1cKMemBarNode2t6M_v_; text: .text%__1cIDivINodeGOpcode6kM_i_; -text: .text%__1cFframeRis_compiled_frame6kMpi_i_; -text: .text%__1cPCallRuntimeNodeOis_CallRuntime6kM_pk0_; text: .text%__1cPshrI_rReg_1NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMorI_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFParseQarray_addressing6MnJBasicType_ippknEType__pnENode__; text: .text%__1cPsalI_rReg_1NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cHciField2t6MpnPfieldDescriptor__v_; -text: .text%__1cIAddLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cIModINodeGOpcode6kM_i_; text: .text%__1cNmulL_rRegNodeErule6kM_I_; -text: .text%__1cSsafePoint_pollNodeHtwo_adr6kM_I_; -text: .text%__1cDCHAManalyze_call6FnLKlassHandle_11nMsymbolHandle_2_pnJCHAResult__; -text: .text%__1cJCHAResult2t6MnLKlassHandle_nMsymbolHandle_2pnNGrowableArray4n0B___pnNGrowableArray4nMmethodHandle___n0E_i_v_; text: .text%__1cMLinkResolverbCresolve_virtual_call_or_null6FnLKlassHandle_1nMsymbolHandle_21_nMmethodHandle__; -text: .text%__1cJCHAResultOis_monomorphic6kM_i_; -text: .text%__1cIciMethodXfind_monomorphic_target6MpnHciKlass_22_p0_; -text: .text%__1cQconstMethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cKMemBarNodeJis_MemBar6kM_pk0_; -text: .text%__1cIGraphKitOinsert_mem_bar6MpnKMemBarNode__v_; -text: .text%__1cHi2sNodeHtwo_adr6kM_I_; text: .text%__1cJCodeCacheMfind_nmethod6Fpv_pnHnmethod__; text: .text%__1cLConvL2INodeLbottom_type6kM_pknEType__; text: .text%__1cMLinkResolverbCresolve_special_call_or_null6FnLKlassHandle_nMsymbolHandle_21_nMmethodHandle__; -text: .text%__1cNIdealLoopTreeObeautify_loops6MpnOPhaseIdealLoop__i_; text: .text%__1cScompP_mem_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKstoreBNodePoper_input_base6kM_I_; text: .text%__1cRandI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSCallLeafDirectNodeRis_safepoint_node6kM_i_; text: .text%__1cJloadLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSCallLeafDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKMemBarNodeJideal_reg6kM_I_; -text: .text%__1cJloadSNodeHtwo_adr6kM_I_; text: .text%__1cVConstantOopWriteValueIwrite_on6MpnUDebugInfoWriteStream__v_; text: .text%__1cUDebugInfoWriteStreamMwrite_handle6MpnI_jobject__v_; -text: .text%__1cLmethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNaddI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cJlog2_long6Fx_i_; text: .text%__1cTconvL2I_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIGraphKitPpush_pair_local6Mi_v_; text: .text%__1cOjmpLoopEndNodePoper_input_base6kM_I_; @@ -2852,131 +1813,74 @@ text: .text%__1cHCmpNodeGadd_id6kM_pknEType__; text: .text%JVM_InternString; text: .text%__1cLStringTableGintern6FpnHoopDesc_pnGThread__2_; text: .text%__1cFKlassQup_cast_abstract6M_p0_; -text: .text%__1cNGrowableArray4CpnENode__2t6Mii_v_; -text: .text%__1cPCheckCastPPNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cSInterpreterRuntimeMmonitorenter6FpnKJavaThread_pnPBasicObjectLock__v_; text: .text%__1cSCountedLoopEndNodeKstride_con6kM_i_; -text: .text%__1cTconvI2L_reg_memNodeJnum_opnds6kM_I_; text: .text%__1cPCheckCastPPNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cPClassFileStreamHskip_u26MipnGThread__v_; text: .text%__1cLOpaque1NodeLbottom_type6kM_pknEType__; text: .text%__1cOPhaseIdealLoopRsplit_thru_region6MpnENode_2_2_; -text: .text%__1cFTypeFCeq6kMpknEType__i_; -text: .text%__1cNmethodOopDescOis_initializer6kM_i_; text: .text%__1cFciEnvRfind_system_klass6MpnIciSymbol__pnHciKlass__; text: .text%__1cNandL_rRegNodeErule6kM_I_; text: .text%__1cQjmpDir_shortNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cQjmpDir_shortNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKjmpDirNodeUshort_branch_version6M_pnIMachNode__; -text: .text%__1cQjmpDir_shortNodeJis_Branch6kM_I_; text: .text%__1cLBlock_ArrayEgrow6MI_v_; -text: .text%__1cOtypeArrayKlassQarray_klass_impl6MiipnGThread__pnMklassOopDesc__; -text: .text%__1cSCompareAndSwapNodeLbottom_type6kM_pknEType__; -text: .text%__1cOtypeArrayKlassQarray_klass_impl6FnUtypeArrayKlassHandle_iipnGThread__pnMklassOopDesc__; text: .text%__1cMPhaseChaitinVfind_base_for_derived6MppnENode_2rI_2_; text: .text%__1cSindIndexOffsetOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cSindIndexOffsetOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cNGrowableArray4CI_Egrow6Mi_v_; -text: .text%__1cHMatcherMreturn_value6Fii_nLOptoRegPair__; text: .text%__1cFStateP_sub_Op_ConvI2L6MpknENode__v_; -text: .text%__1cOjmpLoopEndNodeGpinned6kM_i_; -text: .text%__1cNxorI_rRegNodePoper_input_base6kM_I_; -text: .text%__1cJCHAResultSmonomorphic_target6kM_nMmethodHandle__; text: .text%__1cNsubI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPCountedLoopNodeNstride_is_con6kM_i_; text: .text%__1cRcmpFastUnlockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cbBjava_lang_ref_SoftReferenceJtimestamp6FpnHoopDesc__x_; -text: .text%__1cQLRUMaxHeapPolicyWshould_clear_reference6MpnHoopDesc__i_; -text: .text%__1cLcastP2LNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPcheckCastPPNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cPciInstanceKlassLfind_method6MpnIciSymbol_2_pnIciMethod__; -text: .text%__1cZCallInterpreterDirectNodeMideal_Opcode6kM_i_; text: .text%__1cILoopNodeHsize_of6kM_I_; text: .text%__1cSindIndexOffsetOperFscale6kM_i_; -text: .text%__1cMjniIdSupportNto_method_oop6FpnK_jmethodID__pnNmethodOopDesc__; text: .text%__1cLBoxLockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRSignatureIterator2t6MpnGThread_pnNsymbolOopDesc__v_; -text: .text%__1cRaddI_rReg_memNodeJnum_opnds6kM_I_; -text: .text%__1cFKlassQoop_is_typeArray6kM_i_; -text: .text%__1cGOopMapPset_derived_oop6Miiii_v_; text: .text%__1cKstoreBNodeMideal_Opcode6kM_i_; text: .text%__1cHi2bNodeErule6kM_I_; text: .text%__1cFStateN_sub_Op_LoadI6MpknENode__v_; -text: .text%__1cMloadConDNodePoper_input_base6kM_I_; text: .text%__1cPCountedLoopNodeJinit_trip6kM_pnENode__; text: .text%__1cICmpLNodeDsub6kMpknEType_3_3_; text: .text%__1cRjmpConU_shortNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cRjmpConU_shortNodeMideal_Opcode6kM_i_; -text: .text%__1cMloadConDNodeHtwo_adr6kM_I_; -text: .text%__1cHnmethodKpc_desc_at6MpC_pnGPcDesc__; -text: .text%__1cJrRegPOperFclone6kM_pnIMachOper__; -text: .text%__1cFParseNpush_constant6MnKciConstant__i_; -text: .text%__1cMrep_stosNodeJnum_opnds6kM_I_; text: .text%__1cOClearArrayNodeKmatch_edge6kMI_I_; text: .text%__1cUvisit_all_interfaces6FpnPobjArrayOopDesc_pnXInterfaceVisiterClosure__v_; text: .text%__1cXmembar_release_lockNodeLbottom_type6kM_pknEType__; text: .text%__1cPThreadLocalNodeJideal_reg6kM_I_; -text: .text%__1cPstoreImmI16NodeJnum_opnds6kM_I_; text: .text%__1cTleaPIdxScaleOffNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cIGraphKitbMset_predefined_output_for_runtime_call6MpnENode_pnMMergeMemNode__v_; -text: .text%__1cFKlassXsearch_secondary_supers6kMpnMklassOopDesc__i_; text: .text%__1cPsarI_rReg_1NodeErule6kM_I_; text: .text%__1cOPhaseIdealLoopPis_counted_loop6MpnENode_pnNIdealLoopTree__2_; -text: .text%__1cIGraphKitOhas_ex_handler6M_i_; text: .text%__1cMloadConDNodeErule6kM_I_; text: .text%__1cHCompileQsync_stack_slots6kM_i_; text: .text%__1cNMemoryServiceXtrack_memory_pool_usage6FpnKMemoryPool__v_; -text: .text%__1cMURShiftLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cKoopFactoryTnew_system_objArray6FipnGThread__pnPobjArrayOopDesc__; text: .text%__1cNdecI_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cPClassFileParserbHparse_constant_pool_integer_entry6MnSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cTDebugInfoReadStream2t6MpknHnmethod_i_v_; -text: .text%__1cRsalI_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cJScopeDescJstream_at6kMi_pnTDebugInfoReadStream__; text: .text%__1cVjava_lang_ClassLoaderGparent6FpnHoopDesc__2_; text: .text%__1cIPhaseIFGEinit6MI_v_; -text: .text%__1cMPhaseChaitinQgather_lrg_masks6Mi_v_; text: .text%__1cJPhaseLiveHcompute6MI_v_; text: .text%JVM_GetCPClassNameUTF; text: .text%__1cMLinkResolverUresolve_invokestatic6FrnICallInfo_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cNstoreImmINodeJnum_opnds6kM_I_; -text: .text%__1cITypeNodeHis_Type6M_p0_; text: .text%__1cHRetNodePoper_input_base6kM_I_; -text: .text%__1cLCastP2LNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%jni_GetStringLength: jni.o; text: .text%__1cPloadConUL32NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOFastUnlockNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cPciObjArrayKlassNelement_klass6M_pnHciKlass__; -text: .text%__1cNprefetchwNodeHtwo_adr6kM_I_; -text: .text%__1cNnmethodLocker2T6M_v_; text: .text%__1cKoopFactoryYnew_permanent_shortArray6FipnGThread__pnQtypeArrayOopDesc__; -text: .text%__1cKstoreCNodeHtwo_adr6kM_I_; -text: .text%__1cQleaPIdxScaleNodeJnum_opnds6kM_I_; text: .text%__1cNaddL_rRegNodeMcisc_operand6kM_i_; text: .text%__1cOcompL_rRegNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cTDebugInfoReadStreamLread_handle6M_nGHandle__; -text: .text%__1cJScopeDesc2t6MpknHnmethod_i_v_; text: .text%__1cFStateR_sub_Op_LoadRange6MpknENode__v_; text: .text%__1cOcompiledVFrame2t6MpknFframe_pknLRegisterMap_pnKJavaThread_pnJScopeDesc__v_; text: .text%__1cOcompU_rRegNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cPcmovI_reg_gNodePoper_input_base6kM_I_; -text: .text%__1cLProfileDataSis_VirtualCallData6M_i_; -text: .text%__1cSmembar_acquireNodePoper_input_base6kM_I_; text: .text%__1cNsubL_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cJMarkSweepMfollow_stack6F_v_; -text: .text%__1cNnmethodLocker2t6MpnHnmethod__v_; text: .text%__1cNloadRangeNodeFreloc6kM_i_; -text: .text%__1cNGrowableArray4CpnKciTypeFlowJJsrRecord__2t6Miirk2i_v_; text: .text%__1cTcompareAndSwapLNodeErule6kM_I_; text: .text%__1cZCallDynamicJavaDirectNodeMideal_Opcode6kM_i_; -text: .text%__1cMURShiftINodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cOcompiledVFrameGis_top6kM_i_; text: .text%__1cSInterpreterRuntimeLmonitorexit6FpnKJavaThread_pnPBasicObjectLock__v_; text: .text%__1cNxorI_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cRshrI_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cKciTypeFlow2t6MpnFciEnv_pnIciMethod_i_v_; -text: .text%__1cKciTypeFlowXmark_known_range_starts6M_v_; -text: .text%__1cKciTypeFlowLfind_ranges6M_v_; text: .text%__1cSFixupMirrorClosureJdo_object6MpnHoopDesc__v_; text: .text%__1cKciTypeFlowKmap_blocks6M_v_; text: .text%__1cKciTypeFlowHdo_flow6M_v_; @@ -2984,12 +1888,9 @@ text: .text%__1cKciTypeFlowPget_start_state6M_pkn0ALStateVector__; text: .text%__1cKciTypeFlowKflow_types6M_v_; text: .text%__1cIAndINodeGadd_id6kM_pknEType__; text: .text%__1cMURShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cJloadBNodeHtwo_adr6kM_I_; text: .text%__1cKPSYoungGenRcapacity_in_bytes6kM_L_; -text: .text%__1cHMonitorGnotify6M_i_; text: .text%__1cYciExceptionHandlerStreamPcount_remaining6M_i_; text: .text%__1cFParseXcatch_inline_exceptions6MpnNSafePointNode__v_; -text: .text%__1cHMatcherNfind_receiver6Fi_i_; text: .text%__1cMciMethodDataJload_data6M_v_; text: .text%__1cIciMethodJload_code6M_v_; text: .text%__1cJCmpL3NodeGOpcode6kM_i_; @@ -3000,14 +1901,9 @@ text: .text%__1cOGenerateOopMapGdo_ldc6Mii_v_; text: .text%__1cMTypeKlassPtrFxdual6kM_pknEType__; text: .text%__1cIMaxINodeGOpcode6kM_i_; text: .text%__1cOPhaseTransform2t6MnFPhaseLPhaseNumber__v_; -text: .text%__1cPsalI_rReg_1NodeJnum_opnds6kM_I_; text: .text%__1cQSystemDictionarybAcompute_loader_lock_object6FnGHandle_pnGThread__1_; -text: .text%__1cHciKlassMis_interface6M_i_; -text: .text%__1cPmethodDataKlassRoop_is_methodData6kM_i_; text: .text%__1cIMulLNodeGadd_id6kM_pknEType__; -text: .text%__1cJloadCNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQSystemDictionaryRpreloaded_oops_do6FpnKOopClosure__v_; -text: .text%__1cIVMThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cLJvmtiExportHoops_do6FpnKOopClosure__v_; text: .text%__1cMFlatProfilerHoops_do6FpnKOopClosure__v_; text: .text%__1cQVMOperationQdDueueHoops_do6MpnKOopClosure__v_; @@ -3020,83 +1916,55 @@ text: .text%__1cQPlaceholderTableHoops_do6MpnKOopClosure__v_; text: .text%__1cNThreadServiceHoops_do6FpnKOopClosure__v_; text: .text%__1cKJNIHandlesHoops_do6FpnKOopClosure__v_; text: .text%__1cXJvmtiCurrentBreakpointsHoops_do6FpnKOopClosure__v_; -text: .text%__1cIUniverseHoops_do6FpnKOopClosure_i_v_; text: .text%__1cbGJvmtiVMObjectAllocEventCollectorXoops_do_for_all_threads6FpnKOopClosure__v_; text: .text%__1cRindIndexScaleOperJnum_edges6kM_I_; text: .text%__1cRindIndexScaleOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cKstoreBNodeJnum_opnds6kM_I_; text: .text%__1cNSignatureInfoJdo_double6M_v_; text: .text%__1cJAssemblerEmovl6MnHAddress_pnMRegisterImpl__v_; text: .text%__1cRsalI_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cMrdx_RegIOperEtype6kM_pknEType__; text: .text%__1cMciMethodData2t6MnQmethodDataHandle__v_; -text: .text%__1cSmembar_acquireNodeHtwo_adr6kM_I_; text: .text%__1cRshrI_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cKJNIHandlesLmake_global6FnGHandle_i_pnI_jobject__; text: .text%jni_ExceptionOccurred: jni.o; text: .text%jni_SetObjectArrayElement: jni.o; -text: .text%__1cSCompareAndSwapNodeKmatch_edge6kMI_I_; text: .text%__1cISubINodeJideal_reg6kM_I_; -text: .text%__1cRMachSafePointNodeGpinned6kM_i_; -text: .text%__1cIimmIOperFclone6kM_pnIMachOper__; -text: .text%__1cMloadConINodeFclone6kM_pnENode__; text: .text%__1cICodeHeapIallocate6ML_pv_; text: .text%__1cICodeHeapPsearch_freelist6ML_pnJFreeBlock__; -text: .text%__1cbACallCompiledJavaDirectNodeMideal_Opcode6kM_i_; text: .text%__1cPcmpFastLockNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cLCastP2LNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cNmulL_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cJLoadBNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cVmerge_point_too_heavy6FpnHCompile_pnENode__i_: loopopts.o; text: .text%jni_GetByteArrayRegion: jni.o; -text: .text%__1cFParseKdo_put_xxx6MpknHTypePtr_pnENode_pnHciField_i_v_; -text: .text%__1cHnmethodOis_java_method6kM_i_; text: .text%__1cQjava_lang_StringLutf8_length6FpnHoopDesc__i_; text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_; text: .text%jni_GetStringUTFRegion: jni.o; text: .text%jni_GetStringUTFLength: jni.o; text: .text%__1cOMacroAssemblerWbang_stack_with_offset6Mi_v_; -text: .text%__1cRsarL_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cScompU_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cFciEnvZcheck_klass_accessibility6MpnHciKlass_pnMklassOopDesc__i_; -text: .text%__1cIciObjectMis_obj_array6M_i_; -text: .text%__1cOLibraryCallKitOgenerate_guard6MpnENode_pnKRegionNode_f_v_; text: .text%__1cMoutputStream2t6Mi_v_; text: .text%__1cMstringStreamJas_string6M_pc_; text: .text%__1cMstringStream2t6ML_v_; text: .text%__1cJloadINodeFreloc6kM_i_; text: .text%__1cMstringStream2T6M_v_; text: .text%__1cOMethodLivenessKBasicBlockJstore_two6Mi_v_; -text: .text%__1cJloadINodeIpeephole6MpnFBlock_ipnNPhaseRegAlloc_ri_pnIMachNode__; -text: .text%__1cTconvL2I_reg_regNodeJnum_opnds6kM_I_; text: .text%__1cPClassFileParserXverify_legal_class_name6MnMsymbolHandle_pnGThread__v_; -text: .text%__1cRandI_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cOAbstractICacheQinvalidate_range6FpCi_v_; text: .text%__1cOAbstractICachePcall_flush_stub6FpCi_v_; text: .text%__1cICodeBlobMset_oop_maps6MpnJOopMapSet__v_; text: .text%__1cRClassPathZipEntryLopen_stream6Mpkc_pnPClassFileStream__; text: .text%__1cJCodeCacheIallocate6Fi_pnICodeBlob__; -text: .text%__1cIGraphKitOmake_slow_call6MpknITypeFunc_pCpkcpnENode_88_8_; text: .text%__1cICodeHeapPfollowing_block6MpnJFreeBlock__2_; text: .text%__1cOClearArrayNodeLbottom_type6kM_pknEType__; -text: .text%__1cPshrI_rReg_1NodeJnum_opnds6kM_I_; text: .text%__1cEDictIdoubhash6M_v_; -text: .text%__1cTleaPIdxScaleOffNodeLbottom_type6kM_pknEType__; text: .text%__1cIProjNodeJideal_reg6kM_I_; text: .text%__1cHi2sNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLimmI_16OperJnum_edges6kM_I_; -text: .text%__1cUmembar_cpu_orderNodePoper_input_base6kM_I_; text: .text%__1cPfieldDescriptorRint_initial_value6kM_i_; -text: .text%__1cTCallInterpreterNodeGOpcode6kM_i_; text: .text%__1cMloadConLNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRaddL_rReg_immNodeErule6kM_I_; text: .text%__1cJLoadLNodeJideal_reg6kM_I_; -text: .text%__1cTleaPIdxScaleOffNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cHCompileTset_cached_top_node6MpnENode__v_; text: .text%__1cENodeMsetup_is_top6M_v_; text: .text%__1cIGotoNodeGOpcode6kM_i_; text: .text%__1cOMachPrologNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cHCompilePneed_stack_bang6kMi_i_; text: .text%__1cKBranchDataPpost_initialize6MpnOBytecodeStream_pnRmethodDataOopDesc__v_; text: .text%__1cNFingerprinterIdo_array6Mii_v_; text: .text%jni_GetArrayLength: jni.o; @@ -3104,46 +1972,25 @@ text: .text%__1cJloadSNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKReturnNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cSInterpreterRuntimeE_new6FpnKJavaThread_pnTconstantPoolOopDesc_i_v_; text: .text%__1cMorI_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cKTypeRawPtrFempty6kM_i_; -text: .text%__1cHRetNodeGpinned6kM_i_; -text: .text%__1cHRetNodeHtwo_adr6kM_I_; text: .text%__1cPsalI_rReg_1NodeHtwo_adr6kM_I_; text: .text%__1cNinstanceKlassVadd_dependent_nmethod6MpnHnmethod__v_; text: .text%__1cHRetNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPGlobalTLABStatsKinitialize6M_v_; -text: .text%__1cbBjava_lang_ref_SoftReferenceJset_clock6Fx_v_; -text: .text%__1cUParallelScavengeHeapTensure_parseability6M_v_; text: .text%__1cTDerivedPointerTableFclear6F_v_; -text: .text%__1cNMemoryServiceGgc_end6Fi_v_; -text: .text%__1cSReferenceProcessorQprocess_phaseJNI6M_v_; text: .text%__1cRLowMemoryDetectorRdetect_low_memory6F_v_; -text: .text%__1cSReferenceProcessorbDenqueue_discovered_references6M_i_; -text: .text%__1cSReferenceProcessorbDprocess_discovered_references6M_v_; text: .text%__1cNCollectedHeapbFaccumulate_statistics_all_tlabs6M_v_; text: .text%__1cTDerivedPointerTablePupdate_pointers6F_v_; -text: .text%__1cNCollectedHeapTensure_parseability6M_v_; -text: .text%__1cNCollectedHeapOfill_all_tlabs6M_v_; text: .text%__1cKDictionaryHoops_do6MpnKOopClosure__v_; -text: .text%__1cSReferenceProcessorbBenqueue_discovered_reflists6MppnHoopDesc__v_; text: .text%__1cWThreadLocalAllocBufferbFaccumulate_statistics_before_gc6F_v_; -text: .text%__1cSReferenceProcessorOprocess_phase16MppnHoopDesc_pnPReferencePolicy_pnRBoolObjectClosure_pnKOopClosure_pnLVoidClosure__v_; text: .text%__1cQLRUMaxHeapPolicy2t6M_v_; -text: .text%__1cPGCMemoryManagerIgc_begin6M_v_; -text: .text%__1cPGCMemoryManagerGgc_end6M_v_; text: .text%__1cVLoaderConstraintTableHoops_do6MpnKOopClosure__v_; text: .text%__1cUParallelScavengeHeapbFaccumulate_statistics_all_tlabs6M_v_; text: .text%__1cKPSYoungGenPupdate_counters6M_v_; -text: .text%__1cXjava_lang_ref_ReferenceRpending_list_addr6F_ppnHoopDesc__; text: .text%__1cNMemoryServiceStrack_memory_usage6F_v_; text: .text%__1cQSystemDictionaryHoops_do6FpnKOopClosure__v_; -text: .text%__1cNMemoryServiceIgc_begin6Fi_v_; -text: .text%__1cUParallelScavengeHeapOfill_all_tlabs6M_v_; text: .text%__1cXTraceMemoryManagerStats2T6M_v_; -text: .text%__1cXTraceMemoryManagerStats2t6Mi_v_; text: .text%__1cUParallelScavengeHeapPupdate_counters6M_v_; -text: .text%__1cQPlaceholderTableJnew_entry6MipnNsymbolOopDesc_pnHoopDesc__pnQPlaceholderEntry__; text: .text%__1cQPlaceholderTableMremove_entry6MiInMsymbolHandle_nGHandle__v_; -text: .text%__1cQPlaceholderTableJadd_entry6MiInMsymbolHandle_nGHandle__v_; text: .text%__1cNCollectedHeapQresize_all_tlabs6M_v_; text: .text%__1cUParallelScavengeHeapQresize_all_tlabs6M_v_; text: .text%__1cWThreadLocalAllocBufferQresize_all_tlabs6F_v_; @@ -3152,80 +1999,53 @@ text: .text%__1cYGCAdaptivePolicyCountersbBupdate_counters_from_policy6M_v_; text: .text%__1cbAPSGCAdaptivePolicyCountersbBupdate_counters_from_policy6M_v_; text: .text%__1cNmethodOopDescbEfast_exception_handler_bci_for6MnLKlassHandle_ipnGThread__i_; text: .text%__1cSInterpreterRuntimebFexception_handler_for_exception6FpnKJavaThread_pnHoopDesc__pC_; -text: .text%__1cNaddL_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cNaddL_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cKstoreLNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cUPSAdaptiveSizePolicyZdecay_supplemental_growth6Mi_v_; text: .text%__1cUPSAdaptiveSizePolicybPeden_increment_with_supplement_aligned_up6ML_L_; -text: .text%__1cUPSAdaptiveSizePolicyQdecaying_gc_cost6kM_d_; -text: .text%__1cUPSAdaptiveSizePolicybDcompute_generation_free_space6MLLLLLLLi_v_; text: .text%__1cIPSOldGenMmax_gen_size6M_L_; text: .text%__1cUPSAdaptiveSizePolicybHclear_generation_free_space_flags6M_v_; text: .text%__1cUPSAdaptiveSizePolicyOeden_increment6MLI_L_; -text: .text%__1cUPSAdaptiveSizePolicyVadjust_for_throughput6MipL1_v_; text: .text%__1cQSystemDictionaryTload_instance_class6FnMsymbolHandle_nGHandle_pnGThread__nTinstanceKlassHandle__; -text: .text%__1cUmembar_cpu_orderNodeHtwo_adr6kM_I_; text: .text%__1cPjava_lang_ClassNcreate_mirror6FnLKlassHandle_pnGThread__pnHoopDesc__; -text: .text%__1cLklassVtableRinitialize_vtable6MpnGThread__v_; text: .text%__1cJAssemblerDjmp6MrnFLabel_nJrelocInfoJrelocType__v_; text: .text%__1cPshrI_rReg_1NodeHtwo_adr6kM_I_; text: .text%__1cRmulI_rReg_immNodeMideal_Opcode6kM_i_; -text: .text%__1cNandI_rRegNodePoper_input_base6kM_I_; text: .text%__1cOMachEpilogNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cLklassVtableVinitialize_from_super6MnLKlassHandle__i_; text: .text%__1cIVMThreadHexecute6FpnMVM_Operation__v_; text: .text%__1cLklassVtableOcopy_vtable_to6MpnLvtableEntry__v_; text: .text%__1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_; -text: .text%__1cQinstanceRefKlassbKrelease_and_notify_pending_list_lock6FipnJBasicLock__v_; text: .text%__1cPVM_GC_OperationbKrelease_and_notify_pending_list_lock6M_v_; -text: .text%__1cPVM_GC_OperationOskip_operation6kM_i_; -text: .text%__1cPVM_GC_OperationNdoit_prologue6M_i_; text: .text%__1cPVM_GC_OperationZacquire_pending_list_lock6M_v_; text: .text%__1cMTypeKlassPtrFxmeet6kMpknEType__3_; text: .text%__1cKReturnNodeEhash6kM_I_; -text: .text%__1cHnmethodVis_dependent_on_entry6MpnMklassOopDesc_2pnNmethodOopDesc__i_; -text: .text%__1cbDVM_ParallelGCFailedAllocation2t6MLiiI_v_; text: .text%__1cLlog2_intptr6Fl_i_; text: .text%__1cKKlass_vtbl2n6FLrnLKlassHandle_ipnGThread__pv_; text: .text%__1cFKlassVbase_create_klass_oop6FrnLKlassHandle_irknKKlass_vtbl_pnGThread__pnMklassOopDesc__; text: .text%__1cFKlassRinitialize_supers6MpnMklassOopDesc_pnGThread__v_; -text: .text%__1cMloadConPNodeFclone6kM_pnENode__; -text: .text%__1cIimmPOperFclone6kM_pnIMachOper__; text: .text%__1cFKlassRbase_create_klass6FrnLKlassHandle_irknKKlass_vtbl_pnGThread__1_; text: .text%__1cSCallLeafDirectNodeKmethod_set6Ml_v_; text: .text%__1cJcmpOpOperJnot_equal6kM_i_; text: .text%__1cJloadLNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cRAbstractAssemblerbDgenerate_stack_overflow_check6Mi_v_; -text: .text%__1cCosOunguard_memory6FpcL_i_; text: .text%__1cNandL_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLLShiftINodeJideal_reg6kM_I_; -text: .text%__1cRsarI_rReg_immNodePoper_input_base6kM_I_; -text: .text%__1cGThreadRis_Watcher_thread6kM_i_; text: .text%__1cJLoadSNodeJideal_reg6kM_I_; -text: .text%__1cTconvL2I_reg_regNodeHtwo_adr6kM_I_; text: .text%__1cIPhaseIFGISquareUp6M_v_; text: .text%__1cPciObjectFactoryMvm_symbol_at6Fi_pnIciSymbol__; text: .text%__1cCosJyield_all6Fi_v_; -text: .text%__1cKciTypeFlowLStateVectorOmeet_exception6MpnPciInstanceKlass_pk1_i_; text: .text%__1cCosbCmake_polling_page_unreadable6F_v_; -text: .text%__1cONMethodSweeperFsweep6F_v_; text: .text%__1cSObjectSynchronizerVdeflate_idle_monitors6F_v_; text: .text%__1cMCounterDecayFdecay6F_v_; -text: .text%__1cCosOprotect_memory6FpcL_i_; text: .text%__1cORuntimeServiceWrecord_safepoint_begin6F_v_; text: .text%__1cORuntimeServicebDrecord_safepoint_synchronized6F_v_; text: .text%__1cCosXserialize_thread_states6F_v_; text: .text%__1cUSafepointSynchronizeFbegin6F_v_; -text: .text%__1cUSafepointSynchronizeRis_cleanup_needed6F_i_; text: .text%__1cUSafepointSynchronizeQdo_cleanup_tasks6F_v_; -text: .text%__1cRInlineCacheBufferIis_empty6F_i_; text: .text%__1cRInlineCacheBufferUupdate_inline_caches6F_v_; -text: .text%__1cTAbstractInterpreterRnotice_safepoints6F_v_; text: .text%__1cNloadConP0NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cCosbAmake_polling_page_readable6F_v_; text: .text%__1cORuntimeServiceUrecord_safepoint_end6F_v_; text: .text%__1cUSafepointSynchronizeDend6F_v_; -text: .text%__1cTAbstractInterpreterRignore_safepoints6F_v_; text: .text%__1cQVMOperationQdDueueGinsert6MpnMVM_Operation_2_v_; text: .text%__1cQVMOperationQdDueueGunlink6MpnMVM_Operation__v_; text: .text%__1cMVM_OperationIevaluate6M_v_; @@ -3235,38 +2055,20 @@ text: .text%__1cQVMOperationQdDueueOqueue_add_back6MipnMVM_Operation__v_; text: .text%__1cGThreadMget_priority6Fpk0_nOThreadPriority__; text: .text%__1cCosTget_native_priority6FpknGThread_pi_nIOSReturn__; text: .text%__1cIVMThreadSevaluate_operation6MpnMVM_Operation__v_; -text: .text%__1cQVMOperationQdDueueDadd6MpnMVM_Operation__i_; text: .text%__1cSmembar_releaseNodeLbottom_type6kM_pknEType__; text: .text%__1cCosGrandom6F_l_; -text: .text%__1cNget_next_hash6F_l_: synchronizer.o; -text: .text%__1cNJvmtiGCMarker2t6Mi_v_; text: .text%__1cPVM_GC_OperationNdoit_epilogue6M_v_; -text: .text%__1cKPSScavengeXshould_attempt_scavenge6F_i_; -text: .text%__1cKPSScavengeQinvoke_no_policy6Fpi_i_; text: .text%__1cPGlobalTLABStatsHpublish6M_v_; text: .text%__1cUinitialize_hashtable6FppnLNameSigHash__v_; -text: .text%__1cPclear_hashtable6FppnLNameSigHash__v_; -text: .text%__1cQciBytecodeStreamUis_unresolved_string6kM_i_; -text: .text%__1cFciEnvUis_unresolved_string6kMpnPciInstanceKlass_i_i_; -text: .text%__1cFciEnvZis_unresolved_string_impl6kMpnNinstanceKlass_i_i_; text: .text%__1cNtestP_regNodeFreloc6kM_i_; -text: .text%__1cNSCMemProjNodeGis_CFG6kM_i_; -text: .text%__1cKPSScavengeGinvoke6Fpi_v_; -text: .text%__1cUParallelScavengeHeapTfailed_mem_allocate6MpiLii_pnIHeapWord__; -text: .text%__1cbDVM_ParallelGCFailedAllocationEname6kM_pkc_; text: .text%__1cbDVM_ParallelGCFailedAllocationEdoit6M_v_; text: .text%__1cKDictionaryJnew_entry6MIpnMklassOopDesc_pnHoopDesc__pnPDictionaryEntry__; text: .text%__1cKDictionaryJadd_klass6MnMsymbolHandle_nGHandle_nLKlassHandle__v_; text: .text%__1cQSystemDictionaryRupdate_dictionary6FiIiInTinstanceKlassHandle_nGHandle_pnGThread__v_; -text: .text%__1cQSystemDictionaryRcheck_constraints6FiInTinstanceKlassHandle_nGHandle_pnGThread__v_; text: .text%__1cQSystemDictionaryQfind_placeholder6FiInMsymbolHandle_nGHandle__pnNsymbolOopDesc__; -text: .text%__1cVLoaderConstraintTablePcheck_or_update6MnTinstanceKlassHandle_nGHandle_nMsymbolHandle__pkc_; text: .text%__1cKoopFactoryXnew_permanent_byteArray6FipnGThread__pnQtypeArrayOopDesc__; -text: .text%__1cNIdealLoopTreeTcheck_inner_safepts6MpnOPhaseIdealLoop__v_; text: .text%__1cPsarI_rReg_1NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKciTypeFlowPflow_exceptions6MpnNGrowableArray4Cpn0AFBlock___pnNGrowableArray4CpnPciInstanceKlass___pn0ALStateVector__v_; -text: .text%__1cIAndINodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cIciObjectOis_null_object6kM_i_; text: .text%__1cNIdealLoopTreeNDCE_loop_body6M_v_; text: .text%__1cNprefetchwNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cXmembar_release_lockNodeEsize6kMpnNPhaseRegAlloc__I_; @@ -3277,10 +2079,8 @@ text: .text%__1cMPhaseChaitinMreset_uf_map6MI_v_; text: .text%__1cMPhaseChaitinSbuild_ifg_physical6MpnMResourceArea__I_; text: .text%__1cNPhaseCoalescePcoalesce_driver6M_v_; text: .text%__1cNdecI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cSComputeAdapterInfoHdo_long6M_v_; text: .text%__1cOGenerateOopMapJdo_astore6Mi_v_; text: .text%__1cSTailCalljmpIndNodeNis_block_proj6kM_pknENode__; -text: .text%__1cIciObjectMhas_encoding6M_i_; text: .text%__1cMrcx_RegIOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cIMulLNodeImul_ring6kMpknEType_3_3_; text: .text%__1cHPhiNodeKmake_blank6FpnENode_2_p0_; @@ -3291,11 +2091,7 @@ text: .text%JVM_GetMethodIxByteCodeLength; text: .text%JVM_GetMethodIxByteCode; text: .text%JVM_GetMethodIxExceptionIndexes; text: .text%JVM_GetMethodIxExceptionsCount; -text: .text%__1cENodeUdepends_only_on_test6kM_i_; -text: .text%__1cXmembar_acquire_lockNodePoper_input_base6kM_I_; text: .text%__1cOPhaseIdealLoopMdominated_by6MpnENode_2_v_; -text: .text%__1cNGrowableArray4nLKlassHandle__Icontains6kMrkn0A__i_; -text: .text%__1cLGCTaskQdDueue2t6Mi_v_; text: .text%__1cNaddL_rRegNodeErule6kM_I_; text: .text%__1cGGCTask2t6Mn0AEKindEkind__v_; text: .text%__1cZSerialOldToYoungRootsTaskEname6M_pc_; @@ -3312,7 +2108,6 @@ text: .text%__1cNMonitorSupplyHreserve6F_pnHMonitor__; text: .text%__1cUWaitForBarrierGCTaskIwait_for6M_v_; text: .text%__1cUWaitForBarrierGCTaskIdestruct6M_v_; text: .text%__1cUWaitForBarrierGCTaskHdestroy6Fp0_v_; -text: .text%__1cUWaitForBarrierGCTask2t6Mi_v_; text: .text%__1cUWaitForBarrierGCTaskGcreate6F_p0_; text: .text%__1cNBarrierGCTaskIdestruct6M_v_; text: .text%__1cNBarrierGCTaskOdo_it_internal6MpnNGCTaskManager_I_v_; @@ -3324,35 +2119,21 @@ text: .text%__1cGGCTaskIdestruct6M_v_; text: .text%__1cSCardTableExtensionRscavenge_contents6MpnQObjectStartArray_pnMMutableSpace_pnIHeapWord_pnSPSPromotionManager__v_; text: .text%__1cHThreadsZcreate_thread_roots_tasks6FpnLGCTaskQdDueue__v_; text: .text%__1cKPSYoungGenLswap_spaces6M_v_; -text: .text%__1cUPSAdaptiveSizePolicybPcompute_survivor_space_size_and_threshold6MiiL_i_; text: .text%__1cUParallelScavengeHeapQresize_young_gen6MLL_v_; -text: .text%__1cUPSAdaptiveSizePolicyPupdate_averages6MiLL_v_; -text: .text%__1cKPSYoungGenRresize_generation6MLL_i_; text: .text%__1cKPSYoungGenGresize6MLL_v_; text: .text%__1cKPSYoungGenNresize_spaces6MLL_v_; -text: .text%__1cHMatcherKcan_be_arg6Fi_i_; -text: .text%__1cHMatcherQis_spillable_arg6Fi_i_; -text: .text%__1cUPSAdaptiveSizePolicyOshould_full_GC6ML_i_; text: .text%__1cSAdaptiveSizePolicybIupdate_minor_pause_young_estimator6Md_v_; text: .text%__1cUPSAdaptiveSizePolicybGupdate_minor_pause_old_estimator6Md_v_; text: .text%__1cNsubL_rRegNodeMcisc_operand6kM_i_; text: .text%__1cMStartOSRNodeGOpcode6kM_i_; text: .text%__1cRsubI_rReg_memNodeErule6kM_I_; -text: .text%__1cQinstanceRefKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cXmembar_acquire_lockNodeHtwo_adr6kM_I_; text: .text%__1cNandI_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cNcmovI_regNodePoper_input_base6kM_I_; text: .text%__1cMURShiftINodeJideal_reg6kM_I_; text: .text%__1cMorI_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cLRShiftINodeJideal_reg6kM_I_; -text: .text%__1cLklassItableRinitialize_itable6M_v_; text: .text%__1cLklassVtableQfill_in_mirandas6Mri_v_; text: .text%__1cRandI_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cSmembar_releaseNodePoper_input_base6kM_I_; -text: .text%__1cFKlassZcan_be_primary_super_slow6kM_i_; -text: .text%__1cJrRegLOperFclone6kM_pnIMachOper__; text: .text%__1cFStateR_sub_Op_LoadKlass6MpknENode__v_; -text: .text%__1cRmethodDataOopDescJis_mature6kM_i_; text: .text%__1cJcmpOpOperEless6kM_i_; text: .text%__1cFKlassWappend_to_sibling_list6M_v_; text: .text%__1cOcompL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3361,39 +2142,23 @@ text: .text%__1cNloadKlassNodeFreloc6kM_i_; text: .text%__1cRshrI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIAndINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cTjava_lang_ThrowableNset_backtrace6FpnHoopDesc_2_v_; -text: .text%__1cPcmovI_reg_gNodeMideal_Opcode6kM_i_; text: .text%__1cIAndINodeGmul_id6kM_pknEType__; text: .text%__1cTClassLoadingServiceScompute_class_size6FpnNinstanceKlass__L_; text: .text%__1cLklassVtableQget_num_mirandas6FpnMklassOopDesc_pnPobjArrayOopDesc_4_i_; -text: .text%__1cIVerifierQrelax_verify_for6FpnHoopDesc__i_; -text: .text%__1cLklassVtablebKcompute_vtable_size_and_num_mirandas6Fri1pnMklassOopDesc_pnPobjArrayOopDesc_nLAccessFlags_pnHoopDesc_pnNsymbolOopDesc_5_v_; text: .text%__1cPClassFileParserbAparse_classfile_attributes6MnSconstantPoolHandle_nTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cRaddI_rReg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cVjava_lang_ClassLoaderRis_trusted_loader6FpnHoopDesc__i_; -text: .text%__1cNmethodOopDescMsort_methods6FpnPobjArrayOopDesc_222_v_; text: .text%__1cQSystemDictionaryQadd_to_hierarchy6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cPClassFileParserUcompute_oop_map_size6MnTinstanceKlassHandle_ii_i_; -text: .text%__1cPClassFileParserOparseClassFile6MnMsymbolHandle_nGHandle_2r1pnGThread__nTinstanceKlassHandle__; text: .text%__1cPClassFileParserVset_precomputed_flags6MnTinstanceKlassHandle__v_; -text: .text%__1cPClassFileParserNfill_oop_maps6MnTinstanceKlassHandle_ii_v_; text: .text%__1cPClassFileParserbDcompute_transitive_interfaces6MnTinstanceKlassHandle_nOobjArrayHandle_pnGThread__2_; text: .text%__1cQSystemDictionaryVdefine_instance_class6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cPClassFileParserbCcheck_super_interface_access6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cPClassFileParserYcheck_super_class_access6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cPClassFileParserbBcheck_final_method_override6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cSinstanceKlassKlassXallocate_instance_klass6MiiiinNReferenceType_pnGThread__pnMklassOopDesc__; -text: .text%__1cPClassFileParserQparse_interfaces6MnSconstantPoolHandle_nGHandle_2pnGThread__nOobjArrayHandle__; text: .text%__1cPClassFileParserTparse_constant_pool6MpnGThread__nSconstantPoolHandle__; text: .text%__1cNinstanceKlassOset_alloc_size6MI_v_; -text: .text%__1cTClassLoadingServiceTnotify_class_loaded6FpnNinstanceKlass_i_v_; text: .text%__1cLklassItableZsetup_itable_offset_table6FnTinstanceKlassHandle__v_; -text: .text%__1cPClassFileParserMparse_fields6MnSconstantPoolHandle_ipnUFieldAllocationCount_pnOobjArrayHandle_pnGThread__nPtypeArrayHandle__; -text: .text%__1cPClassFileParserNparse_methods6MnSconstantPoolHandle_ipnLAccessFlags_ppnPobjArrayOopDesc_66pnGThread__nOobjArrayHandle__; text: .text%__1cPClassFileParserMsort_methods6MnOobjArrayHandle_111pnGThread__nPtypeArrayHandle__; text: .text%__1cPClassFileParserbBparse_constant_pool_entries6MnSconstantPoolHandle_ipnGThread__v_; text: .text%__1cIUniverseTflush_dependents_on6FnTinstanceKlassHandle__v_; -text: .text%__1cKoopFactoryQnew_constantPool6FipnGThread__pnTconstantPoolOopDesc__; -text: .text%__1cRconstantPoolKlassIallocate6MipnGThread__pnTconstantPoolOopDesc__; text: .text%__1cPClassFileStream2t6MpCipc_v_; text: .text%__1cNinstanceKlassbBdo_local_static_fields_impl6FnTinstanceKlassHandle_pFpnPfieldDescriptor_pnGThread__v5_v_; text: .text%__1cJCodeCachebKnumber_of_nmethods_with_dependencies6F_i_; @@ -3402,9 +2167,6 @@ text: .text%__1cNinstanceKlassYcompute_secondary_supers6MipnGThread__pnPobjArray text: .text%__1cNinstanceKlassSprocess_interfaces6MpnGThread__v_; text: .text%__1cNinstanceKlassQinit_implementor6M_v_; text: .text%__1cNinstanceKlassQeager_initialize6MpnGThread__v_; -text: .text%__1cKoopFactoryRnew_instanceKlass6FiiiinNReferenceType_pnGThread__pnMklassOopDesc__; -text: .text%__1cQSystemDictionaryVresolve_super_or_fail6FnMsymbolHandle_1nGHandle_2pnGThread__pnMklassOopDesc__; -text: .text%__1cNinstanceKlassZcan_be_primary_super_slow6kM_i_; text: .text%__1cKTypeRawPtrEmake6FpC_pk0_; text: .text%__1cScompI_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cScompI_rReg_memNodePoper_input_base6kM_I_; @@ -3413,11 +2175,8 @@ text: .text%__1cOMethodLivenessSpropagate_liveness6M_v_; text: .text%__1cOMethodLivenessRinit_basic_blocks6M_v_; text: .text%__1cOMethodLivenessNinit_gen_kill6M_v_; text: .text%__1cOMethodLivenessQcompute_liveness6M_v_; -text: .text%__1cFKlassRoop_is_methodData6kM_i_; -text: .text%__1cFVTuneQstart_class_load6F_v_; text: .text%__1cSThreadProfilerMark2t6Mn0AGRegion__v_; text: .text%__1cLClassLoaderOload_classfile6FnMsymbolHandle_pnGThread__nTinstanceKlassHandle__; -text: .text%__1cFVTuneOend_class_load6F_v_; text: .text%__1cQSystemDictionaryRload_shared_class6FnTinstanceKlassHandle_nGHandle_pnGThread__1_; text: .text%__1cQSystemDictionaryRload_shared_class6FnMsymbolHandle_nGHandle_pnGThread__nTinstanceKlassHandle__; text: .text%__1cQSystemDictionaryRfind_shared_class6FnMsymbolHandle__pnMklassOopDesc__; @@ -3428,77 +2187,47 @@ text: .text%__1cRaddL_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cPClassFileParserbKparse_classfile_sourcefile_attribute6MnSconstantPoolHandle_nTinstanceKlassHandle_pnGThread__v_; text: .text%__1cKciTypeFlowLStateVectorGdo_ldc6MpnQciBytecodeStream__v_; text: .text%__1cMPhaseIterGVNIoptimize6M_v_; -text: .text%__1cOrFlagsRegUOperFclone6kM_pnIMachOper__; text: .text%__1cNmulL_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cMrdi_RegPOperJnum_edges6kM_I_; text: .text%__1cRsalI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLklassVtableYadd_new_mirandas_to_list6FpnNGrowableArray4CpnNmethodOopDesc___pnPobjArrayOopDesc_6pnMklassOopDesc__v_; text: .text%__1cQPackageHashtableMcompute_hash6Mpkci_I_; -text: .text%__1cWconstantPoolCacheKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cRsalL_rReg_immNodeMideal_Opcode6kM_i_; -text: .text%__1cIConINodeHget_int6kMpi_i_; text: .text%__1cJMarkSweepSFollowStackClosureHdo_void6M_v_; -text: .text%__1cICallNodeRis_CallStaticJava6kM_pknSCallStaticJavaNode__; text: .text%__1cLOpaque2NodeGOpcode6kM_i_; text: .text%__1cOGenerateOopMapJppdupswap6Mipkc_v_; -text: .text%__1cILoopNode2t6MpnENode_2_v_; text: .text%__1cJloadBNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPClassFileStreamGget_u86MpnGThread__X_; text: .text%__1cKstoreINodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cTconvI2L_reg_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cScompP_mem_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cIVerifierRverify_byte_codes6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cIRewriterHrewrite6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cIRewriterScompute_index_maps6FnSconstantPoolHandle_rpnIintArray_rpnIintStack__v_; -text: .text%__1cIRewriterXnew_constant_pool_cache6FrnIintArray_pnGThread__nXconstantPoolCacheHandle__; -text: .text%__1cIintArray2t6Mii_v_; text: .text%__1cNinstanceKlassNrewrite_class6MpnGThread__v_; -text: .text%__1cKoopFactoryVnew_constantPoolCache6FipnGThread__pnYconstantPoolCacheOopDesc__; -text: .text%__1cNinstanceKlassWadd_loader_constraints6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cNinstanceKlassLverify_code6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cWconstantPoolCacheKlassIallocate6MipnGThread__pnYconstantPoolCacheOopDesc__; text: .text%__1cYconstantPoolCacheOopDescKinitialize6MrnIintArray__v_; text: .text%__1cFframeWsender_for_entry_frame6kMpnLRegisterMap__0_; text: .text%__1cHPhiNodeDcmp6kMrknENode__I_; -text: .text%__1cSmembar_releaseNodeHtwo_adr6kM_I_; text: .text%__1cSObjectSynchronizerJnotifyall6FnGHandle_pnGThread__v_; text: .text%__1cKoopFactoryWnew_permanent_intArray6FipnGThread__pnQtypeArrayOopDesc__; text: .text%__1cPClassFileParserVparse_exception_table6MIInSconstantPoolHandle_pnGThread__nPtypeArrayHandle__; -text: .text%__1cPClassFileParserbSparse_constant_pool_interfacemethodref_entry6MnSconstantPoolHandle_ipnGThread__v_; text: .text%__1cWCountInterfacesClosureEdoit6MpnMklassOopDesc_i_v_; text: .text%__1cMtlsLoadPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNmodI_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cNtestL_regNodeMideal_Opcode6kM_i_; -text: .text%__1cRaddI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIConFNodeGOpcode6kM_i_; text: .text%__1cLOpaque1NodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cTconvI2L_reg_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cNSharedRuntimebOraw_exception_handler_for_return_address6FpC_1_; -text: .text%__1cNSharedRuntimebKexception_handler_for_return_address6FpC_1_; -text: .text%__1cOMethodLivenessKBasicBlockPmerge_exception6MnGBitMap__i_; -text: .text%__1cTconvI2L_reg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIAndINodeKmul_opcode6kM_i_; text: .text%__1cIAndINodeKadd_opcode6kM_i_; -text: .text%__1cPcmovI_reg_gNodeJnum_opnds6kM_I_; text: .text%__1cKCMoveINodeGOpcode6kM_i_; -text: .text%__1cKarrayKlassMoop_is_array6kM_i_; text: .text%__1cIRootNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cPloadConUL32NodeHsize_of6kM_I_; text: .text%__1cJAssemblerEandq6MpnMRegisterImpl_i_v_; text: .text%__1cLClassLoaderOlookup_package6Fpkc_pnLPackageInfo__; text: .text%__1cQPackageHashtableJget_entry6MiIpkcL_pnLPackageInfo__; -text: .text%__1cIGraphKitRmerge_fast_memory6MpnENode_2i_v_; text: .text%JVM_Clone; text: .text%__1cLklassItableTcompute_itable_size6FnOobjArrayHandle__i_; -text: .text%__1cUCallCompiledJavaNodeGOpcode6kM_i_; text: .text%__1cPsalI_rReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKadd_n_reqs6FpnENode_1_v_: graphKit.o; text: .text%__1cSTailCalljmpIndNodeMideal_Opcode6kM_i_; text: .text%__1cQComputeCallStackJdo_double6M_v_; text: .text%__1cKciTypeFlowLStateVectorMdo_putstatic6MpnQciBytecodeStream__v_; -text: .text%__1cLClassLoaderLadd_package6Fpkci_i_; text: .text%__1cIGraphKitHopt_iff6MpnENode_2_2_; -text: .text%__1cIGraphKitOmake_merge_mem6MpnENode_22_v_; text: .text%__1cGEventsDlog6FpkcE_v_; text: .text%__1cMLinkResolverbHlookup_instance_method_in_klasses6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%__1cSsafePoint_pollNodeEsize6kMpnNPhaseRegAlloc__I_; @@ -3506,29 +2235,16 @@ text: .text%__1cNSharedRuntimebWnative_method_throw_unsatisfied_link_error_entry text: .text%__1cPshrI_rReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFParseWensure_phis_everywhere6M_v_; text: .text%__1cNsubL_rRegNodeErule6kM_I_; -text: .text%__1cNIdealLoopTreeUiteration_split_impl6MpnOPhaseIdealLoop_rnJNode_List__v_; -text: .text%__1cNIdealLoopTreebBpolicy_do_remove_empty_loop6MpnOPhaseIdealLoop__i_; -text: .text%__1cNIdealLoopTreeOpolicy_peeling6kMpnOPhaseIdealLoop__i_; -text: .text%__1cIBoolNodeZis_counted_loop_exit_test6M_i_; -text: .text%__1cJloadCNodeHtwo_adr6kM_I_; text: .text%__1cUPSMarkSweepDecoratorVdestination_decorator6F_p0_; -text: .text%__1cTGeneratePairingInfoRpossible_gc_point6MpnOBytecodeStream__i_; -text: .text%__1cENode2n6FL_pv_; text: .text%__1cSvframeStreamCommonZsecurity_get_caller_frame6Mi_v_; text: .text%__1cKBufferBlob2n6FLI_pv_; text: .text%__1cFParseKarray_load6MnJBasicType__v_; -text: .text%__1cICodeBlob2t6Mpkcii_v_; text: .text%__1cKBufferBlob2t6Mpkci_v_; text: .text%__1cKBufferBlobGcreate6Fpkci_p0_; text: .text%__1cKciTypeFlowLStateVectorLdo_putfield6MpnQciBytecodeStream__v_; text: .text%__1cHnmethodNscope_desc_at6MpC_pnJScopeDesc__; -text: .text%__1cHnmethodJcode_size6kM_i_; -text: .text%__1cRtestP_reg_memNodeMideal_Opcode6kM_i_; -text: .text%__1cRtestP_reg_memNodePoper_input_base6kM_I_; text: .text%__1cOPhaseIdealLoopQset_subtree_ctrl6MpnENode__v_; -text: .text%__1cOjmpLoopEndNodeJnum_opnds6kM_I_; text: .text%__1cJAssemblerEmovl6MpnMRegisterImpl_i_v_; -text: .text%__1cRconstantPoolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNinstanceKlassbBcall_class_initializer_impl6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cNinstanceKlassRclass_initializer6M_pnNmethodOopDesc__; text: .text%__1cNinstanceKlassWcall_class_initializer6MpnGThread__v_; @@ -3536,19 +2252,11 @@ text: .text%__1cNinstanceKlassbOset_initialization_state_and_notify_impl6FnTinst text: .text%__1cNinstanceKlassbJset_initialization_state_and_notify6Mn0AKClassState_pnGThread__v_; text: .text%__1cNRelocIteratorTlocs_and_index_size6Fii_i_; text: .text%__1cMrdi_RegPOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cTStackWalkCompPolicyYmethod_back_branch_event6MnMmethodHandle_iipnGThread__v_; -text: .text%__1cFTypeDCeq6kMpknEType__i_; -text: .text%__1cJLoadCNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cNtestL_regNodeHtwo_adr6kM_I_; text: .text%__1cTconvL2I_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRCompilationPolicybJreset_counter_for_back_branch_event6MnMmethodHandle__v_; text: .text%__1cMrax_RegLOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cNmodI_rRegNodePoper_input_base6kM_I_; text: .text%__1cNSignatureInfoIdo_short6M_v_; text: .text%JVM_GetFieldIxModifiers; -text: .text%__1cNsubL_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cNandL_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cNsubL_rRegNodeJnum_opnds6kM_I_; text: .text%__1cTMachCallRuntimeNodePret_addr_offset6M_i_; text: .text%__1cOcompiledVFrameEcode6kM_pnHnmethod__; text: .text%__1cICodeHeapTmark_segmap_as_used6MLL_v_; @@ -3563,21 +2271,17 @@ text: .text%__1cJStartNodeHsize_of6kM_I_; text: .text%__1cILRG_List2t6MI_v_; text: .text%__1cHMatcherLreturn_addr6kM_i_; text: .text%__1cSindIndexOffsetOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cGBundlePinitialize_nops6FppnIMachNode__v_; text: .text%__1cOMachPrologNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cHMemNodeHsize_of6kM_I_; text: .text%__1cNSignatureInfoIdo_float6M_v_; text: .text%__1cRaddI_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRmulI_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cFParseNadd_safepoint6M_v_; text: .text%__1cFStateT_sub_Op_CheckCastPP6MpknENode__v_; text: .text%__1cRaddI_rReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cOCompiledRFrameEinit6M_v_; text: .text%__1cGvframeDtop6kM_p0_; -text: .text%__1cPsarI_rReg_1NodeJnum_opnds6kM_I_; text: .text%__1cRmethodDataOopDescYcompute_extra_data_count6Fii_i_; text: .text%__1cPcheckCastPPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cIciObjectIis_klass6M_i_; text: .text%__1cFStateM_sub_Op_SubI6MpknENode__v_; text: .text%__1cRxorI_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cNloadConP0NodeHsize_of6kM_I_; @@ -3585,76 +2289,42 @@ text: .text%__1cJAssemblerEaddq6MpnMRegisterImpl_i_v_; text: .text%__1cJAssemblerEsubq6MpnMRegisterImpl_2_v_; text: .text%__1cXJNI_ArgumentPusherVaArgHiterate6ML_v_; text: .text%__1cTresource_free_bytes6FpcL_v_; -text: .text%__1cNSingletonBlobMdo_unloading6MpnRBoolObjectClosure_pnKOopClosure_i_v_; text: .text%__1cUPSMarkSweepDecoratorPadjust_pointers6M_v_; -text: .text%__1cUPSMarkSweepDecoratorHcompact6Mi_v_; text: .text%__1cUPSMarkSweepDecoratorKprecompact6M_v_; -text: .text%__1cbBconvI2L_reg_reg_reg_zexNodeMideal_Opcode6kM_i_; text: .text%__1cRindIndexScaleOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cRindIndexScaleOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cPCountedLoopNodeHsize_of6kM_I_; text: .text%__1cENodeHrm_prec6MI_v_; -text: .text%__1cHAddNodeGis_Add6kM_pk0_; text: .text%__1cHCompilebAvarargs_C_out_slots_killed6kM_I_; -text: .text%__1cTMachCallRuntimeNodeSis_MachCallRuntime6M_p0_; -text: .text%__1cMrax_RegIOperJnum_edges6kM_I_; text: .text%__1cICodeHeapLmerge_right6MpnJFreeBlock__v_; -text: .text%__1cNaddI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNmulL_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cWandI_rReg_imm65535NodeMideal_Opcode6kM_i_; -text: .text%__1cKReturnNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cRjmpConU_shortNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cLjmpConUNodeUshort_branch_version6M_pnIMachNode__; text: .text%__1cRjmpConU_shortNodeJlabel_set6MrnFLabel_I_v_; -text: .text%__1cRjmpConU_shortNodeJis_Branch6kM_I_; -text: .text%__1cKcmpOpUOperFclone6kM_pnIMachOper__; -text: .text%__1cRtestP_reg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cFMutexbLwait_for_lock_blocking_implementation6MpnKJavaThread__v_; -text: .text%__1cIregDOperJnum_edges6kM_I_; -text: .text%__1cPciInstanceKlassTis_java_lang_Object6M_i_; text: .text%__1cSciExceptionHandlerLcatch_klass6M_pnPciInstanceKlass__; text: .text%__1cSindIndexOffsetOperNconstant_disp6kM_i_; text: .text%__1cIAndLNodeGadd_id6kM_pknEType__; text: .text%__1cLConvL2INodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cQleaPIdxScaleNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIAndLNodeImul_ring6kMpknEType_3_3_; -text: .text%__1cRaddP_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMloadConLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cHMatcherQpost_fast_unlock6FpknENode__i_; text: .text%__1cFStateV_sub_Op_MemBarRelease6MpknENode__v_; text: .text%__1cOleaPIdxOffNodeMideal_Opcode6kM_i_; -text: .text%__1cILoopNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cScompI_rReg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cScompI_rReg_memNodeJnum_opnds6kM_I_; text: .text%__1cJAssemblerDorq6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cScompI_rReg_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cKJNIHandlesOdestroy_global6FpnI_jobject_i_v_; text: .text%__1cPcmpFastLockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cXmembar_release_lockNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cTcompareAndSwapLNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNmethodOopDescTset_native_function6MpC_v_; text: .text%__1cKciTypeFlowLStateVectorJhalf_type6FpnGciType__3_; -text: .text%__1cQmerge_point_safe6FpnENode__i_: loopopts.o; -text: .text%__1cRaddL_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cHMatcherUc_calling_convention6FpnLOptoRegPair_I_v_; -text: .text%__1cPCallRuntimeNodeScalling_convention6kMpnLOptoRegPair_I_v_; -text: .text%__1cUjni_invoke_nonstatic6FpnHJNIEnv__pnJJavaValue_pnI_jobject_nLJNICallType_pnK_jmethodID_pnSJNI_ArgumentPusher_pnGThread__v_: jni.o; text: .text%__1cQSystemDictionaryRnumber_of_classes6F_i_; text: .text%__1cNaddL_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNxorI_rRegNodeMcisc_operand6kM_i_; text: .text%__1cWCallLeafNoFPDirectNodePoper_input_base6kM_I_; -text: .text%__1cENodeHget_int6kMpi_i_; -text: .text%__1cPCountedLoopNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cJLoadFNodeGOpcode6kM_i_; text: .text%__1cQSystemDictionarybBresolve_array_class_or_null6FnMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; -text: .text%__1cNincI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cPClassFileParserbEparse_constant_pool_long_entry6MnSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cPcmovI_reg_lNodePoper_input_base6kM_I_; text: .text%__1cJAssemblerEleaq6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cNinstanceKlassQarray_klass_impl6MipnGThread__pnMklassOopDesc__; text: .text%__1cJloadINodeIpipeline6kM_pknIPipeline__; text: .text%__1cHTypePtrFxmeet6kMpknEType__3_; -text: .text%__1cNprefetchwNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cFKlassTarray_klass_or_null6M_pnMklassOopDesc__; text: .text%__1cIPhaseIFGYCompute_Effective_Degree6M_v_; text: .text%__1cbCfind_class_from_class_loader6FpnHJNIEnv__nMsymbolHandle_CnGHandle_3CpnGThread__pnH_jclass__; @@ -3667,46 +2337,33 @@ text: .text%__1cScompU_rReg_memNodePoper_input_base6kM_I_; text: .text%__1cScompU_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cRNativeGeneralJumpQjump_destination6kM_pC_; text: .text%__1cLRethrowNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cWCallLeafNoFPDirectNodeHtwo_adr6kM_I_; -text: .text%__1cNSafepointBlobHoops_do6MpnKOopClosure__v_; -text: .text%__1cSvframeStreamCommonYfill_from_compiled_frame6MpnHnmethod_i_v_; text: .text%__1cNandL_rRegNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cHnmethodQis_native_method6kM_i_; text: .text%__1cTleaPIdxScaleOffNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNmulL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cODataRelocationGoffset6M_i_; text: .text%__1cODataRelocationJset_value6MpC_v_; text: .text%__1cKRelocationRpd_set_data_value6MpCl_v_; text: .text%__1cLOptoRuntimeJstub_name6FpC_pkc_; -text: .text%__1cIMulINodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cFStateO_sub_Op_StoreB6MpknENode__v_; text: .text%__1cRaddL_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cIregFOperJnum_edges6kM_I_; text: .text%__1cRandI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIRootNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cIRootNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cOleaPIdxOffNodePoper_input_base6kM_I_; text: .text%__1cJcmpOpOperKless_equal6kM_i_; text: .text%__1cNmethodOopDescVset_signature_handler6MpC_v_; text: .text%__1cIMulLNodeGmul_id6kM_pknEType__; -text: .text%__1cMrep_stosNodeHtwo_adr6kM_I_; text: .text%__1cHMemNodeIadr_type6kM_pknHTypePtr__; -text: .text%__1cNsubI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cHMemNodeScalculate_adr_type6FpknEType_pknHTypePtr__6_; text: .text%__1cRmulI_rReg_immNodeErule6kM_I_; text: .text%__1cURethrowExceptionNodePoper_input_base6kM_I_; text: .text%__1cNaddP_rRegNodePoper_input_base6kM_I_; text: .text%__1cFStateP_sub_Op_RShiftI6MpknENode__v_; -text: .text%__1cKstoreLNodeHtwo_adr6kM_I_; text: .text%__1cNnegI_rRegNodeMideal_Opcode6kM_i_; -text: .text%__1cbBconvI2L_reg_reg_reg_zexNodePoper_input_base6kM_I_; text: .text%__1cbFloadConL_0x6666666666666667NodeErule6kM_I_; text: .text%__1cNSharedRuntimeXfind_callee_info_helper6FpnKJavaThread_rnMvframeStream_rnJBytecodesECode_rnICallInfo_pnGThread__nGHandle__; -text: .text%__1cIGraphKitNstore_barrier6MpnENode_22_v_; text: .text%__1cNmethodOopDescTverified_code_entry6M_pC_; text: .text%__1cNloadKlassNodeIpipeline6kM_pknIPipeline__; text: .text%__1cSmembar_acquireNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cMoutputStreamMdo_vsnprintf6FpcLpkcpnR__va_list_element_irL_3_; text: .text%__1cMoutputStreamFprint6MpkcE_v_; text: .text%__1cMURShiftLNodeJideal_reg6kM_I_; text: .text%__1cZPhaseConservativeCoalesce2t6MrnMPhaseChaitin__v_; @@ -3716,58 +2373,36 @@ text: .text%__1cMPhaseChaitinZcompress_uf_map_for_nodes6M_v_; text: .text%__1cZPhaseConservativeCoalesceGverify6M_v_; text: .text%__1cQComputeCallStackIdo_short6M_v_; text: .text%__1cNFingerprinterHdo_long6M_v_; -text: .text%__1cIciMethodRinstructions_size6M_i_; text: .text%__1cSsafePoint_pollNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNloadConL0NodeLbottom_type6kM_pknEType__; -text: .text%__1cJimmL0OperJconstantL6kM_x_; -text: .text%__1cWandI_rReg_imm65535NodePoper_input_base6kM_I_; text: .text%__1cIAndINodeJideal_reg6kM_I_; text: .text%__1cZInterpreterMacroAssemblerKverify_oop6MpnMRegisterImpl_nITosState__v_; -text: .text%__1cYexternal_word_RelocationJpack_data6M_i_; -text: .text%__1cJimmP0OperFclone6kM_pnIMachOper__; -text: .text%__1cKRelocationYruntime_address_to_index6FpC_l_; text: .text%__1cOemit_d32_reloc6FrnKCodeBuffer_inJrelocInfoJrelocType_i_v_; text: .text%__1cYexternal_word_RelocationEtype6M_nJrelocInfoJrelocType__; -text: .text%__1cRsalL_rReg_immNodePoper_input_base6kM_I_; -text: .text%__1cLPhaseValues2T5B6M_v_; text: .text%__1cNstoreImmBNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateQ_sub_Op_URShiftL6MpknENode__v_; text: .text%__1cJNode_ListEyank6MpnENode__v_; -text: .text%__1cNxorI_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cNxorI_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cJAssemblerEmovq6MpnMRegisterImpl_l_v_; text: .text%jni_ExceptionCheck: jni.o; text: .text%__1cMFastLockNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cTCallDynamicJavaNodeEhash6kM_I_; -text: .text%__1cMalloc_object6FpnH_jclass_pnGThread__pnPinstanceOopDesc__: jni.o; -text: .text%__1cRshrL_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIXorINodeLbottom_type6kM_pknEType__; text: .text%__1cJAssemblerEsubq6MpnMRegisterImpl_i_v_; text: .text%__1cNloadConL0NodeMideal_Opcode6kM_i_; -text: .text%__1cLPcDescCacheKpc_desc_at6kMpnHnmethod_pC_pnGPcDesc__; text: .text%__1cKBlock_ListGinsert6MIpnFBlock__v_; -text: .text%__1cKtype2basic6FpknEType__nJBasicType__; -text: .text%__1cQleaPIdxScaleNodeLbottom_type6kM_pknEType__; text: .text%__1cKklassKlassOklass_oop_size6kM_i_; -text: .text%__1cIGraphKitOnull_check_oop6MpnKRegionNode_pnENode_i_4_; -text: .text%__1cJloadCNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRxorI_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cKTypeAryPtrQcast_to_ptr_type6kMnHTypePtrDPTR__pknEType__; text: .text%__1cKTypeRawPtrEmake6FnHTypePtrDPTR__pk0_; text: .text%__1cJCodeCacheEfree6FpnICodeBlob__v_; text: .text%__1cICodeHeapPadd_to_freelist6MpnJHeapBlock__v_; text: .text%__1cICodeHeapKdeallocate6Mpv_v_; -text: .text%__1cFframeLnmethods_do6M_v_; text: .text%__1cJVectorSetGslamin6Mrk0_v_; text: .text%__1cFStateQ_sub_Op_URShiftI6MpknENode__v_; text: .text%__1cScompI_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRaddI_rReg_memNodeErule6kM_I_; -text: .text%__1cYexternal_word_RelocationWfix_relocation_at_move6Ml_v_; text: .text%__1cKRelocationYpd_get_address_from_code6M_pC_; text: .text%__1cRxorI_rReg_memNodePoper_input_base6kM_I_; text: .text%__1cXJNI_ArgumentPusherVaArgIget_long6M_v_; text: .text%__1cNandL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cOCompilerOracleMshould_print6FnMmethodHandle__i_; text: .text%__1cNstoreImmBNodeFreloc6kM_i_; text: .text%__1cJcmpOpOperNgreater_equal6kM_i_; text: .text%__1cKBufferBlobEfree6Fp0_v_; @@ -3776,12 +2411,9 @@ text: .text%__1cKNativeCallXset_destination_mt_safe6MpC_v_; text: .text%__1cOGenerateOopMapIppop_any6Mi_v_; text: .text%__1cKNode_ArrayFclear6M_v_; text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc__pc_; -text: .text%__1cJAssemblerFpushq6MpnMRegisterImpl__v_; -text: .text%__1cIRootNodeHis_Root6M_p0_; text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_; text: .text%__1cIJumpDataPpost_initialize6MpnOBytecodeStream_pnRmethodDataOopDesc__v_; text: .text%__1cRsalL_rReg_immNodeErule6kM_I_; -text: .text%__1cPstoreImmI16NodeHtwo_adr6kM_I_; text: .text%__1cQjava_lang_StringOchar_converter6FnGHandle_HHpnGThread__1_; text: .text%jni_NewObject: jni.o; text: .text%__1cNaddP_rRegNodeMideal_Opcode6kM_i_; @@ -3790,38 +2422,25 @@ text: .text%__1cFciEnvKcompile_id6M_I_; text: .text%__1cOPhaseIdealLoopNreorg_offsets6MpnNIdealLoopTree__v_; text: .text%__1cNtestL_regNodeErule6kM_I_; text: .text%__1cLOptoRuntimebAcomplete_monitor_exit_Type6F_pknITypeFunc__; -text: .text%__1cNstoreImmINodeHtwo_adr6kM_I_; text: .text%__1cIGraphKitNshared_unlock6MpnENode_2_v_; text: .text%__1cNSafePointNodeLpop_monitor6M_v_; text: .text%__1cRsarI_rReg_immNodeErule6kM_I_; -text: .text%__1cNtestL_regNodePoper_input_base6kM_I_; text: .text%__1cRsarL_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMindirectOperNbase_position6kM_i_; text: .text%__1cMindirectOperNconstant_disp6kM_i_; text: .text%__1cMTailCallNodeKmatch_edge6kMI_I_; text: .text%__1cKciTypeFlowLStateVectorGdo_new6MpnQciBytecodeStream__v_; -text: .text%__1cHMatcherPprior_fast_lock6FpknENode__i_; text: .text%__1cGIfNodeMdominated_by6MpnENode_pnMPhaseIterGVN__v_; text: .text%__1cFStateV_sub_Op_MemBarAcquire6MpknENode__v_; text: .text%__1cNSharedRuntimeQfind_callee_info6FpnKJavaThread_rnJBytecodesECode_rnICallInfo_pnGThread__nGHandle__; text: .text%__1cFKlassDLCA6Mp0_1_; -text: .text%__1cRtestP_reg_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cRtestP_reg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cRtestP_reg_memNodeJnum_opnds6kM_I_; text: .text%__1cHciKlassVleast_common_ancestor6Mp0_1_; -text: .text%__1cUmembar_cpu_orderNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cUmembar_cpu_orderNodeLbottom_type6kM_pknEType__; -text: .text%__1cTcompareAndSwapLNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cNSCMemProjNodeLbottom_type6kM_pknEType__; -text: .text%__1cTcompareAndSwapLNodeHtwo_adr6kM_I_; text: .text%__1cJScopeDescGsender6kM_p0_; text: .text%__1cSindIndexOffsetOperOindex_position6kM_i_; text: .text%__1cSindIndexOffsetOperNbase_position6kM_i_; -text: .text%__1cNSharedRuntimeOresolve_helper6FpnKJavaThread_iipnGThread__nMmethodHandle__; text: .text%__1cNSafePointNodeMpush_monitor6MpknMFastLockNode__v_; -text: .text%__1cNSharedRuntimeSresolve_sub_helper6FpnKJavaThread_iipnGThread__nMmethodHandle__; text: .text%__1cOcompiledVFrameGsender6kM_pnGvframe__; -text: .text%__1cNtestU_regNodeHtwo_adr6kM_I_; text: .text%__1cTciConstantPoolCache2t6MpnFArena_i_v_; text: .text%__1cNGrowableArray4Cpv_2t6MpnFArena_iirk0_v_; text: .text%__1cKstoreFNodePoper_input_base6kM_I_; @@ -3832,13 +2451,11 @@ text: .text%__1cOMachEpilogNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNcmovI_regNodeMideal_Opcode6kM_i_; text: .text%__1cKCompiledIC2t6MpnKNativeCall__v_; text: .text%__1cFStateN_sub_Op_LoadL6MpknENode__v_; -text: .text%__1cNmodI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cSCallLeafDirectNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNSignatureInfoHdo_char6M_v_; text: .text%__1cNtestU_regNodeMideal_Opcode6kM_i_; text: .text%__1cFStateQ_sub_Op_CallLeaf6MpknENode__v_; text: .text%__1cRAbstractAssemblerFflush6M_v_; -text: .text%__1cJloadLNodeIpeephole6MpnFBlock_ipnNPhaseRegAlloc_ri_pnIMachNode__; text: .text%__1cJloadLNodeFreloc6kM_i_; text: .text%__1cSCallLeafDirectNodeFreloc6kM_i_; text: .text%__1cIGraphKitNgen_checkcast6MpnENode_2p2_2_; @@ -3847,50 +2464,31 @@ text: .text%__1cNsubL_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cXmembar_release_lockNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cJAssemblerEmovq6MpnMRegisterImpl_2_v_; text: .text%__1cRmulL_rReg_immNodeMideal_Opcode6kM_i_; -text: .text%__1cRsubI_rReg_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cJAssemblerEmovl6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cFframeRretrieve_receiver6MpnLRegisterMap__pnHoopDesc__; text: .text%__1cPBytecode_invokeNstatic_target6MpnGThread__nMmethodHandle__; text: .text%jni_NewGlobalRef: jni.o; -text: .text%__1cKciTypeFlowFRangeSprivate_copy_count6kMpn0AGJsrSet__i_; -text: .text%__1cOleaPIdxOffNodeJnum_opnds6kM_I_; text: .text%__1cOPhaseIdealLoopLdo_split_if6MpnENode__v_; text: .text%__1cNandI_rRegNodeMcisc_operand6kM_i_; text: .text%__1cHOrINodeGadd_id6kM_pknEType__; text: .text%__1cIPhaseCFGOinsert_goto_at6MII_v_; -text: .text%__1cOPhaseIdealLoop2t6MrnMPhaseIterGVN_pk0i_v_; text: .text%__1cOPhaseIdealLoopPbuild_loop_tree6M_v_; text: .text%__1cRsubI_rReg_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMinINodeLbottom_type6kM_pknEType__; -text: .text%__1cOjmpLoopEndNodeHtwo_adr6kM_I_; text: .text%__1cJLoadBNodeJideal_reg6kM_I_; -text: .text%__1cNnegI_rRegNodePoper_input_base6kM_I_; text: .text%__1cFStateS_sub_Op_FastUnlock6MpknENode__v_; text: .text%__1cXmembar_release_lockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRcmpFastUnlockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMVirtualSpaceNreserved_size6kM_L_; text: .text%__1cScompU_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRsarI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKStoreFNodeGOpcode6kM_i_; -text: .text%__1cLCastP2LNodeJideal_reg6kM_I_; text: .text%__1cPcmovI_reg_gNodeErule6kM_I_; -text: .text%__1cFStateP_sub_Op_CastP2L6MpknENode__v_; -text: .text%__1cScompU_rReg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cScompU_rReg_memNodeJnum_opnds6kM_I_; text: .text%__1cScompU_rReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cMLinkResolverOresolve_method6FrnMmethodHandle_rnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cWCallLeafNoFPDirectNodeRis_safepoint_node6kM_i_; text: .text%__1cQjava_lang_ThreadRset_thread_status6FpnHoopDesc_n0AMThreadStatus__v_; text: .text%__1cWCallLeafNoFPDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cJAssemblerDjcc6Mn0AJCondition_pCnJrelocInfoJrelocType__v_; text: .text%__1cKstoreFNodeMideal_Opcode6kM_i_; text: .text%__1cIimmFOperJconstantF6kM_f_; -text: .text%__1cNcmovI_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cKTypeOopPtrSmake_from_constant6FpnIciObject__pk0_; -text: .text%__1cNcmovI_regNodeJnum_opnds6kM_I_; -text: .text%__1cJAssemblerEmovq6MnHAddress_i_v_; -text: .text%__1cIciObjectJis_method6M_i_; -text: .text%__1cIciObjectOis_method_data6M_i_; text: .text%__1cIDivINodeLbottom_type6kM_pknEType__; text: .text%__1cHOrINodeJideal_reg6kM_I_; text: .text%__1cNcmovI_regNodeMcisc_operand6kM_i_; @@ -3900,63 +2498,40 @@ text: .text%__1cNinstanceKlassUfind_interface_field6kMpnNsymbolOopDesc_2pnPfield text: .text%__1cJloadFNodeMideal_Opcode6kM_i_; text: .text%__1cbFunnecessary_membar_volatileNodeMideal_Opcode6kM_i_; text: .text%__1cSmembar_acquireNodeIadr_type6kM_pknHTypePtr__; -text: .text%__1cIAndLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cIAndLNodeKadd_opcode6kM_i_; text: .text%__1cFStateO_sub_Op_StoreC6MpknENode__v_; text: .text%__1cIAndLNodeKmul_opcode6kM_i_; text: .text%__1cRaddL_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMrep_stosNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cXmembar_acquire_lockNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cFParseJdo_ifnull6MnIBoolTestEmask__v_; -text: .text%__1cMtlsLoadPNodeHtwo_adr6kM_I_; -text: .text%__1cIGraphKitOset_pair_local6MipnENode__v_; -text: .text%__1cJLoadCNodeJideal_reg6kM_I_; -text: .text%__1cPcmovI_reg_lNodeMideal_Opcode6kM_i_; -text: .text%__1cJCodeCacheXmark_for_deoptimization6FpnMklassOopDesc__i_; text: .text%__1cMrcx_RegIOperEtype6kM_pknEType__; -text: .text%__1cLConvL2INodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cOPhaseIdealLoopKDominators6M_v_; text: .text%__1cHNTarjanDDFS6Fp0rnJVectorSet_pnOPhaseIdealLoop_pI_i_; text: .text%__1cHNTarjanIsetdepth6MIpI_v_; text: .text%__1cIMulLNodeKmul_opcode6kM_i_; text: .text%__1cIMulLNodeKadd_opcode6kM_i_; text: .text%jni_SetLongField: jni.o; -text: .text%__1cOPhaseIdealLoopQbuild_loop_early6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; -text: .text%__1cOPhaseIdealLoopPbuild_loop_late6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; text: .text%__1cOPhaseIdealLoopRinit_dom_lca_tags6M_v_; text: .text%__1cKstoreLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLPcDescCacheLadd_pc_desc6MpnGPcDesc__v_; -text: .text%__1cScheck_phi_clipping6FpnHPhiNode_rpnHConNode_rI45rpnENode_5_i_: cfgnode.o; text: .text%__1cJloadSNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cTconvI2L_reg_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cRsubI_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMloadConFNodeMideal_Opcode6kM_i_; -text: .text%__1cTC2IAdapterGeneratorUgenerate_c2i_adapter6FnMmethodHandle__pnKC2IAdapter__; -text: .text%__1cKCompiledICIis_clean6kM_i_; text: .text%__1cNaddP_rRegNodeErule6kM_I_; -text: .text%__1cRmulL_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cNmethodOopDescVclear_native_function6M_v_; -text: .text%__1cICodeBlobOis_java_method6kM_i_; -text: .text%__1cKVtableStubSpd_code_size_limit6Fi_i_; -text: .text%__1cIUniverseWis_out_of_memory_error6FnGHandle__i_; text: .text%__1cTjava_lang_ThrowableTfill_in_stack_trace6FnGHandle_pnGThread__v_; text: .text%__1cTjava_lang_ThrowableQclear_stacktrace6FpnHoopDesc__v_; text: .text%__1cKJavaThreadGactive6F_p0_; text: .text%JVM_FillInStackTrace; text: .text%__1cTjava_lang_ThrowableTfill_in_stack_trace6FnGHandle__v_; text: .text%__1cSInterpreterRuntimePset_bcp_and_mdp6FpCpnKJavaThread__v_; -text: .text%__1cKJavaThreadNreguard_stack6MpC_i_; text: .text%__1cFframeZinterpreter_frame_set_bcp6MpC_v_; text: .text%jni_DeleteGlobalRef: jni.o; -text: .text%__1cKCompiledICZcompute_monomorphic_entry6FnMmethodHandle_nLKlassHandle_iirnOCompiledICInfo_pnGThread__v_; -text: .text%__1cNGrowableArray4nMmethodHandle__Icontains6kMrkn0A__i_; text: .text%__1cLOpaque2NodeEhash6kM_I_; text: .text%__1cICodeHeapLfirst_block6kM_pnJHeapBlock__; text: .text%__1cJCodeCacheFfirst6F_pnICodeBlob__; -text: .text%__1cJBytecodesRspecial_length_at6FpC_i_; text: .text%__1cFParseGdo_new6M_v_; text: .text%__1cFParseFBlockMadd_new_path6M_i_; -text: .text%__1cLklassItablebFinitialize_itable_for_interface6MpnMklassOopDesc_pnRitableMethodEntry__v_; text: .text%__1cJimmI0OperJnum_edges6kM_I_; text: .text%__1cRmulI_rReg_immNodeMcisc_operand6kM_i_; text: .text%__1cICodeHeapMmax_capacity6kM_L_; @@ -3974,103 +2549,65 @@ text: .text%__1cNobjArrayKlassIallocate6MipnGThread__pnPobjArrayOopDesc__; text: .text%__1cRmulI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cHciKlassGloader6M_pnHoopDesc__; text: .text%__1cIConDNodeGOpcode6kM_i_; -text: .text%__1cNandI_rRegNodeJnum_opnds6kM_I_; text: .text%__1cLRethrowNodeEhash6kM_I_; -text: .text%__1cTC2IAdapterGeneratorSstd_verified_entry6FnMmethodHandle__pC_; text: .text%__1cIDivLNodeGOpcode6kM_i_; -text: .text%__1cNandI_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cGThreadOis_Java_thread6kM_i_; text: .text%__1cSmembar_releaseNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cHMatcherQinline_cache_reg6F_i_; -text: .text%__1cbBconvI2L_reg_reg_reg_zexNodeJnum_opnds6kM_I_; text: .text%__1cbBInterpreterCodeletInterfaceRcode_size_to_size6kMi_i_; text: .text%__1cbBInterpreterCodeletInterfaceKinitialize6MpnEStub_i_v_; text: .text%jni_NewLocalRef: jni.o; text: .text%__1cSSetupItableClosureEdoit6MpnMklassOopDesc_i_v_; -text: .text%__1cLOptoRuntimebAresolve_opt_virtual_call_C6FpnKJavaThread__pC_; text: .text%__1cPstoreImmI16NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLRShiftLNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cIemit_d166FrnKCodeBuffer_i_v_; text: .text%__1cKimmI16OperIconstant6kM_l_; text: .text%__1cPClassFileParserbNparse_classfile_inner_classes_attribute6MnSconstantPoolHandle_nTinstanceKlassHandle_pnGThread__H_; text: .text%__1cMloadConFNodeLbottom_type6kM_pknEType__; -text: .text%__1cENodeMis_CatchProj6kM_pknNCatchProjNode__; text: .text%__1cJCodeCacheNalive_nmethod6FpnICodeBlob__pnHnmethod__; text: .text%__1cJAssemblerGmovzbl6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cIVMThreadMis_VM_thread6kM_i_; -text: .text%__1cPcmovI_reg_lNodeJnum_opnds6kM_I_; text: .text%__1cMloadConLNodeHsize_of6kM_I_; text: .text%__1cOMacroAssemblerSload_unsigned_byte6MpnMRegisterImpl_nHAddress__i_; -text: .text%__1cTconvI2L_reg_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNaddL_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cKstoreFNodeJnum_opnds6kM_I_; text: .text%__1cNaddL_rRegNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cSComputeAdapterInfoJdo_double6M_v_; -text: .text%__1cLimmUL32OperFclone6kM_pnIMachOper__; -text: .text%__1cPloadConUL32NodeFclone6kM_pnENode__; text: .text%__1cLLShiftLNodeJideal_reg6kM_I_; -text: .text%__1cMtlsLoadPNodePoper_input_base6kM_I_; text: .text%__1cPlocal_vsnprintf6FpcLpkcpnR__va_list_element__i_; -text: .text%__1cSComputeAdapterInfoHdo_bool6M_v_; text: .text%jio_vsnprintf; -text: .text%__1cURethrowExceptionNodeGpinned6kM_i_; text: .text%__1cNstoreImmINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIAndLNodeJideal_reg6kM_I_; -text: .text%__1cURethrowExceptionNodeHtwo_adr6kM_I_; text: .text%__1cNDispatchTableJset_entry6MirnKEntryPoint__v_; text: .text%jio_snprintf; text: .text%__1cNSafePointNodeKgrow_stack6MpnIJVMState_I_v_; -text: .text%__1cbBconvI2L_reg_reg_reg_zexNodeErule6kM_I_; text: .text%__1cURethrowExceptionNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRsarL_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cTcompareAndSwapLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%JVM_GetCPMethodModifiers; text: .text%__1cFStateR_sub_Op_SafePoint6MpknENode__v_; -text: .text%__1cSsafePoint_pollNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cOCompilerOraclePshould_break_at6FnMmethodHandle__i_; -text: .text%__1cJloadCNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cQorI_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cPsarI_rReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLRShiftLNodeLbottom_type6kM_pknEType__; -text: .text%__1cKReturnNode2t6MpnENode_2222_v_; text: .text%__1cKReturnNodeJideal_reg6kM_I_; text: .text%__1cNinstanceKlassPadd_implementor6MpnMklassOopDesc__v_; text: .text%__1cRPrivilegedElementKinitialize6MpnMvframeStream_pnHoopDesc_p0pnGThread__v_; text: .text%JVM_DoPrivileged; text: .text%__1cOGenerateOopMapXreplace_all_CTS_matches6MnNCellTypeState_1_v_; -text: .text%__1cNIdealLoopTreeMis_loop_exit6kMpnENode_pnOPhaseIdealLoop__2_; text: .text%__1cPpoll_RelocationEtype6M_nJrelocInfoJrelocType__; text: .text%__1cSsafePoint_pollNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSsafePoint_pollNodeFreloc6kM_i_; text: .text%__1cLStrCompNodeGOpcode6kM_i_; text: .text%__1cJOopMapSet2t6M_v_; -text: .text%__1cKloadUBNodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cNobjArrayKlassOmulti_allocate6MipiipnGThread__pnHoopDesc__; text: .text%__1cKstoreCNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cENodeGOpcode6kM_i_; -text: .text%__1cOLibraryCallKitNtry_to_inline6M_i_; text: .text%__1cNFingerprinterHdo_bool6M_v_; text: .text%__1cOPhaseIdealLoopUsplit_if_with_blocks6MrnJVectorSet_rnKNode_Stack__v_; text: .text%__1cNmethodOopDescbDbuild_interpreter_method_data6FnMmethodHandle_pnGThread__v_; text: .text%__1cQLibraryIntrinsicIgenerate6MpnIJVMState__2_; text: .text%__1cLOopRecorderIoop_size6M_i_; -text: .text%__1cHnmethodOexception_size6kM_i_; -text: .text%__1cHnmethodPscopes_pcs_size6kM_i_; text: .text%__1cYDebugInformationRecorderIpcs_size6M_i_; text: .text%__1cYDebugInformationRecorderJdata_size6M_i_; -text: .text%__1cHnmethodQscopes_data_size6kM_i_; -text: .text%__1cHnmethodJstub_size6kM_i_; text: .text%__1cHnmethodKtotal_size6kM_i_; text: .text%__1cNtestU_regNodeErule6kM_I_; text: .text%__1cJOopMapSetJheap_size6kM_i_; -text: .text%__1cICodeBlobWfix_relocation_at_move6Ml_v_; -text: .text%__1cKCodeBufferJcopy_code6MpnICodeBlob__v_; -text: .text%__1cNRelocIteratorMcreate_index6FpnKCodeBuffer_pnJrelocInfo_4_4_; -text: .text%__1cICodeBlobPallocation_size6FpnKCodeBuffer_ii_I_; text: .text%__1cRAbstractAssemblerOcode_fill_byte6F_i_; -text: .text%__1cICodeBlob2t6MpkcpnKCodeBuffer_iiipnJOopMapSet_i_v_; text: .text%__1cMrdx_RegLOperEtype6kM_pknEType__; -text: .text%__1cKCodeBufferPcopy_relocation6MpnICodeBlob__v_; text: .text%__1cVPatchingRelocIteratorHprepass6M_v_; text: .text%__1cVPatchingRelocIteratorIpostpass6M_v_; text: .text%__1cJOopMapSetHcopy_to6MpC_v_; @@ -4079,16 +2616,13 @@ text: .text%__1cINodeHash2t6Mp0_v_; text: .text%__1cOPhaseTransform2t6Mp0nFPhaseLPhaseNumber__v_; text: .text%__1cJAssemblerDjmp6MnHAddress__v_; text: .text%__1cOJNIHandleBlockRrebuild_free_list6M_v_; -text: .text%__1cSstring_compareNodeZcheck_for_anti_dependence6kM_i_; text: .text%jni_GetObjectArrayElement: jni.o; text: .text%__1cKCompiledICSset_to_monomorphic6MrknOCompiledICInfo__v_; -text: .text%__1cIDivINodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cVCallRuntimeDirectNodeMideal_Opcode6kM_i_; text: .text%__1cICmpDNodeGOpcode6kM_i_; text: .text%__1cPcmovI_reg_gNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateM_sub_Op_AndI6MpknENode__v_; text: .text%__1cHCompilebBregister_library_intrinsics6M_v_; -text: .text%__1cNGrowableArray4CpnNCallGenerator__2t6Mii_v_; text: .text%__1cETypeKInitialize6FpnHCompile__v_; text: .text%__1cYDebugInformationRecorder2t6MpnLOopRecorder__v_; text: .text%__1cOCompileWrapper2t6MpnHCompile__v_; @@ -4110,12 +2644,9 @@ text: .text%__1cXPhaseAggressiveCoalesceGverify6M_v_; text: .text%__1cJStartNodeJideal_reg6kM_I_; text: .text%__1cHMatcher2t6MrnJNode_List__v_; text: .text%__1cFArena2t6ML_v_; -text: .text%__1cIPhaseCFGOschedule_early6MrnJVectorSet_rnJNode_List_rnLBlock_Array__i_; text: .text%__1cWNode_Backward_Iterator2t6MpnENode_rnJVectorSet_rnJNode_List_rnLBlock_Array__v_; text: .text%__1cHMatcherFmatch6M_v_; text: .text%__1cFStateM_sub_Op_Goto6MpknENode__v_; -text: .text%__1cIPhaseCFGNschedule_late6MrnJVectorSet_rnJNode_List_rnNGrowableArray4CI___v_; -text: .text%__1cIPhaseCFGQFind_Inner_Loops6M_v_; text: .text%__1cIPhaseCFGQGlobalCodeMotion6MrnHMatcher_IrnJNode_List__v_; text: .text%__1cIPhaseCFGYEstimate_Block_Frequency6M_v_; text: .text%__1cIPhaseCFGJbuild_cfg6M_I_; @@ -4123,7 +2654,6 @@ text: .text%__1cHCompileICode_Gen6M_v_; text: .text%__1cMPhaseChaitin2t6MIrnIPhaseCFG_rnHMatcher__v_; text: .text%__1cMPhaseChaitinRRegister_Allocate6M_v_; text: .text%__1cMPhaseChaitinGde_ssa6M_v_; -text: .text%__1cMPhaseChaitinbGstretch_base_pointer_live_ranges6MpnMResourceArea__i_; text: .text%__1cNPhaseRegAllocTpd_preallocate_hook6M_v_; text: .text%__1cHMatcherPinit_spill_mask6MpnENode__v_; text: .text%__1cHMatcherTFixup_Save_On_Entry6M_v_; @@ -4136,30 +2666,21 @@ text: .text%__1cIPhaseCFGVschedule_pinned_nodes6MrnJVectorSet__v_; text: .text%__1cHCompileTframe_size_in_words6kM_i_; text: .text%__1cOCompileWrapper2T6M_v_; text: .text%__1cHCompileYinit_scratch_buffer_blob6M_v_; -text: .text%__1cHCompileYinit_scratch_locs_memory6M_v_; text: .text%__1cNPhasePeephole2t6MpnNPhaseRegAlloc_rnIPhaseCFG__v_; -text: .text%__1cJPhaseLive2T6M_v_; -text: .text%__1cNPhasePeephole2T6M_v_; text: .text%__1cHCompileGOutput6M_v_; text: .text%__1cHCompileQShorten_branches6MpnFLabel_ri333_v_; text: .text%__1cHCompileLFill_buffer6M_v_; text: .text%__1cHCompileTFillExceptionTables6MIpI1pnFLabel__v_; text: .text%__1cHCompileRScheduleAndBundle6M_v_; text: .text%__1cOMachPrologNodeFreloc6kM_i_; -text: .text%__1cNtestU_regNodePoper_input_base6kM_I_; -text: .text%__1cWemit_exception_handler6FrnKCodeBuffer__v_; text: .text%__1cWsize_exception_handler6F_I_; text: .text%__1cWImplicitExceptionTableIset_size6MI_v_; text: .text%__1cNPhasePeepholeMdo_transform6M_v_; text: .text%__1cMPhaseChaitinMfixup_spills6M_v_; -text: .text%__1cMPhaseChaitin2T6M_v_; text: .text%__1cNPhaseRegAllocPalloc_node_regs6Mi_v_; -text: .text%__1cKCodeBufferOrelocate_stubs6M_v_; -text: .text%__1cIPhaseCFGLRemoveEmpty6M_v_; text: .text%__1cLdo_liveness6FpnNPhaseRegAlloc_pnIPhaseCFG_pnKBlock_List_ipnFArena_pnEDict__v_: buildOopMap.o; text: .text%__1cHCompileMBuildOopMaps6M_v_; text: .text%__1cMPhaseChaitinbApost_allocate_copy_removal6M_v_; -text: .text%__1cNGrowableArray4CpnJNode_List__2t6Mii_v_; text: .text%__1cRsarL_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cOGenerateOopMapIcopy_cts6MpnNCellTypeState_2_i_; text: .text%__1cFStateM_sub_Op_CmpL6MpknENode__v_; @@ -4167,70 +2688,44 @@ text: .text%__1cJloadSNodeFreloc6kM_i_; text: .text%__1cFStateN_sub_Op_LoadS6MpknENode__v_; text: .text%__1cSInterpreterRuntimeOprofile_method6FpnKJavaThread_pC_i_; text: .text%__1cOCompiledRFrame2t6MnFframe_pnKJavaThread_pnGRFrame__v_; -text: .text%__1cKC2IAdapterOis_c2i_adapter6kM_i_; text: .text%__1cOCompiledRFrameKtop_method6kM_nMmethodHandle__; -text: .text%__1cOCompiledRFrameLis_compiled6kM_i_; -text: .text%__1cRmethodDataOopDescKinitialize6MpnNmethodOopDesc__v_; text: .text%__1cKoopFactoryOnew_methodData6FnMmethodHandle_pnGThread__pnRmethodDataOopDesc__; -text: .text%__1cRmethodDataOopDescbGcompute_allocation_size_in_bytes6FpnNmethodOopDesc__i_; text: .text%__1cPmethodDataKlassIallocate6MnMmethodHandle_pnGThread__pnRmethodDataOopDesc__; text: .text%__1cNxorI_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cRmethodDataOopDescbGcompute_allocation_size_in_words6FpnNmethodOopDesc__i_; text: .text%__1cRmethodDataOopDescPpost_initialize6MpnOBytecodeStream__v_; text: .text%__1cHRetNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateO_sub_Op_Return6MpknENode__v_; text: .text%__1cHRetNodeFreloc6kM_i_; -text: .text%__1cZInterpreterMacroAssemblerNdispatch_base6MnITosState_ppCi_v_; -text: .text%__1cZCallInterpreterDirectNodeHtwo_adr6kM_I_; -text: .text%__1cNloadConP0NodeFclone6kM_pnENode__; -text: .text%__1cOClearArrayNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cKScopeValueJread_from6FpnTDebugInfoReadStream__p0_; text: .text%__1cOcompiledVFrameScreate_stack_value6kMpnKScopeValue__pnKStackValue__; text: .text%__1cQleaPIdxScaleNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRindIndexScaleOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cIGraphKitNallocate_heap6MpnENode_222pknITypeFunc_pC22ipknKTypeOopPtr__2_; -text: .text%__1cPciInstanceKlassbBcompute_shared_has_subklass6M_i_; text: .text%__1cNSignatureInfoHdo_byte6M_v_; -text: .text%__1cQorI_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cKCompiledICSset_ic_destination6MpC_v_; -text: .text%__1cNIdealLoopTreePiteration_split6MpnOPhaseIdealLoop_rnJNode_List__v_; text: .text%__1cNandI_rRegNodeErule6kM_I_; -text: .text%__1cRsarI_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cIMulINodeGadd_id6kM_pknEType__; text: .text%__1cVcompiledICHolderKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cNmodI_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMulINodeImul_ring6kMpknEType_3_3_; text: .text%__1cKloadUBNodeMideal_Opcode6kM_i_; -text: .text%__1cHBitDataKis_BitData6M_i_; text: .text%__1cQsalI_rReg_CLNodeMideal_Opcode6kM_i_; -text: .text%__1cNaddP_rRegNodeJnum_opnds6kM_I_; text: .text%__1cJAssemblerEcmpq6MnHAddress_i_v_; text: .text%__1cNloadConP0NodeFreloc6kM_i_; -text: .text%__1cMLinkResolverYresolve_interface_method6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_43ipnGThread__v_; text: .text%__1cSmembar_acquireNodeLbottom_type6kM_pknEType__; text: .text%__1cOMacroAssemblerKincrementq6MpnMRegisterImpl_i_v_; text: .text%__1cRsarI_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cZInterpreterMacroAssemblerNdispatch_next6MnITosState_i_v_; -text: .text%__1cNGrowableArray4nMmethodHandle__2t6Mii_v_; text: .text%__1cLConvL2INodeJideal_reg6kM_I_; -text: .text%__1cNGrowableArray4nLKlassHandle__2t6Mii_v_; -text: .text%__1cNmethodOopDescThas_native_function6kM_i_; text: .text%JVM_GetClassNameUTF; -text: .text%__1cMPrefetchNodeJideal_reg6kM_I_; -text: .text%__1cKCodeBuffer2t6MpCi_v_; text: .text%__1cNprefetchwNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cFStateQ_sub_Op_Prefetch6MpknENode__v_; text: .text%__1cOjmpLoopEndNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cNprefetchwNodeFreloc6kM_i_; text: .text%__1cIAddLNodeJideal_reg6kM_I_; text: .text%__1cILocation2t6MpnTDebugInfoReadStream__v_; text: .text%__1cKstoreCNodeFreloc6kM_i_; -text: .text%__1cNdecI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cNmethodOopDescWis_vanilla_constructor6kM_i_; text: .text%__1cWCallLeafNoFPDirectNodeKmethod_set6Ml_v_; text: .text%__1cOPhaseIdealLoopOplace_near_use6kMpnENode__2_; text: .text%__1cHi2bNodeMideal_Opcode6kM_i_; -text: .text%__1cNLocationValueLis_location6kM_i_; text: .text%__1cNLocationValue2t6MpnTDebugInfoReadStream__v_; text: .text%__1cIMulLNodeJideal_reg6kM_I_; text: .text%__1cNsubL_rRegNodeHtwo_adr6kM_I_; @@ -4241,33 +2736,22 @@ text: .text%JVM_FindClassFromClass; text: .text%__1cKcmpOpUOperEless6kM_i_; text: .text%__1cVcompiledICHolderKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cVcompiledICHolderKlassToop_adjust_pointers6MpnHoopDesc__i_; -text: .text%__1cKReflectionGinvoke6FnTinstanceKlassHandle_nMmethodHandle_nGHandle_inOobjArrayHandle_nJBasicType_4ipnGThread__pnHoopDesc__; -text: .text%__1cITypeLongFwiden6kMpknEType__3_; -text: .text%__1cQsalI_rReg_CLNodePoper_input_base6kM_I_; text: .text%__1cbIjava_lang_reflect_AccessibleObjectIoverride6FpnHoopDesc__C_; text: .text%__1cKReflectionDbox6FpnGjvalue_nJBasicType_pnGThread__pnHoopDesc__; -text: .text%__1cMLinkResolverbHlinktime_resolve_interface_method6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_43ipnGThread__v_; text: .text%__1cLBoxLockNodeEhash6kM_I_; text: .text%__1cJOopMapSetMgrow_om_data6M_v_; -text: .text%__1cRxorI_rReg_memNodeJnum_opnds6kM_I_; -text: .text%__1cKciTypeFlowFBlockQset_private_copy6Mi_v_; text: .text%__1cWandI_rReg_imm65535NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cWandI_rReg_imm65535NodeErule6kM_I_; text: .text%__1cZInterpreterMacroAssemblerGpush_i6MpnMRegisterImpl__v_; text: .text%__1cNcmovI_regNodeErule6kM_I_; text: .text%__1cRsalL_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNGrowableArray4CpnKInlineTree__Egrow6Mi_v_; -text: .text%__1cSComputeAdapterInfoIdo_short6M_v_; -text: .text%__1cNtestL_regNodeJnum_opnds6kM_I_; text: .text%__1cLConvF2DNodeGOpcode6kM_i_; text: .text%__1cISubLNodeLbottom_type6kM_pknEType__; text: .text%__1cSmembar_acquireNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSmembar_acquireNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNaddP_rRegNodeLbottom_type6kM_pknEType__; text: .text%__1cNmodL_rRegNodeErule6kM_I_; -text: .text%__1cRsalI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerDret6Mi_v_; -text: .text%__1cRshrI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cbDjava_lang_reflect_ConstructorPparameter_types6FpnHoopDesc__2_; text: .text%__1cKReflectionSinvoke_constructor6FpnHoopDesc_nOobjArrayHandle_pnGThread__2_; text: .text%__1cbDjava_lang_reflect_ConstructorFclazz6FpnHoopDesc__2_; @@ -4298,72 +2782,40 @@ text: .text%__1cTtypeArrayKlassKlassOklass_oop_size6kM_i_; text: .text%__1cWconstantPoolCacheKlassOklass_oop_size6kM_i_; text: .text%__1cQconstMethodKlassOklass_oop_size6kM_i_; text: .text%__1cPmethodDataKlassOklass_oop_size6kM_i_; -text: .text%__1cGThreadOis_interrupted6Fp0i_i_; -text: .text%__1cHThreadsHoops_do6FpnKOopClosure__v_; text: .text%__1cJHashtableHoops_do6MpnKOopClosure__v_; text: .text%__1cSsafePoint_pollNodeIpipeline6kM_pknIPipeline__; text: .text%__1cIPSOldGenHcompact6M_v_; -text: .text%__1cSsafePoint_pollNodeJnum_opnds6kM_I_; text: .text%__1cFJNIidHoops_do6MpnKOopClosure__v_; -text: .text%__1cJvmSymbolsHoops_do6FpnKOopClosure_i_v_; text: .text%__1cJHashtableGunlink6MpnRBoolObjectClosure__v_; -text: .text%__1cSReferenceProcessorHoops_do6MpnKOopClosure__v_; text: .text%__1cQObjectStartArrayFreset6M_v_; text: .text%__1cIPSOldGenPadjust_pointers6M_v_; text: .text%__1cScompP_mem_rRegNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cJloadBNodeFreloc6kM_i_; text: .text%__1cUandI_rReg_imm255NodeMideal_Opcode6kM_i_; -text: .text%__1cNGrowableArray4CpnKciTypeFlowFBlock__Icontains6kMrk2_i_; text: .text%__1cScompP_mem_rRegNodeFreloc6kM_i_; -text: .text%__1cNcmovP_regNodePoper_input_base6kM_I_; -text: .text%__1cTno_rax_rdx_RegIOperJnum_edges6kM_I_; text: .text%__1cKciTypeFlowLStateVectorJdo_aaload6MpnQciBytecodeStream__v_; -text: .text%__1cJAssemblerMemit_operand6MpnRFloatRegisterImpl_nHAddress__v_; -text: .text%__1cJAssemblerMemit_operand6MpnRFloatRegisterImpl_pnMRegisterImpl_4nHAddressLScaleFactor_ipCrknQRelocationHolder__v_; text: .text%__1cNaddL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cLRethrowNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cRaddI_rReg_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRsubI_rReg_memNodeHtwo_adr6kM_I_; text: .text%__1cIModLNodeGOpcode6kM_i_; text: .text%__1cIMaxINodeLbottom_type6kM_pknEType__; text: .text%__1cFParseMdo_checkcast6M_v_; text: .text%__1cIMulINodeGmul_id6kM_pknEType__; -text: .text%__1cMloadConINodeGis_Con6kM_I_; text: .text%__1cIregDOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cIMulDNodeGOpcode6kM_i_; text: .text%__1cRsarL_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNsubL_rRegNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cHnmethodUnumber_of_dependents6kM_i_; -text: .text%__1cTconvI2L_reg_memNodeFreloc6kM_i_; -text: .text%__1cSComputeAdapterInfoIdo_float6M_v_; text: .text%__1cFParseLarray_store6MnJBasicType__v_; -text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o; text: .text%JVM_FindClassFromClassLoader; text: .text%JVM_FindClassFromBootLoader; -text: .text%__1cZCallInterpreterDirectNodeSalignment_required6kM_i_; -text: .text%__1cZCallInterpreterDirectNodePoper_input_base6kM_I_; -text: .text%__1cZCallInterpreterDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRmulL_rReg_immNodeMcisc_operand6kM_i_; -text: .text%__1cNloadConI0NodeGis_Con6kM_I_; -text: .text%__1cKstoreBNodeHtwo_adr6kM_I_; -text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc__v_: nativeLookup.o; -text: .text%__1cKRegionNodeUdepends_only_on_test6kM_i_; text: .text%__1cMMergeMemNodeIadr_type6kM_pknHTypePtr__; -text: .text%__1cFciEnvZcall_has_multiple_targets6FpnNinstanceKlass_nMsymbolHandle_3ri_i_; -text: .text%__1cMadjust_check6FpnENode_11iipnMPhaseIterGVN__v_: ifnode.o; -text: .text%__1cPsalI_rReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cTconvI2L_reg_memNodeHtwo_adr6kM_I_; text: .text%__1cLPhaseValuesKis_IterGVN6M_pnMPhaseIterGVN__; text: .text%__1cQciTypeArrayKlassJmake_impl6FnJBasicType__p0_; text: .text%__1cFStateM_sub_Op_AddL6MpknENode__v_; text: .text%__1cQciTypeArrayKlassEmake6FnJBasicType__p0_; -text: .text%__1cUmembar_cpu_orderNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cUmembar_cpu_orderNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNSCMemProjNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cSCompareAndSwapNodeJideal_reg6kM_I_; -text: .text%__1cFStateW_sub_Op_MemBarCPUOrder6MpknENode__v_; text: .text%__1cKciTypeFlowLStateVectorMdo_checkcast6MpnQciBytecodeStream__v_; -text: .text%__1cMorI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMrax_RegIOperKin_RegMask6kMi_pknHRegMask__; text: .text%lwp_mutex_init: os_solaris.o; text: .text%__1cJStubQdDueueGcommit6Mi_v_; @@ -4375,79 +2827,49 @@ text: .text%__1cOGenerateOopMapOdo_monitorexit6Mi_v_; text: .text%__1cOGenerateOopMapLmonitor_pop6M_nNCellTypeState__; text: .text%__1cJAssemblerEmovl6MnHAddress_i_v_; text: .text%__1cKoopFactoryNnew_charArray6FpkcpnGThread__pnQtypeArrayOopDesc__; -text: .text%__1cPshrI_rReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cQjava_lang_StringTcreate_oop_from_str6FpkcpnGThread__pnHoopDesc__; -text: .text%__1cRmulI_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cNandI_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cbACallCompiledJavaDirectNodeHtwo_adr6kM_I_; text: .text%__1cIModINodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cNinstanceKlassVis_same_class_package6MpnHoopDesc_pnNsymbolOopDesc__i_; -text: .text%__1cbLtransform_int_divide_to_long_multiply6FpnIPhaseGVN_pnENode_i_3_: divnode.o; text: .text%__1cTno_rax_rdx_RegIOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cJAssemblerGmovzwl6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cRmulL_rReg_immNodeErule6kM_I_; text: .text%__1cZCallDynamicJavaDirectNodePoper_input_base6kM_I_; -text: .text%__1cHTypePtrFempty6kM_i_; -text: .text%__1cOMacroAssemblerSload_unsigned_word6MpnMRegisterImpl_nHAddress__i_; text: .text%__1cOGenerateOopMapXdo_return_monitor_check6M_v_; -text: .text%__1cNobjArrayKlassQarray_klass_impl6MipnGThread__pnMklassOopDesc__; text: .text%__1cFStateP_sub_Op_ConvL2I6MpknENode__v_; text: .text%__1cLOptoRuntimebBcomplete_monitor_enter_Type6F_pknITypeFunc__; text: .text%__1cIGraphKitMnext_monitor6M_i_; text: .text%__1cLBoxLockNode2t6Mi_v_; -text: .text%__1cRmulI_rReg_immNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cJloadFNodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cIplus_adr6FpnENode_l_1_: generateOptoStub.o; text: .text%__1cIGraphKitLshared_lock6MpnENode__pnMFastLockNode__; -text: .text%__1cHConNode2t6MpknEType__v_; text: .text%__1cMloadConDNodeMideal_Opcode6kM_i_; -text: .text%__1cNCompileBrokerTcreate_compile_task6FpnMCompileQdDueue_inMmethodHandle_i3ipkcii_pnLCompileTask__; -text: .text%__1cLCompileTaskKinitialize6MinMmethodHandle_i1ipkcii_v_; text: .text%__1cNCompileBrokerNallocate_task6F_pnLCompileTask__; text: .text%__1cMCompileQdDueueDadd6MpnLCompileTask__v_; text: .text%__1cRxorI_rReg_memNodeErule6kM_I_; text: .text%__1cMCompileQdDueueDget6M_pnLCompileTask__; text: .text%__1cRsarI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cQleaPIdxScaleNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cSCompileTaskWrapper2t6MpnLCompileTask__v_; text: .text%__1cQjava_lang_ThreadGthread6FpnHoopDesc__pnKJavaThread__; text: .text%__1cXmembar_acquire_lockNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateM_sub_Op_MulL6MpknENode__v_; text: .text%__1cCosPhint_no_preempt6F_v_; text: .text%__1cJAssemblerFtestl6MpnMRegisterImpl_i_v_; -text: .text%__1cObox_handleNodePoper_input_base6kM_I_; text: .text%__1cNCompileBrokerJfree_task6FpnLCompileTask__v_; text: .text%__1cSCompileTaskWrapper2T6M_v_; text: .text%__1cLCompileTaskEfree6M_v_; text: .text%__1cNnegI_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKDictionarybAis_valid_protection_domain6MiInMsymbolHandle_nGHandle_2_i_; text: .text%__1cMincI_memNodeMideal_Opcode6kM_i_; text: .text%__1cRandL_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cRaddI_rReg_memNodeFreloc6kM_i_; text: .text%__1cQjava_lang_StringXcreate_oop_from_unicode6FpHipnGThread__pnHoopDesc__; text: .text%jni_NewString: jni.o; -text: .text%__1cRxorI_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cFStateM_sub_Op_AndL6MpknENode__v_; text: .text%__1cKloadUBNodePoper_input_base6kM_I_; -text: .text%__1cbBconvI2L_reg_reg_reg_zexNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cVcompiledICHolderKlassXoop_is_compiledICHolder6kM_i_; -text: .text%__1cJStoreNodeUdepends_only_on_test6kM_i_; text: .text%__1cPcmovI_reg_lNodeErule6kM_I_; -text: .text%__1cOloadConL32NodePoper_input_base6kM_I_; text: .text%__1cNSharedRuntimebJcontinuation_for_implicit_exception6FpnKJavaThread_pCn0AVImplicitExceptionKind__3_; -text: .text%__1cRtestI_reg_immNodeHtwo_adr6kM_I_; text: .text%__1cIimmDOperJconstantD6kM_d_; text: .text%__1cFParsePmerge_exception6Mi_v_; text: .text%__1cXmembar_acquire_lockNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cNGrowableArray4CpnIciObject__2t6MpnFArena_iirk1_v_; -text: .text%__1cICallInfoDset6MnLKlassHandle_1nMmethodHandle_2pnGThread__v_; -text: .text%__1cZCallDynamicJavaDirectNodeHtwo_adr6kM_I_; -text: .text%__1cMLinkResolverbGruntime_resolve_interface_method6FrnICallInfo_nMmethodHandle_nLKlassHandle_nGHandle_4ipnGThread__v_; -text: .text%__1cMLinkResolverWresolve_interface_call6FrnICallInfo_nGHandle_nLKlassHandle_4nMsymbolHandle_54iipnGThread__v_; text: .text%__1cNGrowableArray4CpnIciObject__JappendAll6Mpk2_v_; -text: .text%__1cFciEnv2t6MpnHJNIEnv__iii_v_; -text: .text%__1cRtestP_reg_memNodeFreloc6kM_i_; -text: .text%__1cNtestP_regNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cNGrowableArray4CpnIciMethod__2t6MpnFArena_iirk1_v_; text: .text%__1cNGrowableArray4CpnHciKlass__2t6MpnFArena_iirk1_v_; text: .text%__1cPciObjectFactory2t6MpnFArena_i_v_; @@ -4461,49 +2883,36 @@ text: .text%__1cKstoreBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cNCompileBrokerUpop_jni_handle_block6F_v_; text: .text%__1cbBopt_virtual_call_RelocationLstatic_stub6M_pC_; text: .text%__1cNinstanceKlassbFlookup_method_in_all_interfaces6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; -text: .text%__1cPcmpFastLockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFStateQ_sub_Op_FastLock6MpknENode__v_; text: .text%__1cXmembar_acquire_lockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTconvD2I_reg_regNodeErule6kM_I_; text: .text%__1cITemplateIbytecode6kM_nJBytecodesECode__; -text: .text%__1cLOptoRuntimeRmultianewarray1_C6FpnMklassOopDesc_ipnKJavaThread__v_; text: .text%__1cWImplicitExceptionTableCat6kMI_I_; text: .text%__1cWImplicitExceptionTable2t6MpknHnmethod__v_; text: .text%__1cLVtableStubsPstub_containing6FpC_pnKVtableStub__; -text: .text%__1cLVtableStubsIcontains6FpC_i_; text: .text%__1cNFingerprinterIdo_float6M_v_; text: .text%__1cHnmethodbJcontinuation_for_implicit_exception6MpC_1_; text: .text%__1cLRShiftLNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cUjmpLoopEnd_shortNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cNmodI_rRegNodeHtwo_adr6kM_I_; text: .text%__1cUjmpLoopEnd_shortNodeMideal_Opcode6kM_i_; text: .text%__1cKEntryPoint2t6MpC11111111_v_; text: .text%jni_GetObjectClass: jni.o; text: .text%__1cRappend_interfaces6FnOobjArrayHandle_ripnPobjArrayOopDesc__v_; -text: .text%__1cRandI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cISubLNodeDsub6kMpknEType_3_3_; text: .text%__1cJloadSNodeIpipeline6kM_pknIPipeline__; text: .text%__1cRtestI_reg_immNodeMideal_Opcode6kM_i_; -text: .text%__1cOloadConL32NodeHtwo_adr6kM_I_; -text: .text%__1cQshrI_rReg_CLNodePoper_input_base6kM_I_; text: .text%__1cSstring_compareNodePoper_input_base6kM_I_; text: .text%__1cNcmovI_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMdecI_memNodeMideal_Opcode6kM_i_; text: .text%__1cMrax_RegLOperEtype6kM_pknEType__; -text: .text%__1cRmulI_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cIXorINodeGadd_id6kM_pknEType__; text: .text%__1cNtestP_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cPcmovI_reg_gNodeHtwo_adr6kM_I_; -text: .text%__1cOPhaseIdealLoopKclone_loop6MpnNIdealLoopTree_rnJNode_List_i_v_; -text: .text%__1cHi2bNodePoper_input_base6kM_I_; -text: .text%__1cRsalL_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cKBinaryNodeGOpcode6kM_i_; text: .text%__1cNxorI_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cFStateO_sub_Op_Binary6MpknENode__v_; text: .text%JVM_GetClassLoader; text: .text%__1cMstoreSSPNodeMideal_Opcode6kM_i_; -text: .text%__1cNmulL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cRxorI_rReg_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cINodeHashIround_up6FI_I_; text: .text%__1cHCompileKinit_start6MpnJStartNode__v_; text: .text%__1cOPhaseTransform2t6MpnFArena_nFPhaseLPhaseNumber__v_; @@ -4511,127 +2920,63 @@ text: .text%__1cLPhaseValues2t6MpnFArena_I_v_; text: .text%__1cRaddP_rReg_immNodeIpipeline6kM_pknIPipeline__; text: .text%__1cINodeHash2t6MpnFArena_I_v_; text: .text%__1cRaddI_rReg_memNodeHtwo_adr6kM_I_; -text: .text%__1cIJVMState2n6FL_pv_; text: .text%__1cOMacroAssemblerFalign6Mi_v_; -text: .text%__1cOleaPIdxOffNodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cFVTuneNregister_stub6FpkcpC3_v_; text: .text%__1cFForteNregister_stub6FpkcpC3_v_; -text: .text%__1cMdecI_memNodeJnum_opnds6kM_I_; -text: .text%__1cIModINodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cMLinkResolverXresolve_invokeinterface6FrnICallInfo_nGHandle_nSconstantPoolHandle_ipnGThread__v_; text: .text%lwp_cond_init: os_solaris.o; text: .text%__1cSmembar_releaseNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSmembar_releaseNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOPhaseIdealLoopVclone_up_backedge_goo6MpnENode_22_2_; text: .text%__1cSInterpreterCodeletKinitialize6MpkcnJBytecodesECode__v_; -text: .text%__1cTconvI2L_reg_regNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cNxorI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNaddP_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cZInterpreterMacroAssemblerZcheck_and_handle_popframe6MpnMRegisterImpl__v_; text: .text%__1cOloadConL32NodeErule6kM_I_; -text: .text%__1cOMacroAssemblerMcall_VM_base6MpnMRegisterImpl_22pCii_v_; -text: .text%__1cFframeVnmethods_code_blob_do6M_v_; text: .text%__1cHi2bNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKcmpOpUOperKless_equal6kM_i_; -text: .text%__1cWandI_rReg_imm65535NodeJnum_opnds6kM_I_; text: .text%__1cFParseTprofile_switch_case6Mi_v_; text: .text%__1cKNativeJumpbEcheck_verified_entry_alignment6FpC1_v_; text: .text%__1cFParseSjump_switch_ranges6MpnENode_pnLSwitchRange_4i_v_; text: .text%__1cFParseOmerge_new_path6Mi_v_; -text: .text%__1cUBytecode_tableswitchGlength6M_i_; text: .text%__1cNandI_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cNmodL_rRegNodePoper_input_base6kM_I_; -text: .text%__1cMloadConLNodeFclone6kM_pnENode__; -text: .text%__1cNtestU_regNodeJnum_opnds6kM_I_; -text: .text%__1cIimmLOperFclone6kM_pnIMachOper__; -text: .text%__1cRandL_rReg_immNodePoper_input_base6kM_I_; text: .text%__1cOleaPIdxOffNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKstoreBNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cMmatch_option6FpknMJavaVMOption_pkcp4_i_: arguments.o; -text: .text%__1cNCompileBrokerTis_not_compile_only6FnMmethodHandle__i_; text: .text%__1cNCompileBrokerRassign_compile_id6FnMmethodHandle_i_I_; -text: .text%__1cNCompileBrokerTis_compile_blocking6FnMmethodHandle_i_i_; text: .text%__1cIMulFNodeGOpcode6kM_i_; -text: .text%__1cNIdealLoopTreeQpolicy_peel_only6kMpnOPhaseIdealLoop__i_; -text: .text%__1cNIdealLoopTreeSpolicy_range_check6kMpnOPhaseIdealLoop__i_; -text: .text%__1cQSystemDictionaryPresolve_or_fail6FnMsymbolHandle_ipnGThread__pnMklassOopDesc__; -text: .text%__1cNIdealLoopTreeMpolicy_align6kMpnOPhaseIdealLoop__i_; -text: .text%__1cNIdealLoopTreeNpolicy_unroll6kMpnOPhaseIdealLoop__i_; text: .text%__1cNtestU_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNCompileBrokerZcompilation_is_prohibited6FnMmethodHandle_i_i_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_; -text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_and_dispatch6MpnITemplate_nITosState__v_; text: .text%__1cITemplateIgenerate6MpnZInterpreterMacroAssembler__v_; -text: .text%__1cKC2CompilerOneeds_adapters6M_i_; -text: .text%__1cLServiceUtilLvisible_oop6FpnHoopDesc__i_; text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_; text: .text%__1cNObjectMonitorGEnterI6MpnGThread__v_; -text: .text%__1cIciMethodJhas_loops6kM_i_; -text: .text%__1cIciMethodVshould_print_assembly6M_i_; -text: .text%__1cOMacroAssemblerOcall_VM_helper6MpnMRegisterImpl_pCii_v_; text: .text%__1cNloadConL0NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cZInterpreterMacroAssemblerMcall_VM_base6MpnMRegisterImpl_22pCii_v_; -text: .text%__1cMincI_memNodeJnum_opnds6kM_I_; -text: .text%__1cNCompileBrokerOcheck_break_at6FnMmethodHandle_iii_i_; text: .text%__1cJAssemblerEcall6MrnFLabel_nJrelocInfoJrelocType__v_; -text: .text%__1cNCompileBrokerQset_last_compile6FpnOCompilerThread_nMmethodHandle_ii_v_; -text: .text%__1cNCompileBrokerbAeager_compile_c2i_adapters6FpnFciEnv_pnIciMethod__v_; -text: .text%__1cNCompileBrokerbAeager_compile_i2c_adapters6FpnFciEnv_pnIciMethod__v_; text: .text%__1cNCompileBrokerZinvoke_compiler_on_method6FpnLCompileTask__v_; text: .text%__1cKC2CompilerOcompile_method6MpnFciEnv_pnIciMethod_i_v_; -text: .text%__1cMstoreSSPNodeHis_Copy6kM_I_; text: .text%__1cQshrI_rReg_CLNodeMideal_Opcode6kM_i_; -text: .text%__1cFciEnvPregister_method6MpnIciMethod_iiiiiipnKCodeBuffer_ipnJOopMapSet_pnVExceptionHandlerTable_pnWImplicitExceptionTable_pnQAbstractCompiler_ii_v_; text: .text%__1cLAccessFlagsRatomic_clear_bits6Mi_v_; -text: .text%__1cIciMethodQbreak_at_execute6M_i_; text: .text%__1cFciEnvbOcheck_for_system_dictionary_modification6MpnIciMethod__v_; -text: .text%__1cFciEnvbUsystem_dictionary_modification_counter_changed6M_i_; text: .text%__1cMelapsedTimerDadd6M0_v_; text: .text%__1cNCompileBrokerScollect_statistics6FpnOCompilerThread_nMelapsedTimer_pnLCompileTask__v_; -text: .text%__1cJStartNodeScalling_convention6kMpnLOptoRegPair_I_v_; text: .text%__1cICodeHeapMinsert_after6MpnJFreeBlock_2_v_; -text: .text%__1cKExceptionsNnew_exception6FpnGThread_nMsymbolHandle_3pnRJavaCallArguments_nGHandle_6_6_; -text: .text%__1cFMutex2t6Mipkci_v_; text: .text%__1cKloadUBNodeErule6kM_I_; text: .text%__1cQsalL_rReg_CLNodeMideal_Opcode6kM_i_; -text: .text%__1cbACallCompiledJavaDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cbACallCompiledJavaDirectNodePoper_input_base6kM_I_; -text: .text%__1cTbasictype2arraycopy6FnJBasicType_i_pC_; -text: .text%__1cOLibraryCallKitQinline_arraycopy6M_i_; text: .text%__1cPstoreImmI16NodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cLOptoRuntimeOarraycopy_Type6F_pknITypeFunc__; -text: .text%__1cFciEnvbFpost_compiled_method_load_event6MpnHnmethod__v_; text: .text%__1cJCodeCacheGcommit6FpnICodeBlob__v_; -text: .text%__1cLPcDescCache2t6M_v_; text: .text%__1cFciEnvVnum_inlined_bytecodes6kM_i_; -text: .text%__1cHnmethodSresolve_JNIHandles6M_v_; text: .text%__1cRmulL_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cVExceptionHandlerTableHcopy_to6MpnHnmethod__v_; text: .text%__1cWImplicitExceptionTableHcopy_to6MpnHnmethod__v_; -text: .text%__1cFVTuneOcreate_nmethod6FpnHnmethod__v_; text: .text%__1cYDebugInformationRecorderHcopy_to6MpnHnmethod__v_; -text: .text%__1cHnmethodLnew_nmethod6FnMmethodHandle_iiiiiipnYDebugInformationRecorder_pnKCodeBuffer_ipnJOopMapSet_pnVExceptionHandlerTable_pnWImplicitExceptionTable_pnQAbstractCompiler__p0_; text: .text%__1cPcmovI_reg_lNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHnmFlagsFclear6M_v_; text: .text%__1cHnmethod2n6FLi_pv_; -text: .text%__1cHnmethod2t6MpnNmethodOopDesc_iiiiiiipnYDebugInformationRecorder_pnKCodeBuffer_ipnJOopMapSet_pnVExceptionHandlerTable_pnWImplicitExceptionTable_pnQAbstractCompiler__v_; -text: .text%__1cNaddI_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cKTypeRawPtrFxdual6kM_pknEType__; text: .text%__1cHnmethodQcopy_scopes_data6MpCi_v_; -text: .text%__1cLOopRecorderHcopy_to6MpnICodeBlob__v_; -text: .text%__1cICodeBlobJcopy_oops6MppnI_jobject_i_v_; -text: .text%__1cFStateN_sub_Op_LoadC6MpknENode__v_; -text: .text%__1cJloadCNodeFreloc6kM_i_; text: .text%__1cFParseQjump_if_fork_int6MpnENode_2nIBoolTestEmask__pnGIfNode__; text: .text%__1cWandI_rReg_imm65535NodeHtwo_adr6kM_I_; -text: .text%__1cNdivL_rRegNodePoper_input_base6kM_I_; -text: .text%__1cNmethodOopDescIset_code6MpnHnmethod__v_; text: .text%__1cINodeHashUremove_useless_nodes6MrnJVectorSet__v_; text: .text%__1cQUnique_Node_ListUremove_useless_nodes6MrnJVectorSet__v_; text: .text%__1cKInlineTreeWbuild_inline_tree_root6F_p0_; -text: .text%__1cHCompile2t6MpnFciEnv_pnKC2Compiler_pnIciMethod_ii_v_; text: .text%__1cHCompileWprint_compile_messages6M_v_; -text: .text%__1cPClassFileParserbGparse_constant_pool_double_entry6MnSconstantPoolHandle_ipnGThread__v_; text: .text%__1cQsalI_rReg_CLNodeErule6kM_I_; text: .text%__1cHCompileRbuild_start_state6MpnJStartNode_pknITypeFunc__pnIJVMState__; text: .text%__1cHCompileVidentify_useful_nodes6MrnQUnique_Node_List__v_; @@ -4641,42 +2986,27 @@ text: .text%__1cHCompileUremove_useless_nodes6MrnQUnique_Node_List__v_; text: .text%__1cSPhaseRemoveUseless2t6MpnIPhaseGVN_pnQUnique_Node_List__v_; text: .text%__1cHCompileLFinish_Warm6M_v_; text: .text%__1cHCompileLInline_Warm6M_i_; -text: .text%__1cPno_rax_RegLOperJnum_edges6kM_I_; text: .text%__1cMPhaseIterGVN2t6MpnIPhaseGVN__v_; -text: .text%__1cJBytecodesDdef6Fn0AECode_pkc33nJBasicType_ii1_v_; text: .text%__1cIciMethodRbuild_method_data6MnMmethodHandle__v_; text: .text%__1cSstring_compareNodeErule6kM_I_; text: .text%__1cbAfinal_graph_reshaping_walk6FrnKNode_Stack_pnENode_rnUFinal_Reshape_Counts__v_: compile.o; -text: .text%__1cHCompileVfinal_graph_reshaping6M_i_; -text: .text%__1cOcompI_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cScompI_rReg_memNodeFreloc6kM_i_; text: .text%__1cJStartNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cNTemplateTableKtransition6FnITosState_1_v_; text: .text%__1cIPhaseCCPJtransform6MpnENode__2_; text: .text%__1cHCompileNreturn_values6MpnIJVMState__v_; -text: .text%__1cbCAbstractInterpreterGeneratorQset_entry_points6MnJBytecodesECode__v_; -text: .text%__1cbCAbstractInterpreterGeneratorWset_short_entry_points6MpnITemplate_rpC44444444_v_; text: .text%__1cMPhaseIterGVN2t6Mp0_v_; text: .text%__1cIPhaseCCP2t6MpnMPhaseIterGVN__v_; -text: .text%__1cIPhaseCCP2T6M_v_; text: .text%__1cIPhaseCCPHanalyze6M_v_; text: .text%__1cIPhaseCCPMdo_transform6M_v_; text: .text%__1cOcompI_rRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNsubL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNloadConPcNodeMideal_Opcode6kM_i_; -text: .text%__1cKExceptionsG_throw6FpnGThread_pkcinGHandle__v_; -text: .text%__1cKExceptionsRspecial_exception6FpnGThread_pkcinGHandle__i_; -text: .text%__1cGThreadVset_pending_exception6MpnHoopDesc_pkci_v_; -text: .text%__1cNandL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cLklassItableUcompute_itable_index6FpnNmethodOopDesc__i_; text: .text%__1cWpoll_return_RelocationEtype6M_nJrelocInfoJrelocType__; text: .text%__1cWConstantPoolCacheEntrySset_interface_call6MnMmethodHandle_i_v_; text: .text%__1cJloadFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cPClassFileParserUverify_constantvalue6MiinSconstantPoolHandle_pnGThread__v_; -text: .text%__1cQsalI_rReg_CLNodeJnum_opnds6kM_I_; -text: .text%__1cIMachNodeJis_MachIf6kM_pknKMachIfNode__; text: .text%__1cPsalL_rReg_1NodeMideal_Opcode6kM_i_; -text: .text%__1cKExceptionsRspecial_exception6FpnGThread_pkcinMsymbolHandle_4_i_; text: .text%__1cQjava_lang_StringScreate_from_symbol6FnMsymbolHandle_pnGThread__nGHandle__; text: .text%__1cOClearArrayNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cHMatcherbDinterpreter_frame_pointer_reg6F_i_; @@ -4684,32 +3014,16 @@ text: .text%__1cQorI_rReg_immNodeErule6kM_I_; text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_53pnGThread__v_; text: .text%__1cSInterpreterRuntimeXthrow_pending_exception6FpnKJavaThread__v_; text: .text%__1cKcmpOpUOperHgreater6kM_i_; -text: .text%__1cNCompileBrokerUcheck_adapter_result6FnMmethodHandle_ippnMBasicAdapter__i_; -text: .text%__1cJloadFNodeJnum_opnds6kM_I_; text: .text%__1cYinternal_word_RelocationEtype6M_nJrelocInfoJrelocType__; -text: .text%__1cSMachC2IEntriesNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cbFunnecessary_membar_volatileNodePoper_input_base6kM_I_; text: .text%__1cRmulI_rReg_immNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cQPSIsAliveClosureLdo_object_b6MpnHoopDesc__i_; -text: .text%__1cTCallInterpreterNodeSis_CallInterpreter6kM_pk0_; -text: .text%__1cZCallInterpreterDirectNodePcompute_padding6kMi_i_; -text: .text%__1cSMachC2IcheckICNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cZInterpreterMacroAssemblerPdispatch_epilog6MnITosState_i_v_; text: .text%__1cZInterpreterMacroAssemblerPdispatch_prolog6MnITosState_i_v_; -text: .text%__1cZCallInterpreterDirectNodeKmethod_set6Ml_v_; -text: .text%__1cXMachCallInterpreterNodePret_addr_offset6M_i_; text: .text%__1cQjava_lang_StringPcreate_from_str6FpkcpnGThread__nGHandle__; -text: .text%__1cLOptoRuntimeInew_Type6F_pknITypeFunc__; text: .text%__1cLBoxLockNodeDcmp6kMrknENode__I_; text: .text%__1cMTailCallNodeGOpcode6kM_i_; text: .text%__1cJChunkPoolMfree_all_but6ML_v_; -text: .text%__1cIGraphKitMnew_instance6MpnPciInstanceKlass__pnENode__; -text: .text%__1cPcmpD_cc_regNodePoper_input_base6kM_I_; text: .text%__1cRsalL_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cLOptoRuntimeSnew_typeArray_Type6F_pknITypeFunc__; -text: .text%__1cObox_handleNodeMideal_Opcode6kM_i_; text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_533pnGThread__v_; -text: .text%__1cIGraphKitJnew_array6MpnENode_nJBasicType_pknEType_pknMTypeKlassPtr__2_; text: .text%__1cNdecL_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cKJavaThreadZsecurity_get_caller_class6Mi_pnMklassOopDesc__; text: .text%__1cZCallDynamicJavaDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -4717,23 +3031,15 @@ text: .text%__1cOemit_d64_reloc6FrnKCodeBuffer_lrknQRelocationHolder_i_v_; text: .text%__1cRtestI_reg_immNodeErule6kM_I_; text: .text%__1cIAddFNodeGOpcode6kM_i_; text: .text%__1cSstring_compareNodeMideal_Opcode6kM_i_; -text: .text%__1cNmethodOopDescWcompute_has_loops_flag6M_i_; -text: .text%__1cKloadUBNodeJnum_opnds6kM_I_; -text: .text%__1cNGrowableArray4CpnHoopDesc__2t6Mii_v_; text: .text%__1cZCallDynamicJavaDirectNodeSalignment_required6kM_i_; -text: .text%__1cXvirtual_call_RelocationJpack_data6M_i_; text: .text%__1cXvirtual_call_RelocationEtype6M_nJrelocInfoJrelocType__; text: .text%__1cQorI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cUParallelScavengeHeapIcapacity6kM_L_; text: .text%__1cJAssemblerEcmpq6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cNnegI_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cYinternal_word_RelocationJpack_data6M_i_; -text: .text%__1cKsplit_once6FpnMPhaseIterGVN_pnENode_333_v_: cfgnode.o; text: .text%__1cQSystemDictionarybAvalidate_protection_domain6FnTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cPDictionaryEntryVadd_protection_domain6MpnHoopDesc__v_; text: .text%__1cbIjava_lang_reflect_AccessibleObjectMset_override6FpnHoopDesc_C_v_; text: .text%__1cRCardTableModRefBSPclear_MemRegion6MnJMemRegion__v_; -text: .text%__1cOleaPIdxOffNodeLbottom_type6kM_pknEType__; text: .text%__1cNdivL_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cFParsebLincrement_and_test_invocation_counter6Mi_v_; text: .text%__1cKDictionaryVadd_protection_domain6MiInTinstanceKlassHandle_nGHandle_2pnGThread__v_; @@ -4742,28 +3048,14 @@ text: .text%__1cFParseRarray_store_check6M_v_; text: .text%__1cNobjArrayKlassWcompute_modifier_flags6kMpnGThread__i_; text: .text%__1cScompL_rReg_immNodeMideal_Opcode6kM_i_; text: .text%__1cTmembar_volatileNodeMideal_Opcode6kM_i_; -text: .text%__1cTCallDynamicJavaNodeSis_CallDynamicJava6kM_pk0_; -text: .text%__1cCosHSolarisFEventEpark6M_v_; -text: .text%__1cIMinINodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cODeoptimizationYtrap_state_is_recompiled6Fi_i_; text: .text%__1cXSignatureHandlerLibraryKinitialize6F_v_; text: .text%__1cXSignatureHandlerLibraryDadd6FnMmethodHandle__v_; text: .text%__1cSInterpreterRuntimeTprepare_native_call6FpnKJavaThread_pnNmethodOopDesc__v_; text: .text%__1cNGrowableArray4CL_Efind6kMrkL_i_; -text: .text%__1cUandI_rReg_imm255NodePoper_input_base6kM_I_; -text: .text%__1cSReferenceProcessorZadd_to_discovered_list_mt6MppnHoopDesc_23_v_; text: .text%__1cSInterpreterRuntimeNquicken_io_cc6FpnKJavaThread__v_; -text: .text%__1cJBytecodesDdef6Fn0AECode_pkc33nJBasicType_ii_v_; text: .text%__1cHOrINodeIadd_ring6kMpknEType_3_3_; -text: .text%__1cNObjectMonitorbAEntryQdDueue_SelectSuccessor6M_pnMObjectWaiter__; -text: .text%__1cNObjectMonitorREntryQdDueue_insert6MpnMObjectWaiter_i_v_; text: .text%__1cSobjArrayKlassKlassXallocate_objArray_klass6MinLKlassHandle_pnGThread__pnMklassOopDesc__; -text: .text%__1cJAssemblerEpopq6MpnMRegisterImpl__v_; text: .text%__1cSobjArrayKlassKlassbCallocate_objArray_klass_impl6FnYobjArrayKlassKlassHandle_inLKlassHandle_pnGThread__pnMklassOopDesc__; -text: .text%__1cISubLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cMTypeKlassPtrRcast_to_exactness6kMi_pknEType__; -text: .text%__1cNloadConI0NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cSComputeAdapterInfoHdo_char6M_v_; text: .text%__1cKPerfMemoryFalloc6FL_pc_; text: .text%__1cIPerfData2T6M_v_; text: .text%__1cIPerfDataMcreate_entry6MnJBasicType_LL_v_; @@ -4772,36 +3064,27 @@ text: .text%__1cPcmovI_reg_gNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorEfrom6F_pnMRegisterImpl__; text: .text%__1cXJNI_ArgumentPusherVaArgHget_int6M_v_; text: .text%__1cIPerfData2t6MnJCounterNS_pkcn0AFUnits_n0ALVariability__v_; -text: .text%__1cPPerfDataManagerIadd_item6FpnIPerfData_i_v_; text: .text%__1cLStrCompNodeKmatch_edge6kMI_I_; text: .text%__1cOjmpLoopEndNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cOjmpLoopEndNodeOis_pc_relative6kM_i_; -text: .text%__1cOjmpLoopEndNodeTmay_be_short_branch6kM_i_; text: .text%jni_ReleaseStringUTFChars: jni.o; text: .text%jni_GetStringUTFChars: jni.o; text: .text%__1cFStateW_sub_Op_CountedLoopEnd6MpknENode__v_; text: .text%__1cNFingerprinterIdo_short6M_v_; -text: .text%__1cOcompU_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cJAssemblerEincq6MpnMRegisterImpl__v_; text: .text%__1cFTypeDEmake6Fd_pk0_; text: .text%__1cScompU_rReg_memNodeFreloc6kM_i_; text: .text%__1cNtestL_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFParseLdo_newarray6MnJBasicType__v_; text: .text%__1cWCallLeafNoFPDirectNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMNativeLookupGlookup6FnMmethodHandle_ripnGThread__pC_; text: .text%__1cWCallLeafNoFPDirectNodeFreloc6kM_i_; -text: .text%__1cSstring_compareNodeJnum_opnds6kM_I_; text: .text%__1cFStateU_sub_Op_CallLeafNoFP6MpknENode__v_; text: .text%JVM_FindLibraryEntry; -text: .text%__1cSObjectSynchronizerHinflate6FpnHoopDesc__pnNObjectMonitor__; text: .text%JVM_GetMethodIxExceptionTableEntry; text: .text%__1cNObjectMonitorHRecycle6M_v_; text: .text%__1cISubLNodeGadd_id6kM_pknEType__; text: .text%__1cNmodI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cHMatcherOc_return_value6Fii_nLOptoRegPair__; text: .text%__1cRxorI_rReg_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMachNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cQsarL_rReg_63NodeMideal_Opcode6kM_i_; text: .text%__1cRmulI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIMachOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cIMachOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; @@ -4810,47 +3093,25 @@ text: .text%__1cNandI_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cIDivINodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cNnegI_rRegNodeHtwo_adr6kM_I_; text: .text%__1cFStateS_sub_Op_ClearArray6MpknENode__v_; -text: .text%__1cRaddL_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cFciEnvWis_dependence_violated6FpnMklassOopDesc_pnNmethodOopDesc__i_; -text: .text%__1cHCompile2t6MpnFciEnv_pnIciMethod_i_v_; text: .text%__1cIXorINodeJideal_reg6kM_I_; text: .text%__1cMrep_stosNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cRtestI_reg_immNodePoper_input_base6kM_I_; -text: .text%__1cKC2CompilerPcompile_adapter6MpnFciEnv_pnIciMethod_i_v_; -text: .text%__1cMrep_stosNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cMAdapterCacheGinsert6MpnLAdapterInfo_pnMBasicAdapter__v_; text: .text%__1cFStateO_sub_Op_StoreL6MpknENode__v_; -text: .text%__1cLAdapterInfoHcopy_to6Mp0_v_; -text: .text%__1cQjava_lang_StringFvalue6FpnHoopDesc__pnQtypeArrayOopDesc__; text: .text%__1cPciObjArrayKlassGloader6M_pnHoopDesc__; text: .text%__1cIMinINodeGadd_id6kM_pknEType__; -text: .text%__1cNdecL_rRegNodePoper_input_base6kM_I_; -text: .text%__1cQjava_lang_StringGoffset6FpnHoopDesc__i_; text: .text%__1cKstoreLNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cGThreadLnmethods_do6M_v_; -text: .text%__1cKmul_hiNodeMideal_Opcode6kM_i_; text: .text%__1cKstoreLNodeFreloc6kM_i_; text: .text%__1cMstoreSSPNodeLbottom_type6kM_pknEType__; text: .text%__1cRsubI_rReg_memNodeFreloc6kM_i_; -text: .text%__1cPsarL_rReg_2NodeMideal_Opcode6kM_i_; text: .text%__1cTconvF2D_reg_memNodeMideal_Opcode6kM_i_; -text: .text%__1cRmulL_rReg_immNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cNmodL_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cRmulL_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cbBconvI2L_reg_reg_reg_zexNodeHtwo_adr6kM_I_; text: .text%__1cSCompiledStaticCallSset_to_interpreted6MnMmethodHandle_pC_v_; text: .text%__1cScompU_rReg_immNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cRInterpreterOopMapIis_empty6M_i_; text: .text%__1cNFingerprinterHdo_char6M_v_; -text: .text%__1cOrepush_if_args6FpnFParse_pnENode_3_v_: parse2.o; text: .text%__1cMloadConDNodeLbottom_type6kM_pknEType__; text: .text%__1cNGrowableArray4CpnHoopDesc__Uclear_and_deallocate6M_v_; -text: .text%__1cMrdx_RegLOperJnum_edges6kM_I_; text: .text%__1cLMachUEPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cZget_mirror_from_signature6FnMmethodHandle_pnPSignatureStream_pnGThread__pnHoopDesc__; text: .text%__1cNGrowableArray4CpnJNode_List__Egrow6Mi_v_; text: .text%__1cMciArrayKlass2t6MnLKlassHandle__v_; -text: .text%__1cNObjectMonitorGenter26MpnGThread__v_; text: .text%__1cKarrayKlassKjava_super6kM_pnMklassOopDesc__; text: .text%__1cIUniverseWupdate_heap_info_at_gc6F_v_; text: .text%__1cJCodeCacheLgc_prologue6F_v_; @@ -4860,12 +3121,8 @@ text: .text%__1cJMarkSweepXfollow_weak_klass_links6F_v_; text: .text%__1cJMarkSweepMadjust_marks6F_v_; text: .text%__1cJMarkSweepNrestore_marks6F_v_; text: .text%__1cHThreadsLgc_epilogue6F_v_; -text: .text%__1cKDictionaryMdo_unloading6MpnRBoolObjectClosure__i_; text: .text%__1cHThreadsLgc_prologue6F_v_; -text: .text%__1cNGrowableArray4CpnFKlass__2t6Mii_v_; -text: .text%__1cQSystemDictionaryMdo_unloading6FpnRBoolObjectClosure__i_; text: .text%__1cQSystemDictionaryPplaceholders_do6FpnKOopClosure__v_; -text: .text%__1cSReferenceProcessorPoops_do_statics6FpnKOopClosure__v_; text: .text%__1cQSystemDictionaryYalways_strong_classes_do6FpnKOopClosure__v_; text: .text%__1cUPSAdaptiveSizePolicyWmajor_collection_begin6M_v_; text: .text%__1cUPSAdaptiveSizePolicyUmajor_collection_end6MLnHGCCauseFCause__v_; @@ -4874,69 +3131,46 @@ text: .text%__1cNGrowableArray4CpnFKlass__Uclear_and_deallocate6M_v_; text: .text%__1cKPSYoungGenHcompact6M_v_; text: .text%__1cKPSYoungGenPadjust_pointers6M_v_; text: .text%__1cKPSYoungGenKprecompact6M_v_; -text: .text%__1cLPSMarkSweepQinvoke_no_policy6Fpii_v_; text: .text%__1cLPSMarkSweepPallocate_stacks6F_v_; text: .text%__1cLPSMarkSweepRdeallocate_stacks6F_v_; -text: .text%__1cLPSMarkSweepRmark_sweep_phase16Fi_v_; text: .text%__1cLPSMarkSweepRmark_sweep_phase26F_v_; text: .text%__1cLPSMarkSweepRmark_sweep_phase36F_v_; text: .text%__1cLPSMarkSweepRmark_sweep_phase46F_v_; text: .text%__1cLPSMarkSweepbAreset_millis_since_last_gc6F_v_; text: .text%__1cUPSMarkSweepDecoratorbHset_destination_decorator_tenured6F_v_; text: .text%__1cUPSMarkSweepDecoratorbIset_destination_decorator_perm_gen6F_v_; -text: .text%__1cNExceptionBlobHoops_do6MpnKOopClosure__v_; text: .text%__1cKDictionaryYalways_strong_classes_do6MpnKOopClosure__v_; -text: .text%__1cQUncommonTrapBlobHoops_do6MpnKOopClosure__v_; -text: .text%__1cSDeoptimizationBlobHoops_do6MpnKOopClosure__v_; text: .text%__1cIPSOldGenKprecompact6M_v_; text: .text%__1cVLoaderConstraintTableYpurge_loader_constraints6MpnRBoolObjectClosure__v_; -text: .text%__1cRCardTableModRefBSEis_a6MnKBarrierSetEName__i_; text: .text%__1cJPSPermGenQcompute_new_size6ML_v_; text: .text%__1cJPSPermGenKprecompact6M_v_; -text: .text%__1cJCodeCacheMdo_unloading6FpnRBoolObjectClosure_pnKOopClosure_i_v_; -text: .text%__1cJCodeCacheHoops_do6FpnKOopClosure__v_; -text: .text%__1cPcmpD_cc_regNodeHtwo_adr6kM_I_; -text: .text%__1cbFunnecessary_membar_volatileNodeHtwo_adr6kM_I_; text: .text%__1cIDivINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cIciSymbolHas_utf86M_pkc_; text: .text%__1cQorI_rReg_memNodePoper_input_base6kM_I_; -text: .text%__1cPfieldDescriptorSlong_initial_value6kM_x_; -text: .text%__1cKJavaThreadLnmethods_do6M_v_; text: .text%__1cCosTnative_java_library6F_pv_; text: .text%__1cSTailCalljmpIndNodePoper_input_base6kM_I_; text: .text%__1cOstackSlotPOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cOstackSlotPOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cScompL_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cNandI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNinstanceKlassKfind_field6kMpnNsymbolOopDesc_2ipnPfieldDescriptor__pnMklassOopDesc__; text: .text%__1cPciObjArrayKlass2t6MnLKlassHandle__v_; text: .text%__1cPstoreImmI16NodeFreloc6kM_i_; text: .text%__1cPstoreImmI16NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cCosYprint_jni_name_prefix_on6FpnMoutputStream_i_v_; -text: .text%__1cVlookup_special_native6Fpc_pC_: nativeLookup.o; text: .text%jni_ReleaseStringCritical: jni.o; -text: .text%__1cMNativeLookupMlookup_style6FnMmethodHandle_pcpkciiripnGThread__pC_; text: .text%__1cCosYprint_jni_name_suffix_on6FpnMoutputStream_i_v_; text: .text%jni_GetStringCritical: jni.o; -text: .text%__1cSInterpreterRuntimeTnmethod_entry_point6FpnKJavaThread_pnNmethodOopDesc_pnHnmethod__pC_; text: .text%__1cIPSOldGenOgen_size_limit6M_L_; -text: .text%__1cTI2CAdapterGeneratorSstd_verified_entry6FnMmethodHandle__pC_; -text: .text%__1cTI2CAdapterGeneratorUgenerate_i2c_adapter6FnMmethodHandle__pnKI2CAdapter__; text: .text%__1cUPSAdaptiveSizePolicybQpromo_increment_with_supplement_aligned_up6ML_L_; -text: .text%__1cHnmethodXinterpreter_entry_point6M_pC_; text: .text%__1cUParallelScavengeHeapOresize_old_gen6ML_v_; text: .text%__1cUPSAdaptiveSizePolicyPpromo_increment6MLI_L_; text: .text%__1cWandI_rReg_imm65535NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIPSOldGenGresize6ML_v_; text: .text%__1cKConv2BNodeGOpcode6kM_i_; -text: .text%__1cObox_handleNodeHtwo_adr6kM_I_; text: .text%__1cKarrayKlassOset_alloc_size6MI_v_; text: .text%__1cKarrayKlassXbase_create_array_klass6FrknKKlass_vtbl_inLKlassHandle_pnGThread__nQarrayKlassHandle__; text: .text%__1cNstoreImmINodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKarrayKlassbBcomplete_create_array_klass6FnQarrayKlassHandle_nLKlassHandle_pnGThread__v_; text: .text%__1cLConvI2FNodeGOpcode6kM_i_; -text: .text%__1cNmethodOopDescVparameter_annotations6kM_pnQtypeArrayOopDesc__; -text: .text%__1cNmethodOopDescLannotations6kM_pnQtypeArrayOopDesc__; text: .text%__1cNcmovI_regNodeHtwo_adr6kM_I_; text: .text%__1cNmethodOopDescbGresolved_checked_exceptions_impl6Fp0pnGThread__nOobjArrayHandle__; text: .text%__1cIGraphKitbKcombine_and_pop_all_exception_states6M_pnNSafePointNode__; @@ -4944,71 +3178,50 @@ text: .text%__1cLRethrowNode2t6MpnENode_22222_v_; text: .text%__1cHCompileSrethrow_exceptions6MpnIJVMState__v_; text: .text%__1cKReflectionTget_parameter_types6FnMmethodHandle_ippnHoopDesc_pnGThread__nOobjArrayHandle__; text: .text%__1cKReflectionTget_exception_types6FnMmethodHandle_pnGThread__nOobjArrayHandle__; -text: .text%__1cNinstanceKlassQmethod_index_for6kMpnNmethodOopDesc_pnGThread__i_; text: .text%__1cJAssemblerEandl6MpnMRegisterImpl_i_v_; text: .text%__1cNmethodOopDescKklass_name6kM_pnNsymbolOopDesc__; text: .text%__1cFStateP_sub_Op_Rethrow6MpknENode__v_; text: .text%__1cQComputeCallStackIdo_array6Mii_v_; -text: .text%__1cQsalL_rReg_CLNodePoper_input_base6kM_I_; text: .text%__1cNdecL_rRegNodeErule6kM_I_; text: .text%__1cLRethrowNodeJideal_reg6kM_I_; -text: .text%__1cMNativeLookupLlookup_base6FnMmethodHandle_ripnGThread__pC_; text: .text%__1cNstoreImmINodeFreloc6kM_i_; text: .text%__1cURethrowExceptionNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMNativeLookupNpure_jni_name6FnMmethodHandle__pc_; text: .text%__1cIPerfLong2t6MnJCounterNS_pkcnIPerfDataFUnits_n0CLVariability__v_; text: .text%__1cURethrowExceptionNodeFreloc6kM_i_; -text: .text%__1cTCompareAndSwapLNode2t6MpnENode_2222_v_; -text: .text%__1cQshrI_rReg_CLNodeJnum_opnds6kM_I_; -text: .text%__1cSCompareAndSwapNode2t6MpnENode_2222_v_; -text: .text%__1cTcompareAndSwapLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTcompareAndSwapLNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cOLibraryCallKitRinline_unsafe_CAS6MnJBasicType__i_; text: .text%__1cIProjNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateX_sub_Op_CompareAndSwapL6MpknENode__v_; text: .text%__1cNSCMemProjNodeJideal_reg6kM_I_; text: .text%__1cTcompareAndSwapLNodeFreloc6kM_i_; text: .text%__1cOGenerateOopMapMmonitor_push6MnNCellTypeState__v_; text: .text%__1cOcompP_rRegNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cPsarI_rReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOGenerateOopMapPdo_monitorenter6Mi_v_; text: .text%__1cMmulD_immNodeMideal_Opcode6kM_i_; -text: .text%__1cPmethodDataKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cMaddF_regNodePoper_input_base6kM_I_; text: .text%__1cPcmpD_cc_regNodeMideal_Opcode6kM_i_; text: .text%__1cJLoadPNodeMstore_Opcode6kM_i_; -text: .text%__1cbACallCompiledJavaDirectNodeKmethod_set6Ml_v_; -text: .text%__1cYMachCallCompiledJavaNodePret_addr_offset6M_i_; text: .text%__1cJCMoveNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cKciTypeFlowLStateVectorEtrap6MpnQciBytecodeStream_pnHciKlass_i_v_; text: .text%__1cIDivLNodeLbottom_type6kM_pknEType__; text: .text%__1cNobjArrayKlassYcompute_secondary_supers6MipnGThread__pnPobjArrayOopDesc__; -text: .text%__1cJloadFNodeHtwo_adr6kM_I_; text: .text%__1cNinstanceKlassYremove_dependent_nmethod6MpnHnmethod__v_; text: .text%__1cOGenerateOopMapTmark_reachable_code6M_v_; -text: .text%__1cNobjArrayKlassZcan_be_primary_super_slow6kM_i_; text: .text%__1cOGenerateOopMapKinterp_all6M_v_; text: .text%__1cOGenerateOopMapYrewrite_refval_conflicts6M_v_; text: .text%__1cOGenerateOopMapRinit_basic_blocks6M_v_; text: .text%__1cOGenerateOopMapYsetup_method_entry_state6M_v_; text: .text%__1cFframeZinterpreter_frame_set_mdx6Ml_v_; text: .text%__1cOGenerateOopMapbAmake_context_uninitialized6M_v_; -text: .text%__1cQorI_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cOGenerateOopMapTmethodsig_to_effect6MpnNsymbolOopDesc_ipnNCellTypeState__i_; text: .text%__1cOGenerateOopMapPinitialize_vars6M_v_; text: .text%__1cNobjArrayKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cOGenerateOopMapKinit_state6M_v_; -text: .text%__1cPClassFileParserbFparse_constant_pool_float_entry6MnSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cRmulL_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cOGenerateOopMapNinitialize_bb6M_v_; text: .text%__1cOGenerateOopMapRdo_interpretation6M_v_; -text: .text%__1cQciBytecodeStreamFtable6MnJBytecodesECode__2_; text: .text%__1cOGenerateOopMap2t6MnMmethodHandle__v_; text: .text%__1cOGenerateOopMapbImark_bbheaders_and_count_gc_points6M_v_; text: .text%__1cOGenerateOopMapLcompute_map6MpnGThread__v_; text: .text%__1cIRetTableRcompute_ret_table6MnMmethodHandle__v_; text: .text%__1cRxorI_rReg_memNodeHtwo_adr6kM_I_; -text: .text%__1cNmulI_rRegNodePoper_input_base6kM_I_; text: .text%__1cFStateM_sub_Op_XorI6MpknENode__v_; text: .text%__1cISubLNodeJideal_reg6kM_I_; text: .text%__1cLStrCompNodeLbottom_type6kM_pknEType__; @@ -5017,16 +3230,11 @@ text: .text%__1cQOopMapCacheEntryRallocate_bit_mask6M_v_; text: .text%__1cQOopMapCacheEntryTdeallocate_bit_mask6M_v_; text: .text%__1cQOopMapCacheEntryEfill6MnMmethodHandle_i_v_; text: .text%__1cRsalL_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPsalL_rReg_1NodePoper_input_base6kM_I_; -text: .text%__1cOstackSlotPOperJnum_edges6kM_I_; text: .text%__1cOPhaseIdealLoopOadd_constraint6MiipnENode_22p23_v_; text: .text%jni_IsAssignableFrom: jni.o; text: .text%__1cOstackSlotPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cFParseWcheck_interpreter_type6MpnENode_pknEType_rpnNSafePointNode__2_; -text: .text%__1cFParseXfetch_interpreter_state6MipknEType_pnENode__5_; -text: .text%__1cObox_handleNodeJnum_opnds6kM_I_; text: .text%__1cNaddP_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cSComputeAdapterInfoHdo_byte6M_v_; text: .text%__1cPPerfDataManagerMcounter_name6Fpkc2_pc_; text: .text%__1cOGenerateOopMapKpp_new_ref6MpnNCellTypeState_i_v_; text: .text%__1cNcmovI_regNodeQuse_cisc_RegMask6M_v_; @@ -5035,152 +3243,84 @@ text: .text%__1cOGenerateOopMapVresult_for_basicblock6Mi_v_; text: .text%__1cTOopMapForCacheEntry2t6MnMmethodHandle_ipnQOopMapCacheEntry__v_; text: .text%__1cPcmpD_cc_immNodeMideal_Opcode6kM_i_; text: .text%__1cTOopMapForCacheEntryLcompute_map6MpnGThread__v_; -text: .text%__1cTOopMapForCacheEntryOreport_results6kM_i_; text: .text%__1cTconvF2D_reg_memNodePoper_input_base6kM_I_; text: .text%__1cNdivL_rRegNodeErule6kM_I_; text: .text%__1cRmulL_rReg_immNodeQuse_cisc_RegMask6M_v_; text: .text%JVM_GetCallerClass; text: .text%__1cQsalL_rReg_CLNodeErule6kM_I_; text: .text%__1cJloadLNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cNloadConP0NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cXMachCallDynamicJavaNodePret_addr_offset6M_i_; text: .text%__1cRxorI_rReg_immNodeErule6kM_I_; text: .text%__1cZCallDynamicJavaDirectNodePcompute_padding6kMi_i_; -text: .text%__1cFParseScreate_jump_tables6MpnENode_pnLSwitchRange_4_i_; text: .text%__1cZCallDynamicJavaDirectNodeKmethod_set6Ml_v_; text: .text%__1cPcmovI_reg_lNodeHtwo_adr6kM_I_; text: .text%__1cLConvD2INodeGOpcode6kM_i_; text: .text%__1cNcmovP_regNodeMideal_Opcode6kM_i_; text: .text%__1cTconvI2F_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cKstorePNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cWPredictedCallGeneratorJis_inline6kM_i_; -text: .text%__1cUjmpLoopEnd_shortNodeJis_Branch6kM_I_; text: .text%__1cQorI_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cSInterpreterRuntimeOmultianewarray6FpnKJavaThread_pi_v_; text: .text%__1cUjmpLoopEnd_shortNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cFParseSjump_if_false_fork6MpnGIfNode_ii_v_; -text: .text%__1cbFloadConL_0x6666666666666667NodeMideal_Opcode6kM_i_; text: .text%__1cJAssemblerEshll6MpnMRegisterImpl_i_v_; -text: .text%__1cOjmpLoopEndNodeUshort_branch_version6M_pnIMachNode__; text: .text%__1cUjmpLoopEnd_shortNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPCountedLoopNodeGstride6kM_pnENode__; -text: .text%__1cHi2bNodeJnum_opnds6kM_I_; text: .text%__1cHTypeAryFxdual6kM_pknEType__; text: .text%__1cOMacroAssemblerKverify_oop6MpnMRegisterImpl_pkc_v_; -text: .text%__1cKstoreFNodeHtwo_adr6kM_I_; text: .text%__1cNnegI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLencode_copy6FrnKCodeBuffer_ii_v_; -text: .text%__1cbBconvI2L_reg_reg_reg_zexNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cTconvI2F_reg_regNodePoper_input_base6kM_I_; -text: .text%__1cUCallNativeDirectNodeMideal_Opcode6kM_i_; -text: .text%__1cKmul_hiNodePoper_input_base6kM_I_; -text: .text%__1cKExceptionsNnew_exception6FpnGThread_nMsymbolHandle_pkcnGHandle_6_6_; text: .text%__1cPcmpD_cc_regNodeMcisc_operand6kM_i_; text: .text%__1cPICStubInterfaceKinitialize6MpnEStub_i_v_; text: .text%__1cPICStubInterfaceRcode_size_to_size6kMi_i_; text: .text%__1cPcmpD_cc_regNodeErule6kM_I_; text: .text%__1cNtestU_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cOPSPromotionLABRunallocate_object6MpnHoopDesc__i_; -text: .text%__1cPcmpD_cc_immNodeHtwo_adr6kM_I_; -text: .text%__1cOPhaseIdealLoopJdo_unroll6MpnNIdealLoopTree_rnJNode_List_i_v_; text: .text%__1cRandL_rReg_immNodeErule6kM_I_; -text: .text%__1cNloadConP0NodeGis_Con6kM_I_; text: .text%__1cIMulINodeKmul_opcode6kM_i_; -text: .text%__1cNdivL_rRegNodeJnum_opnds6kM_I_; text: .text%__1cIMulINodeKadd_opcode6kM_i_; text: .text%__1cRxorI_rReg_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cPregister_native6FnLKlassHandle_nMsymbolHandle_1pCpnGThread__i_: jni.o; text: .text%__1cTno_rax_rdx_RegLOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cOtypeArrayKlassOmulti_allocate6MipiipnGThread__pnHoopDesc__; -text: .text%__1cTno_rax_rdx_RegLOperJnum_edges6kM_I_; -text: .text%__1cOCallNativeNodeGOpcode6kM_i_; text: .text%__1cQsalI_rReg_CLNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSobjArrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cJAssemblerDjmp6MpCnJrelocInfoJrelocType__v_; text: .text%__1cLRShiftLNodeJideal_reg6kM_I_; text: .text%jni_SetBooleanField: jni.o; text: .text%__1cVLoaderConstraintTableWfind_constrained_klass6MnMsymbolHandle_nGHandle__pnMklassOopDesc__; text: .text%__1cIModLNodeLbottom_type6kM_pknEType__; text: .text%__1cRxorI_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cHMonitor2t6Mipkci_v_; -text: .text%__1cGHandle2t6MpnGThread_pnHoopDesc__v_; text: .text%__1cQorI_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cODeoptimizationVtrap_state_has_reason6Fii_i_; text: .text%__1cOloadConL32NodeMideal_Opcode6kM_i_; text: .text%__1cNGrowableArray4Cpv_Egrow6Mi_v_; text: .text%jni_GetFieldID: jni.o; text: .text%__1cNGrowableArray4Cl_Egrow6Mi_v_; -text: .text%__1cXjava_lang_ref_ReferenceOset_discovered6FpnHoopDesc_2_v_; text: .text%__1cLResourceObj2n6FLn0APallocation_type__pv_; text: .text%__1cFframeZinterpreter_frame_set_mdp6MpC_v_; -text: .text%__1cJLoadPNodeUdepends_only_on_test6kM_i_; text: .text%__1cFBlockNset_next_call6MpnENode_rnJVectorSet_rnLBlock_Array__v_; text: .text%__1cIciObject2t6MpnHciKlass__v_; text: .text%__1cScompL_rReg_immNodeErule6kM_I_; text: .text%__1cQshrI_rReg_CLNodeErule6kM_I_; -text: .text%__1cNaddL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFStateT_sub_Op_ThreadLocal6MpknENode__v_; -text: .text%__1cVCallRuntimeDirectNodeHtwo_adr6kM_I_; -text: .text%__1cKciTypeFlowOsplit_range_at6Mi_pn0AFRange__; -text: .text%__1cQSystemDictionaryTresolve_from_stream6FnMsymbolHandle_nGHandle_2pnPClassFileStream_pnGThread__pnMklassOopDesc__; -text: .text%__1cXjvm_define_class_common6FpnHJNIEnv__pkcpnI_jobject_pkWi53pnGThread__pnH_jclass__: jvm.o; text: .text%__1cKExceptionsK_throw_msg6FpnGThread_pkcipnNsymbolOopDesc_4_v_; text: .text%__1cKExceptionsK_throw_msg6FpnGThread_pkcinMsymbolHandle_4nGHandle_6_v_; -text: .text%__1cMmulD_immNodePoper_input_base6kM_I_; text: .text%__1cRInlineCacheBufferRic_stub_code_size6F_i_; text: .text%__1cMmulF_immNodeMideal_Opcode6kM_i_; -text: .text%__1cNGrowableArray4CpnKStackValue__2t6Mii_v_; -text: .text%__1cZInterpreterMacroAssemblerbAget_cache_and_index_at_bcp6MpnMRegisterImpl_2i_v_; text: .text%__1cRandL_rReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMloadConFNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cOMacroAssemblerHcall_VM6MpnMRegisterImpl_pCi_v_; text: .text%__1cUandI_rReg_imm255NodeErule6kM_I_; text: .text%__1cRmulL_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNcmovI_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNloadConL0NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPsarL_rReg_2NodePoper_input_base6kM_I_; -text: .text%__1cJAssemblerGpushaq6M_v_; text: .text%__1cOMethodLivenessKBasicBlockFsplit6Mi_p1_; text: .text%__1cFStateP_sub_Op_RShiftL6MpknENode__v_; -text: .text%__1cMrsi_RegPOperJnum_edges6kM_I_; -text: .text%__1cMstoreSSPNodePoper_input_base6kM_I_; -text: .text%__1cScompL_rReg_immNodePoper_input_base6kM_I_; -text: .text%__1cKCodeBufferWinsert_double_constant6Md_pC_; text: .text%__1cPClassFileParserbJparse_classfile_signature_attribute6MnSconstantPoolHandle_nTinstanceKlassHandle_pnGThread__v_; text: .text%__1cNaddP_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFParseHdo_irem6M_v_; -text: .text%__1cRsarL_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerEsubl6MpnMRegisterImpl_2_v_; -text: .text%__1cHi2bNodeHtwo_adr6kM_I_; text: .text%__1cPClassFileParserbBcheck_illegal_static_method6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cJAssemblerFmovsd6MnHAddress_pnRFloatRegisterImpl__v_; -text: .text%__1cTCallInterpreterNodeScalling_convention6kMpnLOptoRegPair_I_v_; -text: .text%__1cXMachCallInterpreterNodeWis_MachCallInterpreter6M_p0_; -text: .text%__1cFStateX_sub_Op_CallInterpreter6MpknENode__v_; -text: .text%__1cZCallInterpreterDirectNodeFreloc6kM_i_; -text: .text%__1cMStartC2INodeScalling_convention6kMpnLOptoRegPair_I_v_; text: .text%__1cZInterpreterMacroAssemblerYtest_method_data_pointer6MpnMRegisterImpl_rnFLabel__v_; -text: .text%__1cMStartC2INodeKc2i_domain6FpknJTypeTuple__3_; -text: .text%__1cHCompilebMGenerate_Compiled_To_Interpreter_Graph6MpknITypeFunc_pC_v_; -text: .text%__1cZCallInterpreterDirectNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cFciEnvUregister_c2i_adapter6MpnIciMethod_pnJOopMapSet_pnKCodeBuffer_ii_v_; -text: .text%__1cSMachC2IcheckICNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cSMachC2IEntriesNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRtestI_reg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cHMatcherbAinterpreter_method_oop_reg6F_i_; -text: .text%__1cHMatcherXcompiler_method_oop_reg6F_i_; text: .text%__1cIciMethodRinterpreter_entry6M_pC_; text: .text%__1cSTailCalljmpIndNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPcmpD_cc_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cSTailCalljmpIndNodeGpinned6kM_i_; -text: .text%__1cSTailCalljmpIndNodeHtwo_adr6kM_I_; text: .text%jni_SetByteArrayRegion: jni.o; -text: .text%__1cHBoxNodeGOpcode6kM_i_; -text: .text%__1cPcmpD_cc_regNodeJnum_opnds6kM_I_; -text: .text%__1cKC2IAdapter2t6MpnKCodeBuffer_iIpnJOopMapSet_i_v_; -text: .text%__1cKC2IAdapterPnew_c2i_adapter6FpnKCodeBuffer_IpnJOopMapSet_i_p0_; -text: .text%__1cKC2IAdapter2n6FLI_pv_; -text: .text%__1cJAssemblerFmovss6MnHAddress_pnRFloatRegisterImpl__v_; text: .text%__1cIMulINodeJideal_reg6kM_I_; text: .text%__1cKCMovePNodeGOpcode6kM_i_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pF_vc_v_; @@ -5189,15 +3329,11 @@ text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorLpass_object6M_v_; text: .text%__1cHciKlass2t6MpnIciSymbol_p0_v_; text: .text%__1cFParseTjump_if_always_fork6Mii_v_; text: .text%__1cKloadUBNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMmulF_immNodePoper_input_base6kM_I_; -text: .text%__1cPcmpD_cc_immNodePoper_input_base6kM_I_; text: .text%__1cUciInstanceKlassKlassEmake6F_p0_; text: .text%__1cJAssemblerDhlt6M_v_; text: .text%__1cOMacroAssemblerEstop6Mpkc_v_; text: .text%__1cQComputeCallStackIdo_float6M_v_; -text: .text%__1cIciObjectUis_array_klass_klass6M_i_; text: .text%__1cKciTypeFlowLStateVectorLdo_newarray6MpnQciBytecodeStream__v_; -text: .text%__1cWResolveOopMapConflictsRpossible_gc_point6MpnOBytecodeStream__i_; text: .text%__1cJloadFNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPcmovI_reg_lNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIciSymbolHbyte_at6Mi_i_; @@ -5205,15 +3341,9 @@ text: .text%__1cNFingerprinterHdo_byte6M_v_; text: .text%__1cENode2t6Mp0111111_v_; text: .text%__1cIMaxINodeGadd_id6kM_pknEType__; text: .text%__1cRCardTableModRefBSFclear6MnJMemRegion__v_; -text: .text%__1cOMacroAssemblerHcall_VM6MpnMRegisterImpl_pC2i_v_; text: .text%__1cKExceptionsL_throw_args6FpnGThread_pkcinMsymbolHandle_5pnRJavaCallArguments__v_; text: .text%__1cMmulD_immNodeErule6kM_I_; -text: .text%__1cMnegD_regNodePoper_input_base6kM_I_; -text: .text%__1cFframeVshould_be_deoptimized6kM_i_; text: .text%__1cMaddF_regNodeMideal_Opcode6kM_i_; -text: .text%__1cbDjava_lang_reflect_ConstructorThas_signature_field6F_i_; -text: .text%__1cbDjava_lang_reflect_ConstructorVhas_annotations_field6F_i_; -text: .text%__1cbDjava_lang_reflect_ConstructorbFhas_parameter_annotations_field6F_i_; text: .text%__1cbDjava_lang_reflect_ConstructorIset_slot6FpnHoopDesc_i_v_; text: .text%__1cKReflectionPnew_constructor6FnMmethodHandle_pnGThread__pnHoopDesc__; text: .text%__1cbDjava_lang_reflect_ConstructorPset_annotations6FpnHoopDesc_2_v_; @@ -5226,61 +3356,35 @@ text: .text%__1cbDjava_lang_reflect_ConstructorTset_parameter_types6FpnHoopDesc_ text: .text%__1cPciInstanceKlassYprotection_domain_handle6M_pnI_jobject__; text: .text%__1cbDjava_lang_reflect_ConstructorJset_clazz6FpnHoopDesc_2_v_; text: .text%__1cbDjava_lang_reflect_ConstructorGcreate6FpnGThread__nGHandle__; -text: .text%__1cKmul_hiNodeJnum_opnds6kM_I_; text: .text%__1cKstoreFNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKstoreBNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRxorI_rReg_immNodeHtwo_adr6kM_I_; -text: .text%__1cNsubI_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cJAssemblerExorl6MpnMRegisterImpl_2_v_; -text: .text%__1cHMatcherXinterpreter_arg_ptr_reg6F_i_; text: .text%__1cINegDNodeGOpcode6kM_i_; text: .text%__1cNdecL_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cPjava_lang_ClassQprimitive_mirror6FnJBasicType__pnHoopDesc__; -text: .text%__1cRsarI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_; -text: .text%__1cNcmovP_regNodeJnum_opnds6kM_I_; text: .text%__1cSCompiledStaticCallNcompute_entry6FnMmethodHandle_rnOStaticCallInfo__v_; text: .text%__1cMloadConDNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cLOptoRuntimeVresolve_static_call_C6FpnKJavaThread__pC_; -text: .text%__1cSCompiledStaticCallIis_clean6kM_i_; text: .text%__1cMrsi_RegPOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cTAbstractInterpreterLdeopt_entry6FnITosState_i_pC_; text: .text%__1cRindIndexScaleOperNconstant_disp6kM_i_; -text: .text%__1cQorI_rReg_memNodeJnum_opnds6kM_I_; -text: .text%__1cRtestI_reg_immNodeJnum_opnds6kM_I_; text: .text%jni_NewStringUTF: jni.o; text: .text%__1cTAbstractInterpreterSBasicType_as_index6FnJBasicType__i_; text: .text%__1cNtestI_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cZInterpreterMacroAssemblerGpush_l6MpnMRegisterImpl__v_; -text: .text%__1cRxorI_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cZInterpreterMacroAssemblerFpop_i6MpnMRegisterImpl__v_; -text: .text%__1cZInterpreterMacroAssemblerGpush_d6MpnRFloatRegisterImpl__v_; -text: .text%__1cObox_handleNodeErule6kM_I_; text: .text%__1cZInterpreterMacroAssemblerIpush_ptr6MpnMRegisterImpl__v_; -text: .text%__1cZInterpreterMacroAssemblerGpush_f6MpnRFloatRegisterImpl__v_; text: .text%__1cOleaPIdxOffNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cQsarL_rReg_63NodePoper_input_base6kM_I_; text: .text%__1cSCompiledStaticCallDset6MrknOStaticCallInfo__v_; text: .text%__1cJAssemblerEcmpl6MpnMRegisterImpl_i_v_; -text: .text%__1cHCompileRmake_vm_intrinsic6MpnIciMethod_i_pnNCallGenerator__; text: .text%__1cNmulI_rRegNodeErule6kM_I_; -text: .text%__1cNGrowableArray4Ci_2t6Mii_v_; -text: .text%__1cQsalL_rReg_CLNodeJnum_opnds6kM_I_; text: .text%__1cNGrowableArray4Ci_Uclear_and_deallocate6M_v_; -text: .text%__1cPCountedLoopNode2t6MpnENode_2_v_; -text: .text%__1cSCountedLoopEndNode2t6MpnENode_2ff_v_; text: .text%__1cJloadDNodeMideal_Opcode6kM_i_; text: .text%__1cENodeIpipeline6kM_pknIPipeline__; text: .text%__1cIDivLNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cMmulD_regNodePoper_input_base6kM_I_; -text: .text%__1cTconvF2D_reg_memNodeJnum_opnds6kM_I_; text: .text%__1cIModINodeJideal_reg6kM_I_; text: .text%__1cYinternal_word_RelocationGtarget6M_pC_; -text: .text%__1cObox_handleNodeLbottom_type6kM_pknEType__; -text: .text%__1cbDreorder_based_on_method_index6FpnPobjArrayOopDesc_1ppnHoopDesc__v_: methodOop.o; text: .text%__1cPshrL_rReg_1NodeMideal_Opcode6kM_i_; -text: .text%__1cUverify_byte_codes_fn6F_pv_: verifier.o; -text: .text%__1cMLinkResolverbPlinktime_resolve_interface_method_or_null6FnLKlassHandle_nMsymbolHandle_21i_nMmethodHandle__; text: .text%JVM_GetClassCPTypes; text: .text%__1cQComputeCallStackHdo_byte6M_v_; text: .text%JVM_GetClassCPEntriesCount; @@ -5291,19 +3395,14 @@ text: .text%__1cJloadBNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKmul_hiNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJAssemblerEnegq6MpnMRegisterImpl__v_; text: .text%__1cNmodL_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKloadUBNodeHtwo_adr6kM_I_; -text: .text%__1cRxorI_rReg_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cVCallRuntimeDirectNodePoper_input_base6kM_I_; text: .text%__1cSstring_compareNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cPPerfDataManagerUcreate_long_variable6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnQPerfLongVariable__; -text: .text%__1cNsubL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOjmpLoopEndNodeGnegate6M_v_; text: .text%__1cQorI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVCallRuntimeDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPsalL_rReg_1NodeErule6kM_I_; text: .text%__1cPcmpD_cc_immNodeErule6kM_I_; text: .text%__1cJAssemblerFtestl6MpnMRegisterImpl_2_v_; -text: .text%__1cbCAbstractInterpreterGeneratorVset_vtos_entry_points6MpnITemplate_rpC44444444_v_; text: .text%__1cHCompileQgrow_alias_types6M_v_; text: .text%__1cUandI_rReg_imm255NodeLout_RegMask6kM_rknHRegMask__; text: .text%jni_CallIntMethod: jni.o; @@ -5311,74 +3410,42 @@ text: .text%__1cNSharedRuntimeSfind_callee_method6FpnKJavaThread_pnGThread__nMme text: .text%__1cPno_rax_RegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cMrdx_RegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cNmulI_rRegNodeMcisc_operand6kM_i_; -text: .text%__1cNxorI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTconvF2D_reg_memNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cIUniverseWreinitialize_vtable_of6FpnFKlass_pnGThread__v_; text: .text%__1cJLoadINodeMstore_Opcode6kM_i_; text: .text%__1cNSharedRuntimeTreresolve_call_site6FpnKJavaThread_pnGThread__nMmethodHandle__; text: .text%__1cbFunnecessary_membar_volatileNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cENodeEgetd6kM_d_; text: .text%__1cICmpFNodeGOpcode6kM_i_; -text: .text%__1cLOptoRuntimeThandle_wrong_method6FpnKJavaThread__pC_; text: .text%__1cNGrowableArray4CpnOMethodLivenessKBasicBlock__Egrow6Mi_v_; text: .text%__1cKstoreFNodeOmemory_operand6kM_pknIMachOper__; text: .text%JVM_SetClassSigners; text: .text%__1cNdivL_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cScompI_rReg_immNodeIpipeline6kM_pknIPipeline__; text: .text%__1cZCallDynamicJavaDirectNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cRandL_rReg_immNodeJnum_opnds6kM_I_; text: .text%__1cOstackSlotPOperFscale6kM_i_; -text: .text%__1cHnmethodPis_dependent_on6MpnMklassOopDesc__i_; -text: .text%__1cMdecI_memNodeHtwo_adr6kM_I_; -text: .text%__1cSalign_to_page_size6FL_L_: heap.o; text: .text%__1cNmulI_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cOstackSlotPOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cPsarL_rReg_2NodeErule6kM_I_; text: .text%__1cOPhaseIdealLoopUpeeled_dom_test_elim6MpnNIdealLoopTree_rnJNode_List__v_; text: .text%jni_NewByteArray: jni.o; text: .text%__1cYinternal_word_RelocationFvalue6M_pC_; -text: .text%__1cYinternal_word_RelocationWfix_relocation_at_move6Ml_v_; text: .text%__1cFStateM_sub_Op_SubL6MpknENode__v_; text: .text%__1cJAssemblerSemit_arith_operand6MipnMRegisterImpl_nHAddress_i_v_; text: .text%__1cJAssemblerEcmpl6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cMaddF_regNodeMcisc_operand6kM_i_; -text: .text%__1cRsubI_rReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cNloadConPcNodeHtwo_adr6kM_I_; -text: .text%__1cbCAbstractInterpreterGeneratorYgenerate_deopt_entry_for6MnITosState_i_pC_; -text: .text%__1cKLoadPCNodeGOpcode6kM_i_; -text: .text%__1cTconvI2F_reg_regNodeMcisc_operand6kM_i_; text: .text%__1cOstackSlotPOperEtype6kM_pknEType__; -text: .text%__1cbCAbstractInterpreterGeneratorZgenerate_return_entry_for6MnITosState_i_pC_; text: .text%__1cTconvD2I_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cMstoreSSPNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNGrowableArray4Ci_Icontains6kMrki_i_; text: .text%__1cKstoreBNodeFreloc6kM_i_; -text: .text%__1cObox_handleNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMjniIdPrivateGid_for6FnTinstanceKlassHandle_i_l_; -text: .text%__1cNget_method_id6FpnHJNIEnv__pnH_jclass_pkc5ipnGThread__pnK_jmethodID__: jni.o; text: .text%__1cQshrI_rReg_CLNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQjava_lang_SystemTout_offset_in_bytes6F_i_; -text: .text%__1cMjniIdSupportNto_jmethod_id6FpnNmethodOopDesc__pnK_jmethodID__; text: .text%__1cNmethodOopDescKjmethod_id6M_pnK_jmethodID__; text: .text%__1cQjava_lang_SystemSin_offset_in_bytes6F_i_; text: .text%__1cRandL_rReg_immNodeHtwo_adr6kM_I_; text: .text%__1cJAssemblerEmovl6MpnMRegisterImpl_2_v_; -text: .text%__1cbACallCompiledJavaDirectNodeFreloc6kM_i_; text: .text%__1cIAddFNodeLbottom_type6kM_pknEType__; -text: .text%__1cUCallCompiledJavaNodeScalling_convention6kMpnLOptoRegPair_I_v_; -text: .text%__1cFStateY_sub_Op_CallCompiledJava6MpknENode__v_; -text: .text%__1cFciEnvUregister_i2c_adapter6MpnIciMethod_pnJOopMapSet_pnKCodeBuffer_i_v_; -text: .text%__1cbACallCompiledJavaDirectNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cMStartI2CNodeScalling_convention6kMpnLOptoRegPair_I_v_; -text: .text%__1cHCompilebMGenerate_Interpreter_To_Compiled_Graph6MpknITypeFunc__v_; text: .text%__1cPciObjectFactoryPinsert_non_perm6Mrpn0ANNonPermObject_pnHoopDesc_pnIciObject__v_; -text: .text%__1cKI2CAdapter2n6FLI_pv_; -text: .text%__1cKCodeBufferVinsert_float_constant6Mf_pC_; -text: .text%__1cbACallCompiledJavaDirectNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKI2CAdapterPnew_i2c_adapter6FpnKCodeBuffer_pnJOopMapSet_i_p0_; text: .text%__1cKmul_hiNodeErule6kM_I_; -text: .text%__1cKI2CAdapter2t6MpnKCodeBuffer_pnJOopMapSet_ii_v_; -text: .text%__1cbBinitialize_itable_for_klass6FpnMklassOopDesc__v_; text: .text%__1cFJNIidEfind6Mi_p0_; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4nGHandle_5pnGThread__v_; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorIgenerate6ML_v_; @@ -5388,69 +3455,40 @@ text: .text%__1cXSignatureHandlerLibraryLset_handler6FpnKCodeBuffer__pC_; text: .text%JVM_IsPrimitiveClass; text: .text%__1cIDivDNodeGOpcode6kM_i_; text: .text%__1cMnegD_regNodeMideal_Opcode6kM_i_; -text: .text%__1cJCMoveNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cPciObjArrayKlassJmake_impl6FpnHciKlass__p0_; -text: .text%__1cQjava_lang_ThreadJis_daemon6FpnHoopDesc__i_; text: .text%__1cJAssemblerEcmpl6MnHAddress_i_v_; text: .text%__1cHi2bNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLimmI_24OperJnum_edges6kM_I_; text: .text%__1cRxorI_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cFTypeDJsingleton6kM_i_; text: .text%__1cPsalI_rReg_1NodeIpipeline6kM_pknIPipeline__; text: .text%__1cIModLNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cUPipeline_Use_Element2t6MIIIinXPipeline_Use_Cycle_Mask__v_; -text: .text%__1cTmembar_volatileNodePoper_input_base6kM_I_; -text: .text%__1cNloadConPcNodePoper_input_base6kM_I_; text: .text%__1cXPipeline_Use_Cycle_Mask2t6MI_v_; text: .text%__1cKCompiledICMset_to_clean6M_v_; -text: .text%__1cNdecL_rRegNodeJnum_opnds6kM_I_; text: .text%__1cIciMethodOresolve_invoke6MpnHciKlass_2_p0_; text: .text%__1cQChunkPoolCleanerEtask6M_v_; text: .text%__1cICmpDNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cPsalL_rReg_1NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateM_sub_Op_MulI6MpknENode__v_; text: .text%__1cZCallDynamicJavaDirectNodeFreloc6kM_i_; -text: .text%__1cQMachCallJavaNodeVis_MachCallStaticJava6M_pnWMachCallStaticJavaNode__; -text: .text%__1cUandI_rReg_imm255NodeJnum_opnds6kM_I_; text: .text%__1cFStateX_sub_Op_CallDynamicJava6MpknENode__v_; -text: .text%__1cNObjectMonitorEwait6MxipnGThread__v_; text: .text%jni_FindClass: jni.o; text: .text%__1cKarrayKlassTallocate_arrayArray6MiipnGThread__pnPobjArrayOopDesc__; text: .text%__1cIMinINodeJideal_reg6kM_I_; text: .text%__1cJCMoveNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cSObjectSynchronizerEwait6FnGHandle_xpnGThread__v_; -text: .text%__1cNCallGeneratorSfor_predicted_call6FpnHciKlass_p03_3_; -text: .text%__1cLTypeInstPtrRcast_to_exactness6kMi_pknEType__; text: .text%__1cTconvI2F_reg_regNodeErule6kM_I_; -text: .text%__1cWPredictedCallGeneratorKis_virtual6kM_i_; -text: .text%__1cTconvF2D_reg_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cNcmovP_regNodeErule6kM_I_; -text: .text%__1cMaddF_regNodeJnum_opnds6kM_I_; text: .text%__1cWPredictedCallGeneratorIgenerate6MpnIJVMState__2_; text: .text%JVM_MonitorWait; -text: .text%__1cPshrL_rReg_1NodePoper_input_base6kM_I_; -text: .text%__1cMaddF_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cNCallGeneratorQfor_virtual_call6FpnIciMethod__p0_; text: .text%__1cUVirtualCallGeneratorIgenerate6MpnIJVMState__2_; -text: .text%__1cLPSMarkSweepbAabsorb_live_data_from_eden6FpnUPSAdaptiveSizePolicy_pnKPSYoungGen_pnIPSOldGen__i_; text: .text%__1cUPSMarkSweepDecoratorbDadvance_destination_decorator6F_v_; -text: .text%__1cNmulI_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cNmulI_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cSOnStackReplacementPget_osr_adapter6FnFframe_nMmethodHandle__pnKOSRAdapter__; -text: .text%__1cNGrowableArray4CpnKOSRAdapter__Hat_grow6Mirk1_1_; text: .text%__1cPciObjArrayKlassEmake6FpnHciKlass__p0_; text: .text%JVM_GetClassDeclaredConstructors; -text: .text%__1cRCardTableModRefBSKinvalidate6MnJMemRegion__v_; text: .text%__1cJLoadFNodeJideal_reg6kM_I_; text: .text%__1cJAssemblerEaddq6MpnMRegisterImpl_2_v_; -text: .text%__1cFTypeFJsingleton6kM_i_; text: .text%__1cTconvF2D_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cMstoreSSPNodeErule6kM_I_; text: .text%__1cOloadConL32NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMstoreSSPNodeHtwo_adr6kM_I_; -text: .text%__1cMincI_memNodeHtwo_adr6kM_I_; text: .text%__1cKcmpOpUOperFequal6kM_i_; -text: .text%__1cTconvF2D_reg_regNodePoper_input_base6kM_I_; text: .text%__1cHRegMask2t6M_v_; text: .text%__1cIGraphKitPdstore_rounding6MpnENode__2_; text: .text%__1cNGrowableArray4Ci_2t6MpnFArena_iirki_v_; @@ -5458,13 +3496,9 @@ text: .text%__1cNloadConL0NodeHsize_of6kM_I_; text: .text%__1cQset_lwp_priority6Fiii_i_; text: .text%__1cJCmpD3NodeGOpcode6kM_i_; text: .text%__1cKloadUBNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPcmpD_cc_immNodeJnum_opnds6kM_I_; text: .text%__1cLConvL2DNodeGOpcode6kM_i_; -text: .text%__1cRmulI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerFcmovq6Mn0AJCondition_pnMRegisterImpl_3_v_; -text: .text%__1cNminI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMmulD_regNodeMideal_Opcode6kM_i_; -text: .text%__1cNminI_rRegNodePoper_input_base6kM_I_; text: .text%__1cFStateM_sub_Op_MinI6MpknENode__v_; text: .text%__1cCosTset_native_priority6FpnGThread_i_nIOSReturn__; text: .text%__1cJStubQdDueueRrequest_committed6Mi_pnEStub__; @@ -5474,7 +3508,6 @@ text: .text%__1cNCallGeneratorRfor_uncommon_trap6FpnIciMethod_nODeoptimizationLD text: .text%__1cUandI_rReg_imm255NodeHtwo_adr6kM_I_; text: .text%__1cJStubQdDueueMremove_first6M_v_; text: .text%__1cOPhaseIdealLoopOdo_range_check6MpnNIdealLoopTree_rnJNode_List__v_; -text: .text%__1cUVirtualCallGeneratorKis_virtual6kM_i_; text: .text%__1cPICStubInterfaceIfinalize6MpnEStub__v_; text: .text%__1cZUncommonTrapCallGeneratorIgenerate6MpnIJVMState__2_; text: .text%__1cPICStubInterfaceEsize6kMpnEStub__i_; @@ -5482,27 +3515,17 @@ text: .text%__1cJAssemblerEcmpq6MpnMRegisterImpl_2_v_; text: .text%__1cNGrowableArray4CpnIciObject__Egrow6Mi_v_; text: .text%__1cFStateM_sub_Op_ModI6MpknENode__v_; text: .text%__1cNObjectMonitor2t6M_v_; -text: .text%__1cNmodI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFParseNdo_instanceof6M_v_; text: .text%__1cPcmpD_cc_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNIdealLoopTreeXpolicy_maximally_unroll6kMpnOPhaseIdealLoop__i_; -text: .text%__1cTmembar_volatileNodeHtwo_adr6kM_I_; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_; text: .text%__1cIGraphKitOgen_instanceof6MpnENode_2_2_; text: .text%__1cHciKlassOsuper_of_depth6MI_p0_; text: .text%__1cJLoadDNodeGOpcode6kM_i_; -text: .text%__1cNcmovL_regNodePoper_input_base6kM_I_; text: .text%__1cMdecI_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRaddI_rReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cXNativeSignatureIteratorJdo_object6Mii_v_; text: .text%__1cQsalL_rReg_CLNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNandI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cbFunnecessary_membar_volatileNodeLbottom_type6kM_pknEType__; -text: .text%__1cHMatcherXpost_store_load_barrier6FpknENode__i_; -text: .text%__1cYjava_lang_reflect_MethodThas_signature_field6F_i_; -text: .text%__1cYjava_lang_reflect_MethodbFhas_parameter_annotations_field6F_i_; text: .text%__1cYjava_lang_reflect_MethodZset_parameter_annotations6FpnHoopDesc_2_v_; -text: .text%__1cYjava_lang_reflect_MethodbChas_annotation_default_field6F_i_; text: .text%__1cJloadDNodePoper_input_base6kM_I_; text: .text%__1cENodeEgetf6kM_f_; text: .text%__1cYjava_lang_reflect_MethodIset_name6FpnHoopDesc_2_v_; @@ -5510,33 +3533,19 @@ text: .text%__1cYjava_lang_reflect_MethodPset_return_type6FpnHoopDesc_2_v_; text: .text%__1cYjava_lang_reflect_MethodJset_clazz6FpnHoopDesc_2_v_; text: .text%__1cYjava_lang_reflect_MethodIset_slot6FpnHoopDesc_i_v_; text: .text%__1cYjava_lang_reflect_MethodGcreate6FpnGThread__nGHandle__; -text: .text%__1cPBytecode_invokeIis_valid6kM_i_; -text: .text%__1cKReflectionKnew_method6FnMmethodHandle_iipnGThread__pnHoopDesc__; -text: .text%__1cYjava_lang_reflect_MethodVhas_annotations_field6F_i_; text: .text%__1cYjava_lang_reflect_MethodPset_annotations6FpnHoopDesc_2_v_; text: .text%__1cYjava_lang_reflect_MethodWset_annotation_default6FpnHoopDesc_2_v_; text: .text%__1cYjava_lang_reflect_MethodNset_modifiers6FpnHoopDesc_i_v_; -text: .text%__1cNmethodOopDescSannotation_default6kM_pnQtypeArrayOopDesc__; text: .text%__1cYjava_lang_reflect_MethodTset_exception_types6FpnHoopDesc_2_v_; text: .text%__1cYjava_lang_reflect_MethodTset_parameter_types6FpnHoopDesc_2_v_; text: .text%__1cVCallRuntimeDirectNodeKmethod_set6Ml_v_; -text: .text%__1cTconvD2I_reg_regNodePoper_input_base6kM_I_; -text: .text%__1cSTailCalljmpIndNodeJnum_opnds6kM_I_; -text: .text%__1cTconvI2D_reg_regNodePoper_input_base6kM_I_; -text: .text%__1cQorI_rReg_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cKstoreFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRaddI_mem_rRegNodePoper_input_base6kM_I_; text: .text%__1cMmulF_immNodeErule6kM_I_; -text: .text%__1cJAssemblerGmovlpd6MpnRFloatRegisterImpl_nHAddress__v_; -text: .text%__1cPcmpF_cc_regNodePoper_input_base6kM_I_; -text: .text%__1cNCompileBrokerTcompile_adapter_for6FnMmethodHandle_ii_pnMBasicAdapter__; text: .text%__1cCosbBthread_local_storage_at_put6Fipv_v_; -text: .text%__1cNCompileBrokerbBwait_for_adapter_completion6FpnLCompileTask__pnMBasicAdapter__; -text: .text%__1cOjmpLoopEndNodeJis_Branch6kM_I_; text: .text%__1cOjmpLoopEndNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cNinstanceKlassSregister_finalizer6FpnPinstanceOopDesc_pnGThread__2_; text: .text%__1cSThreadLocalStorageNpd_set_thread6FpnGThread__v_; -text: .text%__1cKCMoveINodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cSThreadLocalStoragebBget_thread_via_cache_slowly6FLi_pnGThread__; text: .text%__1cMrax_RegIOperEtype6kM_pknEType__; text: .text%__1cOjmpLoopEndNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -5545,7 +3554,6 @@ text: .text%jni_GetMethodID: jni.o; text: .text%__1cSThreadLocalStorageSset_thread_in_slot6FpnGThread__v_; text: .text%get_thread; text: .text%__1cMincI_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cIGraphKitXinsert_mem_bar_volatile6MpnKMemBarNode_i_v_; text: .text%__1cSThreadLocalStorageKset_thread6FpnGThread__v_; text: .text%__1cCosHSolarisKmmap_chunk6FpcLii_2_; text: .text%__1cbFloadConL_0x6666666666666667NodeLout_RegMask6kM_rknHRegMask__; @@ -5555,75 +3563,52 @@ text: .text%__1cRxorI_rReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cMmulD_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNcmovP_regNodeLbottom_type6kM_pknEType__; text: .text%__1cJScopeDescTdecode_scope_values6Mi_pnNGrowableArray4CpnKScopeValue____; -text: .text%__1cTAbstractInterpreterWlayout_activation_impl6FpnNmethodOopDesc_iiiipnFframe_4i_i_; text: .text%__1cLconvI2BNodeMideal_Opcode6kM_i_; text: .text%__1cIDivLNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cQsalI_rReg_CLNodeHtwo_adr6kM_I_; text: .text%__1cPsarL_rReg_2NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNmodL_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cScompL_rReg_immNodeJnum_opnds6kM_I_; -text: .text%__1cQshrL_rReg_CLNodePoper_input_base6kM_I_; -text: .text%__1cJCMoveNode2t6MpnENode_22pknEType__v_; -text: .text%__1cJCMoveNodeEmake6FpnENode_222pknEType__p0_; text: .text%__1cVLoaderConstraintTableYextend_loader_constraint6MpnVLoaderConstraintEntry_nGHandle_pnMklassOopDesc__v_; text: .text%__1cIimmIOperJnum_edges6kM_I_; -text: .text%__1cJAssemblerFmovss6MpnRFloatRegisterImpl_nHAddress__v_; text: .text%__1cRtestI_reg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRandL_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNGrowableArray4CpnKciTypeFlowFBlock__Gremove6Mrk2_v_; text: .text%__1cVLoaderConstraintTablebHensure_loader_constraint_capacity6MpnVLoaderConstraintEntry_i_v_; -text: .text%__1cPsalL_rReg_1NodeJnum_opnds6kM_I_; -text: .text%__1cMsubD_regNodePoper_input_base6kM_I_; -text: .text%__1cMstoreSSPNodeJnum_opnds6kM_I_; text: .text%__1cMnegD_regNodeHtwo_adr6kM_I_; -text: .text%__1cIBytecodeIset_code6MnJBytecodesECode__v_; -text: .text%__1cPClassFileParserXverify_unqualified_name6MpcIi_i_; text: .text%__1cMdivD_immNodeMideal_Opcode6kM_i_; text: .text%__1cTconvI2F_reg_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cQjava_lang_ThreadMis_stillborn6FpnHoopDesc__i_; text: .text%__1cQsarL_rReg_63NodeErule6kM_I_; text: .text%__1cRsubL_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cMVirtualSpaceQuncommitted_size6kM_L_; text: .text%__1cRsubL_rReg_memNodePoper_input_base6kM_I_; -text: .text%__1cMVirtualSpaceJexpand_by6ML_i_; text: .text%__1cNstoreImmPNodeMideal_Opcode6kM_i_; text: .text%__1cQjava_lang_ThreadKset_thread6FpnHoopDesc_pnKJavaThread__v_; text: .text%__1cLOopMapCache2t6M_v_; -text: .text%__1cJloadDNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cQComputeCallStackHdo_char6M_v_; -text: .text%__1cNdivI_rRegNodePoper_input_base6kM_I_; -text: .text%__1cOcmovI_regUNodePoper_input_base6kM_I_; text: .text%__1cZInterpreterMacroAssemblerEpush6MnITosState__v_; text: .text%__1cSvframeArrayElementDbci6kM_i_; text: .text%__1cMaddF_regNodeErule6kM_I_; -text: .text%__1cTconvF2D_reg_memNodeHtwo_adr6kM_I_; text: .text%__1cNdecL_rRegNodeHtwo_adr6kM_I_; text: .text%__1cMdecI_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cFStateN_sub_Op_LoadF6MpknENode__v_; text: .text%__1cIMulDNodeLbottom_type6kM_pknEType__; text: .text%__1cNaddI_rRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJAssemblerEdecl6MpnMRegisterImpl__v_; -text: .text%__1cOPhaseIdealLoopVinsert_pre_post_loops6MpnNIdealLoopTree_rnJNode_List_i_v_; text: .text%__1cJAssemblerGbswapl6MpnMRegisterImpl__v_; text: .text%__1cRInlineCacheBufferLnew_ic_stub6F_pnGICStub__; text: .text%__1cRInlineCacheBufferWcreate_transition_stub6FpnKCompiledIC_pnHoopDesc_pC_v_; text: .text%__1cIAddDNodeGOpcode6kM_i_; text: .text%__1cMincI_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorIpass_int6M_v_; -text: .text%__1cNloadConPcNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cGICStubIset_stub6MpnKCompiledIC_pnHoopDesc_pC_v_; text: .text%__1cRInlineCacheBufferXassemble_ic_buffer_code6FpCpnHoopDesc_1_v_; text: .text%__1cTconvD2I_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cZInterpreterMacroAssemblerHpop_ptr6MpnMRegisterImpl__v_; -text: .text%__1cGThreadbCis_hidden_from_external_view6kM_i_; text: .text%__1cMelapsedTimer2t6M_v_; -text: .text%__1cGThreadVis_jvmti_agent_thread6kM_i_; text: .text%__1cMdivD_immNodeErule6kM_I_; text: .text%__1cTconvI2D_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cFTypeFFxmeet6kMpknEType__3_; text: .text%__1cJAssemblerEshrl6MpnMRegisterImpl_i_v_; text: .text%__1cGICStubLdestination6kM_pC_; -text: .text%__1cRsalL_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRInlineCacheBufferVic_buffer_entry_point6FpC_1_; text: .text%__1cPcmpD_cc_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMaddD_immNodeMideal_Opcode6kM_i_; @@ -5636,31 +3621,21 @@ text: .text%__1cNcmovP_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cUandI_rReg_imm255NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNdivL_rRegNodeHtwo_adr6kM_I_; text: .text%__1cKcastPPNodePoper_input_base6kM_I_; -text: .text%__1cMaddD_immNodePoper_input_base6kM_I_; text: .text%__1cFTypeDFxmeet6kMpknEType__3_; text: .text%__1cKloadUBNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cIDivLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cJloadDNodeErule6kM_I_; -text: .text%__1cRaddI_mem_rRegNodeJnum_opnds6kM_I_; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_; text: .text%__1cPsarL_rReg_1NodeMideal_Opcode6kM_i_; text: .text%__1cKCompiledICMstub_address6kM_pC_; text: .text%__1cMmulD_regNodeMcisc_operand6kM_i_; text: .text%__1cMmulF_memNodePoper_input_base6kM_I_; text: .text%lwp_cond_destroy: os_solaris.o; -text: .text%__1cHnmethodNis_osr_method6kM_i_; text: .text%lwp_mutex_destroy: os_solaris.o; -text: .text%__1cFParseScan_rerun_bytecode6M_i_; text: .text%__1cISubFNodeGOpcode6kM_i_; -text: .text%__1cRjni_invoke_static6FpnHJNIEnv__pnJJavaValue_pnI_jobject_nLJNICallType_pnK_jmethodID_pnSJNI_ArgumentPusher_pnGThread__v_: jni.o; -text: .text%__1cFTypeDGis_nan6kM_i_; -text: .text%__1cTconvI2F_reg_regNodeJnum_opnds6kM_I_; text: .text%__1cOJavaAssertionsNmatch_package6Fpkc_pn0AKOptionList__; -text: .text%__1cOJavaAssertionsHenabled6Fpkci_i_; text: .text%__1cOJavaAssertionsLmatch_class6Fpkc_pn0AKOptionList__; text: .text%JVM_DesiredAssertionStatus; text: .text%__1cHTypePtrFxdual6kM_pknEType__; -text: .text%__1cTconvI2F_reg_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cQjava_lang_ThreadLthreadGroup6FpnHoopDesc__2_; text: .text%__1cLConvI2FNodeLbottom_type6kM_pknEType__; text: .text%__1cXjava_lang_reflect_FieldNset_modifiers6FpnHoopDesc_i_v_; @@ -5671,41 +3646,25 @@ text: .text%__1cXjava_lang_reflect_FieldJset_clazz6FpnHoopDesc_2_v_; text: .text%__1cXjava_lang_reflect_FieldIset_name6FpnHoopDesc_2_v_; text: .text%__1cJvmSymbolsOsignature_type6FpnNsymbolOopDesc__nJBasicType__; text: .text%__1cMloadConFNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNnegI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cPcmpF_cc_regNodeHtwo_adr6kM_I_; -text: .text%__1cKReflectionJnew_field6FpnPfieldDescriptor_ipnGThread__pnHoopDesc__; text: .text%__1cXjava_lang_reflect_FieldIset_type6FpnHoopDesc_2_v_; text: .text%__1cKJavaThreadbScheck_safepoint_and_suspend_for_native_trans6Fp0_v_; text: .text%__1cXjava_lang_reflect_FieldPset_annotations6FpnHoopDesc_2_v_; text: .text%__1cXjava_lang_reflect_FieldGcreate6FpnGThread__nGHandle__; -text: .text%__1cXjava_lang_reflect_FieldVhas_annotations_field6F_i_; text: .text%__1cISubDNodeGOpcode6kM_i_; text: .text%__1cJloadFNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cSstring_compareNodeHtwo_adr6kM_I_; text: .text%__1cPfieldDescriptorLannotations6kM_pnQtypeArrayOopDesc__; text: .text%__1cRaddI_mem_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cXjava_lang_reflect_FieldIset_slot6FpnHoopDesc_i_v_; -text: .text%__1cKScopeValueLis_location6kM_i_; -text: .text%__1cXjava_lang_reflect_FieldThas_signature_field6F_i_; text: .text%__1cMmulF_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSObjectSynchronizerGnotify6FnGHandle_pnGThread__v_; text: .text%JVM_MonitorNotify; text: .text%__1cQsarL_rReg_63NodeLout_RegMask6kM_rknHRegMask__; text: .text%jni_GetStaticFieldID: jni.o; -text: .text%__1cIModLNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cPjava_lang_ClassOprimitive_type6FpnHoopDesc__nJBasicType__; -text: .text%__1cIjniIdMapGcreate6FnTinstanceKlassHandle__p0_; -text: .text%__1cPsarL_rReg_2NodeJnum_opnds6kM_I_; text: .text%__1cKReflectionbFbasic_type_mirror_to_basic_type6FpnHoopDesc_pnGThread__nJBasicType__; text: .text%__1cPcmpF_cc_regNodeMideal_Opcode6kM_i_; -text: .text%__1cQSystemDictionaryQjava_mirror_type6FpnHoopDesc__nJBasicType__; -text: .text%__1cIjniIdMap2t6MpnMklassOopDesc_i_v_; -text: .text%__1cIjniIdMapRcompute_index_cnt6FnTinstanceKlassHandle__i_; -text: .text%__1cLjniIdBucket2t6MpnIjniIdMap_p0_v_; text: .text%__1cNinstanceKlassKjni_id_for6Mi_pnFJNIid__; text: .text%__1cJLoadSNodeMstore_Opcode6kM_i_; -text: .text%__1cLTypeInstPtrLmirror_type6kM_pnGciType__; -text: .text%__1cMsubF_regNodePoper_input_base6kM_I_; text: .text%__1cPcmpD_cc_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cMlogD_regNodeMideal_Opcode6kM_i_; text: .text%__1cbFunnecessary_membar_volatileNodeLout_RegMask6kM_rknHRegMask__; @@ -5715,8 +3674,6 @@ text: .text%__1cMPipeline_Use2t6MIIIpnUPipeline_Use_Element__v_; text: .text%__1cKstorePNodeErule6kM_I_; text: .text%__1cNsymbolOopDescWas_klass_external_name6kM_pkc_; text: .text%__1cbFunnecessary_membar_volatileNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNloadConPcNodeErule6kM_I_; -text: .text%__1cIPipeline2t6MIIiIIiiiipnSmachPipelineStages_2pInMPipeline_Use__v_; text: .text%__1cRComputeEntryStackGdo_int6M_v_; text: .text%__1cMstoreSSPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSMachBreakpointNodeEsize6kMpnNPhaseRegAlloc__I_; @@ -5725,48 +3682,33 @@ text: .text%__1cNtestU_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cPsalL_rReg_1NodeHtwo_adr6kM_I_; text: .text%__1cNmodL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTconvF2D_reg_regNodeErule6kM_I_; -text: .text%__1cJAssemblerDjmp6MpnMRegisterImpl_nJrelocInfoJrelocType__v_; -text: .text%__1cObox_handleNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQsalI_rReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQorI_rReg_memNodeErule6kM_I_; -text: .text%__1cLloadSSDNodePoper_input_base6kM_I_; -text: .text%__1cNCompileBrokerbAinvoke_compiler_on_adapter6FpnLCompileTask__v_; text: .text%__1cLConvF2DNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cMaddF_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRxorI_rReg_memNodeFreloc6kM_i_; -text: .text%__1cMaddF_immNodePoper_input_base6kM_I_; text: .text%__1cKCMoveLNodeGOpcode6kM_i_; text: .text%__1cICodeHeapTmark_segmap_as_free6MLL_v_; text: .text%__1cRaddL_rReg_memNodePoper_input_base6kM_I_; text: .text%JVM_IsArrayClass; text: .text%__1cJAssemblerEsbbq6MnHAddress_i_v_; text: .text%__1cZInterpreterMacroAssemblerFpop_l6MpnMRegisterImpl__v_; -text: .text%__1cMmulD_regNodeJnum_opnds6kM_I_; -text: .text%__1cODeoptimizationYquery_update_method_data6FnQmethodDataHandle_in0ALDeoptReason_rIri4_pnLProfileData__; -text: .text%__1cICodeHeapJexpand_by6ML_i_; -text: .text%__1cMmulD_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cLConvF2DNodeLbottom_type6kM_pknEType__; text: .text%__1cJAssemblerEaddq6MnHAddress_i_v_; text: .text%JVM_GetClassName; text: .text%__1cTconvF2D_reg_regNodeMcisc_operand6kM_i_; text: .text%__1cLStringTableGintern6FpkcpnGThread__pnHoopDesc__; -text: .text%__1cMmulD_immNodeJnum_opnds6kM_I_; text: .text%__1cNmulI_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQorI_rReg_memNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cPPerfDataManagerTcreate_long_counter6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnPPerfLongCounter__; text: .text%__1cNObjectMonitorGnotify6MpnGThread__v_; text: .text%__1cQjava_lang_ThreadMset_priority6FpnHoopDesc_nOThreadPriority__v_; text: .text%__1cRsubL_rReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cRaddL_rReg_memNodeMideal_Opcode6kM_i_; -text: .text%__1cRsubL_rReg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cRsubL_rReg_memNodeJnum_opnds6kM_I_; text: .text%__1cPshrL_rReg_1NodeErule6kM_I_; text: .text%__1cQshrI_rReg_CLNodeHtwo_adr6kM_I_; text: .text%__1cFStateO_sub_Op_CMoveI6MpknENode__v_; text: .text%__1cFStateM_sub_Op_RegD6MpknENode__v_; text: .text%__1cQorI_rReg_memNodeHtwo_adr6kM_I_; -text: .text%__1cUCallNativeDirectNodeHtwo_adr6kM_I_; -text: .text%__1cTconvI2D_reg_regNodeMcisc_operand6kM_i_; text: .text%__1cXNativeSignatureIteratorGdo_int6M_v_; text: .text%__1cIMaxINodeJideal_reg6kM_I_; text: .text%__1cFJNIid2t6MpnMklassOopDesc_ip0_v_; @@ -5774,31 +3716,18 @@ text: .text%__1cNinstanceKlassPjni_id_for_impl6FnTinstanceKlassHandle_i_pnFJNIid text: .text%__1cJAssemblerEaddq6MpnMRegisterImpl_nHAddress__v_; text: .text%JVM_Open; text: .text%__1cHRegMask2t6Miiiiiii_v_; -text: .text%__1cbFloadConL_0x6666666666666667NodeHtwo_adr6kM_I_; text: .text%__1cNsubI_rRegNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cMmulF_regNodePoper_input_base6kM_I_; -text: .text%__1cZInterpreterMacroAssemblerVincrement_mdp_data_at6MpnMRegisterImpl_i_v_; -text: .text%__1cQConstantIntValuePis_constant_int6kM_i_; -text: .text%__1cRmulL_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPsarL_rReg_2NodeHtwo_adr6kM_I_; -text: .text%__1cKmul_hiNodeHtwo_adr6kM_I_; text: .text%__1cQConstantIntValue2t6MpnTDebugInfoReadStream__v_; -text: .text%__1cRxorI_rReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFStateM_sub_Op_ConD6MpknENode__v_; text: .text%__1cLConvI2DNodeGOpcode6kM_i_; text: .text%__1cVLoaderConstraintTableJnew_entry6MIpnNsymbolOopDesc_pnMklassOopDesc_ii_pnVLoaderConstraintEntry__; -text: .text%__1cNaddP_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPcmpF_cc_regNodeMcisc_operand6kM_i_; text: .text%__1cJAssemblerFcmovl6Mn0AJCondition_pnMRegisterImpl_3_v_; -text: .text%__1cVscale_to_lwp_priority6Fiii_i_: os_solaris.o; -text: .text%__1cLOptoRuntimeWresolve_virtual_call_C6FpnKJavaThread__pC_; text: .text%__1cNPerfByteArray2t6MnJCounterNS_pkcnIPerfDataFUnits_n0CLVariability_i_v_; -text: .text%__1cLStrCompNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cMmulF_memNodeMideal_Opcode6kM_i_; text: .text%__1cKConv2BNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cJloadDNodeJnum_opnds6kM_I_; text: .text%__1cFStateM_sub_Op_RegF6MpknENode__v_; -text: .text%__1cMmulF_immNodeJnum_opnds6kM_I_; text: .text%__1cOMacroAssemblerKnull_check6MpnMRegisterImpl_i_v_; text: .text%__1cNcmovP_regNodeHtwo_adr6kM_I_; text: .text%jni_GetStaticObjectField: jni.o; @@ -5806,19 +3735,14 @@ text: .text%__1cIGraphKitSprecision_rounding6MpnENode__2_; text: .text%__1cScompL_rReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSTailCalljmpIndNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cTconvD2F_reg_regNodeMideal_Opcode6kM_i_; -text: .text%__1cLCastP2LNodeUdepends_only_on_test6kM_i_; text: .text%__1cTconvF2D_reg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMmulD_immNodeHtwo_adr6kM_I_; text: .text%__1cOMacroAssemblerFleave6M_v_; text: .text%__1cMloadConDNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMTailCallNode2t6MpnENode_222222_v_; -text: .text%__1cICmpDNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cXPartialSubtypeCheckNodeGOpcode6kM_i_; text: .text%__1cSTailCalljmpIndNodeFreloc6kM_i_; -text: .text%__1cObox_handleNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cOloadConL32NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cMlogD_regNodePoper_input_base6kM_I_; -text: .text%__1cTconvI2F_reg_regNodeHtwo_adr6kM_I_; text: .text%__1cMnegD_regNodeErule6kM_I_; text: .text%__1cLvframeArrayRregister_location6kMi_pC_; text: .text%__1cQorI_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -5826,10 +3750,7 @@ text: .text%__1cFStateQ_sub_Op_TailCall6MpknENode__v_; text: .text%__1cIOSThreadNpd_initialize6M_v_; text: .text%__1cCosScurrent_process_id6F_i_; text: .text%__1cMaddD_immNodeErule6kM_I_; -text: .text%__1cNmaxI_rRegNodePoper_input_base6kM_I_; text: .text%__1cPshrL_rReg_1NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cTconvI2F_reg_regNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cNmaxI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIMaxINodeIadd_ring6kMpknEType_3_3_; text: .text%__1cCosRinitialize_thread6F_v_; text: .text%__1cCosHSolarisKvm_signals6F_pnIsigset_t__; @@ -5844,7 +3765,6 @@ text: .text%__1cCosHSolarisVinit_thread_fpu_state6F_v_; text: .text%__1cIOSThread2t6MpFpv_i1_v_; text: .text%jni_CallStaticVoidMethod: jni.o; text: .text%__1cCosScurrent_stack_size6F_L_; -text: .text%__1cNPhaseRegAllocHset_oop6MpknENode_i_v_; text: .text%__1cCosScurrent_stack_base6F_pC_; text: .text%__1cJloadFNodeFreloc6kM_i_; text: .text%__1cCosMstart_thread6FpnGThread__v_; @@ -5853,14 +3773,10 @@ text: .text%__1cKstoreLNodeIpipeline6kM_pknIPipeline__; text: .text%__1cXNativeSignatureIteratorHdo_long6M_v_; text: .text%__1cNcmovL_memNodeErule6kM_I_; text: .text%__1cFStateO_sub_Op_StoreF6MpknENode__v_; -text: .text%__1cHnmethodbAmake_not_entrant_or_zombie6Mi_v_; text: .text%__1cCosPpd_start_thread6FpnGThread__v_; text: .text%__1cNcmovL_regNodeMcisc_operand6kM_i_; -text: .text%__1cCosNcreate_thread6FpnGThread_n0AKThreadType_L_i_; -text: .text%__1cLconvI2BNodePoper_input_base6kM_I_; text: .text%__1cOGenerateOopMapMdo_checkcast6M_v_; text: .text%JVM_SetThreadPriority; -text: .text%__1cG_start6Fpv_0_: os_solaris.o; text: .text%__1cLOptoRuntimeMrethrow_Type6F_pknITypeFunc__; text: .text%JVM_GetStackAccessControlContext; text: .text%JVM_IsThreadAlive; @@ -5868,27 +3784,16 @@ text: .text%__1cTconvL2D_reg_memNodeMideal_Opcode6kM_i_; text: .text%__1cSstring_compareNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNdivI_rRegNodeErule6kM_I_; text: .text%__1cNdecL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cOLibraryCallKitYinline_native_time_funcs6Mi_i_; text: .text%__1cNGrowableArray4CpknEType__2t6MpnFArena_iirk2_v_; text: .text%__1cFParseVcatch_call_exceptions6MrnYciExceptionHandlerStream__v_; -text: .text%__1cTconvL2F_reg_regNodePoper_input_base6kM_I_; -text: .text%__1cQjava_lang_ThreadIis_alive6FpnHoopDesc__i_; text: .text%jni_CallObjectMethod: jni.o; text: .text%__1cJAssemblerExorq6MpnMRegisterImpl_2_v_; -text: .text%__1cNcmovL_regNodeJnum_opnds6kM_I_; text: .text%__1cLOptoRuntimeYcurrent_time_millis_Type6F_pknITypeFunc__; text: .text%__1cOcmovI_regUNodeMideal_Opcode6kM_i_; -text: .text%__1cNcmovL_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cNObjectMonitorJnotifyAll6MpnGThread__v_; text: .text%__1cMsubD_regNodeMideal_Opcode6kM_i_; -text: .text%__1cNloadConL0NodeFclone6kM_pnENode__; text: .text%__1cPcmpF_cc_regNodeErule6kM_I_; -text: .text%__1cJimmL0OperFclone6kM_pnIMachOper__; text: .text%__1cNmodI_rRegNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cPcmpF_cc_regNodeJnum_opnds6kM_I_; -text: .text%__1cPcmpF_cc_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cbFloadConL_0x6666666666666667NodePoper_input_base6kM_I_; -text: .text%__1cZInterpreterMacroAssemblerFpop_d6MpnRFloatRegisterImpl__v_; text: .text%__1cTconvL2D_reg_memNodePoper_input_base6kM_I_; text: .text%__1cLConvD2FNodeGOpcode6kM_i_; text: .text%__1cWThreadLocalAllocBufferKinitialize6M_v_; @@ -5896,45 +3801,30 @@ text: .text%__1cJloadDNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorEtemp6F_pnMRegisterImpl__; text: .text%__1cMmulF_immNodeHtwo_adr6kM_I_; text: .text%__1cQsarL_rReg_63NodeHtwo_adr6kM_I_; -text: .text%__1cQsarL_rReg_63NodeJnum_opnds6kM_I_; -text: .text%__1cQjava_lang_StringbHcreate_from_platform_depended_str6FpkcpnGThread__nGHandle__; text: .text%__1cMsubF_regNodeMideal_Opcode6kM_i_; text: .text%__1cTconvI2L_reg_regNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cWThreadLocalAllocBufferMinitial_size6F_L_; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorJpass_long6M_v_; text: .text%__1cSInterpreterRuntimeMat_safepoint6FpnKJavaThread__v_; text: .text%__1cTconvF2I_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cRandI_rReg_memNodePoper_input_base6kM_I_; text: .text%__1cRandI_rReg_memNodeMideal_Opcode6kM_i_; -text: .text%__1cCosNcommit_memory6FpcL_i_; -text: .text%__1cNdivI_rRegNodeJnum_opnds6kM_I_; -text: .text%__1cENodeJis_MemBar6kM_pknKMemBarNode__; -text: .text%__1cNjni_functions6F_pknTJNINativeInterface___; -text: .text%__1cNThreadServiceKadd_thread6FpnKJavaThread_i_v_; text: .text%JVM_NativePath; text: .text%__1cKJavaThreadKinitialize6M_v_; -text: .text%__1cHThreadsDadd6FpnKJavaThread_i_v_; -text: .text%__1cGParker2t6M_v_; text: .text%__1cOPhaseIdealLoopKdo_peeling6MpnNIdealLoopTree_rnJNode_List__v_; text: .text%__1cUThreadSafepointStateGcreate6FpnKJavaThread__v_; text: .text%__1cPciInstanceKlassLjava_mirror6M_pnKciInstance__; text: .text%__1cKJavaThreadYcreate_stack_guard_pages6M_v_; text: .text%__1cUThreadSafepointState2t6MpnKJavaThread__v_; -text: .text%__1cCosMguard_memory6FpcL_i_; text: .text%__1cMnegD_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cUCallNativeDirectNodePoper_input_base6kM_I_; text: .text%__1cHnmethodTinc_decompile_count6M_v_; text: .text%__1cIMinINodeIadd_ring6kMpknEType_3_3_; text: .text%__1cMResourceMarkNreset_to_mark6M_v_; text: .text%__1cQThreadStatistics2t6M_v_; -text: .text%__1cMFlatProfilerJis_active6F_i_; -text: .text%__1cNloadConPcNodeLbottom_type6kM_pknEType__; text: .text%__1cMmulD_regNodeErule6kM_I_; text: .text%__1cMdivD_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKJavaThread2t6MpFp0pnGThread__vL_v_; text: .text%__1cPcmpD_cc_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTconvI2D_reg_regNodeErule6kM_I_; -text: .text%__1cQshrL_rReg_CLNodeJnum_opnds6kM_I_; text: .text%__1cNcmovL_memNodePoper_input_base6kM_I_; text: .text%__1cNdivL_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPcmpD_cc_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -5949,38 +3839,25 @@ text: .text%__1cQsalL_rReg_CLNodeHtwo_adr6kM_I_; text: .text%__1cVCallRuntimeDirectNodeFreloc6kM_i_; text: .text%__1cIGraphKitIset_jvms6MpnIJVMState__v_; text: .text%__1cKJavaThreadDrun6M_v_; -text: .text%__1cTconvD2I_reg_regNodeJnum_opnds6kM_I_; text: .text%__1cOsalI_mem_1NodePoper_input_base6kM_I_; -text: .text%__1cSMachCallNativeNodePret_addr_offset6M_i_; text: .text%__1cMLinkResolverbEresolve_interface_call_or_null6FnLKlassHandle_1nMsymbolHandle_21_nMmethodHandle__; -text: .text%__1cZInterpreterMacroAssemblerFpop_f6MpnRFloatRegisterImpl__v_; text: .text%__1cMrdi_RegIOperEtype6kM_pknEType__; -text: .text%__1cVThreadStateTransitionKtransition6FpnKJavaThread_nPJavaThreadState_3_v_; -text: .text%__1cUCallNativeDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKJavaThreadRthread_main_inner6M_v_; -text: .text%__1cQorI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cIGraphKitbAgen_stub_or_native_wrapper6MpCpkcpnIciMethod_iiiii_v_; text: .text%__1cPsalL_rReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMResourceMark2t6M_v_; text: .text%__1cQshrI_rReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJScopeDescGlocals6M_pnNGrowableArray4CpnKScopeValue____; text: .text%__1cJScopeDescVdecode_monitor_values6Mi_pnNGrowableArray4CpnMMonitorValue____; -text: .text%__1cSvframeArrayElementPunpack_on_stack6MiipnFframe_ii_v_; -text: .text%__1cTAbstractInterpreterRlayout_activation6FpnNmethodOopDesc_iiiipnFframe_4i_v_; text: .text%__1cOcompiledVFrameLexpressions6kM_pnUStackValueCollection__; text: .text%__1cOcompiledVFrameImonitors6kM_pnNGrowableArray4CpnLMonitorInfo____; text: .text%__1cOcompiledVFrameGmethod6kM_pnNmethodOopDesc__; text: .text%__1cSvframeArrayElementHfill_in6MpnOcompiledVFrame__v_; text: .text%__1cOcompiledVFrameHraw_bci6kM_i_; -text: .text%__1cNGrowableArray4CpnLMonitorInfo__2t6Mii_v_; text: .text%__1cPPerfDataManagerWcreate_string_constant6FnJCounterNS_pkc3pnGThread__pnSPerfStringConstant__; text: .text%__1cOMacroAssemblerKincrementl6MpnMRegisterImpl_i_v_; text: .text%__1cFframebCinterpreter_frame_set_locals6Mpl_v_; text: .text%__1cFframebHinterpreter_frame_set_monitor_end6MpnPBasicObjectLock__v_; -text: .text%__1cTAbstractInterpreterPsize_activation6FpnNmethodOopDesc_iiiii_i_; text: .text%__1cSPerfStringConstant2t6MnJCounterNS_pkc3_v_; -text: .text%__1cTAbstractInterpreterQcontinuation_for6FpnNmethodOopDesc_pCiiri_3_; -text: .text%__1cZInterpreterMacroAssemblerLcall_VM_Ico6MpnMRegisterImpl_pC2i_v_; text: .text%__1cFframebCinterpreter_frame_set_method6MpnNmethodOopDesc__v_; text: .text%__1cMmulF_regNodeMideal_Opcode6kM_i_; text: .text%__1cFframebBinterpreter_frame_sender_sp6kM_pl_; @@ -5991,18 +3868,10 @@ text: .text%__1cJScopeDescImonitors6M_pnNGrowableArray4CpnMMonitorValue____; text: .text%__1cJAssemblerEaddl6MpnMRegisterImpl_i_v_; text: .text%__1cOcompiledVFrameGlocals6kM_pnUStackValueCollection__; text: .text%__1cJScopeDescLexpressions6M_pnNGrowableArray4CpnKScopeValue____; -text: .text%__1cTconvF2D_reg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cSvframeArrayElementNon_stack_size6kMiiii_i_; -text: .text%__1cMaddD_regNodePoper_input_base6kM_I_; text: .text%__1cXjava_lang_boxing_objectJget_value6FpnHoopDesc_pnGjvalue__nJBasicType__; -text: .text%__1cMorL_rRegNodePoper_input_base6kM_I_; -text: .text%__1cOcmovD_regUNodePoper_input_base6kM_I_; text: .text%__1cPcmovI_reg_gNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cMdivD_immNodePoper_input_base6kM_I_; -text: .text%__1cJloadDNodeHtwo_adr6kM_I_; text: .text%__1cKReflectionTunbox_for_primitive6FpnHoopDesc_pnGjvalue_pnGThread__nJBasicType__; text: .text%__1cCosMset_priority6FpnGThread_nOThreadPriority__nIOSReturn__; -text: .text%__1cMmulF_memNodeJnum_opnds6kM_I_; text: .text%__1cIMulDNodeImul_ring6kMpknEType_3_3_; text: .text%__1cODeoptimizationVtrap_state_add_reason6Fii_i_; text: .text%__1cDhpiFclose6Fi_i_; @@ -6012,32 +3881,22 @@ text: .text%__1cZInterpreterMacroAssemblerUupdate_mdp_by_offset6MpnMRegisterImpl text: .text%__1cNcmovL_regNodeMideal_Opcode6kM_i_; text: .text%__1cZInterpreterMacroAssemblerWupdate_mdp_by_constant6MpnMRegisterImpl_i_v_; text: .text%__1cOtailjmpIndNodeNis_block_proj6kM_pknENode__; -text: .text%__1cRaddL_rReg_memNodeJnum_opnds6kM_I_; text: .text%__1cTconvI2F_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTconvL2F_reg_regNodeMideal_Opcode6kM_i_; text: .text%__1cGICStubKcached_oop6kM_pnHoopDesc__; text: .text%__1cRInlineCacheBufferUic_buffer_cached_oop6FpC_pnHoopDesc__; -text: .text%__1cTconvD2F_reg_regNodePoper_input_base6kM_I_; -text: .text%__1cJAssemblerFpushq6Mi_v_; text: .text%JVM_Close; -text: .text%__1cMnegF_regNodePoper_input_base6kM_I_; -text: .text%__1cOcmovI_regUNodeJnum_opnds6kM_I_; -text: .text%__1cbCAbstractInterpreterGeneratorRset_unimplemented6Mi_v_; text: .text%__1cRComputeEntryStackJdo_object6Mii_v_; text: .text%__1cMLinkResolverYresolve_interface_method6FrnMmethodHandle_rnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cOcmovI_regUNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cGThreadMset_priority6Fp0nOThreadPriority__v_; text: .text%jni_NewObjectV: jni.o; text: .text%__1cKConv2BNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cQshrL_rReg_CLNodeErule6kM_I_; text: .text%__1cTconvF2D_reg_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHnmethodbCcan_not_entrant_be_converted6M_i_; text: .text%__1cNSafePointNodeQpeek_monitor_obj6kM_pnENode__; text: .text%__1cOcmovI_regUNodeMcisc_operand6kM_i_; text: .text%__1cNSafePointNodeQpeek_monitor_box6kM_pnENode__; text: .text%__1cJLoadBNodeMstore_Opcode6kM_i_; -text: .text%__1cVCompressedWriteStreamKwrite_long6Mx_v_; -text: .text%__1cTconvF2I_reg_regNodePoper_input_base6kM_I_; text: .text%__1cLConvF2INodeGOpcode6kM_i_; text: .text%__1cPMultiBranchDataScompute_cell_count6FpnOBytecodeStream__i_; text: .text%__1cFParsePdo_monitor_exit6M_v_; @@ -6047,70 +3906,39 @@ text: .text%__1cRStubCodeGeneratorLstub_epilog6MpnMStubCodeDesc__v_; text: .text%__1cRStubCodeGeneratorLstub_prolog6MpnMStubCodeDesc__v_; text: .text%__1cKcastPPNodeErule6kM_I_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pF3_v3_v_; -text: .text%__1cOsalI_mem_1NodeJnum_opnds6kM_I_; text: .text%__1cKJavaThreadbFdeoptimized_wrt_marked_nmethods6M_v_; text: .text%__1cKJavaThreadHprepare6MpnI_jobject_nOThreadPriority__v_; -text: .text%__1cPshrL_rReg_1NodeJnum_opnds6kM_I_; -text: .text%__1cRandI_rReg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cRandI_rReg_memNodeJnum_opnds6kM_I_; -text: .text%__1cQorI_rReg_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cJAssemblerGmovslq6MpnMRegisterImpl_2_v_; text: .text%__1cRandI_rReg_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cQjava_lang_ThreadJstackSize6FpnHoopDesc__x_; text: .text%__1cRConstantLongValueIwrite_on6MpnUDebugInfoWriteStream__v_; text: .text%JVM_StartThread; text: .text%__1cMthread_entry6FpnKJavaThread_pnGThread__v_: jvm.o; -text: .text%__1cTconvF2D_reg_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cMsubD_regNodeErule6kM_I_; text: .text%__1cQjava_lang_ThreadIpriority6FpnHoopDesc__nOThreadPriority__; text: .text%__1cNmulI_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cIMulFNodeImul_ring6kMpknEType_3_3_; text: .text%__1cLRuntimeStub2n6FLI_pv_; -text: .text%__1cLRuntimeStubQnew_runtime_stub6FpkcpnKCodeBuffer_ipnJOopMapSet_i_p0_; -text: .text%__1cLRuntimeStub2t6MpkcpnKCodeBuffer_iipnJOopMapSet_i_v_; -text: .text%__1cTconvF2D_reg_regNodeJnum_opnds6kM_I_; -text: .text%__1cRxorI_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMmulF_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cOLibraryCallKitbDis_method_invoke_or_aux_frame6MpnIJVMState__i_; text: .text%__1cbFloadConL_0x6666666666666667NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cIAddFNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cOloadConL32NodeHsize_of6kM_I_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFn0AJOperation__v4_v_; text: .text%__1cRaddL_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIDivLNodeJideal_reg6kM_I_; text: .text%__1cGICStubFclear6M_v_; -text: .text%__1cTconvI2D_reg_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cMsubD_regNodeJnum_opnds6kM_I_; -text: .text%__1cMsubD_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cHCompileWget_MethodAccessorImpl6M_pnPciInstanceKlass__; -text: .text%__1cHCompileRget_Method_invoke6M_pnIciMethod__; text: .text%__1cNdecI_rRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cFTypeFFxdual6kM_pknEType__; -text: .text%__1cTconvL2D_reg_memNodeJnum_opnds6kM_I_; -text: .text%__1cTconvI2D_reg_regNodeJnum_opnds6kM_I_; -text: .text%__1cTunsafe_intrinsic_id6FpnNsymbolOopDesc_1_nMvmIntrinsicsCID__; -text: .text%__1cPPerfDataManagerUcreate_long_constant6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnQPerfLongConstant__; text: .text%__1cFStateM_sub_Op_ConF6MpknENode__v_; text: .text%__1cMloadConFNodeHsize_of6kM_I_; text: .text%__1cPsarL_rReg_2NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQsarL_rReg_63NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPoldgetTimeNanos6F_x_; -text: .text%__1cPno_rax_RegLOperFclone6kM_pnIMachOper__; -text: .text%__1cTAbstractInterpreterMreturn_entry6FnITosState_i_pC_; -text: .text%__1cPsarL_rReg_1NodePoper_input_base6kM_I_; -text: .text%__1cMnegD_regNodeJnum_opnds6kM_I_; text: .text%__1cKmul_hiNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cJAssemblerEjccb6Mn0AJCondition_rnFLabel_nJrelocInfoJrelocType__v_; text: .text%__1cNcmovP_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cHMonitor2T6M_v_; text: .text%__1cINegDNodeLbottom_type6kM_pknEType__; -text: .text%__1cLvframeArrayIallocate6FpnKJavaThread_ipnNGrowableArray4CpnOcompiledVFrame___pnLRegisterMap_nFframe_9A9A9A_p0_; -text: .text%__1cNThreadServiceNremove_thread6FpnKJavaThread_i_v_; text: .text%__1cQjava_lang_ThreadbGinherited_access_control_context6FpnHoopDesc__2_; -text: .text%__1cODeoptimizationScreate_vframeArray6FpnKJavaThread_nFframe_pnLRegisterMap__pnLvframeArray__; text: .text%__1cHThreadsGremove6FpnKJavaThread__v_; text: .text%__1cODeoptimizationTuncommon_trap_inner6FpnKJavaThread_i_v_; -text: .text%__1cODeoptimizationPget_method_data6FpnKJavaThread_nMmethodHandle_i_pnRmethodDataOopDesc__; text: .text%__1cLensure_join6FpnKJavaThread__v_: thread.o; text: .text%__1cIOSThread2T6M_v_; text: .text%__1cODeoptimizationNuncommon_trap6FpnKJavaThread_i_pn0ALUnrollBlock__; @@ -6118,10 +3946,7 @@ text: .text%__1cTconvI2D_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cODeoptimizationRgather_statistics6Fn0ALDeoptReason_n0ALDeoptAction_nJBytecodesECode__v_; text: .text%__1cUThreadSafepointStateHdestroy6FpnKJavaThread__v_; text: .text%__1cIGraphKitTdprecision_rounding6MpnENode__2_; -text: .text%__1cNGrowableArray4CpnOcompiledVFrame__2t6Mii_v_; text: .text%__1cOcmovI_regUNodeErule6kM_I_; -text: .text%__1cKJavaThreadEexit6Mi_v_; -text: .text%__1cGParker2T6M_v_; text: .text%__1cCosLfree_thread6FpnIOSThread__v_; text: .text%__1cXpartialSubtypeCheckNodeMideal_Opcode6kM_i_; text: .text%JVM_GetInheritedAccessControlContext; @@ -6135,10 +3960,6 @@ text: .text%__1cMmulD_memNodePoper_input_base6kM_I_; text: .text%__1cRInlineCacheBufferSic_destination_for6FpnKCompiledIC__pC_; text: .text%__1cLvframeArrayPunpack_to_stack6MrnFframe_i_v_; text: .text%__1cOcompL_rRegNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cODeoptimizationLUnrollBlock2t6MiiiiiplppCnJBasicType__v_; -text: .text%__1cLvframeArrayHfill_in6MpnKJavaThread_ipnNGrowableArray4CpnOcompiledVFrame___pknLRegisterMap_i_v_; -text: .text%__SLIP.DELETER__A: thread.o; -text: .text%__1cbIjava_security_AccessControlContextGcreate6FnOobjArrayHandle_inGHandle_pnGThread__pnHoopDesc__; text: .text%__1cIOSThreadKpd_destroy6M_v_; text: .text%__1cMaddF_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cODeoptimizationYfetch_unroll_info_helper6FpnKJavaThread__pn0ALUnrollBlock__; @@ -6146,15 +3967,12 @@ text: .text%__1cODeoptimizationRlast_frame_adjust6Fii_i_; text: .text%__1cKJavaThreadYremove_stack_guard_pages6M_v_; text: .text%__1cODeoptimizationNunpack_frames6FpnKJavaThread_i_nJBasicType__; text: .text%__1cNnmethodLocker2t6MpC_v_; -text: .text%__1cTconvD2I_reg_regNodeHtwo_adr6kM_I_; text: .text%__1cOtailjmpIndNodeMideal_Opcode6kM_i_; text: .text%__1cLconvI2BNodeErule6kM_I_; text: .text%__1cTconvF2I_reg_regNodeErule6kM_I_; text: .text%__1cIciMethodVget_osr_flow_analysis6Mi_pnKciTypeFlow__; text: .text%__1cSCallLeafDirectNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cQAbstractCompilerMsupports_osr6M_i_; text: .text%__1cRaddL_mem_rRegNodePoper_input_base6kM_I_; -text: .text%__1cSCallLeafDirectNodeJnum_opnds6kM_I_; text: .text%__1cXjava_lang_reflect_FieldJmodifiers6FpnHoopDesc__i_; text: .text%__1cMmulL_memNodePoper_input_base6kM_I_; text: .text%__1cODeoptimizationLUnrollBlock2T6M_v_; @@ -6171,14 +3989,10 @@ text: .text%__1cJSubFPNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cZInterpreterMacroAssemblerNdispatch_only6MnITosState__v_; text: .text%__1cRcmpFastUnlockNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKloadUBNodeFreloc6kM_i_; -text: .text%__1cMStartOSRNodeScalling_convention6kMpnLOptoRegPair_I_v_; text: .text%__1cMStartOSRNodeKosr_domain6F_pknJTypeTuple__; -text: .text%__1cMloadConPNodeGis_Con6kM_I_; text: .text%__1cMmulD_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cXjava_lang_reflect_FieldFclazz6FpnHoopDesc__2_; -text: .text%__1cOPSVirtualSpaceJexpand_by6ML_i_; text: .text%__1cNCallGeneratorHfor_osr6FpnIciMethod_i_p0_; -text: .text%__1cFParseWload_interpreter_state6MpnENode_2_v_; text: .text%__1cKstoreINodeIpipeline6kM_pknIPipeline__; text: .text%__1cOstackSlotDOperKin_RegMask6kMi_pknHRegMask__; text: .text%jni_GetFloatArrayRegion: jni.o; @@ -6191,121 +4005,82 @@ text: .text%__1cRaddL_mem_rRegNodeMideal_Opcode6kM_i_; text: .text%__1cIAddFNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cJloadDNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMlogD_regNodeErule6kM_I_; -text: .text%__1cXpartialSubtypeCheckNodePoper_input_base6kM_I_; text: .text%__1cNmulI_rRegNodeHtwo_adr6kM_I_; text: .text%__1cMdecI_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQsalL_rReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKemit_break6FrnKCodeBuffer__v_; text: .text%jni_GetStaticMethodID: jni.o; -text: .text%__1cOstackSlotDOperJnum_edges6kM_I_; text: .text%__1cMsubF_regNodeMcisc_operand6kM_i_; text: .text%__1cMdecI_memNodeFreloc6kM_i_; -text: .text%__1cMdecI_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRCardTableModRefBSbCfind_covering_region_by_base6MpnIHeapWord__i_; text: .text%__1cRCardTableModRefBSVresize_covered_region6MnJMemRegion__v_; text: .text%__1cINegFNodeGOpcode6kM_i_; text: .text%__1cRCardTableModRefBSbAlargest_prev_committed_end6kMi_pnIHeapWord__; -text: .text%__1cLloadSSDNodeJnum_opnds6kM_I_; text: .text%__1cSMachBreakpointNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSCardTableExtensionVresize_covered_region6MnJMemRegion__v_; -text: .text%__1cLconvI2BNodeJnum_opnds6kM_I_; text: .text%__1cNstoreImmPNodePoper_input_base6kM_I_; text: .text%__1cKReflectionUarray_component_type6FpnHoopDesc_pnGThread__2_; text: .text%__1cKoopFactoryUnew_compiledICHolder6FnMmethodHandle_nLKlassHandle_pnGThread__pnXcompiledICHolderOopDesc__; -text: .text%__1cHCompile2t6MpnFciEnv_pF_pknITypeFunc_pCpkciiii_v_; text: .text%__1cTconvL2F_reg_regNodeMcisc_operand6kM_i_; -text: .text%__1cMciArrayKlassOis_array_klass6M_i_; -text: .text%__1cNloadConPcNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cKarrayKlassWuncached_lookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cFStateM_sub_Op_CmpD6MpknENode__v_; -text: .text%__1cNloadConL0NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cUCallNativeDirectNodeKmethod_set6Ml_v_; text: .text%__1cKcastPPNodeMideal_Opcode6kM_i_; -text: .text%__1cNcmovL_memNodeJnum_opnds6kM_I_; text: .text%__1cZInterpreterMacroAssemblerUprofile_taken_branch6MpnMRegisterImpl_2_v_; text: .text%__1cPshrL_rReg_1NodeHtwo_adr6kM_I_; -text: .text%__1cIGraphKitIgen_stub6MpCpkciii_v_; text: .text%__1cbDcatch_cleanup_find_cloned_def6FpnFBlock_pnENode_1rnLBlock_Array_i_3_: lcm.o; text: .text%__1cVcompiledICHolderKlassIallocate6MpnGThread__pnXcompiledICHolderOopDesc__; -text: .text%__1cTC2IAdapterGeneratorUmkh_unverified_entry6FnMmethodHandle__pC_; -text: .text%__1cRaddL_rReg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cLOptoRuntimeNgenerate_stub6FpnFciEnv_pF_pknITypeFunc_pCpkciiii_8_; text: .text%__1cISubDNodeLbottom_type6kM_pknEType__; text: .text%__1cbCcatch_cleanup_fix_all_inputs6FpnENode_11_v_: lcm.o; text: .text%__1cISubFNodeLbottom_type6kM_pknEType__; text: .text%__1cNdivI_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNTemplateTableGbranch6Fii_v_; -text: .text%__1cNstoreImmPNodeHtwo_adr6kM_I_; -text: .text%__1cLOptoRuntimeRnew_objArray_Type6F_pknITypeFunc__; text: .text%JVM_GetComponentType; text: .text%__1cIMulDNodeJideal_reg6kM_I_; -text: .text%__1cTconvF2D_reg_regNodeHtwo_adr6kM_I_; text: .text%__1cJAssemblerEsbbq6MpnMRegisterImpl_i_v_; text: .text%__1cNcmovL_memNodeMideal_Opcode6kM_i_; text: .text%jni_GetStringRegion: jni.o; text: .text%jni_EnsureLocalCapacity: jni.o; -text: .text%__1cLloadSSDNodeHtwo_adr6kM_I_; text: .text%__1cMaddF_memNodePoper_input_base6kM_I_; text: .text%__1cFParseMdo_anewarray6M_v_; text: .text%__1cLConvI2FNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cLconvI2BNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cOMacroAssemblerHcall_VM6MpnMRegisterImpl_pC22i_v_; text: .text%__1cHThreadsYis_supported_jni_version6Fi_C_; -text: .text%__1cMincL_memNodeJnum_opnds6kM_I_; -text: .text%__1cRandL_rReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cKarrayKlassYcompute_secondary_supers6MipnGThread__pnPobjArrayOopDesc__; -text: .text%__1cRaddL_mem_rRegNodeJnum_opnds6kM_I_; text: .text%JVM_NewArray; text: .text%JVM_FreeMemory; text: .text%JVM_TotalMemory; -text: .text%__1cMaddD_immNodeJnum_opnds6kM_I_; -text: .text%__1cMsubF_regNodeJnum_opnds6kM_I_; -text: .text%__1cLloadSSINodePoper_input_base6kM_I_; text: .text%__1cNinstanceKlassPadd_osr_nmethod6MpnHnmethod__v_; text: .text%__1cMincI_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKReflectionRreflect_new_array6FpnHoopDesc_ipnGThread__pnMarrayOopDesc__; -text: .text%__1cMsubF_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cMmulF_memNodeErule6kM_I_; text: .text%__1cODeoptimizationbJupdate_method_data_from_interpreter6FnQmethodDataHandle_ii_v_; text: .text%__1cLClassLoaderSget_system_package6FpkcpnGThread__pnHoopDesc__; text: .text%__1cMTailJumpNodeKmatch_edge6kMI_I_; -text: .text%__1cFStateL_sub_Op_Box6MpknENode__v_; text: .text%__1cRaddL_rReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cTconvL2F_reg_regNodeErule6kM_I_; text: .text%__1cKPSYoungGenLpost_resize6M_v_; text: .text%__1cNcmovL_regNodeErule6kM_I_; -text: .text%__1cOcmovD_regUNodeJnum_opnds6kM_I_; text: .text%__1cRandI_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMnegF_regNodeHtwo_adr6kM_I_; -text: .text%__1cTAbstractInterpreterRTosState_as_index6FnITosState__i_; text: .text%__1cHThreadsbMis_supported_jni_version_including_1_16Fi_C_; text: .text%__1cKstoreBNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cPBytecode_invokeLresult_type6kMpnGThread__nJBasicType__; text: .text%__1cMincL_memNodeMideal_Opcode6kM_i_; text: .text%__1cJAssemblerEaddl6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cJloadCNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cCosPuncommit_memory6FpcL_i_; text: .text%__1cSInterpreterRuntimeJnote_trap6FpnKJavaThread_ipnGThread__v_; text: .text%__1cRSignatureIteratorHiterate6M_v_; text: .text%__1cIModLNodeJideal_reg6kM_I_; -text: .text%__1cNTemplateTableOpatch_bytecode6FnJBytecodesECode_pnMRegisterImpl_4i_v_; text: .text%__1cLConvD2INodeLbottom_type6kM_pknEType__; text: .text%__1cMaddF_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cHBoxNodeLbottom_type6kM_pknEType__; text: .text%__1cFStateM_sub_Op_DivL6MpknENode__v_; text: .text%__1cTconvL2D_reg_memNodeErule6kM_I_; text: .text%JVM_GetSystemPackage; -text: .text%__1cCosNcommit_memory6FpcLL_i_; text: .text%__1cOMacroAssemblerFenter6M_v_; text: .text%__1cLConvF2DNodeJideal_reg6kM_I_; text: .text%__1cNTemplateTableLindex_check6FpnMRegisterImpl_2_v_; text: .text%__1cKNativeJumpUpatch_verified_entry6FpC11_v_; text: .text%__1cLMoveL2DNodeGOpcode6kM_i_; -text: .text%__1cMincI_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFStateP_sub_Op_ConvF2D6MpknENode__v_; text: .text%__1cMmulL_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%Unsafe_DefineClass1; -text: .text%__1cSUnsafe_DefineClass6FpnHJNIEnv__pnI_jstring_pnL_jbyteArray_iipnI_jobject_7_pnH_jclass__: unsafe.o; text: .text%__1cFTypeDFxdual6kM_pknEType__; text: .text%__1cMincI_memNodeFreloc6kM_i_; text: .text%__1cPcmpF_cc_regNodeLout_RegMask6kM_rknHRegMask__; @@ -6314,12 +4089,8 @@ text: .text%__1cMsubF_memNodePoper_input_base6kM_I_; text: .text%__1cTconvF2D_reg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%JVM_DefineClass; text: .text%__1cMaddF_memNodeMideal_Opcode6kM_i_; -text: .text%__1cMmulL_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cMmulL_memNodeJnum_opnds6kM_I_; text: .text%__1cJAssemblerEshrq6MpnMRegisterImpl_i_v_; -text: .text%__1cTC2IAdapterGeneratorLadapter_for6FnMmethodHandle__pnKC2IAdapter__; text: .text%__1cPcmpFastLockNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cZInterpreterMacroAssemblerQtest_mdp_data_at6MpnMRegisterImpl_i2rnFLabel__v_; text: .text%__1cZInterpreterMacroAssemblerYprofile_not_taken_branch6MpnMRegisterImpl__v_; text: .text%__1cTleaPIdxScaleOffNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_533pnGThread__v_; @@ -6327,42 +4098,29 @@ text: .text%__1cYjava_lang_reflect_MethodFclazz6FpnHoopDesc__2_; text: .text%__1cYjava_lang_reflect_MethodEslot6FpnHoopDesc__i_; text: .text%__1cYjava_lang_reflect_MethodLreturn_type6FpnHoopDesc__2_; text: .text%__1cYjava_lang_reflect_MethodPparameter_types6FpnHoopDesc__2_; -text: .text%__1cNloadConL0NodeGis_Con6kM_I_; -text: .text%__1cMset_property6FnGHandle_pkc2pnGThread__v_: jvm.o; text: .text%JVM_GetCPFieldModifiers; text: .text%JVM_InvokeMethod; text: .text%__1cFKlassWcompute_modifier_flags6kMpnGThread__i_; -text: .text%__1cZcatch_cleanup_inter_block6FpnENode_pnFBlock_13rnLBlock_Array_i_v_: lcm.o; text: .text%__1cOsalI_mem_1NodeMideal_Opcode6kM_i_; -text: .text%__1cMaddF_immNodeJnum_opnds6kM_I_; -text: .text%__1cMsubD_immNodePoper_input_base6kM_I_; text: .text%__1cMmulF_regNodeMcisc_operand6kM_i_; -text: .text%__1cMmulF_regNodeJnum_opnds6kM_I_; -text: .text%__1cMmulF_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cMmulD_regNodeHtwo_adr6kM_I_; text: .text%__1cTconvD2F_reg_regNodeMcisc_operand6kM_i_; text: .text%jni_AllocObject: jni.o; -text: .text%__1cCosHSolarisOset_mpss_range6FpcLL_i_; text: .text%__1cTconvF2I_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFParseOdo_tableswitch6M_v_; text: .text%__1cTmembar_volatileNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKReflectionNinvoke_method6FpnHoopDesc_nGHandle_nOobjArrayHandle_pnGThread__2_; -text: .text%__1cMrdx_RegLOperFclone6kM_pnIMachOper__; text: .text%__1cICmpFNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFn0AJCondition__v4_v_; -text: .text%__1cFj_not6FnNTemplateTableJCondition__nJAssemblerJCondition__: templateTable_amd64.o; text: .text%__1cNTemplateTableMlocals_index6FpnMRegisterImpl_i_v_; text: .text%__1cTconvF2D_reg_regNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cMmulF_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%Unsafe_AllocateInstance; text: .text%__1cZInterpreterMacroAssemblerNunlock_object6MpnMRegisterImpl__v_; text: .text%__1cOcmovD_regUNodeMideal_Opcode6kM_i_; -text: .text%__1cIciObjectMis_classless6kM_i_; text: .text%__1cMsubD_immNodeMideal_Opcode6kM_i_; text: .text%__1cRInlineCacheBufferOinit_next_stub6F_v_; text: .text%__1cPshrL_rReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMsubD_immNodeErule6kM_I_; -text: .text%__1cHTypePtrKadd_offset6kMi_pk0_; text: .text%__1cNTemplateTableHconvert6F_v_; text: .text%__1cMnegD_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQorI_rReg_memNodeOmemory_operand6kM_pknIMachOper__; @@ -6377,7 +4135,6 @@ text: .text%__1cTconvD2I_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cScompL_rReg_memNodeMideal_Opcode6kM_i_; text: .text%__1cXpartialSubtypeCheckNodeErule6kM_I_; text: .text%__1cOstackSlotDOperEtype6kM_pknEType__; -text: .text%__1cHThreadsLnmethods_do6F_v_; text: .text%__1cLloadSSDNodeErule6kM_I_; text: .text%__1cMsubD_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRComputeEntryStackIdo_short6M_v_; @@ -6390,7 +4147,6 @@ text: .text%__1cMloadConFNodeKconst_size6kM_i_; text: .text%__1cMorL_rRegNodeMcisc_operand6kM_i_; text: .text%__1cMmulD_memNodeMideal_Opcode6kM_i_; text: .text%__1cMaddD_regNodeMideal_Opcode6kM_i_; -text: .text%__1cTconvI2D_reg_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cMnegF_regNodeMideal_Opcode6kM_i_; text: .text%__1cMloadConFNodeFreloc6kM_i_; text: .text%__1cILogDNodeLbottom_type6kM_pknEType__; @@ -6398,48 +4154,35 @@ text: .text%__1cLConvI2DNodeLbottom_type6kM_pknEType__; text: .text%__1cNstoreImmPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLStrCompNodeJideal_reg6kM_I_; text: .text%__1cMlogD_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cFVTuneOdelete_nmethod6FpnHnmethod__v_; text: .text%__1cMaddD_regNodeMcisc_operand6kM_i_; text: .text%__1cMaddD_regNodeErule6kM_I_; text: .text%__1cScompL_rReg_memNodePoper_input_base6kM_I_; text: .text%__1cIAddFNodeJideal_reg6kM_I_; -text: .text%__1cJimmP0OperPconstant_is_oop6kM_i_; text: .text%__1cJimmP0OperIconstant6kM_l_; text: .text%__1cNciMethodKlassEmake6F_p0_; -text: .text%__1cETypeJis_finite6kM_i_; text: .text%__1cHnmethodFflush6M_v_; text: .text%JVM_GetClassContext; -text: .text%__1cIciObjectTis_type_array_klass6M_i_; -text: .text%__1cNsubL_rRegNodeMcisc_version6Mi_pnIMachNode__; -text: .text%__1cIregFOperFclone6kM_pnIMachOper__; text: .text%__1cRfind_field_offset6FpnI_jobject_ipnGThread__i_; -text: .text%__1cHBoxNodeJideal_reg6kM_I_; text: .text%__1cXPartialSubtypeCheckNodeLbottom_type6kM_pknEType__; text: .text%__1cIciMethod2t6MpnPciInstanceKlass_pnIciSymbol_4_v_; text: .text%__1cPfieldDescriptorTfloat_initial_value6kM_f_; -text: .text%__1cLloadSSDNodeMideal_Opcode6kM_i_; text: .text%__1cMsubF_regNodeErule6kM_I_; text: .text%__1cRsubL_rReg_memNodeFreloc6kM_i_; -text: .text%__1cKExceptionsNnew_exception6FpnGThread_pnNsymbolOopDesc_pkc_nGHandle__; text: .text%__1cTconvL2F_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMmulF_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJStubQdDueueKremove_all6M_v_; text: .text%__1cIDivDNodeLbottom_type6kM_pknEType__; text: .text%__1cLStatSamplerTget_system_property6FpkcpnGThread__2_; -text: .text%__1cRmethodDataOopDescRbci_to_extra_data6Mii_pnLProfileData__; text: .text%__1cICodeBlobFflush6M_v_; text: .text%__1cVMoveF2I_reg_stackNodeMideal_Opcode6kM_i_; -text: .text%__1cNmodL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJArgumentsQPropertyList_add6FppnOSystemProperty_2_v_; text: .text%__1cKstoreCNodeIpipeline6kM_pknIPipeline__; text: .text%__1cSmembar_releaseNodeIadr_type6kM_pknHTypePtr__; -text: .text%__1cQsalI_rReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cSInterpreterRuntimeQcreate_exception6FpnKJavaThread_pc3_v_; text: .text%__1cJAssemblerEaddl6MpnMRegisterImpl_2_v_; text: .text%__1cJStubQdDueueMremove_first6Mi_v_; text: .text%__1cQinitialize_class6FnMsymbolHandle_pnGThread__v_: thread.o; text: .text%__1cJAssemblerFcmovq6Mn0AJCondition_pnMRegisterImpl_nHAddress__v_; -text: .text%__1cXpartialSubtypeCheckNodeJnum_opnds6kM_I_; text: .text%__1cMmulD_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cMaddF_immNodeHtwo_adr6kM_I_; text: .text%__1cIMulDNodeGmul_id6kM_pknEType__; @@ -6451,20 +4194,15 @@ text: .text%__1cFStateM_sub_Op_MulD6MpknENode__v_; text: .text%__1cFStateM_sub_Op_ModL6MpknENode__v_; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4nGHandle_pnGThread__v_; text: .text%__1cXjava_lang_reflect_FieldEslot6FpnHoopDesc__i_; -text: .text%__1cPloadConUL32NodeGis_Con6kM_I_; text: .text%__1cQshrL_rReg_CLNodeHtwo_adr6kM_I_; text: .text%__1cKJavaThreadbOcheck_special_condition_for_native_trans6Fp0_v_; -text: .text%__1cODeoptimizationYreset_invocation_counter6FpnJScopeDesc_i_v_; text: .text%__1cZCallDynamicJavaDirectNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cTconvF2I_reg_regNodeJnum_opnds6kM_I_; -text: .text%__1cMmulD_memNodeJnum_opnds6kM_I_; text: .text%__1cHOrLNodeGOpcode6kM_i_; text: .text%__1cIMulFNodeGmul_id6kM_pknEType__; text: .text%__1cMnegF_regNodeErule6kM_I_; text: .text%__1cMsubF_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cTconvD2F_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%JVM_RawMonitorCreate; -text: .text%__1cOresolve_symbol6Fpkc_pC_: os_solaris.o; text: .text%__1cMMutableSpaceOobject_iterate6MpnNObjectClosure__v_; text: .text%__1cKCMoveDNodeGOpcode6kM_i_; text: .text%__1cFParseQdo_monitor_enter6M_v_; @@ -6472,34 +4210,17 @@ text: .text%__1cPMultiBranchDataPpost_initialize6MpnOBytecodeStream_pnRmethodDat text: .text%__1cXpartialSubtypeCheckNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLConvD2INodeJideal_reg6kM_I_; text: .text%__1cKcastPPNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cZCallDynamicJavaDirectNodeJnum_opnds6kM_I_; -text: .text%__1cMlogD_regNodeJnum_opnds6kM_I_; text: .text%Unsafe_CompareAndSwapInt; text: .text%__1cOstackSlotIOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cOstackSlotIOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cMmatch_option6FpknMJavaVMOption_ppkc5i_i_: arguments.o; text: .text%__1cMmulD_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNmulI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKimmL32OperFclone6kM_pnIMachOper__; -text: .text%__1cIimmFOperFclone6kM_pnIMachOper__; text: .text%__1cOMacroAssemblerTset_last_Java_frame6MpnMRegisterImpl_22pC_v_; -text: .text%__1cOindOffset8OperFclone6kM_pnIMachOper__; -text: .text%__1cOMacroAssemblerVreset_last_Java_frame6MpnMRegisterImpl_i_v_; -text: .text%__1cOloadConL32NodeFclone6kM_pnENode__; -text: .text%__1cMloadConFNodeFclone6kM_pnENode__; text: .text%__1cScompL_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQinstanceRefKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cNTemplateTableRlocals_index_wide6FpnMRegisterImpl__v_; -text: .text%__1cVMoveL2D_reg_stackNodePoper_input_base6kM_I_; text: .text%__1cZInterpreterMacroAssemblerPset_mdp_data_at6MpnMRegisterImpl_i2_v_; -text: .text%__1cKOSRAdapter2n6FLI_pv_; -text: .text%__1cKOSRAdapterPnew_osr_adapter6FpnKCodeBuffer_pnJOopMapSet_ii_p0_; text: .text%__1cJAssemblerEincl6MnHAddress__v_; -text: .text%__1cKOSRAdapter2t6MpnKCodeBuffer_pnJOopMapSet_iii_v_; -text: .text%__1cTconvI2D_reg_regNodeHtwo_adr6kM_I_; -text: .text%__1cNSharedRuntimeRgenerate_osr_blob6Fi_pnKOSRAdapter__; -text: .text%__1cMaddD_regNodeJnum_opnds6kM_I_; -text: .text%__1cbCAbstractInterpreterGeneratorUset_wide_entry_point6MpnITemplate_rpC_v_; text: .text%__1cMmulF_regNodeErule6kM_I_; text: .text%__1cIMulFNodeJideal_reg6kM_I_; text: .text%__1cFStateM_sub_Op_MulF6MpknENode__v_; @@ -6507,149 +4228,85 @@ text: .text%__1cJOopMapSetQsingular_oop_map6M_pnGOopMap__; text: .text%__1cHnmethodVmark_as_seen_on_stack6M_v_; text: .text%__1cMloadConDNodeHsize_of6kM_I_; text: .text%__1cOcmovI_regUNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cLconvI2BNodeHtwo_adr6kM_I_; -text: .text%__1cMorL_rRegNodeJnum_opnds6kM_I_; text: .text%__1cQorI_rReg_memNodeFreloc6kM_i_; text: .text%__1cMaddD_immNodeHtwo_adr6kM_I_; text: .text%__1cMloadConDNodeKconst_size6kM_i_; text: .text%__1cLConvL2FNodeLbottom_type6kM_pknEType__; text: .text%__1cLConvL2DNodeLbottom_type6kM_pknEType__; -text: .text%__1cLloadSSINodeMideal_Opcode6kM_i_; text: .text%__1cOstackSlotDOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cTconvF2D_reg_memNodeFreloc6kM_i_; text: .text%__1cLConvD2INodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cTconvL2D_reg_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cMloadConDNodeFreloc6kM_i_; text: .text%JVM_Lseek; text: .text%__1cPsarL_rReg_1NodeErule6kM_I_; text: .text%__1cPsarL_rReg_1NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cVcompiledICHolderKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cMaddD_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cOstackSlotDOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_; -text: .text%__1cMorL_rRegNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cMmulF_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMlogD_regNodeHtwo_adr6kM_I_; -text: .text%__1cRaddI_mem_rRegNodeHtwo_adr6kM_I_; text: .text%__1cFStateM_sub_Op_AddF6MpknENode__v_; text: .text%__1cIXorINodeIadd_ring6kMpknEType_3_3_; -text: .text%__1cTconvL2F_reg_regNodeJnum_opnds6kM_I_; -text: .text%__1cSstring_compareNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cNGrowableArray4CpnKOSRAdapter__Praw_at_put_grow6Mirk14_v_; text: .text%__1cFStateP_sub_Op_StrComp6MpknENode__v_; -text: .text%__1cTconvL2F_reg_regNodePin_oper_RegMask6kMIII_pknHRegMask__; -text: .text%__1cUInterpreterGeneratorUgenerate_fixed_frame6Mi_v_; text: .text%__1cGciType2t6MnJBasicType__v_; -text: .text%__1cMaddF_memNodeJnum_opnds6kM_I_; -text: .text%__1cUInterpreterGeneratorbAgenerate_run_compiled_code6M_v_; text: .text%__1cScompL_rReg_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cUInterpreterGeneratorZgenerate_counter_overflow6MpC_v_; text: .text%__1cUInterpreterGeneratorVgenerate_counter_incr6MpnFLabel_22_v_; text: .text%__1cPcmpF_cc_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cXNativeSignatureIteratorHdo_bool6M_v_; text: .text%__1cQmulI_mem_immNodePoper_input_base6kM_I_; -text: .text%__1cbCAbstractInterpreterGeneratorXbang_stack_shadow_pages6Mi_v_; text: .text%__1cZInterpreterMacroAssemblerTnotify_method_entry6M_v_; -text: .text%__1cNdecL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cOLibraryCallKitXinline_string_compareTo6M_i_; -text: .text%__1cScompL_rReg_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cJAssemblerEsubq6MpnMRegisterImpl_nHAddress__v_; text: .text%jni_GetEnv; text: .text%JVM_NanoTime; -text: .text%__1cCosNjavaTimeNanos6F_x_; -text: .text%__1cZInterpreterMacroAssemblerNsuper_call_VM6MpnMRegisterImpl_2pC22_v_; -text: .text%__1cFTypeFJis_finite6kM_i_; text: .text%__1cRmulI_rReg_immNodeIpipeline6kM_pknIPipeline__; text: .text%__1cOMacroAssemblerRcall_VM_leaf_base6MpCi_v_; -text: .text%__1cScompL_rReg_memNodeJnum_opnds6kM_I_; -text: .text%__1cHMulNodeGis_Mul6kM_pk0_; text: .text%__1cETypeEmake6Fn0AFTYPES__pk0_; text: .text%__1cQmulI_mem_immNodeMideal_Opcode6kM_i_; -text: .text%__1cParrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cJAssemblerLemit_data646MxnJrelocInfoJrelocType_i_v_; text: .text%__1cJAssemblerFpushq6MnHAddress__v_; -text: .text%__1cIGraphKitSgen_native_wrapper6MpnIciMethod__v_; text: .text%__1cRComputeEntryStackIdo_array6Mii_v_; text: .text%__1cPcmpD_cc_immNodeKconst_size6kM_i_; -text: .text%__1cKLoadPCNodeJideal_reg6kM_I_; text: .text%__1cMorL_rRegNodeErule6kM_I_; -text: .text%__1cUCallNativeDirectNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cScompP_rReg_memNodePoper_input_base6kM_I_; text: .text%__1cScompP_rReg_memNodeMideal_Opcode6kM_i_; -text: .text%__1cSvframeStreamCommonbFfill_in_compiled_inlined_sender6M_i_; text: .text%__1cNdivI_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cKcastPPNodeJnum_opnds6kM_I_; -text: .text%__1cTconvL2D_reg_memNodeHtwo_adr6kM_I_; -text: .text%__1cOLibraryCallKitbNinline_native_Reflection_getCallerClass6M_i_; -text: .text%__1cOLibraryCallKitZinline_native_Class_query6MnMvmIntrinsicsCID__i_; text: .text%__1cMnegF_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHCompile2t6MpnFciEnv_pnKC2Compiler_pnIciMethod__v_; text: .text%__1cKciTypeFlowLStateVectorOdo_null_assert6MpnHciKlass__v_; text: .text%__1cMsubD_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cJLoadLNodeMstore_Opcode6kM_i_; text: .text%__1cNGrowableArray4CpnGciType__Egrow6Mi_v_; -text: .text%__1cMdivD_immNodeJnum_opnds6kM_I_; -text: .text%__1cNstoreImmPNodeJnum_opnds6kM_I_; text: .text%__1cMdivD_immNodeHtwo_adr6kM_I_; -text: .text%__1cLloadSSINodeHtwo_adr6kM_I_; text: .text%__1cLConvI2FNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cIciMethodMnative_entry6M_pC_; text: .text%__1cPcmpD_cc_immNodeFreloc6kM_i_; -text: .text%__1cUCallNativeDirectNodeFreloc6kM_i_; -text: .text%__1cNloadConPcNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMmulD_memNodeErule6kM_I_; text: .text%jni_CallVoidMethod: jni.o; -text: .text%__1cFStateS_sub_Op_CallNative6MpknENode__v_; -text: .text%__1cFStateO_sub_Op_LoadPC6MpknENode__v_; -text: .text%__1cQAbstractCompilerPsupports_native6M_i_; -text: .text%__1cQorI_rReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cbCAbstractInterpreterGeneratorbBgenerate_result_handler_for6MnJBasicType__pC_; text: .text%__1cMmulF_regNodeHtwo_adr6kM_I_; -text: .text%__1cPsalL_rReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cQshrI_rReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNTemplateTableQvolatile_barrier6FnJAssemblerQMembar_mask_bits__v_; -text: .text%__1cNdivL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cVMoveL2D_reg_stackNodeErule6kM_I_; text: .text%__1cRsalI_rReg_immNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cNRelocIterator2t6MpnKCodeBuffer_pC3_v_; text: .text%__1cJBasicLockHmove_to6MpnHoopDesc_p0_v_; -text: .text%__1cYinternal_word_RelocationMforce_target6MpC_v_; text: .text%__1cOstackSlotIOperEtype6kM_pknEType__; -text: .text%__1cLloadSSINodeJnum_opnds6kM_I_; text: .text%__1cKPSYoungGenRavailable_to_live6M_L_; text: .text%__1cOstackSlotIOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cNcmovL_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cSstore_to_stackslot6FrnKCodeBuffer_iii_v_; -text: .text%__1cFTypeFGis_nan6kM_i_; text: .text%__1cQshrL_rReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cTconvD2F_reg_regNodeJnum_opnds6kM_I_; -text: .text%__1cbCAbstractInterpreterGeneratorZgenerate_safept_entry_for6MnITosState_pC_2_; text: .text%__1cUInterpreterGeneratorbDgenerate_stack_overflow_check6M_v_; text: .text%__1cRComputeEntryStackHdo_bool6M_v_; text: .text%__1cMmulD_immNodeFreloc6kM_i_; text: .text%__1cQmulI_mem_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cbCAbstractInterpreterGeneratorZgenerate_continuation_for6MnITosState__pC_; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%JVM_FindPrimitiveClass; -text: .text%__1cOstackSlotIOperJnum_edges6kM_I_; text: .text%JVM_IsSameClassPackage; -text: .text%__1cUInterpreterGeneratorXcheck_for_compiled_code6MrnFLabel__v_; text: .text%__1cRaddI_mem_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMaddF_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPjava_lang_ClassYcreate_basic_type_mirror6FpkcpnGThread__pnHoopDesc__; text: .text%__1cLconvI2BNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMaddD_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMlogD_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cOPSVirtualSpaceJshrink_by6ML_i_; -text: .text%__1cTconvD2F_reg_regNodePin_oper_RegMask6kMIII_pknHRegMask__; text: .text%__1cRCardTableModRefBSYcommitted_unique_to_self6kMinJMemRegion__1_; text: .text%__1cNTemplateTableEiop26Fn0AJOperation__v_; text: .text%__1cFStateN_sub_Op_LoadD6MpknENode__v_; text: .text%__1cTconvL2F_reg_regNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cZInterpreterMacroAssemblerRremove_activation6MnITosState_pnMRegisterImpl_iii_v_; text: .text%__1cZInterpreterMacroAssemblerMdispatch_via6MnITosState_ppC_v_; -text: .text%__1cUInterpreterGeneratorbEgenerate_asm_interpreter_entry6Mi_pC_; text: .text%__1cPcmpF_cc_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cMsubF_memNodeJnum_opnds6kM_I_; text: .text%__1cKPSYoungGenUavailable_to_min_gen6M_L_; text: .text%__1cJAssemblerKrepne_scan6M_v_; text: .text%__1cJname2type6Fpkc_nJBasicType__; @@ -6658,7 +4315,6 @@ text: .text%__1cKPSYoungGenQlimit_gen_shrink6ML_L_; text: .text%__1cTconvI2D_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFStateP_sub_Op_ConvI2F6MpknENode__v_; text: .text%__1cMmulD_immNodeKconst_size6kM_i_; -text: .text%__1cMmulD_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cMmulF_immNodeFreloc6kM_i_; text: .text%__1cJloadBNodeHsize_of6kM_I_; text: .text%__1cOcompI_rRegNodeHsize_of6kM_I_; @@ -6667,7 +4323,6 @@ text: .text%__1cJloadPNodeHsize_of6kM_I_; text: .text%__1cOtypeArrayKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cOtypeArrayKlassNexternal_name6FnJBasicType__pkc_; text: .text%Unsafe_StaticFieldOffset; -text: .text%__1cFTypeFFempty6kM_i_; text: .text%__1cNcmovL_regNodeHtwo_adr6kM_I_; text: .text%__1cLloadSSDNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateO_sub_Op_CMoveP6MpknENode__v_; @@ -6677,69 +4332,41 @@ text: .text%__1cVVM_ParallelGCSystemGC2t6MIInHGCCauseFCause__v_; text: .text%__1cJCmpF3NodeGOpcode6kM_i_; text: .text%Unsafe_GetObjectVolatile; text: .text%__1cMsubD_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cLdivL_10NodePoper_input_base6kM_I_; -text: .text%__1cVVM_ParallelGCSystemGCEname6kM_pkc_; -text: .text%__1cOtypeArrayKlassMcreate_klass6FnJBasicType_ipnGThread__pnMklassOopDesc__; text: .text%Unsafe_EnsureClassInitialized; -text: .text%__1cJAssemblerEjmpb6MrnFLabel_nJrelocInfoJrelocType__v_; text: .text%__1cQSystemDictionaryPresolve_or_null6FnMsymbolHandle_pnGThread__pnMklassOopDesc__; text: .text%__1cOcmovI_regUNodeHtwo_adr6kM_I_; text: .text%__1cMaddD_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJAssemblerEmovw6MnHAddress_pnMRegisterImpl__v_; text: .text%__1cJAssemblerGmovsbl6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cMrax_RegLOperFclone6kM_pnIMachOper__; text: .text%__1cMorL_rRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cTconvD2F_reg_regNodeHtwo_adr6kM_I_; text: .text%__1cUParallelScavengeHeapHcollect6MnHGCCauseFCause__v_; text: .text%__1cJLoadDNodeJideal_reg6kM_I_; text: .text%__1cQciTypeArrayKlass2t6MnLKlassHandle__v_; text: .text%__1cQmulI_mem_immNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpCi_v_; text: .text%__1cPcheckCastPPNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cJAssemblerFpopaq6M_v_; text: .text%__1cSmembar_acquireNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKimmL10OperJnum_edges6kM_I_; text: .text%Unsafe_StaticFieldBaseFromField; -text: .text%__1cLcastP2LNodeHsize_of6kM_I_; -text: .text%__1cQmulI_mem_immNodeRis_cisc_alternate6kM_i_; text: .text%__1cMsubD_regNodeHtwo_adr6kM_I_; -text: .text%__1cZInterpreterMacroAssemblerSnotify_method_exit6MnITosState__v_; text: .text%__1cRsubI_rReg_memNodeHsize_of6kM_I_; -text: .text%__1cTconvL2F_reg_regNodeHtwo_adr6kM_I_; -text: .text%__1cNReservedSpace2t6MpcL_v_; -text: .text%__1cKmul_hiNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cSmembar_acquireNodeJnum_opnds6kM_I_; -text: .text%__1cQsarL_rReg_63NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerMemit_arith_b6MiipnMRegisterImpl_i_v_; -text: .text%__1cPsarL_rReg_2NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cLdivL_10NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cNTemplateTableXresolve_cache_and_index6FipnMRegisterImpl_2_v_; text: .text%__1cNTemplateTableZjvmti_post_fast_field_mod6F_v_; text: .text%JVM_GC; text: .text%__1cNTemplateTablePfast_storefield6FnITosState__v_; text: .text%__1cNTemplateTableQfast_accessfield6FnITosState__v_; -text: .text%__1cScompP_rReg_memNodeJnum_opnds6kM_I_; -text: .text%__1cIPSOldGenSexpand_to_reserved6M_i_; -text: .text%__1cQmulI_mem_immNodeJnum_opnds6kM_I_; -text: .text%__1cIPSOldGenJexpand_by6ML_i_; text: .text%__1cIPSOldGenGexpand6ML_v_; text: .text%__1cIPSOldGenXexpand_and_cas_allocate6ML_pnIHeapWord__; text: .text%__1cPsarL_rReg_1NodeHtwo_adr6kM_I_; text: .text%__1cJAssemblerFtestb6MpnMRegisterImpl_i_v_; -text: .text%__1cXpartialSubtypeCheckNodeHtwo_adr6kM_I_; text: .text%__1cMsubF_regNodeHtwo_adr6kM_I_; -text: .text%__1cZInterpreterMacroAssemblerRget_constant_pool6MpnMRegisterImpl__v_; text: .text%__1cRaddL_rReg_memNodeFreloc6kM_i_; text: .text%__1cVMoveL2D_reg_stackNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cScompP_rReg_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cPsarL_rReg_1NodeJnum_opnds6kM_I_; text: .text%__1cOGenerateOopMapGdo_jsr6Mi_v_; text: .text%__1cMmulF_memNodeHtwo_adr6kM_I_; -text: .text%__1cScompP_rReg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cLPSMarkSweepGinvoke6Fpii_v_; text: .text%__1cOcmovD_regUNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNcmovL_memNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cTconvF2I_reg_regNodeHtwo_adr6kM_I_; text: .text%__1cMmulF_immNodeKconst_size6kM_i_; text: .text%__1cZInterpreterMacroAssemblerbGget_unsigned_2_byte_index_at_bcp6MpnMRegisterImpl_i_v_; text: .text%__1cZInterpreterMacroAssemblerRcall_VM_leaf_base6MpCi_v_; @@ -6748,44 +4375,28 @@ text: .text%__1cMdecI_memNodeIpipeline6kM_pknIPipeline__; text: .text%__1cCosMuser_handler6F_pv_; text: .text%__1cJloadDNodeFreloc6kM_i_; text: .text%__1cMincL_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cNaddL_rRegNodeMcisc_version6Mi_pnIMachNode__; -text: .text%__1cCosHSolarisSset_signal_handler6Fiii_v_; text: .text%__1cNinstanceKlassSremove_osr_nmethod6MpnHnmethod__v_; text: .text%__1cTconvD2F_reg_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cKMemoryPoolLadd_manager6MpnNMemoryManager__v_; text: .text%__1cMmulD_memNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cLClassLoaderbCupdate_class_path_entry_list6Fpkc_v_; text: .text%__1cMsubF_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOcmovI_regUNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cTconvL2D_reg_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cLOptoRuntimeRresolve_call_Type6F_pknITypeFunc__; -text: .text%__1cHciKlassIis_klass6M_i_; text: .text%__1cPPerfDataManagerKname_space6Fpkci_pc_; -text: .text%__1cKScopeValuePis_constant_int6kM_i_; text: .text%jni_RegisterNatives: jni.o; text: .text%Unsafe_GetNativeFloat; -text: .text%__1cMsubF_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%JVM_GetClassDeclaredFields; text: .text%__1cMsubF_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cJMemRegion2t6M_v_; text: .text%jni_SetStaticObjectField: jni.o; -text: .text%__1cQsalL_rReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cCosEstat6FpkcpnEstat__i_; -text: .text%__1cJArgumentsRverify_percentage6FLpkc_i_; text: .text%__1cLOptoRuntimeTmultianewarray_Type6Fi_pknITypeFunc__; text: .text%__1cRComputeEntryStackHdo_long6M_v_; text: .text%__1cHnmethodVinvalidate_osr_method6M_v_; -text: .text%__1cMaddF_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cNMemoryManagerIadd_pool6MpnKMemoryPool__v_; text: .text%jni_SetObjectField: jni.o; -text: .text%__1cLConvD2INodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cJAssemblerEcall6MpnMRegisterImpl_nJrelocInfoJrelocType__v_; text: .text%__1cJloadDNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cLConvD2INodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cOBasicHashtable2t6Mii_v_; -text: .text%__1cCosHSolarisOis_sig_ignored6Fi_i_; -text: .text%__1cNandI_rRegNodeMcisc_version6Mi_pnIMachNode__; -text: .text%__1cNcmovL_memNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cOPhaseIdealLoopJclone_iff6MpnHPhiNode_pnNIdealLoopTree__pnIBoolNode__; text: .text%__1cMTailJumpNodeGOpcode6kM_i_; text: .text%__1cCosHSolarisVcleanup_interruptible6FpnKJavaThread__v_; @@ -6795,7 +4406,6 @@ text: .text%__1cMdivD_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%JVM_IsSupportedJNIVersion; text: .text%JVM_LoadLibrary; text: .text%JVM_Sleep; -text: .text%__1cNReservedSpaceKinitialize6MLLipc_v_; text: .text%__1cHOrLNodeLbottom_type6kM_pknEType__; text: .text%__1cOstackSlotIOperFscale6kM_i_; text: .text%__1cLConvD2FNodeLbottom_type6kM_pknEType__; @@ -6804,7 +4414,6 @@ text: .text%jint_cmp: parse2.o; text: .text%__1cOstackSlotIOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cLloadSSINodeErule6kM_I_; text: .text%__1cLConvI2DNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cVMoveF2I_reg_stackNodePoper_input_base6kM_I_; text: .text%__1cLConvL2FNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cIDivDNodeJideal_reg6kM_I_; text: .text%__1cRandI_rReg_memNodeFreloc6kM_i_; @@ -6814,7 +4423,6 @@ text: .text%__1cPPerfLongVariant2t6MnJCounterNS_pkcnIPerfDataFUnits_n0CLVariabil text: .text%jni_MonitorExit: jni.o; text: .text%jni_MonitorEnter: jni.o; text: .text%__1cHciKlass2t6MnLKlassHandle_pnIciSymbol__v_; -text: .text%__1cPciInstanceKlassbDcompute_shared_is_initialized6M_i_; text: .text%__1cNGrowableArray4CpnIPerfData__Praw_at_put_grow6Mirk14_v_; text: .text%__1cFciEnvOrecord_failure6Mpkc_v_; text: .text%__1cMciArrayKlassRbase_element_type6M_pnGciType__; @@ -6822,14 +4430,11 @@ text: .text%__1cLConvL2DNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cOstackSlotDOperFscale6kM_i_; text: .text%__1cOstackSlotDOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_; text: .text%__1cOcmovI_regUNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKReturnNodeUdepends_only_on_test6kM_i_; text: .text%__1cNcmovL_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTconvD2F_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIDivDNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cTconvF2I_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTconvL2F_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cMsubD_immNodeJnum_opnds6kM_I_; -text: .text%__1cVMoveL2D_reg_stackNodeJnum_opnds6kM_I_; text: .text%__1cRaddI_mem_rRegNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cNTemplateTableH_return6FnITosState__v_; text: .text%__1cNTemplateTableHif_icmp6Fn0AJCondition__v_; @@ -6838,16 +4443,10 @@ text: .text%__1cTconvL2D_reg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cXpartialSubtypeCheckNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNSharedRuntimeEdrem6Fdd_d_; text: .text%__1cRaddI_rReg_immNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cMloadConDNodeFclone6kM_pnENode__; text: .text%__1cScompP_rReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKC2IAdapterXreturn_from_interpreter6M_pC_; -text: .text%__1cKC2IAdapterRsetup_stack_frame6MnFframe_pnLvframeArray__v_; -text: .text%__1cIregDOperFclone6kM_pnIMachOper__; text: .text%__1cJAssemblerGmovswl6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cMsubF_memNodeErule6kM_I_; -text: .text%__1cIimmDOperFclone6kM_pnIMachOper__; text: .text%__1cOMacroAssemblerQload_signed_byte6MpnMRegisterImpl_nHAddress__i_; -text: .text%__1cKC2IAdapterSunpack_c2i_adapter6MnFframe_1pnLvframeArray__v_; text: .text%__1cNdivI_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRMachSpillCopyNodeHsize_of6kM_I_; text: .text%__1cFframebFset_interpreter_frame_sender_sp6Mpl_v_; @@ -6861,26 +4460,15 @@ text: .text%__1cMsubD_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMmulF_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMmulF_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cCosZvm_allocation_granularity6F_i_; -text: .text%__1cJAssemblerFpopfq6M_v_; -text: .text%__1cCosOreserve_memory6FLpc_1_; text: .text%Unsafe_ObjectFieldOffset; -text: .text%__1cUParallelScavengeHeapEkind6M_nNCollectedHeapEName__; -text: .text%__1cKMemoryPool2t6Mpkcn0AIPoolType_LLii_v_; text: .text%__1cNSpaceCounters2t6MpkciLpnMMutableSpace_pnSGenerationCounters__v_; text: .text%__1cMNativeLookupTbase_library_lookup6Fpkc22_pC_; -text: .text%__1cMaddF_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cOcompiledVFrameUresolve_monitor_lock6kMnILocation__pnJBasicLock__; -text: .text%__1cTconvD2I_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cQjava_lang_ThreadKset_daemon6FpnHoopDesc__v_; text: .text%__1cKCompiledICSset_to_megamorphic6MpnICallInfo_nJBytecodesECode_pnGThread__v_; -text: .text%__1cNReservedSpaceKfirst_part6MLii_0_; text: .text%__1cNCellTypeStateImake_any6Fi_0_; text: .text%__1cMorL_rRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cNTemplateTableFaload6Fi_v_; -text: .text%__1cISubFNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cMnegF_regNodeJnum_opnds6kM_I_; -text: .text%__1cINegDNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cKCompiledICOis_megamorphic6kM_i_; text: .text%__1cXNativeSignatureIteratorJdo_double6M_v_; text: .text%__1cISubDNodeGadd_id6kM_pknEType__; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorLpass_double6M_v_; @@ -6893,47 +4481,30 @@ text: .text%__1cLMoveL2DNodeLbottom_type6kM_pknEType__; text: .text%__1cZCompiledArgumentOopFinderDset6MinJBasicType__v_; text: .text%__1cNstoreImmPNodeFreloc6kM_i_; text: .text%__1cNSharedRuntimeVhandle_ic_miss_helper6FpnKJavaThread_pnGThread__nMmethodHandle__; -text: .text%__1cLOptoRuntimebBhandle_wrong_method_ic_miss6FpnKJavaThread__pC_; text: .text%__1cKJavaThreadUremove_monitor_chunk6MpnMMonitorChunk__v_; text: .text%__1cKJavaThreadRadd_monitor_chunk6MpnMMonitorChunk__v_; text: .text%__1cNReservedSpace2t6ML_v_; text: .text%__1cPPerfDataManagerUcreate_long_variable6FnJCounterNS_pkcnIPerfDataFUnits_pnUPerfLongSampleHelper_pnGThread__pnQPerfLongVariable__; -text: .text%__1cNmulL_rRegNodeMcisc_version6Mi_pnIMachNode__; -text: .text%__1cNmulI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cTGeneratePairingInfoOreport_results6kM_i_; text: .text%Unsafe_GetNativeByte; text: .text%__1cbEJvmtiDynamicCodeEventCollector2T6M_v_; text: .text%__1cFframebLprevious_monitor_in_interpreter_frame6kMpnPBasicObjectLock__2_; text: .text%__1cbEJvmtiDynamicCodeEventCollector2t6M_v_; -text: .text%__1cOMacroAssemblerQload_signed_word6MpnMRegisterImpl_nHAddress__i_; -text: .text%__1cQOopMapCacheEntryPfill_for_native6M_v_; text: .text%__1cFStateP_sub_Op_ConvD2I6MpknENode__v_; -text: .text%__1cJAssemblerGpushfq6M_v_; text: .text%__1cKVtableStubRpd_code_alignment6F_i_; text: .text%__1cJAssemblerDorl6MpnMRegisterImpl_2_v_; -text: .text%__1cIDivFNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cINegDNodeJideal_reg6kM_I_; -text: .text%__1cODeoptimizationZtrap_state_set_recompiled6Fii_i_; -text: .text%__1cPshrL_rReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTconvF2D_reg_memNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKklassKlassOset_alloc_size6MI_v_; text: .text%__1cNandI_rRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cTMaskFillerForNative2t6MnMmethodHandle_pLi_v_; text: .text%__1cMsubF_memNodeHtwo_adr6kM_I_; text: .text%__1cINegFNodeLbottom_type6kM_pknEType__; -text: .text%__1cRaddL_rReg_memNodeZcheck_for_anti_dependence6kM_i_; -text: .text%__1cLVtableStubsLcreate_stub6FiipnNmethodOopDesc__pC_; text: .text%__1cMmulL_memNodeFreloc6kM_i_; -text: .text%__1cLVtableStubsGlookup6Fiii_pnKVtableStub__; text: .text%__1cMMonitorValue2t6MpnTDebugInfoReadStream__v_; text: .text%__1cFStateM_sub_Op_NegD6MpknENode__v_; text: .text%__1cOtailjmpIndNodePoper_input_base6kM_I_; -text: .text%__1cNStubGeneratorYgenerate_throw_exception6MpkcpCi_3_; -text: .text%__1cISubDNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cPPerfDataManagerKname_space6Fpkc2i_pc_; -text: .text%__1cLVtableStubsOis_entry_point6FpC_i_; text: .text%__1cNstoreImmPNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHRetNodeJnum_opnds6kM_I_; text: .text%__1cIDivINodeJideal_reg6kM_I_; text: .text%__1cRInvocationCounterDdef6Fn0AFState_ipFnMmethodHandle_pnGThread__pC_v_; text: .text%__1cMNativeLookupNlong_jni_name6FnMmethodHandle__pc_; @@ -6944,7 +4515,6 @@ text: .text%__1cOGenerateOopMapTret_jump_targets_do6MpnOBytecodeStream_pFp0ipi_v text: .text%__1cOClassPathEntry2t6M_v_; text: .text%__1cMorL_rRegNodeHtwo_adr6kM_I_; text: .text%__1cOMacroAssemblerNpop_CPU_state6M_v_; -text: .text%__1cMmulF_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cOMacroAssemblerOpush_CPU_state6M_v_; text: .text%__1cOMacroAssemblerNpop_FPU_state6M_v_; text: .text%__1cOMacroAssemblerOpush_FPU_state6M_v_; @@ -6955,8 +4525,6 @@ text: .text%__1cTconvL2D_reg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cOMacroAssemblerSstore_check_part_16MpnMRegisterImpl__v_; text: .text%__1cRaddL_rReg_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMaddF_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cRClassPathZipEntry2t6Mppvpc_v_; -text: .text%__1cNTemplateTableOprepare_invoke6FpnMRegisterImpl_2inJBytecodesECode__v_; text: .text%__1cVMoveF2I_reg_stackNodeErule6kM_I_; text: .text%__1cJAssemblerEandq6MpnMRegisterImpl_2_v_; text: .text%__1cFParsePdo_lookupswitch6M_v_; @@ -6967,19 +4535,11 @@ text: .text%__1cJloadFNodeIpipeline6kM_pknIPipeline__; text: .text%__1cRComputeEntryStackJdo_double6M_v_; text: .text%__1cMaddD_regNodeHtwo_adr6kM_I_; text: .text%__1cLConvD2FNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cNTemplateTablebAload_invoke_cp_cache_entry6FipnMRegisterImpl_22ii_v_; -text: .text%__1cNTemplateTableZload_field_cp_cache_entry6FipnMRegisterImpl_22i_v_; text: .text%__1cJAssemblerEcmpb6MnHAddress_i_v_; text: .text%__1cCosGsignal6Fipv_1_; -text: .text%__1cLClassLoaderSget_canonical_path6Fpc1i_i_; -text: .text%__1cLClassLoaderXcreate_class_path_entry6FpcnEstat_ppnOClassPathEntry__v_; text: .text%__1cMsubD_immNodeHtwo_adr6kM_I_; -text: .text%__1cLklassVtableTis_miranda_entry_at6Mi_i_; text: .text%__1cKPSScavengeZclean_up_failed_promotion6F_v_; -text: .text%__1cNTemplateTableJfloat_cmp6Fii_v_; text: .text%JVM_Available; -text: .text%__1cJAssemblerHucomiss6MpnRFloatRegisterImpl_2_v_; -text: .text%__1cZInterpreterMacroAssemblerRprofile_checkcast6MipnMRegisterImpl__v_; text: .text%__1cIAddDNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cJAssemblerFimulq6MpnMRegisterImpl_2_v_; text: .text%__1cIRetTableUfind_jsrs_for_target6Mi_pnNRetTableEntry__; @@ -6992,73 +4552,44 @@ text: .text%__1cNTemplateTableGlstore6Fi_v_; text: .text%__1cNRegisterSaverTsave_live_registers6FpnOMacroAssembler_ipi_pnGOopMap__; text: .text%__1cNTemplateTableGistore6Fi_v_; text: .text%__1cIRetTableHadd_jsr6Mii_v_; -text: .text%__1cMincL_memNodeHtwo_adr6kM_I_; text: .text%__1cKPSYoungGenOobject_iterate6MpnNObjectClosure__v_; -text: .text%__1cNGrowableArray4CpnLmarkOopDesc__2t6Mii_v_; -text: .text%__1cUCompressedReadStreamJread_long6M_x_; text: .text%__1cISubDNodeJideal_reg6kM_I_; -text: .text%__1cWNonPrintingResourceObj2n6FLnLResourceObjPallocation_type__pv_; text: .text%__1cNTemplateTableFdload6Fi_v_; text: .text%__1cNTemplateTableFfload6Fi_v_; -text: .text%__1cPaddress_of_flag6FnXCommandLineFlagWithType__pnEFlag__: globals.o; text: .text%__1cNTemplateTableFlload6Fi_v_; text: .text%__1cNTemplateTableFiload6Fi_v_; text: .text%__1cMmulI_memNodePoper_input_base6kM_I_; -text: .text%__1cOcompL_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cNGrowableArray4CpnLmarkOopDesc__Uclear_and_deallocate6M_v_; text: .text%__1cMLinkResolverbBlookup_method_in_interfaces6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; -text: .text%__1cOcompI_rRegNodeFclone6kM_pnENode__; -text: .text%__1cRsubI_rReg_memNodeFclone6kM_pnENode__; -text: .text%__1cLcastP2LNodeFclone6kM_pnENode__; text: .text%__1cKExceptionsK_throw_oop6FpnGThread_pkcipnHoopDesc__v_; text: .text%__1cRaddL_rReg_memNodeErule6kM_I_; text: .text%__1cOMacroAssemblerLstore_check6MpnMRegisterImpl__v_; -text: .text%__1cOsalI_mem_1NodeHtwo_adr6kM_I_; text: .text%__1cHRetNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cVMoveL2D_reg_stackNodeHtwo_adr6kM_I_; -text: .text%__1cRaddL_mem_rRegNodeHtwo_adr6kM_I_; -text: .text%__1cJloadPNodeFclone6kM_pnENode__; -text: .text%__1cJloadBNodeFclone6kM_pnENode__; text: .text%__1cRaddL_rReg_memNodeHtwo_adr6kM_I_; text: .text%__1cMmulF_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cMaddF_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJAssemblerEmovb6MnHAddress_i_v_; -text: .text%__1cIAddDNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%Unsafe_AllocateMemory; text: .text%__1cVMoveF2I_reg_stackNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJAssemblerHfxrstor6MnHAddress__v_; text: .text%__1cJAssemblerGfxsave6MnHAddress__v_; -text: .text%__1cHCompilePget_invoke_name6M_pnIciSymbol__; text: .text%__1cJAssemblerEsetb6Mn0AJCondition_pnMRegisterImpl__v_; -text: .text%__1cNxorI_rRegNodeMcisc_version6Mi_pnIMachNode__; -text: .text%__1cMVM_OperationNdoit_prologue6M_i_; text: .text%__1cNGCTaskManagerGthread6MI_pnMGCTaskThread__; text: .text%__1cRConstantLongValue2t6MpnTDebugInfoReadStream__v_; -text: .text%__1cRConstantLongValueQis_constant_long6kM_i_; -text: .text%__1cKScopeValuePis_constant_oop6kM_i_; -text: .text%__1cKScopeValueSis_constant_double6kM_i_; text: .text%__1cMmulD_memNodeHtwo_adr6kM_I_; -text: .text%__1cVMoveF2I_reg_stackNodeHtwo_adr6kM_I_; text: .text%jni_CallStaticObjectMethod: jni.o; text: .text%__1cNcmovL_memNodeHtwo_adr6kM_I_; text: .text%__1cFStateM_sub_Op_AddD6MpknENode__v_; text: .text%__1cMmulI_memNodeMideal_Opcode6kM_i_; text: .text%__1cScompL_rReg_memNodeFreloc6kM_i_; text: .text%__1cLloadSSINodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNGrowableArray4CpnIPerfData__2t6Mii_v_; -text: .text%__1cOCompilerThreadSis_Compiler_thread6kM_i_; text: .text%__1cTjava_lang_ThrowableLset_message6FpnHoopDesc_2_v_; text: .text%__1cMPerfDataList2T6M_v_; -text: .text%__1cLVtableStubsFenter6FiiipnKVtableStub__v_; text: .text%__1cMmulI_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cOcmovD_regUNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNCompileBrokerUmake_compiler_thread6FpkcpnMCompileQdDueue_pnQCompilerCounters_pnGThread__pnOCompilerThread__; text: .text%__1cNnegI_rRegNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cbCAbstractInterpreterGeneratorbHgenerate_exception_handler_common6Mpkc2i_pC_; -text: .text%__1cSCommandLineFlagsExKis_default6FnPCommandLineFlag__i_; text: .text%__1cJAssemblerEnegl6MpnMRegisterImpl__v_; -text: .text%__1cUConstantOopReadValuePis_constant_oop6kM_i_; -text: .text%__1cHMatcherNlogDSupported6F_ki_; text: .text%__1cOGenerateOopMapRdo_multianewarray6Mii_v_; text: .text%__1cLconvI2BNodeIpipeline6kM_pknIPipeline__; text: .text%__1cUPSGenerationCounters2t6MpkciipnOPSVirtualSpace__v_; @@ -7066,86 +4597,59 @@ text: .text%__1cMPerfDataList2t6Mi_v_; text: .text%__1cFStateP_sub_Op_ConvI2D6MpknENode__v_; text: .text%__1cQCompilerCounters2t6MpkcipnGThread__v_; text: .text%__1cJCodeCachebCmake_marked_nmethods_zombies6F_v_; -text: .text%__1cNVM_DeoptimizeEname6kM_pkc_; text: .text%__1cNTemplateTableHcall_VM6FpnMRegisterImpl_pC2_v_; text: .text%__1cHThreadsbFdeoptimized_wrt_marked_nmethods6F_v_; -text: .text%__1cSCommandLineFlagsExJboolAtPut6FnXCommandLineFlagWithType_i_v_; -text: .text%__1cMmulI_memNodeJnum_opnds6kM_I_; text: .text%__1cFStateM_sub_Op_CmpF6MpknENode__v_; text: .text%__1cODeoptimizationVdeoptimize_dependents6F_i_; -text: .text%__1cOtailjmpIndNodeGpinned6kM_i_; -text: .text%__1cQshrL_rReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerGmovzbl6MpnMRegisterImpl_2_v_; text: .text%__1cILogDNodeJideal_reg6kM_I_; -text: .text%__1cMmulI_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cRaddL_mem_rRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMincL_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFStateO_sub_Op_Conv2B6MpknENode__v_; text: .text%__1cNcmovL_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%jni_CallStaticObjectMethodV: jni.o; -text: .text%__1cMOopTaskQdDueueKinitialize6M_v_; text: .text%__1cMmulD_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cMOopTaskQdDueue2t6M_v_; -text: .text%__1cOLibraryCallKitbBinline_native_currentThread6M_i_; text: .text%__1cNMemoryManager2t6M_v_; text: .text%__1cMaddF_immNodeKconst_size6kM_i_; text: .text%__1cVMoveL2D_reg_stackNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cOLibraryCallKitSinline_math_native6MnMvmIntrinsicsCID__i_; text: .text%__1cFciEnvbNArrayIndexOutOfBoundsException_instance6M_pnKciInstance__; text: .text%__1cMsubD_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMmulI_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMaddF_immNodeFreloc6kM_i_; text: .text%__1cMaddD_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cOCompilerThreadbCis_hidden_from_external_view6kM_i_; -text: .text%__1cNReservedSpaceJlast_part6ML_0_; text: .text%__1cMnegF_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMaddD_immNodeFreloc6kM_i_; text: .text%jni_IsInstanceOf: jni.o; text: .text%__1cMaddD_immNodeKconst_size6kM_i_; text: .text%jni_Throw: jni.o; -text: .text%__1cRmulI_rReg_immNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cOsalI_mem_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSPSPromotionManager2t6M_v_; -text: .text%__1cFKlassUoop_is_objArrayKlass6kM_i_; text: .text%__1cOMacroAssemblerLstore_check6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cOLibraryCallKitXgenerate_current_thread6MrpnENode__2_; text: .text%__1cMsubF_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cJAssemblerFmovss6MpnRFloatRegisterImpl_2_v_; text: .text%JVM_GetLastErrorString; -text: .text%__1cJAssemblerFmovsd6MpnRFloatRegisterImpl_2_v_; text: .text%__1cZInterpreterMacroAssemblerTprofile_switch_case6MpnMRegisterImpl_22_v_; text: .text%__1cZInterpreterMacroAssemblerWprofile_switch_default6MpnMRegisterImpl__v_; text: .text%__1cFStateM_sub_Op_SubF6MpknENode__v_; -text: .text%__1cLVtableStubsScreate_vtable_stub6Fii_pnKVtableStub__; text: .text%JVM_GetInterfaceVersion; text: .text%__1cKstoreBNodeErule6kM_I_; text: .text%__1cKVtableStub2n6FLi_pv_; text: .text%__1cJAssemblerEdecq6MpnMRegisterImpl__v_; -text: .text%__1cZInterpreterMacroAssemblerUprofile_virtual_call6MpnMRegisterImpl_22_v_; text: .text%__1cOtailjmpIndNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cCosFyield6F_v_; -text: .text%__1cRaddI_mem_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOPSVirtualSpace2t6MnNReservedSpace_L_v_; -text: .text%__1cOLibraryCallKitMinline_trans6MnMvmIntrinsicsCID__i_; text: .text%Unsafe_SetMemory; text: .text%__1cCosIjvm_path6Fpci_v_; text: .text%__1cJTimeStamp2t6M_v_; text: .text%__1cZInterpreterMacroAssemblerUupdate_mdp_by_offset6MpnMRegisterImpl_2i_v_; -text: .text%__1cLconvI2BNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorKpass_float6M_v_; text: .text%__1cISubFNodeJideal_reg6kM_I_; text: .text%__1cNGrowableArray4CpnIPerfData__Egrow6Mi_v_; text: .text%__1cMSysClassPathNreset_item_at6Mi_v_; text: .text%__1cFStateM_sub_Op_LogD6MpknENode__v_; -text: .text%__1cFTypeDFempty6kM_i_; -text: .text%__1cZInterpreterMacroAssemblerVincrement_mdp_data_at6MpnMRegisterImpl_2i_v_; -text: .text%__1cJlookupOne6FpnHJNIEnv__pkcpnGThread__pnH_jclass__: jni.o; text: .text%__1cLloadSSINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cCosGgetenv6Fpkcpci_i_; text: .text%__1cZInterpreterMacroAssemblerLlock_object6MpnMRegisterImpl__v_; -text: .text%__1cOtypeArrayKlassQarray_klass_impl6MipnGThread__pnMklassOopDesc__; text: .text%__1cISubFNodeGadd_id6kM_pknEType__; -text: .text%__1cJArgumentsMbuild_string6Fppcpkc_v_; text: .text%__1cFStateM_sub_Op_SubD6MpknENode__v_; text: .text%JVM_RegisterSignal; text: .text%JVM_FindSignal; @@ -7156,12 +4660,10 @@ text: .text%__1cKConv2BNodeJideal_reg6kM_I_; text: .text%__1cXNativeSignatureIteratorIdo_float6M_v_; text: .text%jni_GetDoubleArrayRegion: jni.o; text: .text%__1cLloadSSDNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cVMoveF2I_reg_stackNodeJnum_opnds6kM_I_; text: .text%__1cJArgumentsObuild_jvm_args6Fpkc_v_; text: .text%__1cOLibraryCallKitMpop_math_arg6M_pnENode__; text: .text%__1cZInterpreterMacroAssemblerRgen_subtype_check6MpnMRegisterImpl_rnFLabel__v_; text: .text%__1cFStateO_sub_Op_CMoveL6MpknENode__v_; -text: .text%__1cJArgumentsMadd_property6Fpkc_i_; text: .text%__1cMVM_OperationNdoit_epilogue6M_v_; text: .text%__1cOCompilerThread2t6MpnMCompileQdDueue_pnQCompilerCounters__v_; text: .text%__1cRaddI_mem_rRegNodeFreloc6kM_i_; @@ -7169,7 +4671,6 @@ text: .text%__1cSInterpreterRuntimebKthrow_ArrayIndexOutOfBoundsException6FpnKJa text: .text%__1cVMoveF2I_reg_stackNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNTemplateTableGfconst6Fi_v_; text: .text%__1cNCompileBrokerUcompiler_thread_loop6F_v_; -text: .text%__1cOtailjmpIndNodeHtwo_adr6kM_I_; text: .text%__1cQmulI_mem_immNodeFreloc6kM_i_; text: .text%__1cNincI_rRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNVM_DeoptimizeEdoit6M_v_; @@ -7177,104 +4678,64 @@ text: .text%__1cLMoveF2INodeLbottom_type6kM_pknEType__; text: .text%__1cUConstantOopReadValue2t6MpnTDebugInfoReadStream__v_; text: .text%__1cRaddI_mem_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMdivD_immNodeKconst_size6kM_i_; -text: .text%__1cMmulD_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cQObjectStartArrayKinitialize6MnJMemRegion__v_; text: .text%__1cQObjectStartArraySset_covered_region6MnJMemRegion__v_; -text: .text%__1cMsubF_memNodeRis_cisc_alternate6kM_i_; text: .text%__1cUGcThreadCountClosureJdo_thread6MpnGThread__v_; text: .text%__1cNGrowableArray4CpnTDerivedPointerEntry__Egrow6Mi_v_; -text: .text%__1cOtailjmpIndNodeJnum_opnds6kM_I_; text: .text%__1cPGCMemoryManagerXinitialize_gc_stat_info6M_v_; text: .text%__1cPGCMemoryManager2t6M_v_; text: .text%__1cKGCStatInfo2t6Mi_v_; text: .text%__1cTMaskFillerForNativeLpass_object6M_v_; text: .text%__1cTMaskFillerForNativeJpass_long6M_v_; -text: .text%__1cJMarkSweepUAdjustPointerClosure2t6Mi_v_; text: .text%__1cCosHrealloc6FpvL_1_; text: .text%__1cCosWactive_processor_count6F_i_; -text: .text%__1cSestimate_path_freq6FpnENode__f_: loopnode.o; text: .text%__1cCosNsigexitnum_pd6F_i_; text: .text%__1cMLinkResolverbEvtable_index_of_miranda_method6FnLKlassHandle_nMsymbolHandle_2pnGThread__i_; -text: .text%__1cOLibraryCallKitVinline_fp_conversions6MnMvmIntrinsicsCID__i_; -text: .text%__1cZcatch_cleanup_intra_block6FpnENode_1pnFBlock_ii_v_: lcm.o; -text: .text%__1cCosbCis_thread_cpu_time_supported6F_i_; text: .text%__1cLklassVtableQindex_of_miranda6MpnNsymbolOopDesc_2_i_; -text: .text%__1cNdefaultStreamMhas_log_file6M_i_; -text: .text%__1cNcmovL_memNodeRis_cisc_alternate6kM_i_; -text: .text%__1cRalign_object_size6Fl_l_; -text: .text%__1cMarrayOopDescLheader_size6FnJBasicType__i_; text: .text%__1cNstoreImmBNodeErule6kM_I_; text: .text%__1cNstoreImmINodeErule6kM_I_; -text: .text%__1cLloadSSDNodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cFParseMjump_if_join6MpnENode_2_2_; text: .text%__1cKJNIHandlesQmake_weak_global6FnGHandle__pnI_jobject__; -text: .text%__1cLloadSSINodeZcheck_for_anti_dependence6kM_i_; text: .text%__1cQJNI_FastGetFieldbEgenerate_fast_get_float_field06FnJBasicType__pC_; text: .text%__1cFParseRdo_multianewarray6M_v_; -text: .text%__1cMloadConDNodeGis_Con6kM_I_; text: .text%jni_NewWeakGlobalRef: jni.o; -text: .text%__1cPfilename_to_pid6Fpkc_i_: perfMemory_solaris.o; -text: .text%__1cTis_directory_secure6Fpkc_i_: perfMemory_solaris.o; text: .text%jni_CallStaticVoidMethodV: jni.o; text: .text%jni_CallStaticBooleanMethod: jni.o; text: .text%__1cNGrowableArray4CpnNmethodOopDesc__Egrow6Mi_v_; -text: .text%__1cRInvocationCounterMreinitialize6Fi_v_; -text: .text%__1cXpartialSubtypeCheckNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cTconvF2I_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cUInterpreterGeneratorVgenerate_native_entry6Mi_pC_; text: .text%__1cUInterpreterGeneratorLlock_method6M_v_; text: .text%__1cNGrowableArray4CpC_Egrow6Mi_v_; text: .text%__1cNGrowableArray4CL_Egrow6Mi_v_; -text: .text%__1cObox_handleNodeHsize_of6kM_I_; -text: .text%__1cPsarL_rReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIPSOldGenKinitialize6MnNReservedSpace_Lpkci_v_; text: .text%__1cIPSOldGenYinitialize_virtual_space6MnNReservedSpace_L_v_; text: .text%__1cIPSOldGenPinitialize_work6Mpkci_v_; -text: .text%__1cNdivI_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cbCAbstractInterpreterGeneratorTgenerate_error_exit6Mpkc_pC_; text: .text%__1cTAbstractInterpreterKinitialize6F_v_; text: .text%__1cZInterpreterMacroAssemblerLprofile_ret6MpnMRegisterImpl_2_v_; text: .text%__1cZInterpreterMacroAssemblerSprofile_final_call6MpnMRegisterImpl__v_; text: .text%__1cZInterpreterMacroAssemblerMprofile_call6MpnMRegisterImpl__v_; text: .text%__1cOPSVirtualSpace2t6M_v_; -text: .text%__1cOPSVirtualSpaceKinitialize6MnNReservedSpace_L_i_; text: .text%__1cZInterpreterMacroAssemblerSupdate_mdp_for_ret6MpnMRegisterImpl__v_; text: .text%__1cZInterpreterMacroAssemblerPset_mdp_flag_at6MpnMRegisterImpl_i_v_; text: .text%__1cZInterpreterMacroAssemblerWdispatch_only_noverify6MnITosState__v_; text: .text%__1cZInterpreterMacroAssemblerSsuper_call_VM_leaf6MpCpnMRegisterImpl__v_; text: .text%__1cKReflectionbFbasic_type_arrayklass_to_mirror6FpnMklassOopDesc_pnGThread__pnHoopDesc__; -text: .text%__1cMAdapterCache2t6M_v_; -text: .text%__1cSComputeAdapterInfoIdo_array6Mii_v_; -text: .text%__1cGatomll6Fpkcpx_i_: arguments.o; -text: .text%__1cJArgumentsRcheck_memory_size6Fxx_n0AJArgsRange__; text: .text%__1cJArgumentsVset_parallel_gc_flags6F_v_; -text: .text%__1cYalign_to_allocation_size6FL_L_: heap.o; -text: .text%__1cJArgumentsRparse_memory_size6Fpkcpxx_n0AJArgsRange__; -text: .text%__1cJArgumentsXPropertyList_unique_add6FppnOSystemProperty_pkcpc_v_; text: .text%__1cQAgentLibraryList2t6M_v_; -text: .text%__1cFKlassVoop_is_typeArrayKlass6kM_i_; text: .text%__1cMmulF_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cJAssemblerGmovsbl6MpnMRegisterImpl_2_v_; text: .text%__1cJAssemblerGmovswl6MpnMRegisterImpl_2_v_; -text: .text%__1cLOptoRuntimebDlazy_c2i_adapter_generation_C6FpnKJavaThread__pC_; -text: .text%__1cLOptoRuntimeVgenerate_handler_blob6FpCi_pnNSafepointBlob__; text: .text%__1cRaddL_mem_rRegNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cJAssemblerGmovzwl6MpnMRegisterImpl_2_v_; -text: .text%__1cJAssemblerFmovdq6MpnMRegisterImpl_pnRFloatRegisterImpl__v_; text: .text%__1cRComputeEntryStackIdo_float6M_v_; text: .text%__1cJAssemblerFcmovl6Mn0AJCondition_pnMRegisterImpl_nHAddress__v_; -text: .text%__1cSReferenceProcessor2t6MnJMemRegion_iii_v_; text: .text%__1cJAssemblerEaddl6MnHAddress_pnMRegisterImpl__v_; text: .text%__1cOGenerateOopMapTadd_to_ref_init_set6Mi_v_; text: .text%__1cJAssemblerEcmpq6MpnMRegisterImpl_i_v_; -text: .text%__1cJAssemblerHucomisd6MpnRFloatRegisterImpl_2_v_; text: .text%__1cJAssemblerFidivl6MpnMRegisterImpl__v_; text: .text%__1cJAssemblerFidivq6MpnMRegisterImpl__v_; text: .text%__1cJAssemblerEcdql6M_v_; text: .text%__1cJAssemblerEcdqq6M_v_; text: .text%__1cJAssemblerEleal6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cJAssemblerDorq6MnHAddress_i_v_; -text: .text%__1cWStubGenerator_generate6FpnKCodeBuffer_i_v_; text: .text%__1cJStubQdDueue2t6MpnNStubInterface_ipnFMutex_pkc_v_; text: .text%__1cMGCTaskThreadDrun6M_v_; text: .text%__1cMGCTaskThreadFstart6M_v_; @@ -7284,12 +4745,9 @@ text: .text%__1cISubFNodeDsub6kMpknEType_3_3_; text: .text%__1cJAssemblerFxaddl6MnHAddress_pnMRegisterImpl__v_; text: .text%__1cNGCTaskManagerKset_thread6MIpnMGCTaskThread__v_; text: .text%__1cJAssemblerHldmxcsr6MnHAddress__v_; -text: .text%__1cJAssemblerFxorps6MpnRFloatRegisterImpl_2_v_; text: .text%__1cKcastPPNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cMPeriodicTask2t6ML_v_; text: .text%__1cMPeriodicTaskGenroll6M_v_; -text: .text%__1cPOopTaskQdDueueSetOregister_queue6MipnMOopTaskQdDueue__v_; -text: .text%__1cOMacroAssemblerHcall_VM6MpnMRegisterImpl_pC222i_v_; text: .text%__1cNTemplateTableHcall_VM6FpnMRegisterImpl_pC_v_; text: .text%__1cNTemplateTableHcall_VM6FpnMRegisterImpl_pC22_v_; text: .text%__1cNTemplateTableJfloat_cmp6Fi_v_; @@ -7297,14 +4755,9 @@ text: .text%__1cNTemplateTableKdouble_cmp6Fi_v_; text: .text%__1cNTemplateTableKinitialize6F_v_; text: .text%__1cNTemplateTableGlconst6Fi_v_; text: .text%__1cNTemplateTableGdconst6Fi_v_; -text: .text%__1cNTemplateTableDldc6Fi_v_; text: .text%__1cNTemplateTableHcastore6F_v_; -text: .text%__1cPdouble_quadword6Fpxxx_0_: templateTable_amd64.o; text: .text%__1cNTemplateTableKif_nullcmp6Fn0AJCondition__v_; text: .text%__1cNTemplateTableHif_acmp6Fn0AJCondition__v_; -text: .text%__1cNTemplateTableSgetfield_or_static6Fii_v_; -text: .text%__1cNTemplateTableUjvmti_post_field_mod6Fii_v_; -text: .text%__1cNTemplateTableSputfield_or_static6Fii_v_; text: .text%__1cNTemplateTableUinvokevirtual_helper6FpnMRegisterImpl_22_v_; text: .text%__1cEMIN24CL_6FTA0_0_; text: .text%__1cRCardTableModRefBSbCpar_chunk_heapword_alignment6F_L_; @@ -7312,8 +4765,6 @@ text: .text%__1cOMacroAssemblerPcorrected_idivl6MpnMRegisterImpl__i_; text: .text%__1cOMacroAssemblerPcorrected_idivq6MpnMRegisterImpl__i_; text: .text%__1cLNamedThread2t6M_v_; text: .text%__1cLNamedThreadIset_name6MpkcE_v_; -text: .text%__1cOMacroAssemblerQserialize_memory6MpnMRegisterImpl_22_v_; -text: .text%__1cIDivDNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cIDivDNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cFStatebB_sub_Op_PartialSubtypeCheck6MpknENode__v_; text: .text%__1cFStateM_sub_Op_DivI6MpknENode__v_; @@ -7322,24 +4773,17 @@ text: .text%__1cFStateP_sub_Op_ConvL2F6MpknENode__v_; text: .text%__1cFStateP_sub_Op_ConvL2D6MpknENode__v_; text: .text%__1cFStateP_sub_Op_ConvF2I6MpknENode__v_; text: .text%__1cFStateP_sub_Op_ConvD2F6MpknENode__v_; -text: .text%__1cRcheck_if_clipping6FpknKRegionNode_rpnGIfNode_5_i_: cfgnode.o; -text: .text%__1cWcheck_compare_clipping6FipnGIfNode_pnHConNode_rpnENode__i_: cfgnode.o; -text: .text%__1cIciObjectOis_array_klass6M_i_; text: .text%__1cScompP_rReg_memNodeFreloc6kM_i_; text: .text%__1cKCastPPNodeJideal_reg6kM_I_; text: .text%__1cLMoveF2INodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cFTypeDJis_finite6kM_i_; text: .text%__1cLMoveL2DNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cTconvL2D_reg_memNodeFreloc6kM_i_; text: .text%__1cMdivD_immNodeFreloc6kM_i_; text: .text%__1cMmulF_memNodeFreloc6kM_i_; text: .text%__1cMaddF_memNodeFreloc6kM_i_; -text: .text%__1cLConvF2INodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cLConvF2INodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cLConvD2FNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cOcompP_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cKciTypeFlowLStateVectorRdo_multianewarray6MpnQciBytecodeStream__v_; -text: .text%__1cMorI_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cRCollectorCounters2t6Mpkci_v_; text: .text%Unsafe_CompareAndSwapObject; text: .text%__1cNSafepointBlob2n6FLI_pv_; @@ -7347,8 +4791,6 @@ text: .text%__1cNSafepointBlobGcreate6FpnKCodeBuffer_pnJOopMapSet_i_p0_; text: .text%__1cNSafepointBlob2t6MpnKCodeBuffer_ipnJOopMapSet_i_v_; text: .text%__1cINegFNodeJideal_reg6kM_I_; text: .text%__1cMVirtualSpace2t6M_v_; -text: .text%__1cMVirtualSpaceKinitialize6MnNReservedSpace_L_i_; -text: .text%__1cHMatcherQconvL2FSupported6F_ki_; text: .text%__1cLConvD2FNodeJideal_reg6kM_I_; text: .text%__1cLConvF2INodeJideal_reg6kM_I_; text: .text%__1cLConvL2DNodeJideal_reg6kM_I_; @@ -7364,29 +4806,17 @@ text: .text%__1cJAssemblerEsubl6MpnMRegisterImpl_i_v_; text: .text%__1cJAssemblerEsubq6MnHAddress_i_v_; text: .text%__1cLOptoRuntimeIgenerate6FpnFciEnv__v_; text: .text%__1cMmulD_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cYSurvivorMutableSpacePool2t6MpnKPSYoungGen_pkcnKMemoryPoolIPoolType_i_v_; text: .text%__1cParrayKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; -text: .text%__1cFKlassUoop_is_instanceKlass6kM_i_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: arguments.o; text: .text%__1cJArgumentsWPropertyList_get_value6FpnOSystemProperty_pkc_4_; text: .text%__1cJArgumentsFparse6FpknOJavaVMInitArgs__i_; text: .text%__1cKNoopGCTaskQcreate_on_c_heap6F_p0_; -text: .text%__1cJArgumentsbSparse_java_tool_options_environment_variable6FpnMSysClassPath_pi_i_; -text: .text%__1cWResolveOopMapConflictsOreport_results6kM_i_; -text: .text%__1cMCodeHeapPool2t6MpnICodeHeap_pkci_v_; text: .text%__1cJAssemblerFxchgl6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cJArgumentsbNparse_java_options_environment_variable6FpnMSysClassPath_pi_i_; text: .text%__1cJAssemblerFxchgq6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cJArgumentsVfinalize_vm_init_args6FpnMSysClassPath_i_i_; -text: .text%__1cJArgumentsWparse_each_vm_init_arg6FpknOJavaVMInitArgs_pnMSysClassPath_pi_i_; text: .text%__1cJArgumentsSparse_vm_init_args6FpknOJavaVMInitArgs__i_; text: .text%__1cJAssemblerIcmpxchgl6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cINegFNodeFIdeal6MpnIPhaseGVN_i_pnENode__; -text: .text%__1cJArgumentsZcheck_vm_args_consistency6F_i_; text: .text%__1cICodeHeap2t6M_v_; -text: .text%__1cJArgumentsbOparse_java_compiler_environment_variable6F_v_; text: .text%__1cHVM_ExitNset_vm_exited6F_i_; -text: .text%__1cICodeHeapHreserve6MLLL_i_; text: .text%__1cQRelocationHolder2t6M_v_; text: .text%__1cICodeHeapFclear6M_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: relocInfo.o; @@ -7395,15 +4825,12 @@ text: .text%__1cJArgumentsSset_bytecode_flags6F_v_; text: .text%__1cJArgumentsUset_ergonomics_flags6F_v_; text: .text%__1cJArgumentsbBset_cms_and_parnew_gc_flags6F_v_; text: .text%__1cJArgumentsTset_parnew_gc_flags6F_v_; -text: .text%__1cQno_shared_spaces6F_v_: arguments.o; text: .text%__1cJArgumentsMget_property6Fpkc_2_; text: .text%__1cLsymbolKlassOset_alloc_size6MI_v_; text: .text%__1cLsymbolKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; -text: .text%__1cJArgumentsVprocess_settings_file6Fpkcii_i_; text: .text%__1cNGCTaskManagerKthreads_do6MpnNThreadClosure__v_; text: .text%__1cNGCTaskManagerKinitialize6M_v_; text: .text%__1cNGCTaskManager2t6MI_v_; -text: .text%__1cXSynchronizedGCTaskQdDueue2t6MpnLGCTaskQdDueue_pnFMutex__v_; text: .text%__1cDhpiKinitialize6F_i_; text: .text%__1cDhpiZinitialize_socket_library6F_i_; text: .text%__1cDhpiYinitialize_get_interface6FpnIvm_calls__v_; @@ -7421,74 +4848,39 @@ text: .text%__1cLicache_init6F_v_; text: .text%__1cYGCAdaptivePolicyCounters2t6MpkciipnSAdaptiveSizePolicy__v_; text: .text%__1cHVM_ExitbJwait_for_threads_in_native_to_block6F_i_; text: .text%__1cJAssemblerHstmxcsr6MnHAddress__v_; -text: .text%__1cJAssemblerFaddss6MpnRFloatRegisterImpl_nHAddress__v_; -text: .text%__1cJAssemblerFsubss6MpnRFloatRegisterImpl_2_v_; text: .text%__1cTICacheStubGeneratorVgenerate_icache_flush6MppFpCii_i_v_; text: .text%__1cMSysClassPath2t6Mpkc_v_; text: .text%__1cJArgumentsWinit_system_properties6F_v_; -text: .text%__1cJAssemblerFmulss6MpnRFloatRegisterImpl_nHAddress__v_; -text: .text%__1cJAssemblerFdivss6MpnRFloatRegisterImpl_2_v_; -text: .text%__1cJAssemblerFaddsd6MpnRFloatRegisterImpl_nHAddress__v_; text: .text%__1cFChunkbDstart_chunk_pool_cleaner_task6F_v_; -text: .text%__1cJAssemblerFsubsd6MpnRFloatRegisterImpl_2_v_; text: .text%__1cOchunkpool_init6F_v_; -text: .text%__1cJAssemblerFmulsd6MpnRFloatRegisterImpl_nHAddress__v_; -text: .text%__1cJAssemblerFdivsd6MpnRFloatRegisterImpl_2_v_; text: .text%__1cQSystemDictionarybAcompute_java_system_loader6FpnGThread__v_; -text: .text%__1cJAssemblerGsqrtsd6MpnRFloatRegisterImpl_nHAddress__v_; text: .text%__1cHVM_ExitEdoit6M_v_; -text: .text%__1cRArgumentOopFinderDset6MinJBasicType__v_; text: .text%__1cWAdjoiningVirtualSpaces2t6MnNReservedSpace_LLL_v_; text: .text%__1cUAdjoiningGenerations2t6MnNReservedSpace_LLLLLLL_v_; text: .text%__1cHOrLNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cZCompiledArgumentOopFinderRhandle_oop_offset6M_v_; -text: .text%__1cJAssemblerFxorps6MpnRFloatRegisterImpl_nHAddress__v_; -text: .text%__1cJAssemblerFxorpd6MpnRFloatRegisterImpl_2_v_; -text: .text%__1cJAssemblerFxorpd6MpnRFloatRegisterImpl_nHAddress__v_; -text: .text%__1cJAssemblerJcvtsi2ssl6MpnRFloatRegisterImpl_pnMRegisterImpl__v_; -text: .text%__1cJAssemblerJcvtsi2ssq6MpnRFloatRegisterImpl_pnMRegisterImpl__v_; -text: .text%__1cJAssemblerJcvtsi2sdl6MpnRFloatRegisterImpl_pnMRegisterImpl__v_; -text: .text%__1cFframebAoops_compiled_arguments_do6MnMsymbolHandle_ipknLRegisterMap_pnKOopClosure__v_; -text: .text%__1cJAssemblerJcvtsi2sdq6MpnRFloatRegisterImpl_pnMRegisterImpl__v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: adaptiveSizePolicy.o; -text: .text%__1cSAdaptiveSizePolicy2t6ML_v_; -text: .text%__1cFframebDoops_interpreted_arguments_do6MnMsymbolHandle_ipnKOopClosure__v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: regmask.o; -text: .text%__1cJAssemblerKcvttss2sil6MpnMRegisterImpl_pnRFloatRegisterImpl__v_; -text: .text%__1cJAssemblerKcvttss2siq6MpnMRegisterImpl_pnRFloatRegisterImpl__v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: indexSet.o; -text: .text%__1cJAssemblerKcvttsd2sil6MpnMRegisterImpl_pnRFloatRegisterImpl__v_; text: .text%__1cFframeVinterpreter_frame_mdp6kM_pC_; text: .text%__1cPvm_init_globals6F_v_; -text: .text%__1cJAssemblerKcvttsd2siq6MpnMRegisterImpl_pnRFloatRegisterImpl__v_; text: .text%__1cQSystemDictionaryKclasses_do6FpFpnMklassOopDesc__v_v_; text: .text%__1cQSystemDictionaryKmethods_do6FpFpnNmethodOopDesc__v_v_; text: .text%__1cQSystemDictionaryKinitialize6FpnGThread__v_; text: .text%__1cQSystemDictionarybCinitialize_preloaded_classes6FpnGThread__v_; -text: .text%__1cQSystemDictionarybDinitialize_basic_type_mirrors6FpnGThread__v_; -text: .text%__1cJAssemblerIcvtss2sd6MpnRFloatRegisterImpl_2_v_; -text: .text%__1cJAssemblerIcvtsd2ss6MpnRFloatRegisterImpl_2_v_; text: .text%__1cMinit_globals6F_i_; text: .text%__1cMexit_globals6F_v_; text: .text%__1cOMacroAssemblerKdecrementl6MpnMRegisterImpl_i_v_; -text: .text%__1cHVM_ExitEname6kM_pkc_; text: .text%__1cKcastPPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: fprofiler.o; text: .text%__1cNMemoryServiceRset_universe_heap6FpnNCollectedHeap__v_; text: .text%__1cMPeriodicTask2T5B6M_v_; -text: .text%__1cMPeriodicTaskLis_enrolled6kM_i_; text: .text%__1cNMemoryServicebFadd_parallel_scavenge_heap_info6FpnUParallelScavengeHeap__v_; text: .text%__1cMPeriodicTaskJdisenroll6M_v_; text: .text%__1cSset_init_completed6F_v_; -text: .text%__1cMadapter_init6F_v_; -text: .text%__1cTI2CAdapterGeneratorKinitialize6F_v_; text: .text%__1cNMemoryServiceXadd_psYoung_memory_pool6FpnKPSYoungGen_pnNMemoryManager_4_v_; -text: .text%__1cTC2IAdapterGeneratorKinitialize6F_v_; -text: .text%__1cOstackSlotPOperFclone6kM_pnIMachOper__; -text: .text%__1cObox_handleNodeFclone6kM_pnENode__; text: .text%__1cTAbstract_VM_VersionHvm_name6F_pkc_; text: .text%__1cTAbstract_VM_VersionJvm_vendor6F_pkc_; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: ad_amd64_pipeline.o; text: .text%__1cSobjArrayKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cNTemplateTableHcall_VM6FpnMRegisterImpl_pC222_v_; text: .text%__1cKmutex_init6F_v_; @@ -7505,7 +4897,6 @@ text: .text%__1cSinstanceKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: vm_version.o; text: .text%__1cStemplateTable_init6F_v_; text: .text%__1cNTemplateTableNpd_initialize6F_v_; -text: .text%__1cSinstanceKlassKlassUoop_is_instanceKlass6kM_i_; text: .text%__1cNTemplateTableDnop6F_v_; text: .text%__1cNTemplateTableSshouldnotreachhere6F_v_; text: .text%__1cNTemplateTableLaconst_null6F_v_; @@ -7543,7 +4934,6 @@ text: .text%__1cNTemplateTableGsaload6F_v_; text: .text%__1cSReferenceProcessorMinit_statics6F_v_; text: .text%__1cXreferenceProcessor_init6F_v_; text: .text%__1cZInterpreterMacroAssemblerSsuper_call_VM_leaf6MpCpnMRegisterImpl_33_v_; -text: .text%__1cURecompilationMonitorbGstart_recompilation_monitor_task6F_v_; text: .text%__1cZInterpreterMacroAssemblerUdispatch_only_normal6MnITosState__v_; text: .text%__1cNTemplateTableHaload_06F_v_; text: .text%__1cNTemplateTableGistore6F_v_; @@ -7588,8 +4978,6 @@ text: .text%__1cNTemplateTableElrem6F_v_; text: .text%__1cNTemplateTableElshl6F_v_; text: .text%__1cNTemplateTableElshr6F_v_; text: .text%__1cNTemplateTableFlushr6F_v_; -text: .text%__1cRaddL_rReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cRaddL_mem_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNTemplateTableEineg6F_v_; text: .text%__1cNTemplateTableElneg6F_v_; text: .text%__1cLVtableStubsKinitialize6F_v_; @@ -7597,7 +4985,6 @@ text: .text%__1cNTemplateTableEfneg6F_v_; text: .text%__1cNTemplateTableEdneg6F_v_; text: .text%__1cNTemplateTableEiinc6F_v_; text: .text%__1cNTemplateTableJwide_iinc6F_v_; -text: .text%__1cMincL_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNTemplateTableElcmp6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psScavenge.o; text: .text%__1cKPSScavengeKinitialize6F_v_; @@ -7612,19 +4999,12 @@ text: .text%__1cNTemplateTableMlookupswitch6F_v_; text: .text%__1cNTemplateTableRfast_linearswitch6F_v_; text: .text%__1cNTemplateTableRfast_binaryswitch6F_v_; text: .text%__1cbCAbstractInterpreterGeneratorMgenerate_all6M_v_; -text: .text%__1cbCAbstractInterpreterGeneratorbEset_entry_points_for_all_bytes6M_v_; -text: .text%__1cbCAbstractInterpreterGeneratorbCset_safepoints_for_all_bytes6M_v_; -text: .text%__1cOsalI_mem_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cSPSPromotionManagerKinitialize6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: memoryService.o; text: .text%__1cNTemplateTableIgetfield6Fi_v_; text: .text%__1cNTemplateTableJgetstatic6Fi_v_; -text: .text%__1cNGrowableArray4CpnNMemoryManager__2t6Mii_v_; -text: .text%__1cNGrowableArray4CpnKMemoryPool__2t6Mii_v_; text: .text%__1cNTemplateTableIputfield6Fi_v_; text: .text%__1cNTemplateTableJputstatic6Fi_v_; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psPromotionLAB.o; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: interpreter.o; text: .text%__1cJPSPermGen2t6MnNReservedSpace_LLLLpkci_v_; text: .text%__1cXNativeSignatureIteratorHdo_byte6M_v_; text: .text%__1cIPSOldGen2t6MLLLpkci_v_; @@ -7647,7 +5027,6 @@ text: .text%__1cNTemplateTableLmonitorexit6F_v_; text: .text%__1cNTemplateTableEwide6F_v_; text: .text%__1cNTemplateTableOmultianewarray6F_v_; text: .text%__1cIPSOldGen2t6MnNReservedSpace_LLLLpkci_v_; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: tenuredGeneration.o; text: .text%__1cQvtableStubs_init6F_v_; text: .text%__1cQaccessFlags_init6F_v_; text: .text%__1cSInterpreterRuntimeYthrow_ClassCastException6FpnKJavaThread_pnHoopDesc__v_; @@ -7655,17 +5034,9 @@ text: .text%__1cSInterpreterRuntimeSupdate_mdp_for_ret6FpnKJavaThread_i_v_; text: .text%__1cNeventlog_init6F_v_; text: .text%__1cOMacroAssemblerGc2bool6MpnMRegisterImpl__v_; text: .text%__1cPmethodDataKlassOset_alloc_size6MI_v_; -text: .text%__1cFVTuneEexit6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psMarkSweep.o; -text: .text%__1cTPSAlwaysTrueClosure2t6M_v_: psMarkSweep.o; text: .text%__1cXSignatureHandlerLibraryQset_handler_blob6F_pC_; -text: .text%__1cNGrowableArray4CpC_2t6Mii_v_; -text: .text%__1cNGrowableArray4CL_2t6Mii_v_; -text: .text%__1cbCAbstractInterpreterGeneratorbJgenerate_StackOverflowError_handler6M_pC_; text: .text%__1cOMacroAssemblerRsign_extend_short6MpnMRegisterImpl__v_; -text: .text%__1cbCAbstractInterpreterGeneratorbMgenerate_ArrayIndexOutOfBounds_handler6Mpkc_pC_; -text: .text%__1cbCAbstractInterpreterGeneratorbJgenerate_ClassCastException_handler6M_pC_; -text: .text%__1cGThreadWset_as_starting_thread6M_i_; text: .text%__1cLPSMarkSweepKinitialize6F_v_; text: .text%__1cbBcreate_initial_thread_group6FpnGThread__nGHandle__: thread.o; text: .text%__1cVcreate_initial_thread6FnGHandle_pnKJavaThread_pnGThread__pnHoopDesc__: thread.o; @@ -7678,12 +5049,9 @@ text: .text%__1cNWatcherThreadDrun6M_v_; text: .text%__1cNWatcherThreadFstart6F_v_; text: .text%__1cNWatcherThreadEstop6F_v_; text: .text%__1cOMacroAssemblerQsign_extend_byte6MpnMRegisterImpl__v_; -text: .text%__1cKJavaThread2t6M_v_; text: .text%__1cHRetDataJfixup_ret6MinQmethodDataHandle__pC_; -text: .text%__1cKvtune_init6F_v_; text: .text%__1cLmethodKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cbAPSGCAdaptivePolicyCounters2t6MpkciipnUPSAdaptiveSizePolicy__v_; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psAdaptiveSizePolicy.o; text: .text%__1cKDictionaryKmethods_do6MpFpnNmethodOopDesc__v_v_; text: .text%__1cKDictionaryKclasses_do6MpFpnMklassOopDesc__v_v_; text: .text%__1cbCAbstractInterpreterGeneratorbFgenerate_slow_signature_handler6M_pC_; @@ -7695,20 +5063,15 @@ text: .text%__1cUInterpreterGeneratorXgenerate_accessor_entry6M_pC_; text: .text%__1cKDictionary2t6Mi_v_; text: .text%__1cJBytecodesKinitialize6F_v_; text: .text%__1cObytecodes_init6F_v_; -text: .text%__1cUPSAdaptiveSizePolicy2t6MLLLLLddI_v_; text: .text%__1cJBytecodesNpd_initialize6F_v_; text: .text%__1cHCompileRpd_compiler2_init6F_v_; text: .text%__1cKC2CompilerKinitialize6M_v_; text: .text%__1cFStateQ_sub_Op_TailJump6MpknENode__v_; -text: .text%__1cMorL_rRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cbCAbstractInterpreterGeneratorYgenerate_throw_exception6M_v_; text: .text%__1cUInterpreterGenerator2t6MpnJStubQdDueue__v_; text: .text%__1cWinvocationCounter_init6F_v_; text: .text%__1cQPlaceholderTable2t6Mi_v_; -text: .text%__1cHThreadsJcreate_vm6FpnOJavaVMInitArgs_pi_i_; text: .text%__1cFStateL_sub_Op_OrL6MpknENode__v_; text: .text%__1cFStateM_sub_Op_NegF6MpknENode__v_; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: ad_amd64_expand.o; text: .text%__1cQprint_statistics6F_v_; text: .text%__1cLbefore_exit6FpnKJavaThread__v_; text: .text%__1cFStateP_sub_Op_MoveL2D6MpknENode__v_; @@ -7720,7 +5083,6 @@ text: .text%__1cVjava_lang_ThreadGroupPcompute_offsets6F_v_; text: .text%__1cbIjava_lang_reflect_AccessibleObjectPcompute_offsets6F_v_; text: .text%__1cYjava_lang_reflect_MethodPcompute_offsets6F_v_; text: .text%__1cOThreadCriticalKinitialize6F_v_; -text: .text%__1cRAllocateTLSOffset6F_v_: threadLS_solaris_amd64.o; text: .text%__1cSThreadLocalStoragebCgenerate_code_for_get_thread6F_v_; text: .text%__1cYjava_lang_reflect_MethodNset_signature6FpnHoopDesc_2_v_; text: .text%__1cbDjava_lang_reflect_ConstructorPcompute_offsets6F_v_; @@ -7738,7 +5100,6 @@ text: .text%__1cLJavaClassesbAcompute_hard_coded_offsets6F_v_; text: .text%__1cLJavaClassesPcompute_offsets6F_v_; text: .text%__1cPGlobalTLABStats2t6M_v_; text: .text%__1cQjavaClasses_init6F_v_; -text: .text%__1cMTailJumpNode2t6MpnENode_22222_v_; text: .text%jni_ToReflectedMethod: jni.o; text: .text%__1cSThreadLocalStorageEinit6F_v_; text: .text%__1cNThreadServiceEinit6F_v_; @@ -7752,29 +5113,17 @@ text: .text%__1cWjni_GetFloatField_addr6F_pC_; text: .text%__1cRCardTableModRefBS2t6MnJMemRegion_i_v_; text: .text%__1cXjni_GetDoubleField_addr6F_pC_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: phase.o; -text: .text%__1cJTimeStampMmilliseconds6kM_x_; text: .text%__1cTConstantDoubleValueIwrite_on6MpnUDebugInfoWriteStream__v_; text: .text%__1cKPerfMemoryUdelete_memory_region6F_v_; text: .text%__1cKPerfMemoryUcreate_memory_region6FL_v_; text: .text%__1cRCardTableModRefBSbBct_max_alignment_constraint6F_L_; -text: .text%__1cUdelete_shared_memory6FpcL_v_: perfMemory_solaris.o; -text: .text%__1cUcreate_shared_memory6FL_pc_: perfMemory_solaris.o; text: .text%__1cOtailjmpIndNodeFreloc6kM_i_; -text: .text%__1cSmmap_create_shared6FL_pc_: perfMemory_solaris.o; text: .text%__1cETypeRInitialize_shared6FpnHCompile__v_; text: .text%__1cWconstantPoolCacheKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; -text: .text%__1cbAcreate_sharedmem_resources6Fpkc1L_i_: perfMemory_solaris.o; text: .text%__1cWconstantPoolCacheKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; -text: .text%__1cRmake_user_tmp_dir6Fpkc_i_: perfMemory_solaris.o; -text: .text%__1cbBcleanup_sharedmem_resources6Fpkc_v_: perfMemory_solaris.o; text: .text%__1cMciArrayKlass2t6MpnIciSymbol_ipnHciKlass__v_; -text: .text%__1cLremove_file6Fpkc_v_: perfMemory_solaris.o; -text: .text%__1cWget_sharedmem_filename6Fpkci_pc_: perfMemory_solaris.o; -text: .text%__1cNget_user_name6Fi_pc_: perfMemory_solaris.o; -text: .text%__1cQget_user_tmp_dir6Fpkc_pc_: perfMemory_solaris.o; text: .text%__1cRconstantPoolKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cFciEnvXget_or_create_exception6MrpnI_jobject_nMsymbolHandle__pnKciInstance__; -text: .text%__1cMloadConFNodeGis_Con6kM_I_; text: .text%__1cRconstantPoolKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cKPerfMemoryHdestroy6F_v_; text: .text%__1cQconstMethodKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; @@ -7794,7 +5143,6 @@ text: .text%__1cPPerfDataManagerHdestroy6F_v_; text: .text%__1cMsubD_immNodeFreloc6kM_i_; text: .text%__1cMsubF_memNodeFreloc6kM_i_; text: .text%lookupDirectBufferClasses: jni.o; -text: .text%__1cbDinitializeDirectBufferSupport6FpnHJNIEnv___i_: jni.o; text: .text%__1cVquicken_jni_functions6F_v_; text: .text%JNI_CreateJavaVM; text: .text%__1cFParseWprofile_null_checkcast6M_v_; @@ -7813,7 +5161,6 @@ text: .text%__1cRaddL_mem_rRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMincL_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQJNI_FastGetFieldbDgenerate_fast_get_float_field6F_pC_; text: .text%__1cQJNI_FastGetFieldbEgenerate_fast_get_double_field6F_pC_; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: jniFastGetField_amd64.o; text: .text%__1cNcmovL_memNodeFreloc6kM_i_; text: .text%__1cKJNIHandlesKinitialize6F_v_; text: .text%__1cQjni_handles_init6F_v_; @@ -7821,34 +5168,22 @@ text: .text%JVM_InitProperties; text: .text%JVM_Halt; text: .text%JVM_MaxMemory; text: .text%JVM_GetClassDeclaredMethods; -text: .text%__1cKCMoveDNodeFIdeal6MpnIPhaseGVN_i_pnENode__; text: .text%__1cOsalI_mem_1NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHRetDataKis_RetData6M_i_; text: .text%JVM_InitializeSocketLibrary; text: .text%JVM_Socket; text: .text%__1cPciObjArrayKlass2t6MpnIciSymbol_pnHciKlass_i_v_; -text: .text%__1cPOopTaskQdDueueSet2t6Mi_v_; text: .text%__1cbEinitialize_converter_functions6F_v_; text: .text%JVM_SupportsCX8; text: .text%__1cUciObjArrayKlassKlassEmake6F_p0_; text: .text%__1cTcompilerOracle_init6F_v_; -text: .text%__1cOCompilerOracleRparse_from_string6Fpkc_v_; text: .text%__1cOCompilerOraclePparse_from_file6F_v_; -text: .text%__1cHcc_file6F_pkc_: compilerOracle.o; -text: .text%__1cKTypeOopPtrEmake6FnHTypePtrDPTR_i_pk0_; text: .text%__1cKTypeOopPtrFxdual6kM_pknEType__; -text: .text%__1cOCompilerOracleOread_from_line6Fpc_v_; text: .text%__1cPciObjectFactoryTinit_shared_objects6M_v_; text: .text%__1cVcompiledICHolderKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cVcompiledICHolderKlassOset_alloc_size6MI_v_; -text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: jvmtiEnvBase.o; text: .text%__1cVcompiledICHolderKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; -text: .text%__1cNGrowableArray4CpnMJvmtiEnvBase__2t6Mii_v_; text: .text%__1cRJvmtiEventEnabled2t6M_v_; -text: .text%__1cRciArrayKlassKlassUis_array_klass_klass6M_i_; text: .text%__1cRJvmtiEventEnabledFclear6M_v_; -text: .text%__1cNGrowableArray4CpnOCompilerThread__2t6Mii_v_; -text: .text%__1cFParseNfetch_monitor6MipnENode_2_2_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: compileBroker.o; text: .text%__1cNGrowableArray4CpnIciMethod__Egrow6Mi_v_; text: .text%__1cNCompileBrokerQset_should_block6F_v_; @@ -7856,10 +5191,7 @@ text: .text%__1cUJvmtiEventControllerIvm_start6F_v_; text: .text%__1cPGenerationSizerQinitialize_flags6M_v_; text: .text%__1cUJvmtiEventControllerHvm_init6F_v_; text: .text%__1cUJvmtiEventControllerIvm_death6F_v_; -text: .text%__1cNCompileBrokerVinit_compiler_threads6Fi_v_; -text: .text%__1cUParallelScavengeHeapbCsupports_inline_contig_alloc6kM_i_; text: .text%__1cUParallelScavengeHeapItop_addr6kM_ppnIHeapWord__; -text: .text%__1cNCompileBrokerQcompilation_init6FpnQAbstractCompiler__v_; text: .text%__1cUParallelScavengeHeapIend_addr6kM_ppnIHeapWord__; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: jvmtiEventController.o; text: .text%__1cLJvmtiExportRenter_start_phase6F_v_; @@ -7868,23 +5200,19 @@ text: .text%__1cUParallelScavengeHeapNgc_threads_do6kMpnNThreadClosure__v_; text: .text%__1cUParallelScavengeHeapYpermanent_object_iterate6MpnNObjectClosure__v_; text: .text%__1cLJvmtiExportQenter_live_phase6F_v_; text: .text%__1cLJvmtiExportNpost_vm_start6F_v_; -text: .text%__1cOcompiler2_init6F_v_; text: .text%__1cLJvmtiExportTpost_vm_initialized6F_v_; text: .text%__1cLJvmtiExportNpost_vm_death6F_v_; text: .text%__1cLJvmtiExportbMtransition_pending_onload_raw_monitors6F_v_; text: .text%__1cUParallelScavengeHeapMmax_capacity6kM_L_; text: .text%__1cUJvmtiPendingMonitorsXtransition_raw_monitors6F_v_; -text: .text%__1cMaddF_regNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cUParallelScavengeHeapPpost_initialize6M_v_; text: .text%__1cUParallelScavengeHeapKinitialize6M_i_; -text: .text%__1cHoopDescLheader_size6F_i_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: compilationPolicy.o; text: .text%__1cPClassFileParserbFjava_lang_ref_Reference_fix_pre6MpnPtypeArrayHandle_nSconstantPoolHandle_pnUFieldAllocationCount_pnGThread__v_; text: .text%__1cPClassFileParserXjava_lang_Class_fix_pre6MpnOobjArrayHandle_pnUFieldAllocationCount_pnGThread__v_; text: .text%__1cPClassFileParserYjava_lang_Class_fix_post6Mpi_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: parGCAllocBuffer.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: jvmtiImpl.o; -text: .text%__1cNGrowableArray4CpnPJvmtiRawMonitor__2t6Mii_v_; text: .text%__1cNGrowableArray4CpnPJvmtiRawMonitor__Uclear_and_deallocate6M_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: jvmtiTagMap.o; text: .text%__1cRCompilationPolicyUcompleted_vm_startup6F_v_; @@ -7893,7 +5221,6 @@ text: .text%__SLIP.DELETER__C: ostream.o; text: .text%__1cWcompilationPolicy_init6F_v_; text: .text%__1cMostream_exit6F_v_; text: .text%__1cTtypeArrayKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; -text: .text%__1cTtypeArrayKlassKlassVoop_is_typeArrayKlass6kM_i_; text: .text%__1cbCTwoGenerationCollectorPolicyMrem_set_name6M_nJGenRemSetEName__; text: .text%__1cTtypeArrayKlassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cQostream_init_log6F_v_; @@ -7902,14 +5229,12 @@ text: .text%__1cIUniverseHgenesis6FpnGThread__v_; text: .text%__1cIUniverseNfixup_mirrors6FpnGThread__v_; text: .text%__1cMostream_init6F_v_; text: .text%__1cNdefaultStreamEinit6M_v_; -text: .text%__1cIUniverseUreinitialize_itables6F_v_; text: .text%__1cKklassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cKklassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cNuniverse_init6F_i_; text: .text%__1cIUniversePinitialize_heap6F_i_; text: .text%__1cLClassLoaderbBsetup_bootstrap_search_path6F_v_; text: .text%__1cOuniverse2_init6F_v_; -text: .text%__1cSuniverse_post_init6F_v_; text: .text%__1cIUniverseYcompute_base_vtable_size6F_v_; text: .text%__1cCosXnon_memory_address_word6F_pc_; text: .text%__1cCosGinit_26F_i_; @@ -7919,24 +5244,18 @@ text: .text%__1cCosHSolarisUsynchronization_init6F_v_; text: .text%Unsafe_SetNativeLong; text: .text%__1cCosHSolarisOlibthread_init6F_v_; text: .text%__1cJLoadFNodeMstore_Opcode6kM_i_; -text: .text%__1cOisT2_libthread6F_i_; text: .text%Unsafe_FreeMemory; text: .text%__1cCosHSolarisXinstall_signal_handlers6F_v_; text: .text%Unsafe_PageSize; text: .text%__1cRlwp_priocntl_init6F_i_: os_solaris.o; text: .text%__1cNpriocntl_stub6FinGidtype_iipc_l_: os_solaris.o; -text: .text%__1cCosHSolarisRmpss_sanity_check6F_v_; -text: .text%__1cOLibraryCallKitWinline_native_hashcode6Mii_i_; text: .text%__1cbCTwoGenerationCollectorPolicyQinitialize_flags6M_v_; -text: .text%__1cCosOrelease_memory6FpcL_i_; text: .text%__1cCosLsignal_wait6F_i_; text: .text%JVM_RegisterUnsafeMethods; -text: .text%__1cVcheck_pending_signals6Fi_i_: os_solaris.o; text: .text%__1cCosNsignal_notify6Fi_v_; text: .text%__1cCosOsignal_init_pd6F_v_; text: .text%__1cLClassLoaderQload_zip_library6F_v_; text: .text%__1cLClassLoaderZcreate_package_info_table6F_v_; -text: .text%__1cNmulI_rRegNodeMcisc_version6Mi_pnIMachNode__; text: .text%__1cLClassLoaderKinitialize6F_v_; text: .text%__1cLClassLoaderVcompute_Object_vtable6F_i_; text: .text%__1cCosHSolarisPinit_signal_mem6F_v_; @@ -7947,19 +5266,12 @@ text: .text%__1cCosSget_temp_directory6F_pkc_; text: .text%__1cVLoaderConstraintTable2t6Mi_v_; text: .text%__1cCosbDallocate_thread_local_storage6F_i_; text: .text%__1cOcodeCache_init6F_v_; -text: .text%__1cVverificationType_init6F_v_; -text: .text%__1cVverificationType_exit6F_v_; -text: .text%__1cQVerificationTypeKinitialize6F_v_; -text: .text%__1cQVerificationTypeIfinalize6F_v_; text: .text%__1cJCodeCacheKinitialize6F_v_; text: .text%__1cNIdealLoopTreeQsplit_outer_loop6MpnOPhaseIdealLoop__v_; text: .text%__1cKfix_parent6FpnNIdealLoopTree_1_v_: loopnode.o; text: .text%__1cCosHSolarisQsignal_sets_init6F_v_; text: .text%__1cTClassLoadingServiceEinit6F_v_; -text: .text%__1cTClassLoadingServiceVnotify_class_unloaded6FpnNinstanceKlass_i_v_; -text: .text%__1cCosScreate_main_thread6FpnGThread__i_; text: .text%__1cNIdealLoopTreeUmerge_many_backedges6MpnOPhaseIdealLoop__v_; -text: .text%__1cQcreate_os_thread6FpnGThread_I_pnIOSThread__: os_solaris.o; text: .text%__1cRLowMemoryDetectorKinitialize6F_v_; text: .text%__1cLmethodKlassOset_alloc_size6MI_v_; text: .text%__1cNExceptionBlob2n6FLI_pv_; @@ -7971,13 +5283,10 @@ text: .text%__1cQUncommonTrapBlob2t6MpnKCodeBuffer_ipnJOopMapSet_i_v_; text: .text%__1cSDeoptimizationBlob2n6FLI_pv_; text: .text%__1cSDeoptimizationBlobGcreate6FpnKCodeBuffer_pnJOopMapSet_iiii_p0_; text: .text%__1cSDeoptimizationBlob2t6MpnKCodeBuffer_ipnJOopMapSet_iiii_v_; -text: .text%__1cRLowMemoryDetectorUhas_pending_requests6F_i_; text: .text%__1cCosbDinit_system_properties_values6F_v_; text: .text%__1cCosHSolarisWinitialize_system_info6F_v_; text: .text%__1cCosPphysical_memory6F_X_; -text: .text%__1cMFastLockNodeLis_FastLock6kM_pk0_; text: .text%__1cRLowMemoryDetectorbGlow_memory_detector_thread_entry6FpnKJavaThread_pnGThread__v_; -text: .text%__1cXLowMemoryDetectorThreadbCis_hidden_from_external_view6kM_i_; text: .text%__1cSThreadLocalStorageHpd_init6F_v_; text: .text%__1cLmethodKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: machnode.o; @@ -7985,28 +5294,16 @@ text: .text%__1cPmanagement_init6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: cmsAdaptiveSizePolicy.o; text: .text%__1cKManagementEinit6F_v_; text: .text%__1cKManagementKinitialize6FpnGThread__v_; -text: .text%__1cKManagementWrecord_vm_startup_time6Fxx_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: management.o; text: .text%__1cOmarksweep_init6F_v_; -text: .text%__1cCosXis_server_class_machine6F_i_; -text: .text%__1cJMarkSweepQKeepAliveClosure2t6M_v_: markSweep.o; -text: .text%__1cNReservedSpace2t6MLLipc_v_; -text: .text%__1cJMarkSweepOIsAliveClosure2t6M_v_: markSweep.o; text: .text%__1cCosZset_memory_serialize_page6FpC_v_; -text: .text%__1cCosNset_boot_path6Fcc_i_; -text: .text%__1cJMarkSweepSFollowStackClosure2t6M_v_: markSweep.o; text: .text%__1cNReservedSpaceUpage_align_size_down6FL_L_; text: .text%__1cNReservedSpaceYallocation_align_size_up6FL_L_; -text: .text%__1cNGrowableArray4CpnKOSRAdapter__2t6Mii_v_; -text: .text%__1cXonStackReplacement_init6F_v_; -text: .text%__1cSOnStackReplacementKinitialize6F_v_; -text: .text%__1cJMarkSweepRFollowRootClosure2t6M_v_: markSweep.o; text: .text%__1cCosLinit_random6Fl_v_; text: .text%__1cHOrLNodeJideal_reg6kM_I_; text: .text%__1cOvmStructs_init6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: vmStructs.o; text: .text%__1cJvmSymbolsKinitialize6FpnGThread__v_; -text: .text%__1cJMarkSweepSMarkAndPushClosure2t6M_v_: markSweep.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: markSweep.o; text: .text%__1cQVMOperationQdDueue2t6M_v_; text: .text%__1cCosGstrdup6Fpkc_pc_; @@ -8017,13 +5314,9 @@ text: .text%__1cMsubD_immNodeKconst_size6kM_i_; text: .text%__1cTsignal_thread_entry6FpnKJavaThread_pnGThread__v_: os.o; text: .text%__1cOtailjmpIndNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSobjArrayKlassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_; -text: .text%__1cHMatcherVfind_callee_arguments6FpnNsymbolOopDesc_ipi_pnLOptoRegPair__; text: .text%__1cIVMThreadGcreate6F_v_; text: .text%__1cIVMThread2t6M_v_; -text: .text%__1cNSharedRuntimeUlookup_function_DD_D6FrpFpnHJNIEnv__pnH_jclass_dd_dpkc_v_; -text: .text%__1cNSharedRuntimebIinitialize_StrictMath_entry_points6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: sharedHeap.o; -text: .text%__1cTAssertIsPermClosure2t6M_v_: sharedHeap.o; text: .text%__1cIVMThreadDrun6M_v_; text: .text%__1cWResolveOopMapConflictsUdo_potential_rewrite6MpnGThread__nMmethodHandle__; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: generateOopMap.o; @@ -8031,43 +5324,25 @@ text: .text%__1cNCellTypeStateImake_top6F_0_; text: .text%__1cJAssemblerEandl6MpnMRegisterImpl_2_v_; text: .text%__1cNCellTypeStateLmake_bottom6F_0_; text: .text%__1cNcmovL_memNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cRcheck_basic_types6F_v_; -text: .text%__1cLOptoRuntimeYgenerate_arraycopy_stubs6F_v_; -text: .text%__1cSobjArrayKlassKlassUoop_is_objArrayKlass6kM_i_; text: .text%__1cNSharedRuntimebBgenerate_class_cast_message6FpnKJavaThread_pkc_pc_; -text: .text%__1cNSharedRuntimebBgenerate_class_cast_message6Fpkc2_pc_; -text: .text%__1cLOptoRuntimebPgenerate_polling_page_return_handler_blob6F_v_; text: .text%__1cIVMThreadEloop6M_v_; -text: .text%__1cLOptoRuntimebSgenerate_polling_page_safepoint_handler_blob6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: matcher.o; -text: .text%__1cLOptoRuntimeUsetup_exception_blob6F_v_; -text: .text%__1cLOptoRuntimeWfill_in_exception_blob6F_v_; text: .text%__1cNMemoryManagerbDget_code_cache_memory_manager6F_p0_; text: .text%__1cNMemoryManagerbDget_psScavenge_memory_manager6F_pnPGCMemoryManager__; text: .text%__1cNMemoryManagerbEget_psMarkSweep_memory_manager6F_pnPGCMemoryManager__; -text: .text%__1cQPSGenerationPool2t6MpnIPSOldGen_pkcnKMemoryPoolIPoolType_i_v_; text: .text%__1cJAssemblerFimull6MpnMRegisterImpl_2_v_; -text: .text%__1cLOptoRuntimebBgenerate_uncommon_trap_blob6F_v_; text: .text%__1cNSharedRuntimeTgenerate_deopt_blob6F_v_; -text: .text%__1cQPSGenerationPool2t6MpnJPSPermGen_pkcnKMemoryPoolIPoolType_i_v_; text: .text%__1cNRegisterSaverYrestore_result_registers6FpnOMacroAssembler__v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: runtimeService.o; text: .text%__1cORuntimeServiceYrecord_application_start6F_v_; text: .text%__1cJGenRemSetYmax_alignment_constraint6Fn0AEName__L_; -text: .text%__1cICarSpaceEinit6F_v_; -text: .text%__1cNcarSpace_init6F_v_; text: .text%__1cORuntimeServiceEinit6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: genCollectedHeap.o; -text: .text%__1cTAssertIsPermClosure2t6M_v_: genCollectedHeap.o; -text: .text%__1cRAlwaysTrueClosure2t6M_v_: genCollectedHeap.o; -text: .text%__1cLOptoRuntimeVhandle_exception_Type6F_pknITypeFunc__; -text: .text%__1cLOptoRuntimeSfetch_monitor_Type6F_pknITypeFunc__; text: .text%__1cJAssemblerDorl6MpnMRegisterImpl_i_v_; text: .text%__1cLStatSamplerKinitialize6F_v_; text: .text%__1cLStatSamplerGengage6F_v_; text: .text%__1cLStatSamplerJdisengage6F_v_; text: .text%__1cLStatSamplerHdestroy6F_v_; -text: .text%__1cSCommandLineFlagsExKuintxAtPut6FnXCommandLineFlagWithType_L_v_; text: .text%__1cSobjArrayKlassKlassbEallocate_system_objArray_klass6MpnGThread__pnMklassOopDesc__; text: .text%__1cLOptoRuntimeUmultianewarray5_Type6F_pknITypeFunc__; text: .text%__1cLStatSamplerbMcreate_system_property_instrumentation6FpnGThread__v_; @@ -8079,14 +5354,7 @@ text: .text%__1cJAssemblerEsarq6MpnMRegisterImpl__v_; text: .text%__1cLOptoRuntimeUmultianewarray4_Type6F_pknITypeFunc__; text: .text%__1cJAssemblerEshll6MpnMRegisterImpl__v_; text: .text%__1cJAssemblerEshlq6MpnMRegisterImpl__v_; -text: .text%__1cUEdenMutableSpacePool2t6MpnKPSYoungGen_pnMMutableSpace_pkcnKMemoryPoolIPoolType_i_v_; text: .text%__1cNStubGeneratorQgenerate_initial6M_v_; -text: .text%__1cNStubGeneratorXgenerate_atomic_add_ptr6M_pC_; -text: .text%__1cNStubGeneratorTgenerate_atomic_add6M_pC_; -text: .text%__1cNStubGeneratorbCgenerate_atomic_cmpxchg_long6M_pC_; -text: .text%__1cNStubGeneratorXgenerate_atomic_cmpxchg6M_pC_; -text: .text%__1cNStubGeneratorYgenerate_atomic_xchg_ptr6M_pC_; -text: .text%__1cNStubGeneratorUgenerate_atomic_xchg6M_pC_; text: .text%__1cNStubGeneratorYgenerate_catch_exception6M_pC_; text: .text%__1cNStubGeneratorSgenerate_call_stub6MrpC_1_; text: .text%__1cNStubGeneratorbAgenerate_forward_exception6M_pC_; @@ -8098,18 +5366,12 @@ text: .text%__1cNStubGeneratorSgenerate_f2i_fixup6M_pC_; text: .text%__1cLOptoRuntimeUmultianewarray3_Type6F_pknITypeFunc__; text: .text%__1cNStubGeneratorTgenerate_verify_oop6M_pC_; text: .text%__1cNStubGeneratorVgenerate_verify_mxcsr6M_pC_; -text: .text%__1cNStubGeneratorYgenerate_get_previous_fp6M_pC_; -text: .text%__1cNStubGeneratorbIgenerate_handler_for_unsafe_access6M_pC_; text: .text%__1cMStubRoutinesLinitialize16F_v_; text: .text%__1cMStubRoutinesLinitialize26F_v_; text: .text%__1cSstubRoutines_init16F_v_; text: .text%__1cSstubRoutines_init26F_v_; text: .text%__1cLMoveL2DNodeJideal_reg6kM_I_; -text: .text%__1cNGrowableArray4CpnTDerivedPointerEntry__2t6Mii_v_; text: .text%__1cLMoveF2INodeJideal_reg6kM_I_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: oopMap.o; -text: .text%__1cNGrowableArray4CpnHMonitor__2t6Mii_v_; text: .text%__1cLOptoRuntimeUmultianewarray2_Type6F_pknITypeFunc__; -text: .text%__1cLOptoRuntimeUmultianewarray1_Type6F_pknITypeFunc__; -text: .text%__1cQDoNothingClosure2t6M_v_: oopMap.o; text: .text%__1cJAssemblerEshrl6MpnMRegisterImpl__v_; diff --git a/hotspot/make/solaris/makefiles/reorder_TIERED_i486 b/hotspot/make/solaris/makefiles/reorder_TIERED_i486 index 4edb5a22610..89ac4da3beb 100644 --- a/hotspot/make/solaris/makefiles/reorder_TIERED_i486 +++ b/hotspot/make/solaris/makefiles/reorder_TIERED_i486 @@ -2,7 +2,6 @@ data = R0x2000; text = LOAD ?RXO; -text: .text%__1cNinstanceKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cQIndexSetIteratorQadvance_and_next6M_I_; text: .text%__1cNSharedRuntimeElrem6Fxx_x_; text: .text%__1cCosOjavaTimeMillis6F_x_; @@ -19,7 +18,6 @@ text: .text%__1cDLRGOcompute_degree6kMr0_i_; text: .text%__1cIIndexSetWalloc_block_containing6MI_pn0AIBitBlock__; text: .text%__1cENodeEjvms6kM_pnIJVMState__; text: .text%__1cHRegMaskJis_bound16kM_i_; -text: .text%__1cNobjArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cETypeDcmp6Fkpk03_i_; text: .text%__1cHRegMaskJis_bound26kM_i_; text: .text%__1cHRegMaskESize6kM_I_; @@ -36,8 +34,6 @@ text: .text%__1cENodeHadd_req6Mp0_v_; text: .text%__1cKTypeOopPtrFklass6kM_pnHciKlass__: type.o; text: .text%__1cMPhaseChaitinTinterfere_with_live6MIpnIIndexSet__v_; text: .text%__1cETypeFuhash6Fkpk0_i_; -text: .text%__1cOlower_pressure6FpnDLRG_IpnFBlock_pI4_v_: ifg.o; -text: .text%__1cMget_live_bit6Fpii_i_: buildOopMap.o; text: .text%__1cMPhaseChaitinLskip_copies6MpnENode__2_; text: .text%__1cICallNodeKmatch_edge6kMI_I_; text: .text%__1cHPhiNodeGOpcode6kM_i_; @@ -47,15 +43,12 @@ text: .text%__1cIPhaseIFGQeffective_degree6kMI_i_; text: .text%__1cIUniverseMnon_oop_word6F_pv_; text: .text%__1cIPhaseIFGLremove_node6MI_pnIIndexSet__; text: .text%__1cIPhaseIFGJre_insert6MI_v_; -text: .text%__1cJraw_score6Fdd_d_: chaitin.o; text: .text%__1cDLRGFscore6kM_d_; text: .text%__1cETypeIhashcons6M_pk0_; text: .text%__1cPClassFileStreamGget_u26MpnGThread__H_; text: .text%__1cENodeEhash6kM_I_; text: .text%__1cHNTarjanEEVAL6M_p0_; text: .text%__1cMMachCallNodeKin_RegMask6kMI_rknHRegMask__; -text: .text%__1cMset_live_bit6Fpii_v_: buildOopMap.o; -text: .text%__1cOPhaseIdealLoopUbuild_loop_late_post6MpnENode_pk0_v_; text: .text%__1cIProjNodeGOpcode6kM_i_; text: .text%__1cNobjArrayKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cNobjArrayKlassToop_follow_contents6MpnHoopDesc__v_; @@ -64,7 +57,6 @@ text: .text%__1cDfh16FI_i_; text: .text%__1cNIdealLoopTreeJis_member6kMpk0_i_; text: .text%__1cIConINodeGOpcode6kM_i_; text: .text%__1cGIfNodeGOpcode6kM_i_; -text: .text%__1cOtypeArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cHTypePtrEhash6kM_i_; text: .text%__1cENode2t6MI_v_; text: .text%JVM_ArrayCopy; @@ -79,11 +71,9 @@ text: .text%__1cKIfTrueNodeGOpcode6kM_i_; text: .text%__1cIAddPNodeGOpcode6kM_i_; text: .text%__1cPDictionaryEntrybDprotection_domain_set_oops_do6MpnKOopClosure__v_: dictionary.o; text: .text%__1cHTypeIntEhash6kM_i_; -text: .text%__1cSPSPromotionManagerUflush_prefetch_queue6M_v_: psPromotionManager.o; text: .text%__1cMMachProjNodeLbottom_type6kM_pknEType__; text: .text%__1cMPhaseIterGVNNtransform_old6MpnENode__2_; text: .text%__1cMMachProjNodeGOpcode6kM_i_; -text: .text%__1cMclr_live_bit6Fpii_v_: buildOopMap.o; text: .text%__1cJCProjNodeNis_block_proj6kM_pknENode__: cfgnode.o; text: .text%__1cJPhaseLiveGgetset6MpnFBlock__pnIIndexSet__; text: .text%__1cHConNodeGOpcode6kM_i_; @@ -223,7 +213,6 @@ text: .text%__1cFframeYinterpreter_frame_method6kM_pnNmethodOopDesc__; text: .text%__1cENodeHdel_req6MI_v_; text: .text%__1cETypeEhash6kM_i_; text: .text%__1cLSymbolTableGlookup6FpkcipnGThread__pnNsymbolOopDesc__; -text: .text%__1cKoopFactoryKnew_symbol6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cIHaltNodeGOpcode6kM_i_; text: .text%__1cMPhaseIterGVNZremove_globally_dead_node6MpnENode__v_; text: .text%__1cIParmNodeGOpcode6kM_i_; @@ -310,7 +299,6 @@ text: .text%__1cHMatcherKmatch_tree6MpknENode__pnIMachNode__; text: .text%__1cIIndexSetSpopulate_free_list6F_v_; text: .text%__1cMloadConINodeLout_RegMask6kM_rknHRegMask__; text: .text%JVM_ReleaseUTF; -text: .text%__1cKutf8_write6FpCH_0_: utf8.o; text: .text%__1cKNode_ArrayGremove6MI_v_; text: .text%__1cKRegionNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cMPhaseIterGVNMsubsume_node6MpnENode_2_v_; @@ -359,7 +347,6 @@ text: .text%__1cHPhiNodeHsize_of6kM_I_: cfgnode.o; text: .text%__1cJTypeTupleGfields6FI_ppknEType__; text: .text%__1cMPhaseChaitinFUnion6MpknENode_3_v_; text: .text%__1cKRegionNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cLrecord_bias6FpknIPhaseIFG_ii_v_: coalesce.o; text: .text%__1cMPhaseChaitinSget_spillcopy_wide6MpnENode_2I_2_; text: .text%__1cKNativeCallLdestination6kM_pC_; text: .text%__1cICallNodeIIdentity6MpnOPhaseTransform__pnENode__: callnode.o; @@ -415,7 +402,6 @@ text: .text%__1cNmethodOopDescLresult_type6kM_nJBasicType__; text: .text%__1cFStateM_sub_Op_ConI6MpknENode__v_; text: .text%__1cNRelocIteratorKset_limits6MpC1_v_; text: .text%__1cIsplit_if6FpnGIfNode_pnMPhaseIterGVN__pnENode__: ifnode.o; -text: .text%__1cTremove_useless_bool6FpnGIfNode_pnIPhaseGVN__pnENode__: ifnode.o; text: .text%__1cJeRegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cSInterpreterRuntimeJanewarray6FpnKJavaThread_pnTconstantPoolOopDesc_ii_v_; text: .text%__1cHAddNodeEhash6kM_I_; @@ -478,7 +464,6 @@ text: .text%__1cMMergeMemNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cLMachNopNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cKRegionNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cMObjectLocker2T6M_v_; -text: .text%__1cWConstantPoolCacheEntryRset_initial_state6Mi_v_; text: .text%__1cOPhaseIdealLoopOidom_no_update6kMpnENode__2_: loopTransform.o; text: .text%__1cRmethodDataOopDescPinitialize_data6MpnOBytecodeStream_i_i_; text: .text%__1cRmethodDataOopDescTbytecode_cell_count6FnJBytecodesECode__i_; @@ -516,7 +501,6 @@ text: .text%__1cMLinkResolverYlookup_method_in_klasses6FrnMmethodHandle_nLKlassH text: .text%__1cMMergeMemNodePset_base_memory6MpnENode__v_; text: .text%__1cNLoadKlassNodeGOpcode6kM_i_; text: .text%__1cKTypeRawPtrEhash6kM_i_; -text: .text%__1cIciObjectIencoding6M_pnI_jobject__; text: .text%__1cPPerfLongVariantGsample6M_v_; text: .text%__1cIAndINodeGOpcode6kM_i_; text: .text%__1cVCompressedWriteStream2t6Mi_v_; @@ -552,7 +536,6 @@ text: .text%__1cCosMvm_page_size6F_i_; text: .text%__1cENodeDcmp6kMrk0_I_; text: .text%__1cNloadRangeNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateM_sub_Op_RegI6MpknENode__v_; -text: .text%__1cFKlassNlookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cFStateM_sub_Op_AddP6MpknENode__v_; text: .text%__1cIGraphKitMsaved_ex_oop6FpnNSafePointNode__pnENode__; text: .text%__1cIciObjectJset_ident6MI_v_; @@ -654,7 +637,6 @@ text: .text%__1cFParseFBlockRsuccessor_for_bci6Mi_p1_; text: .text%JVM_CurrentThread; text: .text%__1cKBranchDataKcell_count6M_i_: ciMethodData.o; text: .text%__1cLOopMapCacheIentry_at6kMi_pnQOopMapCacheEntry__; -text: .text%__1cHOopFlowEmake6FpnFArena_i_p0_; text: .text%__1cOGenerateOopMapKcheck_type6MnNCellTypeState_1_v_; text: .text%__1cMMergeMemNodeNgrow_to_match6Mpk0_v_; text: .text%__1cHTypeIntFxdual6kM_pknEType__; @@ -734,8 +716,6 @@ text: .text%__1cWconstantPoolCacheKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cWconstantPoolCacheKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cFframebFinterpreter_frame_monitor_begin6kM_pnPBasicObjectLock__; text: .text%__1cGGCTask2t6M_v_; -text: .text%__1cETypeFwiden6kMpk0_2_: type.o; -text: .text%__1cIAddPNodeQmach_bottom_type6FpknIMachNode__pknEType__; text: .text%__1cJLoadBNodeGOpcode6kM_i_; text: .text%__1cOPhaseIdealLoopGspinup6MpnENode_2222pnLsmall_cache__2_; text: .text%__1cPCountedLoopNodeGOpcode6kM_i_; @@ -762,8 +742,6 @@ text: .text%__1cNSignatureInfoJdo_object6Mii_v_: bytecode.o; text: .text%__1cHCompileKTracePhase2T6M_v_; text: .text%__1cILoadNodeHsize_of6kM_I_; text: .text%__1cVjava_lang_ClassLoaderbBnon_reflection_class_loader6FpnHoopDesc__2_; -text: .text%__1cFciEnvYget_method_by_index_impl6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; -text: .text%__1cFciEnvTget_method_by_index6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; text: .text%__1cFciEnvNlookup_method6MpnNinstanceKlass_2pnNsymbolOopDesc_4nJBytecodesECode__pnNmethodOopDesc__; text: .text%__1cNCatchProjNodeLbottom_type6kM_pknEType__: cfgnode.o; text: .text%__1cNCatchProjNodeHsize_of6kM_I_: cfgnode.o; @@ -838,7 +816,6 @@ text: .text%__1cCosEfree6Fpv_v_; text: .text%__1cKInlineTreeJcallee_at6kMipnIciMethod__p0_; text: .text%__1cQSystemDictionarybCfind_instance_or_array_klass6FnMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; text: .text%__1cMVirtualSpaceOcommitted_size6kM_I_; -text: .text%__1cNinstanceKlassSlookup_osr_nmethod6kMkpnNmethodOopDesc_i_pnHnmethod__; text: .text%__1cGRFrame2t6MnFframe_pnKJavaThread_kp0_v_; text: .text%__1cYCallStaticJavaDirectNodeFreloc6kM_i_; text: .text%__1cKciTypeFlowLStateVectorJcopy_into6kMp1_v_; @@ -847,7 +824,6 @@ text: .text%__1cKciTypeFlowQadd_to_work_list6Mpn0AFBlock__v_; text: .text%__1cKciTypeFlowOwork_list_next6M_pn0AFBlock__; text: .text%__1cKciTypeFlowKflow_block6Mpn0AFBlock_pn0ALStateVector_pn0AGJsrSet__v_; text: .text%__1cWConstantPoolCacheEntryKset_method6MnJBytecodesECode_nMmethodHandle_i_v_; -text: .text%__1cFframeRoops_code_blob_do6MpnKOopClosure_pknLRegisterMap__v_; text: .text%__1cLOptoRuntimeSuncommon_trap_Type6F_pknITypeFunc__; text: .text%__1cIHaltNode2t6MpnENode_2_v_; text: .text%__1cLPCTableNodeLbottom_type6kM_pknEType__; @@ -887,12 +863,10 @@ text: .text%__1cRindIndexScaleOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cOGenerateOopMapFppush6MpnNCellTypeState__v_; text: .text%__1cIConLNodeGOpcode6kM_i_; text: .text%__1cQSystemDictionarybOfind_constrained_instance_or_array_klass6FnMsymbolHandle_nGHandle_pnGThread__pnMklassOopDesc__; -text: .text%__1cHTypeIntFwiden6kMpknEType__3_; text: .text%__1cNCallGenerator2t6MpnIciMethod__v_; text: .text%__1cIGraphKit2t6M_v_; text: .text%__1cHMulNodeEhash6kM_I_; text: .text%__1cFStateM_sub_Op_ConP6MpknENode__v_; -text: .text%__1cIciSymbol2t6MnMsymbolHandle__v_; text: .text%__1cIAddLNodeGOpcode6kM_i_; text: .text%__1cIGraphKitNset_map_clone6MpnNSafePointNode__v_; text: .text%__1cIGraphKitOreplace_in_map6MpnENode_2_v_; @@ -917,7 +891,6 @@ text: .text%__1cIAddINodeJideal_reg6kM_I_: classes.o; text: .text%__1cOPhaseIdealLoopIsink_use6MpnENode_2_v_; text: .text%__1cKMemoryPoolYrecord_peak_memory_usage6M_v_; text: .text%__1cNinstanceKlassKlink_class6MpnGThread__v_; -text: .text%__1cTStackWalkCompPolicyRcompilation_level6MnMmethodHandle_i_i_; text: .text%__1cKMemBarNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cNinstanceKlassPinitialize_impl6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cTconstantPoolOopDescbBbasic_type_for_signature_at6Mi_nJBasicType__; @@ -935,8 +908,6 @@ text: .text%__1cISubINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cKReturnNodeKmatch_edge6kMI_I_; text: .text%__1cKReturnNodeGOpcode6kM_i_; text: .text%__1cKHandleAreaHoops_do6MpnKOopClosure__v_; -text: .text%__1cNchunk_oops_do6FpnKOopClosure_pnFChunk_pc_I_: handles.o; -text: .text%__1cGThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cKstorePNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cLStringTableGintern6FpnNsymbolOopDesc_pnGThread__pnHoopDesc__; text: .text%__1cNsymbolOopDescKas_unicode6kMri_pH_; @@ -964,7 +935,6 @@ text: .text%__1cPmethodDataKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cPmethodDataKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cRMachNullCheckNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cICodeHeapLheader_size6F_I_; -text: .text%__1cKJavaThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cJTypeTupleKmake_range6FpnLciSignature__pk0_; text: .text%__1cJStoreNodeSIdeal_masked_input6MpnIPhaseGVN_I_pnENode__; text: .text%__1cIAddINodeIadd_ring6kMpknEType_3_3_; @@ -1003,7 +973,6 @@ text: .text%__1cQCallLeafNoFPNodeGOpcode6kM_i_; text: .text%__1cIciMethodTcall_profile_at_bci6Mi_nNciCallProfile__; text: .text%__1cRInterpretedRFrame2t6MnFframe_pnKJavaThread_kpnGRFrame__v_; text: .text%__1cJAssemblerEmovl6MpnMRegisterImpl_nHAddress__v_; -text: .text%__1cPBytecode_invokeFindex6kM_i_; text: .text%__1cFParseHdo_call6M_v_; text: .text%__1cIGraphKitWround_double_arguments6MpnIciMethod__v_; text: .text%__1cIGraphKitTround_double_result6MpnIciMethod__v_; @@ -1057,12 +1026,10 @@ text: .text%__1cLOpaque1NodeGOpcode6kM_i_; text: .text%__1cSObjectSynchronizerJslow_exit6FpnHoopDesc_pnJBasicLock_pnGThread__v_; text: .text%__1cbBopt_virtual_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cLnaxRegPOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cbAjni_check_async_exceptions6FpnKJavaThread__v_: jni.o; text: .text%__1cKciTypeFlowLStateVectorStype_meet_internal6FpnGciType_3p0_3_; text: .text%__1cJFieldTypeSskip_optional_size6FpnNsymbolOopDesc_pi_v_; text: .text%__1cQjmpCon_shortNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cSobjArrayKlassKlassIoop_size6kMpnHoopDesc__i_: objArrayKlassKlass.o; -text: .text%__1cIGraphKitTset_all_memory_call6MpnENode__v_; text: .text%__1cJloadSNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKjmpDirNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIBoolNodeDcmp6kMrknENode__I_; @@ -1090,7 +1057,6 @@ text: .text%__1cXPhaseAggressiveCoalesceYinsert_copy_with_overlap6MpnFBlock_pnEN text: .text%__1cJAssemblerKemit_arith6MiipnMRegisterImpl_i_v_; text: .text%__1cFStateN_sub_Op_LoadP6MpknENode__v_; text: .text%__1cTconstantPoolOopDescbDresolve_string_constants_impl6FnSconstantPoolHandle_pnGThread__v_; -text: .text%__1cNCompileBrokerOcompile_method6FnMmethodHandle_i1ipkcpnGThread__pnHnmethod__; text: .text%__1cJloadINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFArenaRdestruct_contents6M_v_; text: .text%__1cFStateM_sub_Op_CmpI6MpknENode__v_; @@ -1098,7 +1064,6 @@ text: .text%__1cIAddPNodeJideal_reg6kM_I_: classes.o; text: .text%__1cJAssemblerDjcc6Mn0AJCondition_rnFLabel_nJrelocInfoJrelocType__v_; text: .text%__1cHi2sNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOGenerateOopMapJdo_method6Miiii_v_; -text: .text%__1cLSymbolTableFprobe6Fpkci_pnNsymbolOopDesc__; text: .text%__1cNdecI_eRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIciObjectFklass6M_pnHciKlass__; text: .text%__1cQPSGenerationPoolQget_memory_usage6M_nLMemoryUsage__; @@ -1106,7 +1071,6 @@ text: .text%__1cLRShiftLNodeGOpcode6kM_i_; text: .text%__1cKMemBarNodeFmatch6MpknIProjNode_pknHMatcher__pnENode__; text: .text%__1cMURShiftLNodeGOpcode6kM_i_; text: .text%__1cIMulINodeGOpcode6kM_i_; -text: .text%__1cPBytecode_invokeJsignature6kM_pnNsymbolOopDesc__; text: .text%__1cIConDNodeGOpcode6kM_i_; text: .text%__1cNSignatureInfoGdo_int6M_v_: bytecode.o; text: .text%__1cFframebGinterpreter_callee_receiver_addr6MnMsymbolHandle__ppnHoopDesc__; @@ -1138,13 +1102,11 @@ text: .text%__1cPStatSamplerTaskEtask6M_v_: statSampler.o; text: .text%__1cMPeriodicTaskMtime_to_wait6F_I_: thread.o; text: .text%jni_GetByteArrayRegion: jni.o; text: .text%__1cQPlaceholderTableKfind_entry6MiInMsymbolHandle_nGHandle__pnNsymbolOopDesc__; -text: .text%__1cKBufferBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cKstorePNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFStateP_sub_Op_LShiftI6MpknENode__v_; text: .text%jni_GetArrayLength: jni.o; text: .text%__1cICodeHeapIcapacity6kM_I_; text: .text%__1cMCodeHeapPoolQget_memory_usage6M_nLMemoryUsage__; -text: .text%__1cKMemoryPoolImax_size6kM_I_: memoryPool.o; text: .text%__1cMCodeHeapPoolNused_in_bytes6M_I_: memoryPool.o; text: .text%__1cIPipelinePoperand_latency6kMIpk0_I_; text: .text%__1cIMachOperEtype6kM_pknEType__; @@ -1221,19 +1183,16 @@ text: .text%__1cPJavaCallWrapper2t6MnMmethodHandle_nGHandle_pnJJavaValue_pnGThre text: .text%__1cCosUos_exception_wrapper6FpFpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v2468_v_; text: .text%__1cJJavaCallsEcall6FpnJJavaValue_nMmethodHandle_pnRJavaCallArguments_pnGThread__v_; text: .text%__1cRJavaCallArgumentsKparameters6M_pi_; -text: .text%__1cRruntime_type_from6FpnJJavaValue__nJBasicType__: javaCalls.o; text: .text%__1cTAbstractInterpreterbFsize_top_interpreter_activation6FpnNmethodOopDesc__i_; text: .text%__1cJMultiNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cPJavaCallWrapper2T6M_v_; text: .text%__1cITypeFuncFxdual6kM_pknEType__; -text: .text%__1cKInlineTree2t6MpnHCompile_pk0pnIciMethod_pnIJVMState_if_v_; text: .text%__1cMLinkResolverXresolve_klass_no_update6FrnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; text: .text%__1cHciField2t6MpnPciInstanceKlass_i_v_; text: .text%__1cTconstantPoolOopDescbCklass_ref_at_if_loaded_check6FnSconstantPoolHandle_ipnGThread__pnMklassOopDesc__; text: .text%__1cNloadKlassNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOGenerateOopMapCpp6MpnNCellTypeState_2_v_; text: .text%__1cSObjectSynchronizerXidentity_hash_value_for6FnGHandle__i_; -text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_; text: .text%__1cHoopDescSslow_identity_hash6M_i_; text: .text%__1cIMulINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cGciType2t6MnLKlassHandle__v_; @@ -1242,8 +1201,6 @@ text: .text%__1cLRShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cKInlineTreeYcompute_callee_frequency6kMi_f_; text: .text%__1cKInlineTreebCbuild_inline_tree_for_callee6MpnIciMethod_pnIJVMState_i_p0_; text: .text%__1cIciMethodbBinterpreter_call_site_count6Mi_i_; -text: .text%__1cHnmethodHoops_do6MpnKOopClosure__v_; -text: .text%__1cJGC_lockerNlock_critical6FpnKJavaThread__v_: jni.o; text: .text%__1cJAssemblerElock6M_v_; text: .text%__1cFKlassTarray_klass_or_null6Mi_pnMklassOopDesc__; text: .text%__1cRandI_eReg_immNodeLout_RegMask6kM_rknHRegMask__; @@ -1265,12 +1222,10 @@ text: .text%__1cSInterpreterRuntimeMmonitorenter6FpnKJavaThread_pnPBasicObjectLo text: .text%__1cPciInstanceKlass2t6MnLKlassHandle__v_; text: .text%jni_GetPrimitiveArrayCritical: jni.o; text: .text%jni_ReleasePrimitiveArrayCritical: jni.o; -text: .text%__1cWConstantPoolCacheEntryPbytecode_number6FnJBytecodesECode__i_: cpCacheOop.o; text: .text%__1cOMethodLivenessKBasicBlockIload_two6Mi_v_; text: .text%__1cMCreateExNodeJideal_reg6kM_I_: classes.o; text: .text%__1cFArena2t6M_v_; text: .text%__1cHMulNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cLsymbolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cMCreateExNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cSInterpreterRuntimeLmonitorexit6FpnKJavaThread_pnPBasicObjectLock__v_; text: .text%__1cIJVMState2t6Mi_v_; @@ -1284,9 +1239,7 @@ text: .text%__1cEDict2T6M_v_; text: .text%__1cNCatchProjNodeDcmp6kMrknENode__I_; text: .text%__1cSCountedLoopEndNodeKstride_con6kM_i_; text: .text%__1cRmethodDataOopDescKmileage_of6FpnNmethodOopDesc__i_; -text: .text%__1cQconstMethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cHCompileXin_preserve_stack_slots6M_I_; -text: .text%__1cLmethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cKTypeRawPtrFxmeet6kMpknEType__3_; text: .text%__1cTJvmtiEventCollectorYunset_jvmti_thread_state6M_v_; text: .text%__1cbGJvmtiVMObjectAllocEventCollector2T6M_v_; @@ -1298,7 +1251,6 @@ text: .text%__1cFStateM_sub_Op_CmpU6MpknENode__v_; text: .text%__1cSPSKeepAliveClosureGdo_oop6MppnHoopDesc__v_: psScavenge.o; text: .text%__1cFTypeDEmake6Fd_pk0_; text: .text%jni_IsSameObject: jni.o; -text: .text%__1cRCompilationPolicybIreset_counter_for_invocation_event6MnMmethodHandle__v_; text: .text%__1cKMemoryPoolHoops_do6MpnKOopClosure__v_; text: .text%__1cNstoreImmBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cJloadPNodeIpipeline6kM_pknIPipeline__; @@ -1351,7 +1303,6 @@ text: .text%__1cNstoreImmBNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOGenerateOopMapIdo_field6Miiii_v_; text: .text%__1cOGenerateOopMapRsigchar_to_effect6McipnNCellTypeState__2_; text: .text%__1cJAssemblerFtestl6MpnMRegisterImpl_2_v_; -text: .text%__1cIGraphKitZset_results_for_java_call6MpnMCallJavaNode__pnENode__; text: .text%JVM_GetMethodIxModifiers; text: .text%__1cNSCMemProjNodeGOpcode6kM_i_; text: .text%__1cJleaP8NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -1363,8 +1314,6 @@ text: .text%__1cFStateM_sub_Op_RegL6MpknENode__v_; text: .text%__1cRMachNullCheckNodeLout_RegMask6kM_rknHRegMask__: machnode.o; text: .text%__1cRshrI_eReg_immNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cScompP_mem_eRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cFciEnvbAget_constant_by_index_impl6MpnPciInstanceKlass_i_nKciConstant__; -text: .text%__1cFciEnvVget_constant_by_index6MpnPciInstanceKlass_i_nKciConstant__; text: .text%__1cLLShiftLNodeGOpcode6kM_i_; text: .text%__1cTciConstantPoolCacheGinsert6Mipv_v_; text: .text%__1cSobjArrayKlassKlassToop_adjust_pointers6MpnHoopDesc__i_; @@ -1376,7 +1325,6 @@ text: .text%__1cUreloc_java_to_interp6F_I_; text: .text%__1cTsize_java_to_interp6F_I_; text: .text%__1cKstoreINodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cScompU_eReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cIGraphKitTcreate_and_xform_if6MpnENode_2ff_pnGIfNode__: graphKit.o; text: .text%__1cSCallLeafDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQComputeCallStackHdo_void6M_v_: generateOopMap.o; text: .text%__1cHciField2t6MpnPfieldDescriptor__v_; @@ -1401,11 +1349,9 @@ text: .text%__1cFParseQarray_addressing6MnJBasicType_ippknEType__pnENode__; text: .text%__1cHCompileSregister_intrinsic6MpnNCallGenerator__v_; text: .text%__1cMeADXRegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cRcmpFastUnlockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cXcopy_u2_with_conversion6FpH0i_v_: classFileParser.o; text: .text%__1cPClassFileParserYparse_checked_exceptions6MpHInSconstantPoolHandle_pnGThread__1_; text: .text%__1cMLinkResolverbCresolve_special_call_or_null6FnLKlassHandle_nMsymbolHandle_21_nMmethodHandle__; text: .text%__1cPciInstanceKlassLfind_method6MpnIciSymbol_2_pnIciMethod__; -text: .text%__1cNCallGeneratorPfor_direct_call6FpnIciMethod__p0_; text: .text%__1cTDirectCallGeneratorIgenerate6MpnIJVMState__2_; text: .text%__1cMWarmCallInfoLalways_cold6F_p0_; text: .text%__1cFciEnvRfind_system_klass6MpnIciSymbol__pnHciKlass__; @@ -1444,10 +1390,7 @@ text: .text%__1cNloadKlassNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cIGraphKitPpush_pair_local6Mi_v_: parse2.o; text: .text%__1cNMemoryServiceXtrack_memory_pool_usage6FpnKMemoryPool__v_; text: .text%__1cMLinkResolverUresolve_invokestatic6FrnICallInfo_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cKklassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cXcmpL_reg_flags_LTGENodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNinstanceKlassScopy_static_fields6MpnSPSPromotionManager__v_; -text: .text%__1cSinstanceKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cKoopFactoryYnew_permanent_shortArray6FipnGThread__pnQtypeArrayOopDesc__; text: .text%__1cFStateR_sub_Op_LoadRange6MpknENode__v_; text: .text%__1cOcompU_eRegNodeIpipeline6kM_pknIPipeline__; @@ -1466,8 +1409,6 @@ text: .text%__1cIGraphKitTuse_exception_state6MpnNSafePointNode__pnENode__; text: .text%__1cKstoreINodeFreloc6kM_i_; text: .text%__1cRCardTableModRefBSPdirty_MemRegion6MnJMemRegion__v_; text: .text%__1cPcheckCastPPNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cTStackWalkCompPolicyYmethod_back_branch_event6MnMmethodHandle_iipnGThread__v_; -text: .text%__1cRCompilationPolicybJreset_counter_for_back_branch_event6MnMmethodHandle__v_; text: .text%__1cKciTypeFlowHdo_flow6M_v_; text: .text%__1cKciTypeFlowKmap_blocks6M_v_; text: .text%__1cKciTypeFlowKflow_types6M_v_; @@ -1509,14 +1450,12 @@ text: .text%__1cJrelocInfoKset_format6Mi_v_; text: .text%__1cPfieldDescriptorRint_initial_value6kM_i_; text: .text%__1cJTimeStampSticks_since_update6kM_x_; text: .text%__1cISubLNodeGOpcode6kM_i_; -text: .text%__1cRconstantPoolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cICodeBlobMset_oop_maps6MpnJOopMapSet__v_; text: .text%__1cJCodeCacheIallocate6Fi_pnICodeBlob__; text: .text%__1cQVMOperationQdDueueSqueue_remove_front6Mi_pnMVM_Operation__; text: .text%__1cMorI_eRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cScompI_eReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVAdaptivePaddedAverageGsample6Mf_v_; -text: .text%__1cNPrefetchQdDueueFclear6M_v_: psPromotionManager.o; text: .text%__1cSPSPromotionManagerFreset6M_v_; text: .text%__1cSPSPromotionManagerKflush_labs6M_v_; text: .text%__1cJloadSNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -1608,10 +1547,8 @@ text: .text%__1cKDictionaryJnew_entry6MIpnMklassOopDesc_pnHoopDesc__pnPDictionar text: .text%__1cIAndINodeKadd_opcode6kM_i_: classes.o; text: .text%__1cIAndINodeKmul_opcode6kM_i_: classes.o; text: .text%__1cRandI_eReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRshrI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJLoadSNodeJideal_reg6kM_I_: classes.o; text: .text%__1cLProfileDataPpost_initialize6MpnOBytecodeStream_pnRmethodDataOopDesc__v_: ciMethodData.o; -text: .text%__1cRaddI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOPhaseIdealLoopMdominated_by6MpnENode_2_v_; text: .text%__1cPRoundDoubleNodeGOpcode6kM_i_; text: .text%__1cRsarI_eReg_immNodeLout_RegMask6kM_rknHRegMask__; @@ -1619,7 +1556,6 @@ text: .text%__1cJAssemblerEandl6MpnMRegisterImpl_i_v_; text: .text%__1cLklassVtableQfill_in_mirandas6Mri_v_; text: .text%__1cCosXthread_local_storage_at6Fi_pv_; text: .text%__1cSThreadLocalStoragePget_thread_slow6F_pnGThread__; -text: .text%__1cQinstanceRefKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cLregFPR1OperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cNstoreImmBNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKstoreINodeOmemory_operand6kM_pknIMachOper__; @@ -1640,8 +1576,6 @@ text: .text%__1cPClassFileStream2t6MpCipc_v_; text: .text%__1cNinstanceKlassSprocess_interfaces6MpnGThread__v_; text: .text%__1cNinstanceKlassQinit_implementor6M_v_; text: .text%__1cNinstanceKlassbBdo_local_static_fields_impl6FnTinstanceKlassHandle_pFpnPfieldDescriptor_pnGThread__v5_v_; -text: .text%__1cSinstanceKlassKlassXallocate_instance_klass6MiiiinNReferenceType_pnGThread__pnMklassOopDesc__; -text: .text%__1cKoopFactoryRnew_instanceKlass6FiiiinNReferenceType_pnGThread__pnMklassOopDesc__; text: .text%__1cLklassVtableQget_num_mirandas6FpnMklassOopDesc_pnPobjArrayOopDesc_4_i_; text: .text%__1cLklassItableZsetup_itable_offset_table6FnTinstanceKlassHandle__v_; text: .text%__1cIUniverseTflush_dependents_on6FnTinstanceKlassHandle__v_; @@ -1649,7 +1583,6 @@ text: .text%__1cJCodeCachebKnumber_of_nmethods_with_dependencies6F_i_; text: .text%__1cPClassFileParserbBparse_constant_pool_entries6MnSconstantPoolHandle_ipnGThread__v_; text: .text%__1cQSystemDictionaryQadd_to_hierarchy6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cNinstanceKlassWdo_local_static_fields6MpFpnPfieldDescriptor_pnGThread__v4_v_; -text: .text%__1cPClassFileParserUcompute_oop_map_size6MnTinstanceKlassHandle_ii_i_; text: .text%__1cPClassFileParserVset_precomputed_flags6MnTinstanceKlassHandle__v_; text: .text%__1cPClassFileParserTparse_constant_pool6MpnGThread__nSconstantPoolHandle__; text: .text%__1cPClassFileParserbDcompute_transitive_interfaces6MnTinstanceKlassHandle_nOobjArrayHandle_pnGThread__2_; @@ -1664,8 +1597,6 @@ text: .text%__1cNinstanceKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__p text: .text%__1cSThreadProfilerMark2T6M_v_; text: .text%__1cJEventMark2t6MpkcE_v_: classLoader.o; text: .text%__1cSThreadProfilerMark2t6Mn0AGRegion__v_; -text: .text%__1cFVTuneOend_class_load6F_v_; -text: .text%__1cFVTuneQstart_class_load6F_v_; text: .text%__1cLClassLoaderOload_classfile6FnMsymbolHandle_pnGThread__nTinstanceKlassHandle__; text: .text%__1cQSystemDictionaryRfind_shared_class6FnMsymbolHandle__pnMklassOopDesc__; text: .text%__1cQSystemDictionaryRload_shared_class6FnMsymbolHandle_nGHandle_pnGThread__nTinstanceKlassHandle__; @@ -1704,7 +1635,6 @@ text: .text%__1cNmulL_eRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cYciExceptionHandlerStreamPcount_remaining6M_i_; text: .text%__1cJLoadLNodeJideal_reg6kM_I_: classes.o; text: .text%__1cPshrI_eReg_1NodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cWconstantPoolCacheKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cYmulI_imm_RShift_highNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cUBytecode_tableswitchOdest_offset_at6kMi_i_; text: .text%__1cSObjectSynchronizerJnotifyall6FnGHandle_pnGThread__v_; @@ -1731,9 +1661,6 @@ text: .text%__1cIXorINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cNSafepointBlobbDpreserve_callee_argument_oops6MnFframe_pknLRegisterMap_pnKOopClosure__v_: codeBlob.o; text: .text%__1cKManagementJtimestamp6F_x_; text: .text%__1cIPSOldGenPupdate_counters6M_v_; -text: .text%__1cNSharedRuntimebOraw_exception_handler_for_return_address6FpC_1_; -text: .text%__1cNSharedRuntimebKexception_handler_for_return_address6FpC_1_; -text: .text%__1cNaddI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cHOrINodeGadd_id6kM_pknEType__: classes.o; text: .text%signalHandler; text: .text%JVM_handle_solaris_signal; @@ -1800,7 +1727,6 @@ text: .text%__1cFKlassTarray_klass_or_null6M_pnMklassOopDesc__; text: .text%__1cNdecI_eRegNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cICodeHeapLmerge_right6MpnJFreeBlock__v_; text: .text%__1cIregDOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cNsubI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIPhaseIFGYCompute_Effective_Degree6M_v_; text: .text%__1cMPhaseChaitinISimplify6M_v_; text: .text%__1cMPhaseChaitinGSelect6M_I_; @@ -1809,7 +1735,6 @@ text: .text%__1cJScopeDescJstream_at6kMi_pnTDebugInfoReadStream__; text: .text%__1cLOptoRuntimeJstub_name6FpC_pkc_; text: .text%__1cSvframeStreamCommonZsecurity_get_caller_frame6Mi_v_; text: .text%__1cENodeHrm_prec6MI_v_; -text: .text%__1cUjni_invoke_nonstatic6FpnHJNIEnv__pnJJavaValue_pnI_jobject_nLJNICallType_pnK_jmethodID_pnSJNI_ArgumentPusher_pnGThread__v_: jni.o; text: .text%__1cWflagsReg_long_EQdDNEOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cKciTypeFlowPflow_exceptions6MpnNGrowableArray4Cpn0AFBlock___pnNGrowableArray4CpnPciInstanceKlass___pn0ALStateVector__v_; text: .text%__1cXmembar_release_lockNodeIadr_type6kM_pknHTypePtr__; @@ -1820,7 +1745,6 @@ text: .text%__1cMPhaseChaitinZcompress_uf_map_for_nodes6M_v_; text: .text%__1cZPhaseConservativeCoalesceGverify6M_v_; text: .text%__1cHTypePtrFxmeet6kMpknEType__3_; text: .text%__1cSsafePoint_pollNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cJScopeDesc2t6MpknHnmethod_i_v_; text: .text%__1cOcompiledVFrame2t6MpknFframe_pknLRegisterMap_pnKJavaThread_pnJScopeDesc__v_; text: .text%__1cNSignatureInfoHdo_long6M_v_: bytecode.o; text: .text%__1cXvirtual_call_RelocationJfirst_oop6M_pC_; @@ -1844,7 +1768,6 @@ text: .text%__1cWflagsReg_long_LEGTOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cSThreadLocalStorageTpd_getTlsAccessMode6F_n0AQpd_tlsAccessMode__; text: .text%__1cOMacroAssemblerKget_thread6MpnMRegisterImpl__v_; text: .text%__1cLRethrowNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cRcmpFastUnlockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIGraphKitNshared_unlock6MpnENode_2_v_; text: .text%__1cNSafePointNodeLpop_monitor6M_v_; text: .text%__1cLOptoRuntimebAcomplete_monitor_exit_Type6F_pknITypeFunc__; @@ -1877,7 +1800,6 @@ text: .text%__1cNobjArrayKlassIallocate6MipnGThread__pnPobjArrayOopDesc__; text: .text%__1cMeBCXRegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cRsubI_eReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cIJumpDataPpost_initialize6MpnOBytecodeStream_pnRmethodDataOopDesc__v_; -text: .text%__1cMalloc_object6FpnH_jclass_pnGThread__pnPinstanceOopDesc__: jni.o; text: .text%__1cHOrINodeJideal_reg6kM_I_: classes.o; text: .text%__1cKTypeRawPtrEmake6FnHTypePtrDPTR__pk0_; text: .text%__1cKTypeAryPtrQcast_to_ptr_type6kMnHTypePtrDPTR__pknEType__; @@ -1900,7 +1822,6 @@ text: .text%__1cYinternal_word_RelocationLunpack_data6M_v_; text: .text%__1cMorI_eRegNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%jni_NewObject: jni.o; text: .text%__1cMTailCallNodeKmatch_edge6kMI_I_; -text: .text%__1cIciMethodRinstructions_size6M_i_; text: .text%__1cKStoreFNodeGOpcode6kM_i_; text: .text%__1cFStateO_sub_Op_StoreC6MpknENode__v_; text: .text%__1cFciEnvKcompile_id6M_I_; @@ -1939,7 +1860,6 @@ text: .text%__1cXmembar_release_lockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__ text: .text%__1cXcmpL_reg_flags_LTGENodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJloadBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cMLinkResolverOresolve_method6FrnMmethodHandle_rnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; -text: .text%__1cNincI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJloadLNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cNandL_eRegNodeQuse_cisc_RegMask6M_v_; text: .text%__1cSciExceptionHandlerLcatch_klass6M_pnPciInstanceKlass__; @@ -1958,8 +1878,6 @@ text: .text%jni_NewGlobalRef: jni.o; text: .text%__1cKPSYoungGenRcapacity_in_bytes6kM_I_; text: .text%__1cMVirtualSpaceNreserved_size6kM_I_; text: .text%__1cHNTarjanIsetdepth6MIpI_v_; -text: .text%__1cOPhaseIdealLoopPbuild_loop_late6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; -text: .text%__1cOPhaseIdealLoopQbuild_loop_early6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; text: .text%__1cOPhaseIdealLoopKDominators6M_v_; text: .text%__1cHNTarjanDDFS6Fp0rnJVectorSet_pnOPhaseIdealLoop_pI_i_; text: .text%__1cOPhaseIdealLoopRinit_dom_lca_tags6M_v_; @@ -1994,7 +1912,6 @@ text: .text%__1cICmpDNodeGOpcode6kM_i_; text: .text%__1cLRuntimeStubbDpreserve_callee_argument_oops6MnFframe_pknLRegisterMap_pnKOopClosure__v_: codeBlob.o; text: .text%__1cNDispatchTableJset_entry6MirnKEntryPoint__v_; text: .text%__1cNmethodOopDescVclear_native_function6M_v_; -text: .text%__1cFframeLnmethods_do6M_v_; text: .text%__1cJLoadBNodeJideal_reg6kM_I_: classes.o; text: .text%__1cSSetupItableClosureEdoit6MpnMklassOopDesc_i_v_: klassVtable.o; text: .text%__1cLeAXRegIOperKin_RegMask6kMi_pknHRegMask__; @@ -2010,7 +1927,6 @@ text: .text%jni_DeleteGlobalRef: jni.o; text: .text%__1cOPhaseIdealLoopLdo_split_if6MpnENode__v_; text: .text%__1cRsubI_eReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNaddI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKTypeOopPtrSmake_from_constant6FpnIciObject__pk0_; text: .text%__1cMURShiftLNodeLbottom_type6kM_pknEType__: classes.o; text: .text%jni_GetObjectArrayElement: jni.o; text: .text%__1cQSystemDictionaryRpreloaded_oops_do6FpnKOopClosure__v_; @@ -2023,7 +1939,6 @@ text: .text%__1cQVMOperationQdDueueHoops_do6MpnKOopClosure__v_; text: .text%__1cKManagementHoops_do6FpnKOopClosure__v_; text: .text%__1cSObjectSynchronizerHoops_do6FpnKOopClosure__v_; text: .text%__1cKJNIHandlesHoops_do6FpnKOopClosure__v_; -text: .text%__1cIVMThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cbGJvmtiVMObjectAllocEventCollectorXoops_do_for_all_threads6FpnKOopClosure__v_; text: .text%__1cQPlaceholderTableHoops_do6MpnKOopClosure__v_; text: .text%__1cKJNIHandlesMweak_oops_do6FpnRBoolObjectClosure_pnKOopClosure__v_; @@ -2040,7 +1955,6 @@ text: .text%__1cIAndLNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%jio_vsnprintf; text: .text%__1cLRethrowNodeEhash6kM_I_: classes.o; text: .text%__1cWCallLeafNoFPDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRsalI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRsalI_eReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJAssemblerDjmp6MnHAddress__v_; text: .text%jio_snprintf; @@ -2057,8 +1971,6 @@ text: .text%__1cRLowMemoryDetectorRdetect_low_memory6F_v_; text: .text%__1cbAPSGCAdaptivePolicyCountersbBupdate_counters_from_policy6M_v_; text: .text%__1cWThreadLocalAllocBufferQresize_all_tlabs6F_v_; text: .text%__1cUParallelScavengeHeapbFaccumulate_statistics_all_tlabs6M_v_; -text: .text%__1cPGCMemoryManagerIgc_begin6M_v_; -text: .text%__1cPGCMemoryManagerGgc_end6M_v_; text: .text%__1cNMemoryServiceStrack_memory_usage6F_v_; text: .text%__1cXTraceMemoryManagerStats2T6M_v_; text: .text%__1cQSystemDictionaryHoops_do6FpnKOopClosure__v_; @@ -2094,7 +2006,6 @@ text: .text%__1cORuntimeServiceWrecord_safepoint_begin6F_v_; text: .text%__1cSObjectSynchronizerVdeflate_idle_monitors6F_v_; text: .text%__1cJloadFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMCounterDecayFdecay6F_v_; -text: .text%__1cONMethodSweeperFsweep6F_v_; text: .text%__1cRInlineCacheBufferUupdate_inline_caches6F_v_; text: .text%__1cUSafepointSynchronizeDend6F_v_; text: .text%__1cORuntimeServiceUrecord_safepoint_end6F_v_; @@ -2241,7 +2152,6 @@ text: .text%__1cFStateM_sub_Op_ConL6MpknENode__v_; text: .text%__1cSmembar_acquireNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cHRetNodeFreloc6kM_i_; text: .text%__1cIConFNodeGOpcode6kM_i_; -text: .text%__1cLRuntimeStubHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cJCodeCacheNalive_nmethod6FpnICodeBlob__pnHnmethod__; text: .text%__1cQLibraryIntrinsicIgenerate6MpnIJVMState__2_; text: .text%__1cOcompP_eRegNodeLout_RegMask6kM_rknHRegMask__; @@ -2249,9 +2159,7 @@ text: .text%__1cFStateM_sub_Op_CmpL6MpknENode__v_; text: .text%__1cKCompiledICSset_ic_destination6MpC_v_; text: .text%__1cLConvL2INodeJideal_reg6kM_I_: classes.o; text: .text%__1cZInterpreterMacroAssemblerNdispatch_next6MnITosState_i_v_; -text: .text%__1cPshlI_eReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cSmembar_releaseNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cNdecI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNandL_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNdecI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJLoadDNodeGOpcode6kM_i_; @@ -2267,13 +2175,9 @@ text: .text%__1cXmembar_acquire_lockNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRxorI_eReg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFStateR_sub_Op_SafePoint6MpknENode__v_; text: .text%__1cMciMethodDataStrap_recompiled_at6MpnLProfileData__i_; -text: .text%__1cSsafePoint_pollNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cSsafePoint_pollNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSsafePoint_pollNodeFreloc6kM_i_; -text: .text%__1cKCodeBuffer2t6MpCi_v_; text: .text%__1cNandI_eRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cRandI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cHi2sNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cHi2sNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFStateL_sub_Op_OrI6MpknENode__v_; text: .text%JVM_GetClassNameUTF; @@ -2311,14 +2215,12 @@ text: .text%__1cTshrL_eReg_32_63NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLOptoRuntimebBcomplete_monitor_enter_Type6F_pknITypeFunc__; text: .text%__1cIMaxINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cFStateQ_sub_Op_FastLock6MpknENode__v_; -text: .text%__1cPcmpFastLockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIGraphKitLshared_lock6MpnENode__pnMFastLockNode__; text: .text%__1cQjava_lang_ThreadGthread6FpnHoopDesc__pnKJavaThread__; text: .text%__1cEUTF8Ounicode_length6Fpkc_i_; text: .text%__1cPCallRuntimeNodeGOpcode6kM_i_; text: .text%__1cFParseFBlockMadd_new_path6M_i_; text: .text%JVM_FindClassFromClass; -text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o; text: .text%__1cIMulINodeGmul_id6kM_pknEType__: classes.o; text: .text%__1cPshlI_eReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cbDjava_lang_reflect_ConstructorFclazz6FpnHoopDesc__2_; @@ -2327,8 +2229,6 @@ text: .text%__1cbDjava_lang_reflect_ConstructorPparameter_types6FpnHoopDesc__2_; text: .text%__1cbDjava_lang_reflect_ConstructorEslot6FpnHoopDesc__i_; text: .text%__1cLConvI2LNodeJideal_reg6kM_I_: classes.o; text: .text%__1cKReflectionSinvoke_constructor6FpnHoopDesc_nOobjArrayHandle_pnGThread__2_; -text: .text%__1cMorI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc__v_: nativeLookup.o; text: .text%__1cMtlsLoadPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cYmulI_imm_RShift_highNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFParseFBlockNstack_type_at6kMi_pknEType__; @@ -2361,12 +2261,10 @@ text: .text%__1cQjava_lang_StringXcreate_oop_from_unicode6FpHipnGThread__pnHoopD text: .text%__1cJAssemblerEmovl6MpnMRegisterImpl_i_v_; text: .text%__1cXmembar_acquire_lockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMMergeMemNodeIadr_type6kM_pknHTypePtr__: memnode.o; -text: .text%__1cITypeLongFwiden6kMpknEType__3_; text: .text%__1cIModINodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cQjava_lang_StringTcreate_oop_from_str6FpkcpnGThread__pnHoopDesc__; text: .text%__1cKoopFactoryNnew_charArray6FpkcpnGThread__pnQtypeArrayOopDesc__; text: .text%__1cScompP_mem_eRegNodeFreloc6kM_i_; -text: .text%__1cMadjust_check6FpnENode_11iipnMPhaseIterGVN__v_: ifnode.o; text: .text%__1cNtestU_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateP_sub_Op_ConvI2L6MpknENode__v_; text: .text%__1cJScopeDescGsender6kM_p0_; @@ -2443,7 +2341,6 @@ text: .text%__1cNmaxI_eRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateM_sub_Op_AddL6MpknENode__v_; text: .text%__1cJAssemblerEsubl6MpnMRegisterImpl_i_v_; text: .text%__1cFForteNregister_stub6FpkcpC3_v_; -text: .text%__1cFVTuneNregister_stub6FpkcpC3_v_; text: .text%__1cENodeEgetd6kM_d_; text: .text%__1cFStateM_sub_Op_AndL6MpknENode__v_; text: .text%__1cKConv2BNodeGOpcode6kM_i_; @@ -2483,16 +2380,13 @@ text: .text%__1cNCompileBrokerScollect_statistics6FpnOCompilerThread_nMelapsedTi text: .text%__1cLConvI2FNodeGOpcode6kM_i_; text: .text%__1cQComputeCallStackIdo_short6M_v_: generateOopMap.o; text: .text%__1cICodeHeapMinsert_after6MpnJFreeBlock_2_v_; -text: .text%__1cHnmFlagsFclear6M_v_; text: .text%__1cHnmethodQcopy_scopes_data6MpCi_v_; text: .text%__1cVExceptionHandlerTableHcopy_to6MpnHnmethod__v_; text: .text%__1cHnmethod2n6FIi_pv_; text: .text%__1cWImplicitExceptionTableHcopy_to6MpnHnmethod__v_; -text: .text%__1cFVTuneOcreate_nmethod6FpnHnmethod__v_; text: .text%__1cFciEnvVnum_inlined_bytecodes6kM_i_; text: .text%__1cJCodeCacheGcommit6FpnICodeBlob__v_; text: .text%__1cYDebugInformationRecorderHcopy_to6MpnHnmethod__v_; -text: .text%__1cLOopRecorderHcopy_to6MpnICodeBlob__v_; text: .text%__1cQorI_eReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cHCompileUremove_useless_nodes6MrnQUnique_Node_List__v_; text: .text%__1cIciMethodRbuild_method_data6MnMmethodHandle__v_; @@ -2511,7 +2405,6 @@ text: .text%__1cIPhaseCCPHanalyze6M_v_; text: .text%__1cIPhaseCCPMdo_transform6M_v_; text: .text%__1cHCompileNreturn_values6MpnIJVMState__v_; text: .text%__1cKInlineTreeWbuild_inline_tree_root6F_p0_; -text: .text%__1cbAfinal_graph_reshaping_walk6FrnKNode_Stack_pnENode_rnUFinal_Reshape_Counts__v_: compile.o; text: .text%__1cIPhaseCCPJtransform6MpnENode__2_; text: .text%__1cHCompileLFinish_Warm6M_v_; text: .text%__1cMPhaseIterGVN2t6Mp0_v_; @@ -2535,7 +2428,6 @@ text: .text%__1cXSignatureHandlerLibraryKinitialize6F_v_; text: .text%__1cXSignatureHandlerLibraryDadd6FnMmethodHandle__v_; text: .text%__1cIAddFNodeGOpcode6kM_i_; text: .text%__1cJAssemblerFffree6Mi_v_; -text: .text%__1cKExceptionsG_throw6FpnGThread_pkcinGHandle__v_; text: .text%__1cQjava_lang_StringPcreate_from_str6FpkcpnGThread__nGHandle__; text: .text%__1cOGenerateOopMapIppop_any6Mi_v_; text: .text%__1cXroundDouble_mem_regNodeLout_RegMask6kM_rknHRegMask__; @@ -2551,7 +2443,6 @@ text: .text%__1cCosLelapsedTime6F_d_; text: .text%__1cKJavaThreadZsecurity_get_caller_class6Mi_pnMklassOopDesc__; text: .text%jni_GetStringUTFChars: jni.o; text: .text%jni_ReleaseStringUTFChars; -text: .text%__1cNloadConI0NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cSInterpreterRuntimeXthrow_pending_exception6FpnKJavaThread__v_; text: .text%__1cXcmpL_reg_flags_LEGTNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOClearArrayNodeIIdentity6MpnOPhaseTransform__pnENode__; @@ -2572,18 +2463,14 @@ text: .text%__1cFParsebLincrement_and_test_invocation_counter6Mi_v_; text: .text%__1cQsalI_eReg_CLNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSshrL_eReg_1_31NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJleaP8NodeIpipeline6kM_pknIPipeline__; -text: .text%__1cXcmpL_reg_flags_LTGENodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cNcmpL_LTGENodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFParsePmerge_exception6Mi_v_; text: .text%__1cFStateS_sub_Op_ClearArray6MpknENode__v_; text: .text%__1cMrep_stosNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMrep_stosNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOcompI_eRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cFTypeFEmake6Ff_pk0_; text: .text%__1cKstoreLNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSInterpreterRuntimeOmultianewarray6FpnKJavaThread_pi_v_; text: .text%__1cIDivINodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cPmethodDataKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cLStrCompNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cXJNI_ArgumentPusherVaArgHget_int6M_v_: jni.o; text: .text%__1cNtestP_regNodeIpipeline6kM_pknIPipeline__; @@ -2602,11 +2489,8 @@ text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMs text: .text%__1cFParseLdo_newarray6MnJBasicType__v_; text: .text%__1cSsafePoint_pollNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKstoreLNodeFreloc6kM_i_; -text: .text%__1cGThreadLnmethods_do6M_v_; text: .text%__1cPRoundDoubleNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cCosTnative_java_library6F_pv_; -text: .text%__1cQjava_lang_StringFvalue6FpnHoopDesc__pnQtypeArrayOopDesc__; -text: .text%__1cQjava_lang_StringGoffset6FpnHoopDesc__i_; text: .text%__1cIModLNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cScompP_eReg_immNodeIpipeline6kM_pknIPipeline__; text: .text%__1cQjava_lang_StringScreate_from_symbol6FnMsymbolHandle_pnGThread__nGHandle__; @@ -2615,13 +2499,11 @@ text: .text%__1cRmulI_eReg_immNodeQuse_cisc_RegMask6M_v_; text: .text%__1cCosYprint_jni_name_suffix_on6FpnMoutputStream_i_v_; text: .text%__1cCosYprint_jni_name_prefix_on6FpnMoutputStream_i_v_; text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_53pnGThread__v_; -text: .text%__1cVlookup_special_native6Fpc_pC_: nativeLookup.o; text: .text%__1cPciObjArrayKlassGloader6M_pnHoopDesc__: ciObjArrayKlass.o; text: .text%__1cPDictionaryEntryVadd_protection_domain6MpnHoopDesc__v_; text: .text%__1cRxorI_eReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQSystemDictionarybAvalidate_protection_domain6FnTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cKDictionaryVadd_protection_domain6MiInTinstanceKlassHandle_nGHandle_2pnGThread__v_; -text: .text%__1cPshrI_eReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cKarrayKlassbBcomplete_create_array_klass6FnQarrayKlassHandle_nLKlassHandle_pnGThread__v_; text: .text%__1cKarrayKlassXbase_create_array_klass6FrknKKlass_vtbl_inLKlassHandle_pnGThread__nQarrayKlassHandle__; text: .text%__1cIPerfLong2t6MnJCounterNS_pkcnIPerfDataFUnits_n0CLVariability__v_; @@ -2642,7 +2524,6 @@ text: .text%__1cPfieldDescriptorSlong_initial_value6kM_x_; text: .text%__1cRsubI_eReg_memNodeFreloc6kM_i_; text: .text%__1cKstoreBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cJLoadPNodeMstore_Opcode6kM_i_: classes.o; -text: .text%__1cKJavaThreadLnmethods_do6M_v_; text: .text%__1cXvirtual_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cNcmovI_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cZCallDynamicJavaDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -2651,17 +2532,14 @@ text: .text%__1cOGenerateOopMapXreplace_all_CTS_matches6MnNCellTypeState_1_v_; text: .text%__1cNstoreImmINodeFreloc6kM_i_; text: .text%__1cNobjArrayKlassYcompute_secondary_supers6MipnGThread__pnPobjArrayOopDesc__; text: .text%__1cRsarI_eReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cRsarI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cWCallLeafNoFPDirectNodeFreloc6kM_i_; text: .text%__1cNobjArrayKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: objArrayKlass.o; text: .text%jni_GetStringCritical: jni.o; text: .text%jni_ReleaseStringCritical: jni.o; text: .text%__1cPciObjArrayKlass2t6MnLKlassHandle__v_; -text: .text%__1cPsarI_eReg_1NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPsarI_eReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPconvF2D_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cPPerfDataManagerMcounter_name6Fpkc2_pc_; -text: .text%__1cRaddL_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cHCompileSrethrow_exceptions6MpnIJVMState__v_; text: .text%__1cLRethrowNodeJideal_reg6kM_I_: classes.o; text: .text%__1cURethrowExceptionNodeLout_RegMask6kM_rknHRegMask__; @@ -2682,9 +2560,7 @@ text: .text%__1cFParseTprofile_switch_case6Mi_v_; text: .text%__1cKJavaThreadLgc_epilogue6M_v_; text: .text%__1cFParseOmerge_new_path6Mi_v_; text: .text%__1cFParseSjump_switch_ranges6MpnENode_pnLSwitchRange_4i_v_; -text: .text%__1cNxorI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%jni_NewByteArray: jni.o; -text: .text%__1cNmulL_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMstoreSSINodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKReflectionTget_parameter_types6FnMmethodHandle_ippnHoopDesc_pnGThread__nOobjArrayHandle__; text: .text%__1cNmethodOopDescbGresolved_checked_exceptions_impl6Fp0pnGThread__nOobjArrayHandle__; @@ -2698,13 +2574,11 @@ text: .text%__1cPstoreImmI16NodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cOcmpD_cc_P6NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRandI_eReg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cNObjectMonitorHRecycle6M_v_; -text: .text%__1cNandL_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFBlockNset_next_call6MpnENode_rnJVectorSet_rnLBlock_Array__v_; text: .text%__1cJloadSNodeIpipeline6kM_pknIPipeline__; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorEmove6Mii_v_; text: .text%__1cENode2t6Mp0111111_v_; text: .text%__1cFStateP_sub_Op_RShiftL6MpknENode__v_; -text: .text%__1cMloadConLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIAddDNodeGOpcode6kM_i_; text: .text%__1cNmodL_eRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKarrayKlassTallocate_arrayArray6MiipnGThread__pnPobjArrayOopDesc__; @@ -2729,8 +2603,6 @@ text: .text%__1cPshrI_eReg_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%jni_GetFieldID: jni.o; text: .text%jni_IsAssignableFrom: jni.o; text: .text%__1cNnegI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNnegI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cSobjArrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cFParseWcheck_interpreter_type6MpnENode_pknEType_rpnNSafePointNode__2_; text: .text%__1cJAssemblerEaddl6MnHAddress_i_v_; text: .text%__1cTsarL_eReg_32_63NodeLout_RegMask6kM_rknHRegMask__; @@ -2745,9 +2617,7 @@ text: .text%__1cFStateX_sub_Op_CompareAndSwapL6MpknENode__v_; text: .text%__1cSloadL_volatileNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cNtestU_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSloadL_volatileNodeFreloc6kM_i_; -text: .text%__1cTcompareAndSwapLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cISubLNodeGadd_id6kM_pknEType__: classes.o; -text: .text%__1cFframeVnmethods_code_blob_do6M_v_; text: .text%__1cOPhaseIdealLoopUpeeled_dom_test_elim6MpnNIdealLoopTree_rnJNode_List__v_; text: .text%__1cJAssemblerDhlt6M_v_; text: .text%__1cYcmpL_zero_flags_LEGTNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -2761,11 +2631,8 @@ text: .text%jni_SetBooleanField: jni.o; text: .text%__1cTconvD2I_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateT_sub_Op_ThreadLocal6MpknENode__v_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pF_vc_v_; -text: .text%__1cMtlsLoadPNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIciObject2t6MpnHciKlass__v_; text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorDbox6Mii_v_; -text: .text%__1cKsplit_once6FpnMPhaseIterGVN_pnENode_333_v_: cfgnode.o; -text: .text%__1cYmulI_imm_RShift_highNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPRoundDoubleNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cKloadUBNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMURShiftLNodeJideal_reg6kM_I_: classes.o; @@ -2775,8 +2642,6 @@ text: .text%__1cPClassFileParserbBcheck_illegal_static_method6FnTinstanceKlassHa text: .text%__1cGciType2t6MpnHciKlass__v_; text: .text%__1cHciKlass2t6MpnIciSymbol_p0_v_; text: .text%__1cIciMethodRinterpreter_entry6M_pC_; -text: .text%__1cXjvm_define_class_common6FpnHJNIEnv__pkcpnI_jobject_pkWi53pnGThread__pnH_jclass__: jvm.o; -text: .text%__1cQSystemDictionaryTresolve_from_stream6FnMsymbolHandle_nGHandle_2pnPClassFileStream_pnGThread__pnMklassOopDesc__; text: .text%__1cUciInstanceKlassKlassEmake6F_p0_; text: .text%__1cLLShiftLNodeJideal_reg6kM_I_: classes.o; text: .text%__1cIciSymbolHbyte_at6Mi_i_; @@ -2785,12 +2650,10 @@ text: .text%__1cZCallDynamicJavaDirectNodeKmethod_set6Mi_v_; text: .text%__1cIModINodeJideal_reg6kM_I_: classes.o; text: .text%__1cSTailCalljmpIndNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cXMachCallDynamicJavaNodePret_addr_offset6M_i_; -text: .text%__1cNcmpL_EQdDNENodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOGenerateOopMapOdo_monitorexit6Mi_v_; text: .text%__1cOGenerateOopMapLmonitor_pop6M_nNCellTypeState__; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_; text: .text%__1cOmulIS_eRegNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSalign_to_page_size6FI_I_: heap.o; text: .text%__1cKExceptionsK_throw_msg6FpnGThread_pkcinMsymbolHandle_4nGHandle_6_v_; text: .text%__1cKExceptionsK_throw_msg6FpnGThread_pkcipnNsymbolOopDesc_4_v_; text: .text%__1cPciInstanceKlassYprotection_domain_handle6M_pnI_jobject__; @@ -2810,7 +2673,6 @@ text: .text%__1cJMarkSweepSFollowStackClosureHdo_void6M_v_: markSweep.o; text: .text%__1cPICStubInterfaceRcode_size_to_size6kMi_i_: icBuffer.o; text: .text%__1cPICStubInterfaceKinitialize6MpnEStub_i_v_: icBuffer.o; text: .text%__1cSleaP_eReg_immINodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNcmpL_LEGTNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFStateQ_sub_Op_URShiftL6MpknENode__v_; text: .text%__1cIModLNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cJAssemblerEcmpl6MpnMRegisterImpl_i_v_; @@ -2844,10 +2706,8 @@ text: .text%__1cIMulINodeKmul_opcode6kM_i_: classes.o; text: .text%__1cNsubL_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVCallRuntimeDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cODeoptimizationVtrap_state_has_reason6Fii_i_; -text: .text%__1cNaddL_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJloadBNodeIpipeline6kM_pknIPipeline__; text: .text%__1cRmulI_eReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cS__ieee754_rem_pio26Fdpd_i_: sharedRuntimeTrig.o; text: .text%__1cSThreadLocalStorageNpd_set_thread6FpnGThread__v_; text: .text%__1cSThreadLocalStorageKset_thread6FpnGThread__v_; text: .text%__1cSThreadLocalStoragebBget_thread_via_cache_slowly6FIi_pnGThread__; @@ -2870,7 +2730,6 @@ text: .text%__1cICmpDNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cIDivDNodeGOpcode6kM_i_; text: .text%__1cHCompileQgrow_alias_types6M_v_; text: .text%JVM_GetClassCPTypes; -text: .text%__1cUverify_byte_codes_fn6F_pv_: verifier.o; text: .text%JVM_GetClassMethodsCount; text: .text%JVM_GetClassCPEntriesCount; text: .text%JVM_GetClassFieldsCount; @@ -2878,7 +2737,6 @@ text: .text%__1cKstoreBNodeFreloc6kM_i_; text: .text%__1cPconvI2F_SSFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQjava_lang_ThreadKset_thread6FpnHoopDesc_pnKJavaThread__v_; text: .text%__1cMdecI_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPconvI2L_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOMacroAssemblerKverify_FPU6Mipkc_v_; text: .text%__1cJLoadFNodeJideal_reg6kM_I_: classes.o; text: .text%__1cMloadConDNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -2920,7 +2778,6 @@ text: .text%__1cRandL_eReg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cMloadConFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateM_sub_Op_MinI6MpknENode__v_; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_; -text: .text%__1cNminI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFMutex2T6M_v_; text: .text%lwp_mutex_destroy: os_solaris.o; text: .text%__1cHMonitor2T6M_v_; @@ -2942,7 +2799,6 @@ text: .text%__1cXroundDouble_mem_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__ text: .text%__1cJCodeCacheFfirst6F_pnICodeBlob__; text: .text%__1cNaddP_eRegNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cICodeHeapLfirst_block6kM_pnJHeapBlock__; -text: .text%__1cXcmpL_reg_flags_LEGTNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPciObjectFactoryPinsert_non_perm6Mrpn0ANNonPermObject_pnHoopDesc_pnIciObject__v_; text: .text%__1cKloadUBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cISubDNodeGOpcode6kM_i_; @@ -2951,7 +2807,6 @@ text: .text%__1cSObjectSynchronizerGnotify6FnGHandle_pnGThread__v_; text: .text%__1cOcmpD_cc_P6NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLConvD2FNodeGOpcode6kM_i_; text: .text%__1cTmembar_volatileNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cSshrL_eReg_1_31NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%JVM_MonitorNotify; text: .text%__1cFParseNdo_instanceof6M_v_; text: .text%__1cJAssemblerEshrl6MpnMRegisterImpl_i_v_; @@ -2967,7 +2822,6 @@ text: .text%__1cYjava_lang_reflect_MethodWset_annotation_default6FpnHoopDesc_2_v text: .text%__1cZCallDynamicJavaDirectNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMulFNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cFStateN_sub_Op_LoadF6MpknENode__v_; -text: .text%__1cNandI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cWPredictedCallGeneratorIgenerate6MpnIJVMState__2_; text: .text%__1cYjava_lang_reflect_MethodGcreate6FpnGThread__nGHandle__; text: .text%__1cYjava_lang_reflect_MethodJset_clazz6FpnHoopDesc_2_v_; @@ -2985,7 +2839,6 @@ text: .text%__1cINegDNodeGOpcode6kM_i_; text: .text%__1cNCallGeneratorRfor_uncommon_trap6FpnIciMethod_nODeoptimizationLDeoptReason_n0CLDeoptAction__p0_; text: .text%__1cNmodI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cFStateP_sub_Op_LShiftL6MpknENode__v_; -text: .text%__1cNmodI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cLConvI2DNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cIGraphKitJpush_pair6MpnENode__v_: callGenerator.o; text: .text%__1cZUncommonTrapCallGeneratorIgenerate6MpnIJVMState__2_; @@ -2995,9 +2848,7 @@ text: .text%__1cJAssemblerFfld_d6MnHAddress__v_; text: .text%__1cJloadFNodeFreloc6kM_i_; text: .text%__1cMincI_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cVCallRuntimeDirectNodeKmethod_set6Mi_v_; -text: .text%__1cRaddI_eReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOGenerateOopMapKinit_state6M_v_; -text: .text%__1cNSafepointBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cOGenerateOopMapTmark_reachable_code6M_v_; text: .text%__1cOGenerateOopMapPinitialize_vars6M_v_; text: .text%__1cNinstanceKlassSregister_finalizer6FpnPinstanceOopDesc_pnGThread__2_; @@ -3013,7 +2864,6 @@ text: .text%__1cMmulD_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQjava_lang_SystemSin_offset_in_bytes6F_i_; text: .text%__1cJAssemblerEaddl6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cQjava_lang_SystemTout_offset_in_bytes6F_i_; -text: .text%__1cIBytecodeIset_code6MnJBytecodesECode__v_; text: .text%__1cNmulI_eRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIRetTableRcompute_ret_table6MnMmethodHandle__v_; text: .text%__1cOGenerateOopMapLcompute_map6MpnGThread__v_; @@ -3032,7 +2882,6 @@ text: .text%__1cQjava_lang_ThreadMset_priority6FpnHoopDesc_nOThreadPriority__v_; text: .text%__1cIMulDNodeImul_ring6kMpknEType_3_3_; text: .text%__1cOmulF24_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOGenerateOopMapPdo_monitorenter6Mi_v_; -text: .text%__1cRjni_invoke_static6FpnHJNIEnv__pnJJavaValue_pnI_jobject_nLJNICallType_pnK_jmethodID_pnSJNI_ArgumentPusher_pnGThread__v_: jni.o; text: .text%__1cOjmpLoopEndNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cOjmpLoopEndNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOGenerateOopMapMmonitor_push6MnNCellTypeState__v_; @@ -3054,7 +2903,6 @@ text: .text%__1cNinstanceKlassYremove_dependent_nmethod6MpnHnmethod__v_; text: .text%__1cNsubI_eRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cTcmovII_reg_LEGTNodeQuse_cisc_RegMask6M_v_; text: .text%__1cJAssemblerFfld_s6MnHAddress__v_; -text: .text%__1cVscale_to_lwp_priority6Fiii_i_: os_solaris.o; text: .text%__1cNxorI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJMemRegionMintersection6kMk0_0_; text: .text%__1cMincI_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3098,7 +2946,6 @@ text: .text%jni_NewObjectArray: jni.o; text: .text%__1cKCompiledICKcached_oop6kM_pnHoopDesc__; text: .text%__1cFStateM_sub_Op_MulI6MpknENode__v_; text: .text%__1cCosPpd_start_thread6FpnGThread__v_; -text: .text%__1cNsubL_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPRoundDoubleNodeJideal_reg6kM_I_: classes.o; text: .text%__1cXjava_lang_reflect_FieldIset_slot6FpnHoopDesc_i_v_; text: .text%__1cKReflectionInew_type6FnMsymbolHandle_nLKlassHandle_pnGThread__nGHandle__; @@ -3144,9 +2991,7 @@ text: .text%jni_GetFloatArrayRegion: jni.o; text: .text%__1cKJavaThreadDrun6M_v_; text: .text%__1cKJavaThreadRthread_main_inner6M_v_; text: .text%__1cKReflectionbFbasic_type_mirror_to_basic_type6FpnHoopDesc_pnGThread__nJBasicType__; -text: .text%__1cM__kernel_cos6Fdd_d_: sharedRuntimeTrig.o; text: .text%__1cJAssemblerFcmovl6Mn0AJCondition_pnMRegisterImpl_3_v_; -text: .text%__1cM__kernel_sin6Fddi_d_: sharedRuntimeTrig.o; text: .text%__1cSleaP_eReg_immINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOPhaseIdealLoopJclone_iff6MpnHPhiNode_pnNIdealLoopTree__pnIBoolNode__; text: .text%__1cGThreadFstart6Fp0_v_; @@ -3154,7 +2999,6 @@ text: .text%__1cNSharedRuntimeEdsin6Fd_d_; text: .text%__1cNSharedRuntimeEdcos6Fd_d_; text: .text%jni_CallStaticVoidMethod: jni.o; text: .text%__1cPPerfDataManagerTcreate_long_counter6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnPPerfLongCounter__; -text: .text%__1cSshlL_eReg_1_31NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNsymbolOopDescWas_klass_external_name6kM_pkc_; text: .text%__1cNdecI_eRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cTconvF2I_reg_regNodeLout_RegMask6kM_rknHRegMask__; @@ -3165,7 +3009,6 @@ text: .text%JVM_IsArrayClass; text: .text%__1cHTypePtrFxdual6kM_pknEType__; text: .text%__1cSMachBreakpointNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cQshrI_eReg_CLNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cRmulI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%JVM_GetClassName; text: .text%__1cSsarL_eReg_1_31NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLStringTableGintern6FpkcpnGThread__pnHoopDesc__; @@ -3184,7 +3027,6 @@ text: .text%__1cJArrayDataKcell_count6M_i_: ciMethodData.o; text: .text%JVM_Open; text: .text%__1cQjava_lang_ThreadIpriority6FpnHoopDesc__nOThreadPriority__; text: .text%__1cQjava_lang_ThreadJstackSize6FpnHoopDesc__x_; -text: .text%__1cYcmpL_zero_flags_EQdDNENodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNObjectMonitorJnotifyAll6MpnGThread__v_; text: .text%__1cNPerfByteArray2t6MnJCounterNS_pkcnIPerfDataFUnits_n0CLVariability_i_v_; text: .text%JVM_StartThread; @@ -3192,9 +3034,7 @@ text: .text%__1cQComputeCallStackIdo_array6Mii_v_: generateOopMap.o; text: .text%__1cMthread_entry6FpnKJavaThread_pnGThread__v_: jvm.o; text: .text%__1cOMacroAssemblerKnull_check6MpnMRegisterImpl_i_v_; text: .text%__1cGICStubLdestination6kM_pC_; -text: .text%__1cYcmpL_zero_flags_LEGTNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cLConvD2INodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cRxorI_eReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRInlineCacheBufferVic_buffer_entry_point6FpC_1_; text: .text%__1cKJavaThreadHprepare6MpnI_jobject_nOThreadPriority__v_; text: .text%jni_GetStaticObjectField: jni.o; @@ -3250,13 +3090,11 @@ text: .text%__1cFStateO_sub_Op_StoreF6MpknENode__v_; text: .text%__1cQaddD_reg_immNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cTsarL_eReg_32_63NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%jni_CallObjectMethod: jni.o; -text: .text%__1cNaddP_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNaddP_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLOptoRuntimeMrethrow_Type6F_pknITypeFunc__; text: .text%__1cMstoreSSPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRandI_eReg_memNodeFreloc6kM_i_; text: .text%__1cRCardTableModRefBSPclear_MemRegion6MnJMemRegion__v_; -text: .text%__1cHThreadsHoops_do6FpnKOopClosure__v_; text: .text%__1cRInlineCacheBufferLnew_ic_stub6F_pnGICStub__; text: .text%__1cRInlineCacheBufferWcreate_transition_stub6FpnKCompiledIC_pnHoopDesc_pC_v_; text: .text%__1cRInlineCacheBufferXassemble_ic_buffer_code6FpCpnHoopDesc_1_v_; @@ -3276,7 +3114,6 @@ text: .text%__1cMsubD_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%JVM_MonitorNotifyAll; text: .text%__1cLConvI2FNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cKConv2BNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cNmaxI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cSvframeArrayElementDbci6kM_i_; text: .text%__1cIDivDNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cMloadConFNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3289,15 +3126,12 @@ text: .text%__1cXJNI_ArgumentPusherVaArgJget_float6M_v_: jni.o; text: .text%__1cTcmovII_reg_LTGENodeQuse_cisc_RegMask6M_v_; text: .text%__1cSPerfStringConstant2t6MnJCounterNS_pkc3_v_; text: .text%__1cIMulDNodeGmul_id6kM_pknEType__: classes.o; -text: .text%__1cQorI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPPerfDataManagerWcreate_string_constant6FnJCounterNS_pkc3pnGThread__pnSPerfStringConstant__; text: .text%__1cOMacroAssemblerFleave6M_v_; text: .text%JVM_GetInheritedAccessControlContext; text: .text%JVM_NativePath; text: .text%__1cQjava_lang_ThreadbGinherited_access_control_context6FpnHoopDesc__2_; text: .text%__1cVLoaderConstraintTableJnew_entry6MIpnNsymbolOopDesc_pnMklassOopDesc_ii_pnVLoaderConstraintEntry__; -text: .text%__1cVloadConL_low_onlyNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cQsalI_eReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFStateT_sub_Op_CallRuntime6MpknENode__v_; text: .text%__1cCosXnon_memory_address_word6F_pc_; text: .text%__1cQsalI_eReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3307,7 +3141,6 @@ text: .text%__1cNandI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVCallRuntimeDirectNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOmulF24_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cRandL_eReg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cTshrL_eReg_32_63NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOaddF24_regNodeQuse_cisc_RegMask6M_v_; text: .text%__1cNcmovP_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKCompiledICOset_cached_oop6MpnHoopDesc__v_; @@ -3319,7 +3152,6 @@ text: .text%__1cKCompiledICMstub_address6kM_pC_; text: .text%__1cZInterpreterMacroAssemblerUupdate_mdp_by_offset6MpnMRegisterImpl_i_v_; text: .text%__1cKstoreFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSaddD_reg_roundNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cMdecI_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPciInstanceKlassLjava_mirror6M_pnKciInstance__; text: .text%__1cISubDNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cKReflectionTunbox_for_primitive6FpnHoopDesc_pnGjvalue_pnGThread__nJBasicType__; @@ -3342,13 +3174,11 @@ text: .text%__1cLConvI2DNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cQsalL_eReg_CLNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cNSafePointNodeQpeek_monitor_obj6kM_pnENode__; text: .text%__1cVcompiledICHolderKlassToop_adjust_pointers6MpnHoopDesc__i_; -text: .text%__1cHnmethodbAmake_not_entrant_or_zombie6Mi_v_; text: .text%__1cPoldgetTimeNanos6F_x_: os_solaris.o; text: .text%__1cVcompiledICHolderKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cIDivLNodeJideal_reg6kM_I_: classes.o; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFn0AJOperation__v4_v_; text: .text%__1cYinternal_word_RelocationGtarget6M_pC_; -text: .text%__1cRxorI_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerEsarl6MpnMRegisterImpl_i_v_; text: .text%__1cIModLNodeJideal_reg6kM_I_: classes.o; text: .text%__1cFParsePdo_monitor_exit6M_v_; @@ -3368,7 +3198,6 @@ text: .text%__1cFParseMdo_anewarray6M_v_; text: .text%__1cJLoadDNodeJideal_reg6kM_I_: classes.o; text: .text%__1cXjava_lang_reflect_FieldFclazz6FpnHoopDesc__2_; text: .text%__1cMsubD_regNodeQuse_cisc_RegMask6M_v_; -text: .text%__1cOcmpD_cc_P6NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTcmovII_reg_EQdDNENodeQuse_cisc_RegMask6M_v_; text: .text%__1cFStateM_sub_Op_CmpD6MpknENode__v_; text: .text%__1cXjava_lang_reflect_FieldJmodifiers6FpnHoopDesc__i_; @@ -3391,7 +3220,6 @@ text: .text%__1cKEntryPoint2t6M_v_; text: .text%__1cKstoreINodeIpipeline6kM_pknIPipeline__; text: .text%__1cXcmpL_reg_flags_LTGENodeIpipeline6kM_pknIPipeline__; text: .text%__1cSMachBreakpointNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cQshrI_eReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cKemit_break6FrnKCodeBuffer__v_; text: .text%__1cQshrI_eReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIciMethodVget_osr_flow_analysis6Mi_pnKciTypeFlow__; @@ -3443,7 +3271,6 @@ text: .text%__1cOcompiledVFrameImonitors6kM_pnNGrowableArray4CpnLMonitorInfo____ text: .text%__1cRsubL_eReg_memNodeFreloc6kM_i_; text: .text%__1cMTailJumpNodeKmatch_edge6kMI_I_; text: .text%__1cFStateP_sub_Op_ConvF2D6MpknENode__v_; -text: .text%__1cNdivL_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNinstanceKlassPadd_osr_nmethod6MpnHnmethod__v_; text: .text%__1cHThreadsbMis_supported_jni_version_including_1_16Fi_C_; text: .text%__1cFStateM_sub_Op_DivL6MpknENode__v_; @@ -3458,7 +3285,6 @@ text: .text%__1cNmodI_eRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cLStrCompNodeJideal_reg6kM_I_: classes.o; text: .text%__1cJAssemblerGfrstor6MnHAddress__v_; text: .text%JVM_GetCPFieldModifiers; -text: .text%__1cSUnsafe_DefineClass6FpnHJNIEnv__pnI_jstring_pnL_jbyteArray_iipnI_jobject_7_pnH_jclass__: unsafe.o; text: .text%__1cJBasicLockHmove_to6MpnHoopDesc_p0_v_; text: .text%__1cSObjectSynchronizerOinflate_helper6FpnHoopDesc__pnNObjectMonitor__: synchronizer.o; text: .text%__1cSdivD_reg_roundNodeLout_RegMask6kM_rknHRegMask__; @@ -3480,15 +3306,10 @@ text: .text%__1cLPSMarkSweepRmark_sweep_phase46F_v_; text: .text%__1cYjava_lang_reflect_MethodPparameter_types6FpnHoopDesc__2_; text: .text%__1cLPSMarkSweepbAreset_millis_since_last_gc6F_v_; text: .text%__1cUPSAdaptiveSizePolicyUmajor_collection_end6MInHGCCauseFCause__v_; -text: .text%__1cSDeoptimizationBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cJCodeCacheLgc_epilogue6F_v_; text: .text%__1cJMarkSweepNrestore_marks6F_v_; -text: .text%__1cQUncommonTrapBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cNExceptionBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cYinternal_word_RelocationFvalue6M_pC_: relocInfo.o; text: .text%__1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_533pnGThread__v_; -text: .text%__1cJCodeCacheHoops_do6FpnKOopClosure__v_; -text: .text%__1cMset_property6FnGHandle_pkc2pnGThread__v_: jvm.o; text: .text%__1cJCodeCacheLgc_prologue6F_v_; text: .text%__1cHJNIEnv_JNewObject6MpnH_jclass_pnK_jmethodID_E_pnI_jobject__: jni.o; text: .text%__1cLPSMarkSweepPallocate_stacks6F_v_; @@ -3501,7 +3322,6 @@ text: .text%__1cMincI_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cUPSAdaptiveSizePolicyWmajor_collection_begin6M_v_; text: .text%__1cJMarkSweepMadjust_marks6F_v_; text: .text%__1cJMarkSweepXfollow_weak_klass_links6F_v_; -text: .text%__1cNmodL_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%jni_AllocObject: jni.o; text: .text%__1cPcmpFastLockNodeIpipeline6kM_pknIPipeline__; text: .text%__1cQSystemDictionaryYalways_strong_classes_do6FpnKOopClosure__v_; @@ -3512,7 +3332,6 @@ text: .text%__1cUPSMarkSweepDecoratorbHset_destination_decorator_tenured6F_v_; text: .text%JVM_InvokeMethod; text: .text%__1cQSystemDictionaryValways_strong_oops_do6FpnKOopClosure__v_; text: .text%__1cFKlassWcompute_modifier_flags6kMpnGThread__i_; -text: .text%__1cHThreadsLnmethods_do6F_v_; text: .text%__1cIPSOldGenKprecompact6M_v_; text: .text%__1cHThreadsLgc_epilogue6F_v_; text: .text%__1cHThreadsLgc_prologue6F_v_; @@ -3522,9 +3341,7 @@ text: .text%__1cHi2bNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQSystemDictionaryPplaceholders_do6FpnKOopClosure__v_; text: .text%__1cFStateM_sub_Op_ModL6MpknENode__v_; text: .text%__1cJPSPermGenKprecompact6M_v_; -text: .text%__1cHi2bNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTleaPIdxScaleOffNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cMincI_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cKDictionaryYalways_strong_classes_do6MpnKOopClosure__v_; text: .text%__1cNTemplateTableMlocals_index6FpnMRegisterImpl_i_v_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFn0AJCondition__v4_v_; @@ -3533,7 +3350,6 @@ text: .text%__1cOaddF24_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNcmovI_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cJStubQdDueueMremove_first6Mi_v_; text: .text%__1cSsarL_eReg_1_31NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNloadConL0NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%JVM_NewArray; text: .text%__1cLConvF2INodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cOcmpF_cc_P6NodeLout_RegMask6kM_rknHRegMask__; @@ -3545,7 +3361,6 @@ text: .text%__1cNTemplateTableHconvert6F_v_; text: .text%__1cZInterpreterMacroAssemblerNunlock_object6MpnMRegisterImpl__v_; text: .text%__1cSmulF24_reg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIDivDNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cTconvD2I_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIMulFNodeJideal_reg6kM_I_: classes.o; text: .text%__1cFStateP_sub_Op_ConvD2I6MpknENode__v_; text: .text%__1cLMoveF2INodeGOpcode6kM_i_; @@ -3575,13 +3390,11 @@ text: .text%JVM_GetSystemPackage; text: .text%__1cLStatSamplerTget_system_property6FpkcpnGThread__2_; text: .text%__1cPconvL2D_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cXPartialSubtypeCheckNodeLbottom_type6kM_pknEType__: classes.o; -text: .text%__1cOresolve_symbol6Fpkc_pC_: os_solaris.o; text: .text%__1cPMultiBranchDataPpost_initialize6MpnOBytecodeStream_pnRmethodDataOopDesc__v_; text: .text%JVM_RawMonitorCreate; text: .text%__1cQConstantIntValue2t6MpnTDebugInfoReadStream__v_; text: .text%__1cOMacroAssemblerTset_last_Java_frame6MpnMRegisterImpl_22pC_v_; text: .text%__1cOMacroAssemblerRcall_VM_leaf_base6MpCi_v_; -text: .text%__1cSstring_compareNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cISubFNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cFStateP_sub_Op_StrComp6MpknENode__v_; text: .text%__1cFStateP_sub_Op_ConvI2F6MpknENode__v_; @@ -3599,13 +3412,10 @@ text: .text%__1cQinstanceRefKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread text: .text%__1cLvframeArrayPunpack_to_stack6MrnFframe_i_v_; text: .text%__1cLvframeArrayZdeallocate_monitor_chunks6M_v_; text: .text%__1cOstoreF_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cVcompiledICHolderKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNcmovI_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cImulINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cQsalL_eReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%Unsafe_CompareAndSwapInt; text: .text%__1cZInterpreterMacroAssemblerPset_mdp_data_at6MpnMRegisterImpl_i2_v_; -text: .text%__1cRsubI_eReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cQsalL_eReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMsubD_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMnegD_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3634,7 +3444,6 @@ text: .text%__1cODeoptimizationYfetch_unroll_info_helper6FpnKJavaThread__pn0ALUn text: .text%__1cOMacroAssemblerFenter6M_v_; text: .text%Unsafe_GetNativeByte; text: .text%__1cOMacroAssemblerNpop_FPU_state6M_v_; -text: .text%__1cTsarL_eReg_32_63NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPconvL2F_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKCMoveLNodeGOpcode6kM_i_; text: .text%JVM_NanoTime; @@ -3657,10 +3466,8 @@ text: .text%__1cFStateP_sub_Op_ConvI2D6MpknENode__v_; text: .text%__1cJAssemblerEmovw6MnHAddress_pnMRegisterImpl__v_; text: .text%__1cQshrL_eReg_CLNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cFStateM_sub_Op_AddF6MpknENode__v_; -text: .text%__1cParrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%jint_cmp: parse2.o; text: .text%__1cJAssemblerExorl6MpnMRegisterImpl_i_v_; -text: .text%__1cPBytecode_invokeLresult_type6kMpnGThread__nJBasicType__; text: .text%jni_CallVoidMethod: jni.o; text: .text%__1cOsubF24_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOstoreF_immNodeOmemory_operand6kM_pknIMachOper__; @@ -3683,7 +3490,6 @@ text: .text%__1cPmovI_nocopyNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJAssemblerFfwait6M_v_; text: .text%__1cJAssemblerKrepne_scan6M_v_; text: .text%__1cNRegisterSaverWrestore_live_registers6FpnOMacroAssembler__v_; -text: .text%__1cRandL_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNcmovL_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cZInterpreterMacroAssemblerMdispatch_via6MnITosState_ppC_v_; text: .text%__1cImulINodeOmemory_operand6kM_pknIMachOper__; @@ -3702,12 +3508,10 @@ text: .text%__1cJCmpF3NodeGOpcode6kM_i_; text: .text%__1cIAddDNodeIIdentity6MpnOPhaseTransform__pnENode__: classes.o; text: .text%__1cJAssemblerFtestb6MpnMRegisterImpl_i_v_; text: .text%__1cNTemplateTableQfast_accessfield6FnITosState__v_; -text: .text%__1cOmulIS_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%Unsafe_StaticFieldBaseFromField; text: .text%__1cNTemplateTableZjvmti_post_fast_field_mod6F_v_; text: .text%__1cNTemplateTablePfast_storefield6FnITosState__v_; text: .text%Unsafe_StaticFieldOffset; -text: .text%__1cNTemplateTableXresolve_cache_and_index6FipnMRegisterImpl_2_v_; text: .text%Unsafe_GetObjectVolatile; text: .text%__1cHnmethodFflush6M_v_; text: .text%__1cHnmethodSflush_dependencies6MpnRBoolObjectClosure__v_; @@ -3717,7 +3521,6 @@ text: .text%__1cQciTypeArrayKlass2t6MnLKlassHandle__v_; text: .text%__1cNaddP_eRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cIMachOperNbase_position6kM_i_; text: .text%__1cZInterpreterMacroAssemblerGf2ieee6M_v_; -text: .text%__1cFVTuneOdelete_nmethod6FpnHnmethod__v_; text: .text%Unsafe_EnsureClassInitialized; text: .text%__1cIciSymbolHas_utf86M_pkc_; text: .text%__1cOtypeArrayKlassNexternal_name6FnJBasicType__pkc_; @@ -3728,7 +3531,6 @@ text: .text%__1cIciMethodMnative_entry6M_pC_; text: .text%__1cNdivI_eRegNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cJAssemblerHfincstp6M_v_; text: .text%__1cETypeFxdual6kM_pk0_; -text: .text%__1cQorI_eReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOMacroAssemblerEfpop6M_v_; text: .text%__1cLOptoRuntimeTmultianewarray_Type6Fi_pknITypeFunc__; text: .text%__1cOGenerateOopMapGdo_jsr6Mi_v_; @@ -3741,7 +3543,6 @@ text: .text%jni_RegisterNatives: jni.o; text: .text%__1cSmulF24_reg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cSaddF24_reg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%JVM_GetClassDeclaredFields; -text: .text%stat: os_solaris.o; text: .text%JVM_IsSameClassPackage; text: .text%__1cCosMuser_handler6F_pv_; text: .text%__1cQSystemDictionaryPresolve_or_null6FnMsymbolHandle_pnGThread__pnMklassOopDesc__; @@ -3793,9 +3594,7 @@ text: .text%JVM_LoadLibrary; text: .text%JVM_IsSupportedJNIVersion; text: .text%__1cOstoreF_immNodeFreloc6kM_i_; text: .text%__1cPPerfLongVariant2t6MnJCounterNS_pkcnIPerfDataFUnits_n0CLVariability_pnUPerfLongSampleHelper__v_; -text: .text%__1cNmulI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerGfild_d6MnHAddress__v_; -text: .text%__1cRmulI_imm_highNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%Unsafe_ObjectFieldOffset; text: .text%__1cRaddL_eReg_memNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJAssemblerEincl6MnHAddress__v_; @@ -3835,20 +3634,14 @@ text: .text%__1cHnmethodbJcontinuation_for_implicit_exception6MpC_1_; text: .text%__1cWImplicitExceptionTable2t6MpknHnmethod__v_; text: .text%__1cPPerfDataManagerUcreate_long_variable6FnJCounterNS_pkcnIPerfDataFUnits_pnUPerfLongSampleHelper_pnGThread__pnQPerfLongVariable__; text: .text%__1cKExceptionsK_throw_oop6FpnGThread_pkcipnHoopDesc__v_; -text: .text%__1cNdivI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cLVtableStubsPstub_containing6FpC_pnKVtableStub__; text: .text%__1cMNativeLookupTbase_library_lookup6Fpkc22_pC_; text: .text%__1cFStateP_sub_Op_ConvF2I6MpknENode__v_; -text: .text%__1cODeoptimizationYreset_invocation_counter6FpnJScopeDesc_i_v_; text: .text%__1cQshrL_eReg_CLNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cTconvF2I_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNCellTypeStateImake_any6Fi_0_: generateOopMap.o; text: .text%__1cJAssemblerEmovb6MnHAddress_i_v_; text: .text%__1cPPerfDataManagerKname_space6Fpkc2i_pc_; -text: .text%__1cTshlL_eReg_32_63NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cWImplicitExceptionTableCat6kMI_I_; -text: .text%__1cQshrL_eReg_CLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cSsarL_eReg_1_31NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerFfinit6M_v_; text: .text%__1cFParseRjump_if_true_fork6MpnGIfNode_ii_v_; text: .text%__1cKVtableStubRpd_code_alignment6F_i_; @@ -3889,7 +3682,6 @@ text: .text%__1cIRetTableHadd_jsr6Mii_v_; text: .text%__1cNTemplateTableFfload6Fi_v_; text: .text%__1cNTemplateTableFlload6Fi_v_; text: .text%__1cNcmovI_memNodeFreloc6kM_i_; -text: .text%__1cPaddress_of_flag6FnXCommandLineFlagWithType__pnEFlag__: globals.o; text: .text%__1cNTemplateTableFiload6Fi_v_; text: .text%__1cOGenerateOopMapTret_jump_targets_do6MpnOBytecodeStream_pFp0ipi_vi4_v_; text: .text%__1cNdivI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3951,14 +3743,11 @@ text: .text%__1cQCompilerCounters2t6MpkcipnGThread__v_; text: .text%__1cJAssemblerEandl6MpnMRegisterImpl_2_v_; text: .text%__1cNCompileBrokerUmake_compiler_thread6FpkcpnMCompileQdDueue_pnQCompilerCounters_pnGThread__pnOCompilerThread__; text: .text%__1cNCompileBrokerUcompiler_thread_loop6F_v_; -text: .text%__1cOcmpF_cc_P6NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJAssemblerEcdql6M_v_; text: .text%__1cUInterpreterGeneratorbDgenerate_stack_overflow_check6M_v_; text: .text%__1cRCardTableModRefBSbCfind_covering_region_by_base6MpnIHeapWord__i_; -text: .text%__1cIci2bNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRCardTableModRefBSbAlargest_prev_committed_end6kMi_pnIHeapWord__; text: .text%__1cMSysClassPathNreset_item_at6Mi_v_: arguments.o; -text: .text%__1cLconvI2BNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cFStateM_sub_Op_CmpF6MpknENode__v_; text: .text%__1cRCardTableModRefBSVresize_covered_region6MnJMemRegion__v_; text: .text%__1cJAssemblerDorl6MpnMRegisterImpl_nHAddress__v_; @@ -3973,7 +3762,6 @@ text: .text%__1cOtailjmpIndNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVcompiler_thread_entry6FpnKJavaThread_pnGThread__v_: thread.o; text: .text%__1cOCompilerThread2t6MpnMCompileQdDueue_pnQCompilerCounters__v_; text: .text%__1cNSafepointBlob2t6MpnKCodeBuffer_ipnJOopMapSet_i_v_; -text: .text%__1cJlookupOne6FpnHJNIEnv__pkcpnGThread__pnH_jclass__: jni.o; text: .text%__1cUPSGenerationCounters2t6MpkciipnOPSVirtualSpace__v_; text: .text%__1cNSafepointBlob2n6FII_pv_; text: .text%__1cQmulD_reg_memNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3992,7 +3780,6 @@ text: .text%__1cPmovP_nocopyNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%jni_CallStaticObjectMethodV: jni.o; text: .text%__1cIci2bNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cZInterpreterMacroAssemblerRgen_subtype_check6MpnMRegisterImpl_rnFLabel__v_; -text: .text%__1cRaddI_mem_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%JVM_Available; text: .text%__1cCosIjvm_path6Fpci_v_; text: .text%__1cZInterpreterMacroAssemblerUupdate_mdp_by_offset6MpnMRegisterImpl_2i_v_; @@ -4032,7 +3819,6 @@ text: .text%__1cFStateL_sub_Op_OrL6MpknENode__v_; text: .text%__1cFStateM_sub_Op_SubF6MpknENode__v_; text: .text%__1cMPeriodicTaskGenroll6M_v_; text: .text%__1cMPeriodicTask2t6MI_v_; -text: .text%__1cSestimate_path_freq6FpnENode__f_: loopnode.o; text: .text%__1cFStateP_sub_Op_MoveL2D6MpknENode__v_; text: .text%__1cNincI_eRegNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNTemplateTableHcastore6F_v_; @@ -4068,17 +3854,13 @@ text: .text%__1cHnmethodVinvalidate_osr_method6M_v_; text: .text%__1cQAgentLibraryList2t6M_v_: arguments.o; text: .text%__1cJAssemblerEmovb6MpnMRegisterImpl_nHAddress__v_; text: .text%__1cLklassVtableQindex_of_miranda6MpnNsymbolOopDesc_2_i_; -text: .text%__1cPconvL2D_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cPconvD2F_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNmulI_eRegNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cINegFNodeJideal_reg6kM_I_: classes.o; text: .text%__1cSInterpreterRuntimeMat_safepoint6FpnKJavaThread__v_; text: .text%__1cOGenerateOopMapTadd_to_ref_init_set6Mi_v_; text: .text%__1cIPSOldGenOgen_size_limit6M_I_; text: .text%__1cIPSOldGenGresize6MI_v_; -text: .text%__1cQorl_eReg_immNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNciMethodKlassEmake6F_p0_; -text: .text%__1cPconvL2F_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cUParallelScavengeHeapItop_addr6kM_ppnIHeapWord__: parallelScavengeHeap.o; text: .text%__1cIciMethod2t6MpnPciInstanceKlass_pnIciSymbol_4_v_; text: .text%__1cMGCTaskThread2t6MpnNGCTaskManager_II_v_; @@ -4086,13 +3868,10 @@ text: .text%__1cMGCTaskThreadFstart6M_v_; text: .text%__1cMGCTaskThreadDrun6M_v_; text: .text%__1cJLoadFNodeMstore_Opcode6kM_i_: classes.o; text: .text%__1cUInterpreterGeneratorLlock_method6M_v_; -text: .text%__1cXpartialSubtypeCheckNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cISubFNodeJideal_reg6kM_I_: classes.o; text: .text%__1cISubFNodeGadd_id6kM_pknEType__: classes.o; text: .text%__1cIPSOldGenPinitialize_work6Mpkci_v_; -text: .text%lstat: perfMemory_solaris.o; text: .text%__1cRComputeEntryStackHdo_long6M_v_: generateOopMap.o; -text: .text%__1cPfilename_to_pid6Fpkc_l_: perfMemory_solaris.o; text: .text%Unsafe_CompareAndSwapObject; text: .text%__1cJCodeCachebGmake_marked_nmethods_not_entrant6F_v_; text: .text%__1cZInterpreterMacroAssemblerSsuper_call_VM_leaf6MpCpnMRegisterImpl__v_; @@ -4198,7 +3977,6 @@ text: .text%__1cIVMThreadDrun6M_v_; text: .text%__1cSThreadLocalStoragebCgenerate_code_for_get_thread6F_v_; text: .text%__1cTtypeArrayKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cKTypeOopPtrFxdual6kM_pknEType__; -text: .text%__1cKTypeOopPtrEmake6FnHTypePtrDPTR_i_pk0_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: vm_version.o; text: .text%__1cKVM_VersionWget_processor_features6F_v_; text: .text%__1cKVM_VersionKinitialize6F_v_; @@ -4239,9 +4017,7 @@ text: .text%__1cbAcall_initializeSystemClass6FpnGThread__v_: thread.o; text: .text%__1cWreset_vm_info_property6FpnGThread__v_: thread.o; text: .text%JVM_RegisterUnsafeMethods; text: .text%__1cQvtableStubs_init6F_v_; -text: .text%__1cFVTuneEexit6F_v_; text: .text%__1cTtypeArrayKlassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: typeArrayKlassKlass.o; -text: .text%__1cKvtune_init6F_v_; text: .text%__1cIUniversePcheck_alignment6FIIpkc_v_; text: .text%__1cSinstanceKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cFJNIidKdeallocate6Fp0_v_; @@ -4292,7 +4068,6 @@ text: .text%__1cNCellTypeStateImake_top6F_0_: generateOopMap.o; text: .text%__1cWResolveOopMapConflictsUdo_potential_rewrite6MpnGThread__nMmethodHandle__; text: .text%__1cJGenRemSetYmax_alignment_constraint6Fn0AEName__I_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: genCollectedHeap.o; -text: .text%__1cTAssertIsPermClosure2t6M_v_: genCollectedHeap.o; text: .text%__1cKNoopGCTaskQcreate_on_c_heap6F_p0_; text: .text%__1cNGCTaskManagerKthreads_do6MpnNThreadClosure__v_; text: .text%__1cNGCTaskManagerKinitialize6M_v_; @@ -4398,9 +4173,6 @@ text: .text%__1cHi2sNodeIpipeline6kM_pknIPipeline__; text: .text%__1cHi2bNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKstoreBNodeIpipeline6kM_pknIPipeline__; text: .text%__1cOtailjmpIndNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cRaddL_eReg_memNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cLconvP2BNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; -text: .text%__1cIcp2bNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTconvI2F_SSF_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cQmulD_reg_memNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cOtailjmpIndNodeFreloc6kM_i_; @@ -4410,7 +4182,6 @@ text: .text%__1cQaccessFlags_init6F_v_; text: .text%__1cPconvI2L_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJArgumentsbBset_cms_and_parnew_gc_flags6F_v_; text: .text%__1cJArgumentsTset_parnew_gc_flags6F_v_; -text: .text%__1cQno_shared_spaces6F_v_: arguments.o; text: .text%__1cJArgumentsMget_property6Fpkc_2_; text: .text%__1cMSysClassPathQadd_jars_to_path6Fpcpkc_1_; text: .text%__1cMSysClassPathPexpand_endorsed6M_v_; @@ -4446,13 +4217,11 @@ text: .text%__1cQconstMethodKlassOset_alloc_size6MI_v_: constMethodKlass.o; text: .text%__1cQconstMethodKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cTcompilerOracle_init6F_v_; text: .text%__1cOCompilerOraclePparse_from_file6F_v_; -text: .text%__1cHcc_file6F_pkc_: compilerOracle.o; text: .text%__1cVcompiledICHolderKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: compiledICHolderKlass.o; text: .text%__1cVcompiledICHolderKlassOset_alloc_size6MI_v_: compiledICHolderKlass.o; text: .text%__1cVcompiledICHolderKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: compileBroker.o; text: .text%__1cNCompileBrokerQset_should_block6F_v_; -text: .text%__1cNCompileBrokerVinit_compiler_threads6Fi_v_; text: .text%__1cSDeoptimizationBlobGcreate6FpnKCodeBuffer_pnJOopMapSet_iiii_p0_; text: .text%__1cRCardTableModRefBSbBct_max_alignment_constraint6F_I_; text: .text%__1cRCardTableModRefBS2t6MnJMemRegion_i_v_; @@ -4508,20 +4277,13 @@ text: .text%__1cLStatSamplerJdisengage6F_v_; text: .text%__1cLStatSamplerGengage6F_v_; text: .text%__1cLStatSamplerKinitialize6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: sharedHeap.o; -text: .text%__1cTAssertIsPermClosure2t6M_v_: sharedHeap.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psMarkSweep.o; -text: .text%__1cTPSAlwaysTrueClosure2t6M_v_: psMarkSweep.o; text: .text%__1cLPSMarkSweepKinitialize6F_v_; text: .text%__1cbAPSGCAdaptivePolicyCounters2t6MpkciipnUPSAdaptiveSizePolicy__v_; text: .text%__1cQPlaceholderTable2t6Mi_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: phase.o; text: .text%__1cKPerfMemoryUdelete_memory_region6F_v_; text: .text%__1cKPerfMemoryUcreate_memory_region6FI_v_; -text: .text%__1cUdelete_shared_memory6FpcI_v_: perfMemory_solaris.o; -text: .text%__1cUcreate_shared_memory6FI_pc_: perfMemory_solaris.o; -text: .text%__1cSmmap_create_shared6FI_pc_: perfMemory_solaris.o; -text: .text%__1cbAcreate_sharedmem_resources6Fpkc1I_i_: perfMemory_solaris.o; -text: .text%__1cbBcleanup_sharedmem_resources6Fpkc_v_: perfMemory_solaris.o; text: .text%__1cIPSOldGen2t6MnNReservedSpace_IIIIpkci_v_; text: .text%__1cSReferenceProcessorMinit_statics6F_v_; text: .text%__1cXreferenceProcessor_init6F_v_; @@ -4602,7 +4364,6 @@ text: .text%__1cMPeriodicTask2T5B6M_v_; text: .text%__1cQSystemDictionarybCinitialize_preloaded_classes6FpnGThread__v_; text: .text%__1cQSystemDictionaryKinitialize6FpnGThread__v_; text: .text%__1cQSystemDictionaryKclasses_do6FpFpnMklassOopDesc__v_v_; -text: .text%__1cLremove_file6Fpkc_v_: perfMemory_solaris.o; text: .text%__1cNMemoryServicebFadd_parallel_scavenge_heap_info6FpnUParallelScavengeHeap__v_; text: .text%__1cNMemoryServiceRset_universe_heap6FpnNCollectedHeap__v_; text: .text%__1cNMemoryManagerbEget_psMarkSweep_memory_manager6F_pnPGCMemoryManager__; @@ -4610,11 +4371,6 @@ text: .text%__1cNMemoryManagerbDget_psScavenge_memory_manager6F_pnPGCMemoryManag text: .text%__1cNMemoryManagerbDget_code_cache_memory_manager6F_p0_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: matcher.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: markSweep.o; -text: .text%__1cJMarkSweepSMarkAndPushClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepRFollowRootClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepSFollowStackClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepOIsAliveClosure2t6M_v_: markSweep.o; -text: .text%__1cJMarkSweepQKeepAliveClosure2t6M_v_: markSweep.o; text: .text%__1cOmarksweep_init6F_v_; text: .text%__1cNMemoryServiceXadd_psYoung_memory_pool6FpnKPSYoungGen_pnNMemoryManager_4_v_; text: .text%__1cKmutex_init6F_v_; @@ -4666,9 +4422,6 @@ text: .text%__1cCosEinit6F_v_; text: .text%__1cCosHSolarisUsynchronization_init6F_v_; text: .text%__1cCosHSolarisOlibthread_init6F_v_; text: .text%__1cUParallelScavengeHeapYpermanent_object_iterate6MpnNObjectClosure__v_; -text: .text%__1cWget_sharedmem_filename6Fpkci_pc_: perfMemory_solaris.o; -text: .text%__1cNget_user_name6Fl_pc_: perfMemory_solaris.o; -text: .text%__1cQget_user_tmp_dir6Fpkc_pc_: perfMemory_solaris.o; text: .text%__1cKPerfMemoryHdestroy6F_v_; text: .text%__1cKPerfMemoryKinitialize6F_v_; text: .text%__1cPperfMemory_exit6F_v_; @@ -4689,7 +4442,6 @@ text: .text%__1cCosXterminate_signal_thread6F_v_; text: .text%__1cCosLsignal_init6F_v_; text: .text%__1cTsignal_thread_entry6FpnKJavaThread_pnGThread__v_: os.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: oopMap.o; -text: .text%__1cQDoNothingClosure2t6M_v_: oopMap.o; text: .text%__1cSobjArrayKlassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: objArrayKlassKlass.o; text: .text%__1cSobjArrayKlassKlassbEallocate_system_objArray_klass6MpnGThread__pnMklassOopDesc__; text: .text%__1cSobjArrayKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; @@ -4703,7 +4455,6 @@ text: .text%__1cCosHSolarisPinit_signal_mem6F_v_; text: .text%__1cCosSget_temp_directory6F_pkc_; text: .text%__1cCosbDallocate_thread_local_storage6F_i_; text: .text%__1cCosHSolarisQsignal_sets_init6F_v_; -text: .text%__1cQcreate_os_thread6FpnGThread_I_pnIOSThread__: os_solaris.o; text: .text%__1cCosbDinit_system_properties_values6F_v_; text: .text%__1cCosHSolarisWinitialize_system_info6F_v_; text: .text%__1cCosPphysical_memory6F_X_; diff --git a/hotspot/make/solaris/makefiles/reorder_TIERED_sparc b/hotspot/make/solaris/makefiles/reorder_TIERED_sparc index 15c03b78514..08abc3b4377 100644 --- a/hotspot/make/solaris/makefiles/reorder_TIERED_sparc +++ b/hotspot/make/solaris/makefiles/reorder_TIERED_sparc @@ -4,7 +4,6 @@ text = LOAD ?RXO; text: .text%__1cCosOjavaTimeMillis6F_x_; text: .text%__1cQIndexSetIteratorQadvance_and_next6M_I_; -text: .text%__1cNinstanceKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNinstanceKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cNinstanceKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cOtypeArrayKlassToop_adjust_pointers6MpnHoopDesc__i_; @@ -33,7 +32,6 @@ text: .text%__1cETypeFuhash6Fkpk0_i_; text: .text%__1cQIndexSetIteratorEnext6M_I_: chaitin.o; text: .text%__1cENodeIout_grow6MI_v_; text: .text%__1cOloadConI13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cNobjArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cENodeHadd_req6Mp0_v_; text: .text%__1cJMarkSweepUAdjustPointerClosureGdo_oop6MppnHoopDesc__v_: markSweep.o; text: .text%__1cNobjArrayKlassToop_follow_contents6MpnHoopDesc__v_; @@ -45,7 +43,6 @@ text: .text%__1cHPhiNodeGOpcode6kM_i_; text: .text%__1cKbranchNodeNis_block_proj6kM_pknENode__: ad_sparc_misc.o; text: .text%__1cIProjNodeGOpcode6kM_i_; text: .text%__1cETypeIhashcons6M_pk0_; -text: .text%__1cOPhaseIdealLoopUbuild_loop_late_post6MpnENode_pk0_v_; text: .text%__1cMPhaseChaitinTinterfere_with_live6MIpnIIndexSet__v_; text: .text%__1cWNode_Backward_IteratorEnext6M_pnENode__; text: .text%__1cNIdealLoopTreeJis_member6kMpk0_i_; @@ -154,7 +151,6 @@ text: .text%__1cETypeFxmeet6kMpk0_2_; text: .text%__1cILRG_ListGextend6MII_v_; text: .text%__1cJVectorSet2F6kMI_i_; text: .text%__1cENodeQIdeal_DU_postCCP6MpnIPhaseCCP__p0_; -text: .text%__1cOtypeArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cIProjNodeEhash6kM_I_; text: .text%__1cIAddINodeGOpcode6kM_i_; text: .text%__1cIIndexSet2t6Mp0_v_; @@ -168,7 +164,6 @@ text: .text%__1cICmpPNodeGOpcode6kM_i_; text: .text%__1cKNode_ArrayGremove6MI_v_; text: .text%__1cHPhiNodeEhash6kM_I_; text: .text%__1cLSymbolTableGlookup6FpkcipnGThread__pnNsymbolOopDesc__; -text: .text%__1cKoopFactoryKnew_symbol6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cKmethodOperJnum_edges6kM_I_: ad_sparc.o; text: .text%__1cJStartNodeLbottom_type6kM_pknEType__; text: .text%__1cHTypeIntFxmeet6kMpknEType__3_; @@ -502,7 +497,6 @@ text: .text%__1cNObjectMonitorFenter6MpnGThread__v_; text: .text%__1cENodeKreplace_by6Mp0_v_; text: .text%__1cSObjectSynchronizerJslow_exit6FpnHoopDesc_pnJBasicLock_pnGThread__v_; text: .text%__1cMMergeMemNodePiteration_setup6Mpk0_v_; -text: .text%__1cFKlassNlookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cKDictionaryEfind6MiInMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; text: .text%__1cRMachSpillCopyNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKRegionNodeIIdentity6MpnOPhaseTransform__pnENode__; @@ -605,7 +599,6 @@ text: .text%__1cMTypeKlassPtrEhash6kM_i_; text: .text%__1cMCallLeafNodeGOpcode6kM_i_; text: .text%__1cSCallLeafDirectNodeIpipeline6kM_pknIPipeline__; text: .text%__1cHPhiNodeEmake6FpnENode_2pknEType_pknHTypePtr__p0_; -text: .text%__1cIAddPNodeQmach_bottom_type6FpknIMachNode__pknEType__; text: .text%__1cOcompU_iRegNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJiRegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cNflagsRegPOperKin_RegMask6kMi_pknHRegMask__; @@ -640,7 +633,6 @@ text: .text%__1cJStartNodeGOpcode6kM_i_; text: .text%__1cQregF_to_stkINodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cENodeDcmp6kMrk0_I_; text: .text%__1cHTypeIntFxdual6kM_pknEType__; -text: .text%__1cIciObjectIencoding6M_pnI_jobject__; text: .text%__1cMmerge_region6FpnKRegionNode_pnIPhaseGVN__pnENode__: cfgnode.o; text: .text%__1cJAssemblerOpatched_branch6Fiii_i_; text: .text%__1cJAssemblerSbranch_destination6Fii_i_; @@ -738,10 +730,7 @@ text: .text%__1cMLinkResolverOresolve_invoke6FrnICallInfo_nGHandle_nSconstantPoo text: .text%__1cIBoolNodeJideal_reg6kM_I_: subnode.o; text: .text%__1cHCmpNodeJideal_reg6kM_I_: classes.o; text: .text%__1cRloadConP_pollNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cETypeFwiden6kMpk0_2_: type.o; text: .text%__1cLstoreI0NodeIpipeline6kM_pknIPipeline__; -text: .text%__1cFciEnvTget_method_by_index6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; -text: .text%__1cFciEnvYget_method_by_index_impl6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; text: .text%__1cMloadConPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFciEnvNlookup_method6MpnNinstanceKlass_2pnNsymbolOopDesc_4nJBytecodesECode__pnNmethodOopDesc__; text: .text%__1cKDictionaryKfind_class6MiInMsymbolHandle_nGHandle__pnMklassOopDesc__; @@ -755,7 +744,6 @@ text: .text%__1cSInterpreterRuntimeMmonitorenter6FpnKJavaThread_pnPBasicObjectLo text: .text%__1cSInterpreterRuntimePresolve_get_put6FpnKJavaThread_nJBytecodesECode__v_; text: .text%__1cQsubI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cXmembar_acquire_lockNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cQaddP_reg_regNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cPCountedLoopNodeGOpcode6kM_i_; text: .text%__1cSInterpreterRuntimeLmonitorexit6FpnKJavaThread_pnPBasicObjectLock__v_; text: .text%__1cIAndLNodeGOpcode6kM_i_; @@ -826,7 +814,6 @@ text: .text%__1cURethrowExceptionNodeNis_block_proj6kM_pknENode__: ad_sparc_misc text: .text%__1cQSystemDictionarybOfind_constrained_instance_or_array_klass6FnMsymbolHandle_nGHandle_pnGThread__pnMklassOopDesc__; text: .text%__1cQsubI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJloadBNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cIciSymbol2t6MnMsymbolHandle__v_; text: .text%__1cQaddP_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKmethodOperGmethod6kM_i_: ad_sparc.o; text: .text%__1cFKlassIsubklass6kM_p0_; @@ -946,7 +933,6 @@ text: .text%__1cIGraphKitOreplace_in_map6MpnENode_2_v_; text: .text%__1cNinstanceKlassLfind_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cHCompileKTracePhase2T6M_v_; text: .text%__1cMPhaseChaitinLclone_projs6MpnFBlock_IpnENode_4rI_i_; -text: .text%__1cNinstanceKlassSlookup_osr_nmethod6kMkpnNmethodOopDesc_i_pnHnmethod__; text: .text%__1cIJVMState2t6MpnIciMethod_p0_v_; text: .text%__1cIHaltNode2t6MpnENode_2_v_; text: .text%__1cLOptoRuntimeSuncommon_trap_Type6F_pknITypeFunc__; @@ -954,7 +940,6 @@ text: .text%__1cJloadLNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cSsafePoint_pollNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cINodeHashJhash_find6MpknENode__p1_; text: .text%__1cQmulL_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cSaddP_reg_imm13NodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cOMethodLivenessKBasicBlock2t6Mp0ii_v_; text: .text%__1cOMethodLivenessKBasicBlockQcompute_gen_kill6MpnIciMethod__v_; text: .text%__1cOGenerateOopMapFppush6MpnNCellTypeState__v_; @@ -987,7 +972,6 @@ text: .text%__1cFParseHdo_call6M_v_; text: .text%__1cNloadConP0NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cHMulNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cMPhaseIterGVNJtransform6MpnENode__2_; -text: .text%__1cHTypeIntFwiden6kMpknEType__3_; text: .text%__1cSsafePoint_pollNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJloadSNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKarrayKlassLobject_size6kMi_i_; @@ -1019,7 +1003,6 @@ text: .text%__1cIBoolNodeHsize_of6kM_I_; text: .text%__1cSobjArrayKlassKlassIoop_size6kMpnHoopDesc__i_: objArrayKlassKlass.o; text: .text%__1cPcompP_iRegPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJloadPNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cPBytecode_invokeJsignature6kM_pnNsymbolOopDesc__; text: .text%__1cFframebGinterpreter_callee_receiver_addr6MnMsymbolHandle__ppnHoopDesc__; text: .text%__1cNSignatureInfoGdo_int6M_v_: bytecode.o; text: .text%__1cOstackSlotLOperKin_RegMask6kMi_pknHRegMask__; @@ -1038,9 +1021,7 @@ text: .text%__1cMloadConINodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cGIfNodeHsize_of6kM_I_: classes.o; text: .text%__1cPconvL2I_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cIimmLOperJconstantL6kM_x_: ad_sparc_clone.o; -text: .text%__1cTStackWalkCompPolicyRcompilation_level6MnMmethodHandle_i_i_; text: .text%jni_GetByteArrayRegion: jni.o; -text: .text%__1cIGraphKitTset_all_memory_call6MpnENode__v_; text: .text%__1cSHighResTimeSamplerLtake_sample6M_x_: statSampler.o; text: .text%__1cHCompileFstart6kM_pnJStartNode__; text: .text%__1cPStatSamplerTaskEtask6M_v_: statSampler.o; @@ -1082,7 +1063,6 @@ text: .text%__1cXinitialize_static_field6FpnPfieldDescriptor_pnGThread__v_: clas text: .text%__1cURethrowExceptionNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cOJNIHandleBlockOallocate_block6FpnGThread__p0_; text: .text%__1cNSignatureInfoHdo_bool6M_v_: bytecode.o; -text: .text%__1cKBufferBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cSandI_reg_imm13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cIAddINodeIadd_ring6kMpknEType_3_3_; text: .text%__1cLTypeInstPtrQcast_to_ptr_type6kMnHTypePtrDPTR__pknEType__; @@ -1095,7 +1075,6 @@ text: .text%__1cPorI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cLRethrowNodeGOpcode6kM_i_; text: .text%__1cJloadSNodeIpipeline6kM_pknIPipeline__; text: .text%__1cICodeHeapIcapacity6kM_I_; -text: .text%__1cKMemoryPoolImax_size6kM_I_: memoryPool.o; text: .text%__1cMCodeHeapPoolNused_in_bytes6M_I_: memoryPool.o; text: .text%__1cPcmpFastLockNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cMCodeHeapPoolQget_memory_usage6M_nLMemoryUsage__; @@ -1136,7 +1115,6 @@ text: .text%__1cJloadSNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cIJumpDataKcell_count6M_i_: ciMethodData.o; text: .text%__1cObranchConPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cITypeFuncFxdual6kM_pknEType__; -text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_; text: .text%__1cFStateM_sub_Op_CmpI6MpknENode__v_; text: .text%__1cJcmpOpOperFccode6kM_i_: ad_sparc_clone.o; text: .text%__1cGciType2t6MnLKlassHandle__v_; @@ -1200,7 +1178,6 @@ text: .text%__1cQmulL_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cLstoreP0NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLRethrowNodeKmatch_edge6kMI_I_; text: .text%__1cFTypeFEhash6kM_i_; -text: .text%__1cHnmethodHoops_do6MpnKOopClosure__v_; text: .text%__1cFStateM_sub_Op_AddI6MpknENode__v_; text: .text%__1cOParseGeneratorIgenerate6MpnIJVMState__2_; text: .text%__1cFParseQcreate_entry_map6M_pnNSafePointNode__; @@ -1213,17 +1190,13 @@ text: .text%__1cFParsePdo_method_entry6M_v_; text: .text%__1cNCallGeneratorKfor_inline6FpnIciMethod_f_p0_; text: .text%__1cbGJvmtiVMObjectAllocEventCollector2t6M_v_; text: .text%__1cbGJvmtiVMObjectAllocEventCollector2T6M_v_; -text: .text%__1cQconstMethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cRciVirtualCallDataOtranslate_from6MpnLProfileData__v_; text: .text%jni_IsSameObject: jni.o; text: .text%__1cMloadConINodeIpipeline6kM_pknIPipeline__; text: .text%__1cNbranchConNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cNbranchConNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQandL_reg_regNodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cLmethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cLsymbolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cIciObjectFklass6M_pnHciKlass__; -text: .text%__1cLSymbolTableFprobe6Fpkci_pnNsymbolOopDesc__; text: .text%__1cPThreadLocalNodeGOpcode6kM_i_; text: .text%__1cZPhaseConservativeCoalesceKupdate_ifg6MIIpnIIndexSet_2_v_; text: .text%__1cZPhaseConservativeCoalesceMunion_helper6MpnENode_2II222pnFBlock_I_v_; @@ -1244,7 +1217,6 @@ text: .text%__1cRshrP_reg_imm5NodeIpipeline6kM_pknIPipeline__; text: .text%__1cQandI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cIciMethodbBinterpreter_call_site_count6Mi_i_; text: .text%__1cGBitMapIset_from6M0_v_; -text: .text%__1cNCompileBrokerOcompile_method6FnMmethodHandle_i1ipkcpnGThread__pnHnmethod__; text: .text%__1cTconstantPoolOopDescbDresolve_string_constants_impl6FnSconstantPoolHandle_pnGThread__v_; text: .text%__1cHSubNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cFChunk2n6FII_pv_; @@ -1278,7 +1250,6 @@ text: .text%__1cNCatchProjNodeDcmp6kMrknENode__I_; text: .text%__1cKTypeOopPtrEhash6kM_i_; text: .text%__1cIMinINodeGOpcode6kM_i_; text: .text%__1cMURShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cFframeRoops_code_blob_do6MpnKOopClosure_pknLRegisterMap__v_; text: .text%__1cKTypeRawPtrFxmeet6kMpknEType__3_; text: .text%JVM_GetMethodIxModifiers; text: .text%__1cIMulLNodeLbottom_type6kM_pknEType__: classes.o; @@ -1325,7 +1296,6 @@ text: .text%__1cSconvI2D_helperNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cPClassFileStreamHskip_u26MipnGThread__v_; text: .text%__1cUcompI_iReg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOMacroAssemblerNverify_thread6M_v_; -text: .text%__1cIGraphKitZset_results_for_java_call6MpnMCallJavaNode__pnENode__; text: .text%__1cSbranchCon_longNodeIpipeline6kM_pknIPipeline__; text: .text%__1cHnmethodVcleanup_inline_caches6M_v_; text: .text%__1cTciConstantPoolCacheGinsert6Mipv_v_; @@ -1356,12 +1326,9 @@ text: .text%__1cKoopFactoryTnew_system_objArray6FipnGThread__pnPobjArrayOopDesc_ text: .text%__1cbDcatch_cleanup_find_cloned_def6FpnFBlock_pnENode_1rnLBlock_Array_i_3_: lcm.o; text: .text%__1cQxorI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cKstoreLNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cFciEnvVget_constant_by_index6MpnPciInstanceKlass_i_nKciConstant__; -text: .text%__1cFciEnvbAget_constant_by_index_impl6MpnPciInstanceKlass_i_nKciConstant__; text: .text%__1cOClearArrayNodeKmatch_edge6kMI_I_; text: .text%__1cPconvL2I_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJloadSNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKJavaThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cSFixupMirrorClosureJdo_object6MpnHoopDesc__v_: universe.o; text: .text%__1cFStateP_sub_Op_LShiftI6MpknENode__v_; text: .text%__1cQandL_reg_regNodeLout_RegMask6kM_rknHRegMask__; @@ -1387,7 +1354,6 @@ text: .text%__1cOAbstractICacheQinvalidate_range6FpCi_v_; text: .text%__1cKstorePNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMaxINodeGOpcode6kM_i_; text: .text%__1cTDirectCallGeneratorIgenerate6MpnIJVMState__2_; -text: .text%__1cNCallGeneratorPfor_direct_call6FpnIciMethod__p0_; text: .text%__1cMWarmCallInfoLalways_cold6F_p0_; text: .text%__1cIimmDOperJconstantD6kM_d_: ad_sparc_clone.o; text: .text%__1cIPhaseIFGEinit6MI_v_; @@ -1512,7 +1478,6 @@ text: .text%__1cPciObjectFactoryMvm_symbol_at6Fi_pnIciSymbol__; text: .text%__1cKDictionaryJadd_klass6MnMsymbolHandle_nGHandle_nLKlassHandle__v_; text: .text%__1cVshrL_reg_imm6_L2INodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cZCallDynamicJavaDirectNodePoper_input_base6kM_I_: ad_sparc_misc.o; -text: .text%__1cIGraphKitTcreate_and_xform_if6MpnENode_2ff_pnGIfNode__: graphKit.o; text: .text%__1cWImplicitExceptionTableGappend6MII_v_; text: .text%__1cRMachNullCheckNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLProfileDataPpost_initialize6MpnOBytecodeStream_pnRmethodDataOopDesc__v_: ciMethodData.o; @@ -1534,14 +1499,12 @@ text: .text%__1cFKlassMset_subklass6MpnMklassOopDesc__v_; text: .text%__1cOGenerateOopMapLmerge_state6Fp0ipi_v_; text: .text%__1cMTypeKlassPtrFxdual6kM_pknEType__; text: .text%__1cQSystemDictionaryVdefine_instance_class6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cSinstanceKlassKlassXallocate_instance_klass6MiiiinNReferenceType_pnGThread__pnMklassOopDesc__; text: .text%__1cPClassFileParserbBcheck_final_method_override6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cJCodeCachebKnumber_of_nmethods_with_dependencies6F_i_; text: .text%__1cNinstanceKlassQinit_implementor6M_v_; text: .text%__1cPClassFileStream2t6MpCipc_v_; text: .text%__1cNinstanceKlassSprocess_interfaces6MpnGThread__v_; text: .text%__1cNinstanceKlassYcompute_secondary_supers6MipnGThread__pnPobjArrayOopDesc__; -text: .text%__1cKoopFactoryRnew_instanceKlass6FiiiinNReferenceType_pnGThread__pnMklassOopDesc__; text: .text%__1cNinstanceKlassWdo_local_static_fields6MpFpnPfieldDescriptor_pnGThread__v4_v_; text: .text%__1cPClassFileParserMsort_methods6MnOobjArrayHandle_111pnGThread__nPtypeArrayHandle__; text: .text%__1cFKlassKsuperklass6kM_pnNinstanceKlass__; @@ -1561,22 +1524,17 @@ text: .text%__1cISubINodeJideal_reg6kM_I_: classes.o; text: .text%__1cNinstanceKlassOset_alloc_size6MI_v_: instanceKlass.o; text: .text%__1cNinstanceKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: instanceKlass.o; text: .text%__1cHMemNodeHsize_of6kM_I_; -text: .text%__1cFVTuneQstart_class_load6F_v_; text: .text%__1cSThreadProfilerMark2T6M_v_; -text: .text%__1cFVTuneOend_class_load6F_v_; text: .text%__1cLClassLoaderOload_classfile6FnMsymbolHandle_pnGThread__nTinstanceKlassHandle__; text: .text%__1cJEventMark2t6MpkcE_v_: classLoader.o; text: .text%__1cSThreadProfilerMark2t6Mn0AGRegion__v_; text: .text%__1cQSystemDictionaryRload_shared_class6FnTinstanceKlassHandle_nGHandle_pnGThread__1_; -text: .text%__1cKklassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cPClassFileParserbKparse_classfile_sourcefile_attribute6MnSconstantPoolHandle_nTinstanceKlassHandle_pnGThread__v_; text: .text%__1cQmodI_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLRShiftINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cKCMoveINodeGOpcode6kM_i_; text: .text%__1cLLShiftLNodeGOpcode6kM_i_; text: .text%__1cYcompareAndSwapL_boolNodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cSinstanceKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cNinstanceKlassScopy_static_fields6MpnSPSPromotionManager__v_; text: .text%__1cMtlsLoadPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateQ_sub_Op_URShiftI6MpknENode__v_; text: .text%__1cKcmpOpUOperGnegate6M_v_: ad_sparc_clone.o; @@ -1626,7 +1584,6 @@ text: .text%__1cTOopMapForCacheEntryZfill_stackmap_for_opcodes6MpnOBytecodeStrea text: .text%__1cSaddL_reg_imm13NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQshrL_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cKstoreLNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cNSharedRuntimebKexception_handler_for_return_address6FpC_1_; text: .text%__1cILoopNodeHsize_of6kM_I_: classes.o; text: .text%__1cHMatcherLfind_shared6MpnENode__v_; text: .text%__1cJStartNodeHsize_of6kM_I_; @@ -1643,8 +1600,6 @@ text: .text%__1cRcompL_reg_conNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cMLinkResolverbHlookup_instance_method_in_klasses6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%__1cMnegF_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cNSharedRuntimebWnative_method_throw_unsatisfied_link_error_entry6F_pC_; -text: .text%__1cTStackWalkCompPolicyYmethod_back_branch_event6MnMmethodHandle_iipnGThread__v_; -text: .text%__1cRCompilationPolicybJreset_counter_for_back_branch_event6MnMmethodHandle__v_; text: .text%__1cOMethodLivenessQcompute_liveness6M_v_; text: .text%__1cOMethodLiveness2t6MpnFArena_pnIciMethod__v_; text: .text%__1cOMethodLivenessNinit_gen_kill6M_v_; @@ -1654,7 +1609,6 @@ text: .text%__1cIGraphKitHopt_iff6MpnENode_2_2_; text: .text%__1cLRShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cJTimeStampGupdate6M_v_; text: .text%__1cRmethodDataOopDescKmileage_of6FpnNmethodOopDesc__i_; -text: .text%__1cWconstantPoolCacheKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cMloadConDNodeIpipeline6kM_pknIPipeline__; text: .text%__1cFParseQarray_addressing6MnJBasicType_ippknEType__pnENode__; text: .text%__1cNloadConP0NodeLout_RegMask6kM_rknHRegMask__; @@ -1673,7 +1627,6 @@ text: .text%__1cWstatic_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInf text: .text%__1cNflagsRegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cYciExceptionHandlerStreamPcount_remaining6M_i_; text: .text%__1cFParseXcatch_inline_exceptions6MpnNSafePointNode__v_; -text: .text%__1cRconstantPoolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNobjArrayKlassKcopy_array6MpnMarrayOopDesc_i2iipnGThread__v_; text: .text%__1cKcmpOpUOperNgreater_equal6kM_i_: ad_sparc_clone.o; text: .text%JVM_GetFieldIxModifiers; @@ -1698,7 +1651,6 @@ text: .text%__1cKo0RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cIregDOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cNmethodOopDescTverified_code_entry6M_pC_; text: .text%__1cNSharedRuntimeXfind_callee_info_helper6FpnKJavaThread_rnMvframeStream_rnJBytecodesECode_rnICallInfo_pnGThread__nGHandle__; -text: .text%__1cPBytecode_invokeFindex6kM_i_; text: .text%__1cLRethrowNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cSPSKeepAliveClosureGdo_oop6MppnHoopDesc__v_: psScavenge.o; text: .text%__1cFParseFBlockRsuccessor_for_bci6Mi_p1_; @@ -1736,7 +1688,6 @@ text: .text%__1cJCodeCacheMfind_nmethod6Fpv_pnHnmethod__; text: .text%__1cOPhaseIdealLoopMdominated_by6MpnENode_2_v_; text: .text%__1cQshlI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cFParseNthrow_to_exit6MpnNSafePointNode__v_; -text: .text%__1cQinstanceRefKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cVConstantOopWriteValueIwrite_on6MpnUDebugInfoWriteStream__v_; text: .text%__1cJVectorSetGslamin6Mrk0_v_; text: .text%JVM_Clone; @@ -1772,7 +1723,6 @@ text: .text%__1cXmembar_release_lockNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cJNode_ListEyank6MpnENode__v_; text: .text%__1cMPhaseChaitinISimplify6M_v_; text: .text%__1cNIdealLoopTreeIset_nest6MI_i_; -text: .text%__1cSCallLeafDirectNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIMulLNodeImul_ring6kMpknEType_3_3_; text: .text%__1cMStartOSRNodeGOpcode6kM_i_; text: .text%__1cSCallLeafDirectNodeLout_RegMask6kM_rknHRegMask__; @@ -1792,7 +1742,6 @@ text: .text%__1cSMemBarVolatileNodeGOpcode6kM_i_; text: .text%__1cLstoreB0NodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cRshrI_reg_imm5NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc__pc_; -text: .text%__1cRcmpFastUnlockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNSafePointNodeLpop_monitor6M_v_; text: .text%__1cMPhaseChaitinVfind_base_for_derived6MppnENode_2rI_2_; text: .text%__1cLOptoRuntimebAcomplete_monitor_exit_Type6F_pknITypeFunc__; @@ -1824,8 +1773,6 @@ text: .text%__1cOGenerateOopMapGdo_ldc6Mii_v_; text: .text%__1cJCMoveNodeLis_cmove_id6FpnOPhaseTransform_pnENode_44pnIBoolNode__4_; text: .text%__1cKTypeAryPtrQcast_to_ptr_type6kMnHTypePtrDPTR__pknEType__; text: .text%__1cOPhaseIdealLoopKDominators6M_v_; -text: .text%__1cOPhaseIdealLoopPbuild_loop_late6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; -text: .text%__1cOPhaseIdealLoopQbuild_loop_early6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; text: .text%jni_NewGlobalRef: jni.o; text: .text%__1cTciConstantPoolCache2t6MpnFArena_i_v_; text: .text%__1cIAndINodeJideal_reg6kM_I_: classes.o; @@ -1981,10 +1928,8 @@ text: .text%__1cFciEnvKcompile_id6M_I_; text: .text%__1cPmethodDataKlassIallocate6MnMmethodHandle_pnGThread__pnRmethodDataOopDesc__; text: .text%__1cKoopFactoryOnew_methodData6FnMmethodHandle_pnGThread__pnRmethodDataOopDesc__; text: .text%__1cIAndLNodeJideal_reg6kM_I_: classes.o; -text: .text%__1cKCodeBuffer2t6MpCi_v_; text: .text%__1cVshrL_reg_imm6_L2INodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cLConvL2INodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cIciMethodRinstructions_size6M_i_; text: .text%__1cSmulI_reg_imm13NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cCosXthread_local_storage_at6Fi_pv_; text: .text%__1cMindIndexOperNconstant_disp6kM_i_: ad_sparc.o; @@ -2013,7 +1958,6 @@ text: .text%__1cLOpaque2NodeLbottom_type6kM_pknEType__: connode.o; text: .text%__1cSconvI2D_helperNodeIpipeline6kM_pknIPipeline__; text: .text%__1cUPSGenerationCountersKupdate_all6M_v_: psGenerationCounters.o; text: .text%__1cQComputeCallStackHdo_long6M_v_: generateOopMap.o; -text: .text%__1cKTypeOopPtrSmake_from_constant6FpnIciObject__pk0_; text: .text%__1cQregP_to_stkPNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cOGenerateOopMapHppstore6MpnNCellTypeState_i_v_; text: .text%__1cJTimeStampSticks_since_update6kM_x_; @@ -2038,7 +1982,6 @@ text: .text%__1cIXorINodeGadd_id6kM_pknEType__: classes.o; text: .text%__1cFStateM_sub_Op_AndI6MpknENode__v_; text: .text%__1cVshrL_reg_imm6_L2INodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKcmpOpFOperJnum_edges6kM_I_: ad_sparc_clone.o; -text: .text%__1cLRuntimeStubHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cTmembar_volatileNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJloadFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateL_sub_Op_OrI6MpknENode__v_; @@ -2066,7 +2009,6 @@ text: .text%__1cJttyLockerbCbreak_tty_lock_for_safepoint6Fi_v_; text: .text%__1cSmembar_acquireNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cPorI_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIPhaseCFGOinsert_goto_at6MII_v_; -text: .text%__1cITypeLongFwiden6kMpknEType__3_; text: .text%__1cSThreadLocalStoragePget_thread_slow6F_pnGThread__; text: .text%__1cPCallRuntimeNodeGOpcode6kM_i_; text: .text%__1cJcmpOpOperNgreater_equal6kM_i_: ad_sparc_clone.o; @@ -2097,7 +2039,6 @@ text: .text%__1cSTailCalljmpIndNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cKstoreLNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cGIfNodeMdominated_by6MpnENode_pnMPhaseIterGVN__v_; text: .text%__1cOcompiledVFrame2t6MpknFframe_pknLRegisterMap_pnKJavaThread_pnJScopeDesc__v_; -text: .text%__1cJScopeDesc2t6MpknHnmethod_i_v_; text: .text%__1cQshlI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cOGenerateOopMapJdo_astore6Mi_v_; text: .text%__1cbFunnecessary_membar_volatileNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; @@ -2127,7 +2068,6 @@ text: .text%__1cLBoxLockNode2t6Mi_v_; text: .text%__1cPconvF2D_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLOptoRuntimebBcomplete_monitor_enter_Type6F_pknITypeFunc__; text: .text%__1cIGraphKitLshared_lock6MpnENode__pnMFastLockNode__; -text: .text%__1cPcmpFastLockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNloadConP0NodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cRorI_reg_imm13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKcmpOpUOperEless6kM_i_: ad_sparc_clone.o; @@ -2135,7 +2075,6 @@ text: .text%__1cQaddF_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cRLowMemoryDetectorWdetect_after_gc_memory6FpnKMemoryPool__v_; text: .text%lwp_mutex_init: os_solaris.o; text: .text%__1cRsubI_zero_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cFframeLnmethods_do6M_v_; text: .text%__1cQjava_lang_ThreadGthread6FpnHoopDesc__pnKJavaThread__; text: .text%__1cQnotemp_iRegIOperEtype6kM_pknEType__: ad_sparc.o; text: .text%__1cITemplateIbytecode6kM_nJBytecodesECode__; @@ -2178,7 +2117,6 @@ text: .text%__1cKManagementJtimestamp6F_x_; text: .text%__1cIPSOldGenPupdate_counters6M_v_; text: .text%__1cQshrI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cFForteNregister_stub6FpkcpC3_v_; -text: .text%__1cFVTuneNregister_stub6FpkcpC3_v_; text: .text%__1cNinstanceKlassbFlookup_method_in_all_interfaces6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cTloadL_unalignedNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cJloadLNodeOmemory_operand6kM_pknIMachOper__; @@ -2249,11 +2187,9 @@ text: .text%__1cSmembar_acquireNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cYDebugInformationRecorderHcopy_to6MpnHnmethod__v_; text: .text%__1cVExceptionHandlerTableHcopy_to6MpnHnmethod__v_; text: .text%__1cJCodeCacheGcommit6FpnICodeBlob__v_; -text: .text%__1cFVTuneOcreate_nmethod6FpnHnmethod__v_; text: .text%__1cHnmethodQcopy_scopes_data6MpCi_v_; text: .text%__1cFciEnvVnum_inlined_bytecodes6kM_i_; text: .text%__1cWImplicitExceptionTableHcopy_to6MpnHnmethod__v_; -text: .text%__1cLOopRecorderHcopy_to6MpnICodeBlob__v_; text: .text%__1cIciMethodRbuild_method_data6M_v_; text: .text%__1cHCompileIOptimize6M_v_; text: .text%__1cHCompileLFinish_Warm6M_v_; @@ -2365,7 +2301,6 @@ text: .text%__1cQmulF_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cQxorI_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cWCallLeafNoFPDirectNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLcmpD_ccNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cWCallLeafNoFPDirectNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJloadINodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cbBopt_virtual_call_RelocationLstatic_stub6M_pC_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_; @@ -2392,8 +2327,6 @@ text: .text%__1cSandI_reg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIimmLOperJnum_edges6kM_I_: ad_sparc_clone.o; text: .text%__1cFParseOmerge_new_path6Mi_v_; text: .text%__1cQregP_to_stkPNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; -text: .text%__1cQjava_lang_StringGoffset6FpnHoopDesc__i_; -text: .text%__1cQjava_lang_StringFvalue6FpnHoopDesc__pnQtypeArrayOopDesc__; text: .text%__1cQjava_lang_StringScreate_from_symbol6FnMsymbolHandle_pnGThread__nGHandle__; text: .text%__1cSmembar_releaseNodeLout_RegMask6kM_rknHRegMask__; text: .text%jni_NewByteArray: jni.o; @@ -2402,7 +2335,6 @@ text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMs text: .text%__1cQSystemDictionarybAvalidate_protection_domain6FnTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cKDictionaryVadd_protection_domain6MiInTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cFParseLdo_newarray6MnJBasicType__v_; -text: .text%__1cPmethodDataKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNmethodOopDescKklass_name6kM_pnNsymbolOopDesc__; text: .text%__1cSconvI2D_helperNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cLstoreP0NodeLout_RegMask6kM_rknHRegMask__; @@ -2454,7 +2386,6 @@ text: .text%__1cJScopeDescGsender6kM_p0_; text: .text%__1cSxorI_reg_imm13NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOcompiledVFrameGsender6kM_pnGvframe__; text: .text%__1cZInterpreterMacroAssemblerDpop6MnITosState__v_; -text: .text%__1cGThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cQPlaceholderTableHoops_do6MpnKOopClosure__v_; text: .text%__1cXJvmtiCurrentBreakpointsHoops_do6FpnKOopClosure__v_; text: .text%__1cNMemoryServiceHoops_do6FpnKOopClosure__v_; @@ -2462,7 +2393,6 @@ text: .text%__1cNThreadServiceHoops_do6FpnKOopClosure__v_; text: .text%__1cKJNIHandlesHoops_do6FpnKOopClosure__v_; text: .text%__1cQSystemDictionaryRpreloaded_oops_do6FpnKOopClosure__v_; text: .text%__1cLJvmtiExportHoops_do6FpnKOopClosure__v_; -text: .text%__1cIVMThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cKJNIHandlesMweak_oops_do6FpnRBoolObjectClosure_pnKOopClosure__v_; text: .text%__1cSObjectSynchronizerHoops_do6FpnKOopClosure__v_; text: .text%__1cMFlatProfilerHoops_do6FpnKOopClosure__v_; @@ -2510,8 +2440,6 @@ text: .text%__1cMTypeKlassPtrFxmeet6kMpknEType__3_; text: .text%__1cKPSYoungGenPupdate_counters6M_v_; text: .text%__1cWThreadLocalAllocBufferbFaccumulate_statistics_before_gc6F_v_; text: .text%__1cWThreadLocalAllocBufferQresize_all_tlabs6F_v_; -text: .text%__1cPGCMemoryManagerIgc_begin6M_v_; -text: .text%__1cPGCMemoryManagerGgc_end6M_v_; text: .text%__1cRLowMemoryDetectorRdetect_low_memory6F_v_; text: .text%__1cNMemoryServiceStrack_memory_usage6F_v_; text: .text%__1cbAPSGCAdaptivePolicyCountersPupdate_counters6M_v_; @@ -2527,7 +2455,6 @@ text: .text%__1cORuntimeServicebDrecord_safepoint_synchronized6F_v_; text: .text%__1cQaddF_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cUSafepointSynchronizeFbegin6F_v_; text: .text%__1cKarrayKlassTallocate_arrayArray6MiipnGThread__pnPobjArrayOopDesc__; -text: .text%__1cONMethodSweeperFsweep6F_v_; text: .text%__1cCosbAmake_polling_page_readable6F_v_; text: .text%__1cUSafepointSynchronizeDend6F_v_; text: .text%__1cOcmovII_immNodeErule6kM_I_: ad_sparc_misc.o; @@ -2539,7 +2466,6 @@ text: .text%JVM_GetCallerClass; text: .text%__1cNSignatureInfoHdo_byte6M_v_: bytecode.o; text: .text%__1cOcmovPP_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKstoreBNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSobjArrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cLstoreC0NodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cTloadL_unalignedNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cICmpFNodeGOpcode6kM_i_; @@ -2551,7 +2477,6 @@ text: .text%jni_IsAssignableFrom: jni.o; text: .text%jni_GetFieldID: jni.o; text: .text%__1cJLoadPNodeMstore_Opcode6kM_i_: classes.o; text: .text%__1cLstoreB0NodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cZInterpreterMacroAssemblerbAget_cache_and_index_at_bcp6MpnMRegisterImpl_2i_v_; text: .text%__1cHTypeAryFxdual6kM_pknEType__; text: .text%__1cMtlsLoadPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIVMThreadHexecute6FpnMVM_Operation__v_; @@ -2626,9 +2551,7 @@ text: .text%__1cJloadSNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cRloadConP_pollNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNObjectMonitorHRecycle6M_v_; text: .text%__1cNSharedRuntimeSfind_callee_method6FpnKJavaThread_pnGThread__nMmethodHandle__; -text: .text%__1cMloadConLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJloadDNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cQSystemDictionaryTresolve_from_stream6FnMsymbolHandle_nGHandle_2pnPClassFileStream_pnGThread__pnMklassOopDesc__; text: .text%__1cQstkI_to_regFNodeIpipeline6kM_pknIPipeline__; text: .text%__1cQregP_to_stkPNodeIpipeline6kM_pknIPipeline__; text: .text%__1cZInterpreterMacroAssemblerFpop_i6MpnMRegisterImpl__v_; @@ -2636,7 +2559,6 @@ text: .text%__1cIMaxINodeGadd_id6kM_pknEType__: classes.o; text: .text%__1cNSharedRuntimeTreresolve_call_site6FpnKJavaThread_pnGThread__nMmethodHandle__; text: .text%__1cYcompareAndSwapL_boolNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNSCMemProjNodeJideal_reg6kM_I_: classes.o; -text: .text%__1cYcompareAndSwapL_boolNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIProjNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIPSOldGenMmax_gen_size6M_I_: psOldGen.o; text: .text%__1cKExceptionsK_throw_msg6FpnGThread_pkcipnNsymbolOopDesc_4_v_; @@ -2855,7 +2777,6 @@ text: .text%__1cOstackSlotPOperEtype6kM_pknEType__: ad_sparc.o; text: .text%jni_GetMethodID: jni.o; text: .text%__1cQshlL_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMulINodeJideal_reg6kM_I_: classes.o; -text: .text%__1cNminI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRshlI_reg_imm5NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cOloadConL13NodeIpipeline6kM_pknIPipeline__; text: .text%__1cNObjectMonitorGnotify6MpnGThread__v_; @@ -2877,7 +2798,6 @@ text: .text%__1cQcmovI_reg_ltNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNloadConL0NodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cKo1RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cSsubL_reg_reg_1NodeIpipeline6kM_pknIPipeline__; -text: .text%__1cIBytecodeIset_code6MnJBytecodesECode__v_; text: .text%__1cQshrL_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cRsarL_reg_imm6NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJloadFNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -2948,7 +2868,6 @@ text: .text%__1cFStateM_sub_Op_SubL6MpknENode__v_; text: .text%__1cKCompiledICMstub_address6kM_pC_; text: .text%__1cJvmSymbolsOsignature_type6FpnNsymbolOopDesc__nJBasicType__; text: .text%__1cQsubL_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cQmodI_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cISubDNodeGOpcode6kM_i_; text: .text%__1cQmodI_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPfieldDescriptorLannotations6kM_pnQtypeArrayOopDesc__; @@ -2986,7 +2905,6 @@ text: .text%__1cRtestI_reg_immNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJMemRegionMintersection6kMk0_0_; text: .text%__1cKJavaThread2t6MpFp0pnGThread__vI_v_; text: .text%__1cKJavaThreadDrun6M_v_; -text: .text%__1cNSafepointBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cPjava_lang_ClassOprimitive_type6FpnHoopDesc__nJBasicType__; text: .text%JVM_IsArrayClass; text: .text%jni_CallStaticVoidMethod: jni.o; @@ -3017,14 +2935,12 @@ text: .text%__1cXNativeSignatureIteratorGdo_int6M_v_: interpreterRT_sparc.o; text: .text%__1cINodeHashEgrow6M_v_; text: .text%__1cOGenerateOopMapPdo_monitorenter6Mi_v_; text: .text%__1cOcmovPP_regNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; -text: .text%__1cMloadConDNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIMaxINodeIadd_ring6kMpknEType_3_3_; text: .text%__1cJloadSNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cOGenerateOopMapLcompute_map6MpnGThread__v_; text: .text%__1cLConvF2DNodeLbottom_type6kM_pknEType__: classes.o; text: .text%JVM_Open; text: .text%__1cRInvocationCounterFreset6M_v_; -text: .text%__1cRCompilationPolicybIreset_counter_for_invocation_event6MnMmethodHandle__v_; text: .text%__1cOGenerateOopMap2t6MnMmethodHandle__v_; text: .text%__1cOGenerateOopMapRdo_interpretation6M_v_; text: .text%__1cIRetTableRcompute_ret_table6MnMmethodHandle__v_; @@ -3144,7 +3060,6 @@ text: .text%__1cLstoreF0NodeIpipeline6kM_pknIPipeline__; text: .text%__1cIMinINodeIadd_ring6kMpknEType_3_3_; text: .text%JVM_GetInheritedAccessControlContext; text: .text%__1cPPerfDataManagerWcreate_string_constant6FnJCounterNS_pkc3pnGThread__pnSPerfStringConstant__; -text: .text%__1cNmaxI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%JVM_NativePath; text: .text%__1cOMacroAssemblerNflush_windows6M_v_; text: .text%__1cSsubD_regD_regDNodeIpipeline6kM_pknIPipeline__; @@ -3157,13 +3072,11 @@ text: .text%__1cVinline_cache_regPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cKstorePNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cQObjectStartArrayFreset6M_v_; text: .text%__1cPconvI2D_memNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHThreadsHoops_do6FpnKOopClosure__v_; text: .text%__1cQaddD_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLConvF2INodeGOpcode6kM_i_; text: .text%__1cVCallRuntimeDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJHashtableGunlink6MpnRBoolObjectClosure__v_; text: .text%__1cIPSOldGenPadjust_pointers6M_v_; -text: .text%__1cVCallRuntimeDirectNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOcmovPI_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cIPSOldGenHcompact6M_v_; text: .text%__1cMtlsLoadPNodeEsize6kMpnNPhaseRegAlloc__I_; @@ -3177,7 +3090,6 @@ text: .text%__1cOcmovLL_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%jni_GetStaticMethodID: jni.o; text: .text%__1cZInterpreterMacroAssemblerUupdate_mdp_by_offset6MipnMRegisterImpl__v_; text: .text%__1cRtestI_reg_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHnmethodbAmake_not_entrant_or_zombie6Mi_v_; text: .text%__1cPconvF2D_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOPhaseIdealLoopKdo_peeling6MpnNIdealLoopTree_rnJNode_List__v_; text: .text%__1cOcmovLL_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; @@ -3290,7 +3202,6 @@ text: .text%__1cINegDNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cLConvI2FNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cOcmovLL_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRorI_reg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cTloadL_unalignedNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTloadL_unalignedNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cKloadUBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cXconvI2D_regDHi_regDNodeIpipeline6kM_pknIPipeline__; @@ -3371,7 +3282,6 @@ text: .text%__1cYjava_lang_reflect_MethodEslot6FpnHoopDesc__i_; text: .text%__1cYjava_lang_reflect_MethodFclazz6FpnHoopDesc__2_; text: .text%__1cYinternal_word_RelocationGtarget6M_pC_; text: .text%__1cJStubQdDueueKremove_all6M_v_; -text: .text%__1cMloadConFNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPconvI2D_memNodeIpipeline6kM_pknIPipeline__; text: .text%__1cPorL_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cZInterpreterMacroAssemblerLindex_check6MpnMRegisterImpl_2i22_v_; @@ -3405,12 +3315,10 @@ text: .text%__1cSInterpreterRuntimeQcreate_exception6FpnKJavaThread_pc3_v_; text: .text%__1cQComputeCallStackIdo_array6Mii_v_: generateOopMap.o; text: .text%__1cKPSYoungGenKprecompact6M_v_; text: .text%__1cXjava_lang_reflect_FieldEslot6FpnHoopDesc__i_; -text: .text%__1cSconvD2I_helperNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMnegF_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cHThreadsLgc_prologue6F_v_; text: .text%__1cHThreadsLgc_epilogue6F_v_; text: .text%__1cPconvI2L_regNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cPconvD2I_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4nGHandle_pnGThread__v_; text: .text%__1cUParallelScavengeHeapHcollect6MnHGCCauseFCause__v_; text: .text%__1cRCardTableModRefBSFclear6MnJMemRegion__v_; @@ -3449,10 +3357,6 @@ text: .text%__1cKPSYoungGenHcompact6M_v_; text: .text%JVM_GetSystemPackage; text: .text%__1cPfieldDescriptorTfloat_initial_value6kM_f_; text: .text%__1cKPSYoungGenPadjust_pointers6M_v_; -text: .text%__1cQUncommonTrapBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cSDeoptimizationBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cNExceptionBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cJCodeCacheHoops_do6FpnKOopClosure__v_; text: .text%__1cJCodeCacheLgc_prologue6F_v_; text: .text%__1cJCodeCacheLgc_epilogue6F_v_; text: .text%__1cIXorINodeIadd_ring6kMpknEType_3_3_; @@ -3508,16 +3412,13 @@ text: .text%__1cSstring_compareNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%jni_GetEnv; text: .text%__1cJloadDNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cQstkI_to_regINodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSstring_compareNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cXNativeSignatureIteratorHdo_bool6M_v_: interpreterRT_sparc.o; text: .text%Unsafe_GetNativeByte; text: .text%JVM_NanoTime; text: .text%__1cCosNjavaTimeNanos6F_x_; text: .text%__1cOMacroAssemblerOrestore_thread6MkpnMRegisterImpl__v_; -text: .text%__1cVcompiledICHolderKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cQandL_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cIimmFOperJnum_edges6kM_I_: ad_sparc_clone.o; -text: .text%__1cHThreadsLnmethods_do6F_v_; text: .text%__1cKcmpOpFOperGnegate6M_v_: ad_sparc_clone.o; text: .text%__1cICodeBlobFflush6M_v_; text: .text%__1cFParseMdo_anewarray6M_v_; @@ -3537,8 +3438,6 @@ text: .text%__1cHnmethodSflush_dependencies6MpnRBoolObjectClosure__v_; text: .text%__1cKo2RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cQregI_to_stkINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_method_entry6MnTAbstractInterpreterKMethodKind__pC_; -text: .text%__1cParrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cFVTuneOdelete_nmethod6FpnHnmethod__v_; text: .text%__1cWloadConI_x43300000NodeIpipeline6kM_pknIPipeline__; text: .text%__1cFParseQdo_monitor_enter6M_v_; text: .text%__1cPorL_reg_regNodeIpipeline6kM_pknIPipeline__; @@ -3547,13 +3446,11 @@ text: .text%JVM_FindPrimitiveClass; text: .text%__1cVMoveL2D_stack_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNTemplateTableEiop26Fn0AJOperation__v_; text: .text%__1cZInterpreterMacroAssemblerMdispatch_via6MnITosState_ppC_v_; -text: .text%__1cSmodL_reg_imm13NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRshrI_reg_imm5NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%__1cSsubL_reg_reg_2NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cUmulL_reg_imm13_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIDivDNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cPconvI2F_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNinstanceKlassUfind_interface_field6kMpnNsymbolOopDesc_2pnPfieldDescriptor__pnMklassOopDesc__; text: .text%__1cOstackSlotFOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cUdivL_reg_imm13_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3561,7 +3458,6 @@ text: .text%__1cRSignatureIteratorHiterate6M_v_; text: .text%__1cOcmovLL_regNodeHtwo_adr6kM_I_: ad_sparc_misc.o; text: .text%__1cJname2type6Fpkc_nJBasicType__; text: .text%__1cSmulL_reg_imm13NodeIpipeline6kM_pknIPipeline__; -text: .text%__1cPBytecode_invokeLresult_type6kMpnGThread__nJBasicType__; text: .text%__1cOloadConL13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKcmpOpFOperHgreater6kM_i_: ad_sparc_clone.o; text: .text%__1cIDivDNodeJideal_reg6kM_I_: classes.o; @@ -3589,7 +3485,6 @@ text: .text%__1cNTemplateTableQfast_accessfield6FnITosState__v_; text: .text%__1cKCompiledICSset_to_megamorphic6MpnICallInfo_nJBytecodesECode_pnGThread__v_; text: .text%Unsafe_StaticFieldOffset; text: .text%__1cQmulI_reg_regNodeHsize_of6kM_I_: ad_sparc_misc.o; -text: .text%__1cNTemplateTableXresolve_cache_and_index6FipnMRegisterImpl_2_v_; text: .text%__1cQaddI_reg_regNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cOcmovLI_regNodeHtwo_adr6kM_I_: ad_sparc_misc.o; text: .text%JVM_GetClassContext; @@ -3725,7 +3620,6 @@ text: .text%__1cQmulD_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%Unsafe_AllocateMemory; text: .text%__1cSandL_reg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%JVM_GetLastErrorString; -text: .text%__1cQmodL_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNTemplateTableElop26Fn0AJOperation__v_; text: .text%__1cQjava_lang_ThreadKset_daemon6FpnHoopDesc__v_; text: .text%__1cNTemplateTableEfop26Fn0AJOperation__v_; @@ -3738,7 +3632,6 @@ text: .text%__1cNTemplateTableGlstore6Fi_v_; text: .text%__1cLConvF2INodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cIciMethod2t6MpnPciInstanceKlass_pnIciSymbol_4_v_; text: .text%__1cRcompL_reg_regNodeHsize_of6kM_I_: ad_sparc_misc.o; -text: .text%__1cLconvI2BNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cLConvD2FNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cSconvD2I_helperNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cRsubI_zero_regNodeHsize_of6kM_I_: ad_sparc_misc.o; @@ -3775,7 +3668,6 @@ text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpnMRegisterImpl_pC22_v_; text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpnMRegisterImpl_pC2_v_; text: .text%__1cTjava_lang_ThrowableLset_message6FpnHoopDesc_2_v_; text: .text%__1cOGenerateOopMapTret_jump_targets_do6MpnOBytecodeStream_pFp0ipi_vi4_v_; -text: .text%__1cPconvI2D_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%Unsafe_SetMemory; text: .text%__1cKstfSSFNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cZInterpreterMacroAssemblerOthrow_if_not_x6MnJAssemblerJCondition_pCpnMRegisterImpl__v_; @@ -3798,7 +3690,6 @@ text: .text%__1cRMachSpillCopyNodeHsize_of6kM_I_: ad_sparc.o; text: .text%__1cQCompilerCounters2t6MpkcipnGThread__v_; text: .text%__1cOGenerateOopMapRdo_multianewarray6Mii_v_; text: .text%__1cNCompileBrokerUcompiler_thread_loop6F_v_; -text: .text%__1cbFpartialSubtypeCheck_vs_zeroNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%jni_CallStaticObjectMethodV: jni.o; text: .text%__1cNTemplateTableMfast_xaccess6FnITosState__v_; text: .text%__1cJMemRegionFminus6kMk0_0_; @@ -3857,13 +3748,10 @@ text: .text%__1cLstoreF0NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cZInterpreterMacroAssemblerWprofile_switch_default6MpnMRegisterImpl__v_; text: .text%__1cTAbstract_VM_VersionOvm_info_string6F_pkc_; text: .text%__1cJStubQdDueue2t6MpnNStubInterface_ipnFMutex_pkc_v_; -text: .text%__1cSconvF2I_helperNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cHThreadsbFdeoptimized_wrt_marked_nmethods6F_v_; -text: .text%__1cbAconvL2D_reg_slow_fxtofNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOstackSlotFOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cOstackSlotFOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cOstackSlotFOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; -text: .text%__1cPconvF2I_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNTemplateTableGlconst6Fi_v_; text: .text%__1cLstoreC0NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cMPeriodicTaskGenroll6M_v_; @@ -3913,7 +3801,6 @@ text: .text%__1cLMoveF2INodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cLOptoRuntimeIl2f_Type6F_pknITypeFunc__; text: .text%__1cOMacroAssemblerUcalc_mem_param_words6MpnMRegisterImpl_2_v_; text: .text%__1cZInterpreterMacroAssemblerLprofile_ret6MnITosState_pnMRegisterImpl_3_v_; -text: .text%__1cZInterpreterMacroAssemblerUprofile_virtual_call6MpnMRegisterImpl_2_v_; text: .text%__1cZInterpreterMacroAssemblerMprofile_call6MpnMRegisterImpl__v_; text: .text%__1cLklassVtableQindex_of_miranda6MpnNsymbolOopDesc_2_i_; text: .text%__1cZInterpreterMacroAssemblerSupdate_mdp_for_ret6MnITosState_pnMRegisterImpl__v_; @@ -4001,16 +3888,13 @@ text: .text%__1cSThreadLocalStorageHpd_init6F_v_; text: .text%__1cVMoveF2I_stack_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVMoveL2D_stack_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cWinvocationCounter_init6F_v_; -text: .text%__1cKTypeOopPtrEmake6FnHTypePtrDPTR_i_pk0_; text: .text%__1cKTypeOopPtrFxdual6kM_pknEType__; text: .text%__1cFParseMjump_if_join6MpnENode_2_2_; text: .text%__1cSinstanceKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cSinstanceKlassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: instanceKlassKlass.o; -text: .text%__1cLconvP2BNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cETypeRInitialize_shared6FpnHCompile__v_; text: .text%__1cQinstanceRefKlassZupdate_nonstatic_oop_maps6FpnMklassOopDesc__v_; text: .text%__1cVInterfaceSupport_init6F_v_; -text: .text%__1cZInterpreterMacroAssemblerSsuper_call_VM_leaf6MpnMRegisterImpl_pC2_v_; text: .text%__1cPGenerationSizerQinitialize_flags6M_v_: parallelScavengeHeap.o; text: .text%__1cZInterpreterMacroAssemblerPdispatch_normal6MnITosState__v_; text: .text%__1cJTimeStampMmilliseconds6kM_x_; @@ -4103,11 +3987,9 @@ text: .text%__1cLmethodKlassOset_alloc_size6MI_v_: methodKlass.o; text: .text%__1cQvtableStubs_init6F_v_; text: .text%__1cKi0RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cKg1RegPOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cFVTuneEexit6F_v_; text: .text%__1cLmethodKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: methodKlass.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: methodLiveness.o; text: .text%__1cMMutableSpaceOobject_iterate6MpnNObjectClosure__v_; -text: .text%__1cKvtune_init6F_v_; text: .text%__1cKmutex_init6F_v_; text: .text%__1cQaccessFlags_init6F_v_; text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpnMRegisterImpl_pC222_v_; @@ -4440,7 +4322,6 @@ text: .text%__1cNTemplateTableLtableswitch6F_v_; text: .text%__1cNTemplateTableMlookupswitch6F_v_; text: .text%__1cNTemplateTableRfast_linearswitch6F_v_; text: .text%__1cNTemplateTableRfast_binaryswitch6F_v_; -text: .text%__1cNCompileBrokerVinit_compiler_threads6Fi_v_; text: .text%__1cJPSPermGen2t6MnNReservedSpace_IIIIpkci_v_; text: .text%__1cNCompileBrokerQset_should_block6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: compileBroker.o; diff --git a/hotspot/make/solaris/makefiles/reorder_TIERED_sparcv9 b/hotspot/make/solaris/makefiles/reorder_TIERED_sparcv9 index 15c03b78514..cc44a252232 100644 --- a/hotspot/make/solaris/makefiles/reorder_TIERED_sparcv9 +++ b/hotspot/make/solaris/makefiles/reorder_TIERED_sparcv9 @@ -2,9 +2,7 @@ data = R0x2000; text = LOAD ?RXO; -text: .text%__1cCosOjavaTimeMillis6F_x_; text: .text%__1cQIndexSetIteratorQadvance_and_next6M_I_; -text: .text%__1cNinstanceKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNinstanceKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cNinstanceKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cOtypeArrayKlassToop_adjust_pointers6MpnHoopDesc__i_; @@ -18,11 +16,9 @@ text: .text%__1cENodeHlatency6MI_I_; text: .text%__1cHRegMaskJis_bound16kM_i_; text: .text%__1cDff16FI_i_; text: .text%__1cHRegMaskESize6kM_I_; -text: .text%__1cXresource_allocate_bytes6FI_pc_; text: .text%__1cENodeIpipeline6kM_pknIPipeline__; text: .text%__1cJVectorSet2R6MI_rnDSet__; text: .text%__1cHRegMaskJis_bound26kM_i_; -text: .text%__1cNSharedRuntimeElmul6Fxx_x_; text: .text%__1cIMachNodeGOpcode6kM_i_; text: .text%__1cJiRegIOperEtype6kM_pknEType__: ad_sparc.o; text: .text%__1cIIndexSetKinitialize6MI_v_; @@ -33,7 +29,6 @@ text: .text%__1cETypeFuhash6Fkpk0_i_; text: .text%__1cQIndexSetIteratorEnext6M_I_: chaitin.o; text: .text%__1cENodeIout_grow6MI_v_; text: .text%__1cOloadConI13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cNobjArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cENodeHadd_req6Mp0_v_; text: .text%__1cJMarkSweepUAdjustPointerClosureGdo_oop6MppnHoopDesc__v_: markSweep.o; text: .text%__1cNobjArrayKlassToop_follow_contents6MpnHoopDesc__v_; @@ -45,7 +40,6 @@ text: .text%__1cHPhiNodeGOpcode6kM_i_; text: .text%__1cKbranchNodeNis_block_proj6kM_pknENode__: ad_sparc_misc.o; text: .text%__1cIProjNodeGOpcode6kM_i_; text: .text%__1cETypeIhashcons6M_pk0_; -text: .text%__1cOPhaseIdealLoopUbuild_loop_late_post6MpnENode_pk0_v_; text: .text%__1cMPhaseChaitinTinterfere_with_live6MIpnIIndexSet__v_; text: .text%__1cWNode_Backward_IteratorEnext6M_pnENode__; text: .text%__1cNIdealLoopTreeJis_member6kMpk0_i_; @@ -56,7 +50,6 @@ text: .text%__1cOPhaseIdealLoopYsplit_if_with_blocks_pre6MpnENode__2_; text: .text%__1cOPhaseIdealLoopZsplit_if_with_blocks_post6MpnENode__v_; text: .text%__1cIUniverseMnon_oop_word6F_pv_; text: .text%__1cDLRGOcompute_degree6kMr0_i_; -text: .text%__1cFArenaIArealloc6MpvII_1_; text: .text%__1cIConINodeGOpcode6kM_i_; text: .text%__1cETypeEmeet6kMpk0_2_; text: .text%__1cENode2t6MI_v_; @@ -91,7 +84,6 @@ text: .text%__1cOPhaseIdealLoopEsort6MpnNIdealLoopTree_2_2_; text: .text%__1cMMachProjNodeLbottom_type6kM_pknEType__; text: .text%JVM_ArrayCopy; text: .text%__1cOtypeArrayKlassKcopy_array6MpnMarrayOopDesc_i2iipnGThread__v_; -text: .text%__1cNSharedRuntimeDl2f6Fx_f_; text: .text%__1cPjava_lang_ClassLas_klassOop6FpnHoopDesc__pnMklassOopDesc__; text: .text%__1cHConNodeGOpcode6kM_i_; text: .text%__1cMPhaseIterGVNWadd_users_to_worklist06MpnENode__v_; @@ -129,7 +121,6 @@ text: .text%__1cMMachProjNodeLout_RegMask6kM_rknHRegMask__: classes.o; text: .text%__1cRMachSpillCopyNodeKin_RegMask6kMI_rknHRegMask__: ad_sparc.o; text: .text%__1cbAfinal_graph_reshaping_impl6FpnENode_rnUFinal_Reshape_Counts__v_: compile.o; text: .text%__1cOtypeArrayKlassIallocate6MipnGThread__pnQtypeArrayOopDesc__; -text: .text%__1cUParallelScavengeHeapVlarge_typearray_limit6M_I_: parallelScavengeHeap.o; text: .text%__1cIPhaseCCPOtransform_once6MpnENode__2_; text: .text%__1cGciTypeEmake6FnJBasicType__p0_; text: .text%__1cKoopFactoryNnew_typeArray6FnJBasicType_ipnGThread__pnQtypeArrayOopDesc__; @@ -154,7 +145,6 @@ text: .text%__1cETypeFxmeet6kMpk0_2_; text: .text%__1cILRG_ListGextend6MII_v_; text: .text%__1cJVectorSet2F6kMI_i_; text: .text%__1cENodeQIdeal_DU_postCCP6MpnIPhaseCCP__p0_; -text: .text%__1cOtypeArrayKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cIProjNodeEhash6kM_I_; text: .text%__1cIAddINodeGOpcode6kM_i_; text: .text%__1cIIndexSet2t6Mp0_v_; @@ -168,7 +158,6 @@ text: .text%__1cICmpPNodeGOpcode6kM_i_; text: .text%__1cKNode_ArrayGremove6MI_v_; text: .text%__1cHPhiNodeEhash6kM_I_; text: .text%__1cLSymbolTableGlookup6FpkcipnGThread__pnNsymbolOopDesc__; -text: .text%__1cKoopFactoryKnew_symbol6FpkcipnGThread__pnNsymbolOopDesc__; text: .text%__1cKmethodOperJnum_edges6kM_I_: ad_sparc.o; text: .text%__1cJStartNodeLbottom_type6kM_pknEType__; text: .text%__1cHTypeIntFxmeet6kMpknEType__3_; @@ -206,11 +195,7 @@ text: .text%__1cKSchedulingPAddNodeToBundle6MpnENode_pknFBlock__v_; text: .text%__1cICallNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cTconstantPoolOopDescNklass_at_impl6FnSconstantPoolHandle_ipnGThread__pnMklassOopDesc__; text: .text%__1cJLoadPNodeGOpcode6kM_i_; -text: .text%__1cMMutableSpaceIallocate6MI_pnIHeapWord__; -text: .text%__1cJPSPermGenSallocate_permanent6MI_pnIHeapWord__; -text: .text%__1cUParallelScavengeHeapWpermanent_mem_allocate6MI_pnIHeapWord__; text: .text%__1cIMachNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cMMutableSpaceMcas_allocate6MI_pnIHeapWord__; text: .text%__1cNflagsRegPOperEtype6kM_pknEType__: ad_sparc.o; text: .text%__1cHPhiNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cMMachTypeNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; @@ -235,7 +220,6 @@ text: .text%__1cICmpUNodeGOpcode6kM_i_; text: .text%__1cOPhaseIdealLoopbIdom_lca_for_get_late_ctrl_internal6MpnENode_22_2_; text: .text%__1cXPipeline_Use_Cycle_MaskCOr6Mrk0_v_; text: .text%__1cILoadNodeEhash6kM_I_; -text: .text%__1cKTypeAryPtrKadd_offset6kMi_pknHTypePtr__; text: .text%__1cKHandleMarkKinitialize6MpnGThread__v_; text: .text%__1cKHandleMark2T6M_v_; text: .text%__1cZPhaseConservativeCoalesceIcoalesce6MpnFBlock__v_; @@ -263,7 +247,6 @@ text: .text%__1cJMultiNodeIproj_out6kMI_pnIProjNode__; text: .text%__1cPindOffset13OperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cUcompI_iReg_imm13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cODataRelocationJset_value6MpC_v_: relocInfo.o; -text: .text%__1cKRelocationRpd_set_data_value6MpCi_v_; text: .text%__1cKCastPPNodeGOpcode6kM_i_; text: .text%__1cOoop_RelocationFvalue6M_pC_: relocInfo.o; text: .text%__1cOoop_RelocationGoffset6M_i_: relocInfo.o; @@ -284,7 +267,6 @@ text: .text%__1cNbranchConNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cOoop_RelocationSfix_oop_relocation6M_v_; text: .text%__1cRSignatureIteratorSiterate_parameters6M_v_; text: .text%__1cIAddPNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cGBitMap2t6MpII_v_; text: .text%__1cPClassFileStreamGget_u46MpnGThread__I_; text: .text%__1cMMachCallNodeLbottom_type6kM_pknEType__; text: .text%__1cFParsePdo_one_bytecode6M_v_; @@ -292,7 +274,6 @@ text: .text%__1cFParseNdo_exceptions6M_v_; text: .text%__1cHPhiNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cHMatcherKmatch_tree6MpknENode__pnIMachNode__; text: .text%__1cMPhaseIterGVNKis_IterGVN6M_p0_: phaseX.o; -text: .text%__1cKimmI13OperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cCosVcurrent_stack_pointer6F_pC_; text: .text%__1cEDict2F6kMpkv_pv_; text: .text%__1cKRegionNodeLbottom_type6kM_pknEType__: classes.o; @@ -320,7 +301,6 @@ text: .text%__1cRSignatureIteratorSiterate_returntype6M_v_; text: .text%__1cSaddP_reg_imm13NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cIMachNodeHtwo_adr6kM_I_: ad_sparc.o; text: .text%__1cNSafePointNodeHsize_of6kM_I_; -text: .text%__1cLTypeInstPtrKadd_offset6kMi_pknHTypePtr__; text: .text%__1cHCmpNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cPcheckCastPPNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNLoadRangeNodeGOpcode6kM_i_; @@ -371,9 +351,7 @@ text: .text%__1cRshlI_reg_imm5NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cIMachOperDreg6kMpnNPhaseRegAlloc_pknENode__i_; text: .text%__1cNPhaseCoalesceRcombine_these_two6MpnENode_2_v_; text: .text%__1cKcmpOpPOperJnum_edges6kM_I_: ad_sparc_clone.o; -text: .text%__1cKTypeRawPtrKadd_offset6kMi_pknHTypePtr__; text: .text%__1cMloadConINodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cFArenaEgrow6MI_pv_; text: .text%__1cMPhaseChaitinLinsert_proj6MpnFBlock_IpnENode_I_v_; text: .text%__1cILoadNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cJStoreNodeLbottom_type6kM_pknEType__; @@ -383,7 +361,6 @@ text: .text%__1cQaddP_reg_regNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cIHaltNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cPCheckCastPPNodeGOpcode6kM_i_; text: .text%__1cKStorePNodeGOpcode6kM_i_; -text: .text%__1cKRelocationLunpack_data6M_v_: relocInfo.o; text: .text%__1cNflagsRegUOperEtype6kM_pknEType__: ad_sparc.o; text: .text%__1cNinstanceKlassGvtable6kM_pnLklassVtable__; text: .text%__1cPcheckCastPPNodeHtwo_adr6kM_I_: ad_sparc_misc.o; @@ -465,7 +442,6 @@ text: .text%__1cFChunkJnext_chop6M_v_; text: .text%__1cMMergeMemNodeEhash6kM_I_; text: .text%__1cKSchedulingbFComputeRegisterAntidependencies6MpnFBlock__v_; text: .text%__1cKSchedulingPComputeUseCount6MpknFBlock__v_; -text: .text%__1cHTypePtrHget_con6kM_i_; text: .text%__1cNinstanceKlassRprotection_domain6M_pnHoopDesc__: instanceKlass.o; text: .text%__1cIMachNodePcompute_padding6kMi_i_: ad_sparc.o; text: .text%__1cIMachNodeSalignment_required6kM_i_: ad_sparc.o; @@ -477,13 +453,10 @@ text: .text%__1cObranchConUNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cFBlockJfind_node6kMpknENode__I_; text: .text%__1cUArgumentSizeComputerDset6MinJBasicType__v_: frame.o; text: .text%__1cHCmpNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cNCollectedHeapXallocate_from_tlab_slow6FpnGThread_I_pnIHeapWord__; text: .text%__1cWThreadLocalAllocBufferXclear_before_allocation6M_v_; text: .text%__1cHTypePtrEhash6kM_i_; text: .text%__1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__; text: .text%__1cSObjectSynchronizerKslow_enter6FnGHandle_pnJBasicLock_pnGThread__v_; -text: .text%__1cWThreadLocalAllocBufferEfill6MpnIHeapWord_2I_v_; -text: .text%__1cUParallelScavengeHeapRallocate_new_tlab6MI_pnIHeapWord__; text: .text%__1cYNoJvmtiVMObjectAllocMark2t6M_v_; text: .text%__1cYNoJvmtiVMObjectAllocMark2T6M_v_; text: .text%__1cFBlockLfind_remove6MpknENode__v_; @@ -502,7 +475,6 @@ text: .text%__1cNObjectMonitorFenter6MpnGThread__v_; text: .text%__1cENodeKreplace_by6Mp0_v_; text: .text%__1cSObjectSynchronizerJslow_exit6FpnHoopDesc_pnJBasicLock_pnGThread__v_; text: .text%__1cMMergeMemNodePiteration_setup6Mpk0_v_; -text: .text%__1cFKlassNlookup_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cKDictionaryEfind6MiInMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; text: .text%__1cRMachSpillCopyNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKRegionNodeIIdentity6MpnOPhaseTransform__pnENode__; @@ -513,8 +485,6 @@ text: .text%__1cIGraphKitJclone_map6M_pnNSafePointNode__; text: .text%__1cKIfTrueNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cRMemBarReleaseNodeGOpcode6kM_i_; text: .text%__1cKbranchNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cIMachOperIconstant6kM_i_; -text: .text%__1cWMutableSpaceUsedHelperLtake_sample6M_x_: spaceCounters.o; text: .text%__1cGPcDescHreal_pc6kMpknHnmethod__pC_; text: .text%__1cRPSOldPromotionLABFflush6M_v_; text: .text%__1cTconstantPoolOopDescMklass_ref_at6MipnGThread__pnMklassOopDesc__; @@ -526,7 +496,6 @@ text: .text%__1cKTypeRawPtrEhash6kM_i_; text: .text%__1cIBoolNodeKmatch_edge6kMI_I_: subnode.o; text: .text%__1cMMergeMemNodePset_base_memory6MpnENode__v_; text: .text%__1cLIfFalseNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cCosPelapsed_counter6F_x_; text: .text%__1cGBitMapOset_difference6M0_v_; text: .text%__1cNSafePointNodeEjvms6kM_pnIJVMState__: callnode.o; text: .text%__1cOoop_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; @@ -534,7 +503,6 @@ text: .text%__1cMMergeMemNodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%JVM_GetMethodIxLocalsCount; text: .text%__1cNloadRangeNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%JVM_CurrentThread; -text: .text%__1cENodeHget_ptr6kM_i_; text: .text%__1cRcmpFastUnlockNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cIAndINodeGOpcode6kM_i_; text: .text%__1cPClassFileParserYverify_legal_method_name6MnMsymbolHandle_pnGThread__v_; @@ -569,7 +537,6 @@ text: .text%__1cQaddP_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cQaddP_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cMLinkResolverZcheck_klass_accessability6FnLKlassHandle_1pnGThread__v_; text: .text%__1cIJVMStateIof_depth6kMi_p0_; -text: .text%__1cNSharedRuntimeElrem6Fxx_x_; text: .text%__1cRconstantPoolKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cMciMethodDataLbci_to_data6Mi_pnLProfileData__; text: .text%__1cRMemBarAcquireNodeGOpcode6kM_i_; @@ -579,7 +546,6 @@ text: .text%__1cObranchConUNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJVectorSet2t6MpnFArena__v_; text: .text%__1cKTypeAryPtrFxmeet6kMpknEType__3_; text: .text%__1cVcompP_iRegP_imm13NodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cRSignatureIteratorSiterate_parameters6MX_v_; text: .text%__1cICallNodeFmatch6MpknIProjNode_pknHMatcher__pnENode__; text: .text%__1cJTraceTime2T6M_v_; text: .text%__1cITypeNodeFValue6kMpnOPhaseTransform__pknEType__; @@ -605,7 +571,6 @@ text: .text%__1cMTypeKlassPtrEhash6kM_i_; text: .text%__1cMCallLeafNodeGOpcode6kM_i_; text: .text%__1cSCallLeafDirectNodeIpipeline6kM_pknIPipeline__; text: .text%__1cHPhiNodeEmake6FpnENode_2pknEType_pknHTypePtr__p0_; -text: .text%__1cIAddPNodeQmach_bottom_type6FpknIMachNode__pknEType__; text: .text%__1cOcompU_iRegNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJiRegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cNflagsRegPOperKin_RegMask6kMi_pknHRegMask__; @@ -640,7 +605,6 @@ text: .text%__1cJStartNodeGOpcode6kM_i_; text: .text%__1cQregF_to_stkINodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cENodeDcmp6kMrk0_I_; text: .text%__1cHTypeIntFxdual6kM_pknEType__; -text: .text%__1cIciObjectIencoding6M_pnI_jobject__; text: .text%__1cMmerge_region6FpnKRegionNode_pnIPhaseGVN__pnENode__: cfgnode.o; text: .text%__1cJAssemblerOpatched_branch6Fiii_i_; text: .text%__1cJAssemblerSbranch_destination6Fii_i_; @@ -653,7 +617,6 @@ text: .text%__1cWMachCallStaticJavaNodePret_addr_offset6M_i_; text: .text%__1cITypeFuncEmake6FpknJTypeTuple_3_pk0_; text: .text%__1cMloadConDNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cSCallLeafDirectNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cKTypeOopPtrHget_con6kM_i_; text: .text%__1cQsubI_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cIRootNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cJloadLNodeErule6kM_I_: ad_sparc_misc.o; @@ -729,7 +692,6 @@ text: .text%__1cOGenerateOopMapEpush6MnNCellTypeState__v_; text: .text%__1cJloadSNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cKStoreCNodeGOpcode6kM_i_; text: .text%__1cOGenerateOopMapRdo_exception_edge6MpnOBytecodeStream__v_; -text: .text%__1cMstringStreamFwrite6MpkcI_v_; text: .text%__1cOGenerateOopMapDpop6M_nNCellTypeState__; text: .text%__1cHRetNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cPcmpFastLockNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; @@ -738,10 +700,7 @@ text: .text%__1cMLinkResolverOresolve_invoke6FrnICallInfo_nGHandle_nSconstantPoo text: .text%__1cIBoolNodeJideal_reg6kM_I_: subnode.o; text: .text%__1cHCmpNodeJideal_reg6kM_I_: classes.o; text: .text%__1cRloadConP_pollNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cETypeFwiden6kMpk0_2_: type.o; text: .text%__1cLstoreI0NodeIpipeline6kM_pknIPipeline__; -text: .text%__1cFciEnvTget_method_by_index6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; -text: .text%__1cFciEnvYget_method_by_index_impl6MpnPciInstanceKlass_inJBytecodesECode__pnIciMethod__; text: .text%__1cMloadConPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFciEnvNlookup_method6MpnNinstanceKlass_2pnNsymbolOopDesc_4nJBytecodesECode__pnNmethodOopDesc__; text: .text%__1cKDictionaryKfind_class6MiInMsymbolHandle_nGHandle__pnMklassOopDesc__; @@ -755,7 +714,6 @@ text: .text%__1cSInterpreterRuntimeMmonitorenter6FpnKJavaThread_pnPBasicObjectLo text: .text%__1cSInterpreterRuntimePresolve_get_put6FpnKJavaThread_nJBytecodesECode__v_; text: .text%__1cQsubI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cXmembar_acquire_lockNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cQaddP_reg_regNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cPCountedLoopNodeGOpcode6kM_i_; text: .text%__1cSInterpreterRuntimeLmonitorexit6FpnKJavaThread_pnPBasicObjectLock__v_; text: .text%__1cIAndLNodeGOpcode6kM_i_; @@ -765,13 +723,10 @@ text: .text%__1cVjava_lang_ClassLoaderbBnon_reflection_class_loader6FpnHoopDesc_ text: .text%__1cFParseFBlockKinit_graph6Mp0_v_; text: .text%__1cMTypeKlassPtrEmake6FnHTypePtrDPTR_pnHciKlass_i_pk0_; text: .text%__1cKRelocationLspec_simple6FnJrelocInfoJrelocType__nQRelocationHolder__; -text: .text%__1cCosGmalloc6FI_pv_; text: .text%__1cSInterpreterRuntimeOresolve_invoke6FpnKJavaThread_nJBytecodesECode__v_; text: .text%__1cIGraphKitTadd_exception_state6MpnNSafePointNode__v_; -text: .text%__1cIimmPOperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cIregDOperEtype6kM_pknEType__: ad_sparc.o; text: .text%__1cKstoreINodeIpipeline6kM_pknIPipeline__; -text: .text%__1cICodeHeapLheader_size6F_I_; text: .text%__1cWConstantPoolCacheEntryKset_method6MnJBytecodesECode_nMmethodHandle_i_v_; text: .text%__1cNloadRangeNodeIpipeline6kM_pknIPipeline__; text: .text%__1cFParseMdo_one_block6M_v_; @@ -794,7 +749,6 @@ text: .text%__1cHMatcherKmatch_sfpt6MpnNSafePointNode__pnIMachNode__; text: .text%__1cMFastLockNodeGOpcode6kM_i_; text: .text%__1cLConvL2INodeGOpcode6kM_i_; text: .text%__1cIXorINodeGOpcode6kM_i_; -text: .text%__1cMVirtualSpaceOcommitted_size6kM_I_; text: .text%__1cOcompU_iRegNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cPorI_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKTypeAryPtrFklass6kM_pnHciKlass__; @@ -812,23 +766,17 @@ text: .text%__1cPcompP_iRegPNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cPsp_ptr_RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cPClassFileParserbCverify_legal_field_signature6MnMsymbolHandle_1pnGThread__v_; text: .text%__1cPClassFileParserXverify_legal_field_name6MnMsymbolHandle_pnGThread__v_; -text: .text%__1cRshrP_reg_imm5NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLBoxLockNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cITypeLongEmake6Fxxi_pk0_; text: .text%__1cNloadKlassNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%JVM_GetCPMethodNameUTF; text: .text%__1cMtlsLoadPNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cLstoreB0NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cIimmIOperIconstant6kM_i_: ad_sparc_clone.o; -text: .text%__1cNSharedRuntimeEldiv6Fxx_x_; text: .text%__1cHBitDataKcell_count6M_i_: ciMethodData.o; text: .text%__1cURethrowExceptionNodeNis_block_proj6kM_pknENode__: ad_sparc_misc.o; text: .text%__1cQSystemDictionarybOfind_constrained_instance_or_array_klass6FnMsymbolHandle_nGHandle_pnGThread__pnMklassOopDesc__; text: .text%__1cQsubI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJloadBNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cIciSymbol2t6MnMsymbolHandle__v_; text: .text%__1cQaddP_reg_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKmethodOperGmethod6kM_i_: ad_sparc.o; text: .text%__1cFKlassIsubklass6kM_p0_; text: .text%__1cNinstanceKlassbBallocate_permanent_instance6MpnGThread__pnPinstanceOopDesc__; text: .text%__1cXInterpreterFrameClosureJoffset_do6Mi_v_: frame.o; @@ -885,7 +833,6 @@ text: .text%__1cIConLNodeGOpcode6kM_i_; text: .text%JVM_GetCPFieldSignatureUTF; text: .text%__1cENodeLnonnull_req6kM_p0_; text: .text%__1cYCallStaticJavaDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cYCallStaticJavaDirectNodeKmethod_set6Mi_v_; text: .text%__1cMelapsedTimerFstart6M_v_; text: .text%__1cMelapsedTimerEstop6M_v_; text: .text%__1cMURShiftINodeLbottom_type6kM_pknEType__: classes.o; @@ -946,7 +893,6 @@ text: .text%__1cIGraphKitOreplace_in_map6MpnENode_2_v_; text: .text%__1cNinstanceKlassLfind_method6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cHCompileKTracePhase2T6M_v_; text: .text%__1cMPhaseChaitinLclone_projs6MpnFBlock_IpnENode_4rI_i_; -text: .text%__1cNinstanceKlassSlookup_osr_nmethod6kMkpnNmethodOopDesc_i_pnHnmethod__; text: .text%__1cIJVMState2t6MpnIciMethod_p0_v_; text: .text%__1cIHaltNode2t6MpnENode_2_v_; text: .text%__1cLOptoRuntimeSuncommon_trap_Type6F_pknITypeFunc__; @@ -954,7 +900,6 @@ text: .text%__1cJloadLNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cSsafePoint_pollNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cINodeHashJhash_find6MpknENode__p1_; text: .text%__1cQmulL_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cSaddP_reg_imm13NodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cOMethodLivenessKBasicBlock2t6Mp0ii_v_; text: .text%__1cOMethodLivenessKBasicBlockQcompute_gen_kill6MpnIciMethod__v_; text: .text%__1cOGenerateOopMapFppush6MpnNCellTypeState__v_; @@ -966,7 +911,6 @@ text: .text%__1cTCreateExceptionNodeIpipeline6kM_pknIPipeline__; text: .text%__1cLstoreB0NodeIpipeline6kM_pknIPipeline__; text: .text%__1cMtlsLoadPNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLBoxLockNodeKin_RegMask6kMI_rknHRegMask__; -text: .text%__1cITypeLongEmake6Fx_pk0_; text: .text%__1cHciFieldPinitialize_from6MpnPfieldDescriptor__v_; text: .text%__1cKimmI13OperJnum_edges6kM_I_: ad_sparc_clone.o; text: .text%__1cJloadBNodeIpipeline6kM_pknIPipeline__; @@ -987,7 +931,6 @@ text: .text%__1cFParseHdo_call6M_v_; text: .text%__1cNloadConP0NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cHMulNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cMPhaseIterGVNJtransform6MpnENode__2_; -text: .text%__1cHTypeIntFwiden6kMpknEType__3_; text: .text%__1cSsafePoint_pollNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJloadSNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKarrayKlassLobject_size6kMi_i_; @@ -1019,36 +962,26 @@ text: .text%__1cIBoolNodeHsize_of6kM_I_; text: .text%__1cSobjArrayKlassKlassIoop_size6kMpnHoopDesc__i_: objArrayKlassKlass.o; text: .text%__1cPcompP_iRegPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cJloadPNodeOmemory_operand6kM_pknIMachOper__; -text: .text%__1cPBytecode_invokeJsignature6kM_pnNsymbolOopDesc__; text: .text%__1cFframebGinterpreter_callee_receiver_addr6MnMsymbolHandle__ppnHoopDesc__; text: .text%__1cNSignatureInfoGdo_int6M_v_: bytecode.o; text: .text%__1cOstackSlotLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cKInlineTreeMok_to_inline6MpnIciMethod_pnIJVMState_rnNciCallProfile_pnMWarmCallInfo__8_; text: .text%__1cOGenerateOopMapbAget_basic_block_containing6kMi_pnKBasicBlock__; -text: .text%__1cICodeHeapSallocated_capacity6kM_I_; -text: .text%__1cICHeapObj2n6FI_pv_; text: .text%__1cQsubL_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cWCallLeafNoFPDirectNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cFTypeDEhash6kM_i_; -text: .text%__1cKTypeRawPtrHget_con6kM_i_; text: .text%__1cJStartNodeFmatch6MpknIProjNode_pknHMatcher__pnENode__; text: .text%jni_ExceptionOccurred: jni.o; text: .text%__1cKciTypeFlowLStateVectorStype_meet_internal6FpnGciType_3p0_3_; text: .text%__1cMloadConINodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cGIfNodeHsize_of6kM_I_: classes.o; text: .text%__1cPconvL2I_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cIimmLOperJconstantL6kM_x_: ad_sparc_clone.o; -text: .text%__1cTStackWalkCompPolicyRcompilation_level6MnMmethodHandle_i_i_; text: .text%jni_GetByteArrayRegion: jni.o; -text: .text%__1cIGraphKitTset_all_memory_call6MpnENode__v_; -text: .text%__1cSHighResTimeSamplerLtake_sample6M_x_: statSampler.o; text: .text%__1cHCompileFstart6kM_pnJStartNode__; text: .text%__1cPStatSamplerTaskEtask6M_v_: statSampler.o; -text: .text%__1cMPeriodicTaskOreal_time_tick6FI_v_; text: .text%__1cQPlaceholderTableKfind_entry6MiInMsymbolHandle_nGHandle__pnNsymbolOopDesc__; text: .text%__1cIParmNodeJideal_reg6kM_I_; text: .text%__1cQandL_reg_regNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cIMachNodeRget_base_and_disp6kMrirpknHTypePtr__pknENode__; text: .text%__1cQSystemDictionarybBresolve_array_class_or_null6FnMsymbolHandle_nGHandle_2pnGThread__pnMklassOopDesc__; text: .text%__1cIregFOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cRbranchLoopEndNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; @@ -1072,7 +1005,6 @@ text: .text%__1cUcompU_iReg_imm13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%JVM_RawMonitorEnter; text: .text%JVM_RawMonitorExit; text: .text%__1cOMachReturnNodeKin_RegMask6kMI_rknHRegMask__; -text: .text%__1cMTypeKlassPtrKadd_offset6kMi_pknHTypePtr__; text: .text%__1cWShouldNotReachHereNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPcmpFastLockNodeIpipeline6kM_pknIPipeline__; text: .text%__1cETypeRget_typeflow_type6FpnGciType__pk0_; @@ -1082,7 +1014,6 @@ text: .text%__1cXinitialize_static_field6FpnPfieldDescriptor_pnGThread__v_: clas text: .text%__1cURethrowExceptionNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cOJNIHandleBlockOallocate_block6FpnGThread__p0_; text: .text%__1cNSignatureInfoHdo_bool6M_v_: bytecode.o; -text: .text%__1cKBufferBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cSandI_reg_imm13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cIAddINodeIadd_ring6kMpknEType_3_3_; text: .text%__1cLTypeInstPtrQcast_to_ptr_type6kMnHTypePtrDPTR__pknEType__; @@ -1094,16 +1025,10 @@ text: .text%__1cNLoadKlassNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cPorI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cLRethrowNodeGOpcode6kM_i_; text: .text%__1cJloadSNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cICodeHeapIcapacity6kM_I_; -text: .text%__1cKMemoryPoolImax_size6kM_I_: memoryPool.o; -text: .text%__1cMCodeHeapPoolNused_in_bytes6M_I_: memoryPool.o; text: .text%__1cPcmpFastLockNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cMCodeHeapPoolQget_memory_usage6M_nLMemoryUsage__; text: .text%__1cFArena2T6M_v_; text: .text%__1cKMemBarNodeFmatch6MpknIProjNode_pknHMatcher__pnENode__; -text: .text%__1cOCallRelocationFvalue6M_pC_: relocInfo.o; -text: .text%__1cHoopDescSslow_identity_hash6M_i_; -text: .text%__1cSObjectSynchronizerXidentity_hash_value_for6FnGHandle__i_; text: .text%__1cLPCTableNodeEhash6kM_I_; text: .text%__1cHConNodeLout_RegMask6kM_rknHRegMask__: classes.o; text: .text%__1cXPhaseAggressiveCoalesceYinsert_copy_with_overlap6MpnFBlock_pnENode_II_v_; @@ -1136,7 +1061,6 @@ text: .text%__1cJloadSNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cIJumpDataKcell_count6M_i_: ciMethodData.o; text: .text%__1cObranchConPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cITypeFuncFxdual6kM_pknEType__; -text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_; text: .text%__1cFStateM_sub_Op_CmpI6MpknENode__v_; text: .text%__1cJcmpOpOperFccode6kM_i_: ad_sparc_clone.o; text: .text%__1cGciType2t6MnLKlassHandle__v_; @@ -1175,7 +1099,6 @@ text: .text%jni_ReleasePrimitiveArrayCritical: jni.o; text: .text%__1cPconvI2L_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNMemoryServiceXtrack_memory_pool_usage6FpnKMemoryPool__v_; text: .text%__1cSmembar_releaseNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cJimmU5OperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cPciInstanceKlass2t6MnLKlassHandle__v_; text: .text%__1cLOpaque1NodeEhash6kM_I_; text: .text%__1cJStoreNodeZIdeal_sign_extended_input6MpnIPhaseGVN_i_pnENode__; @@ -1200,11 +1123,9 @@ text: .text%__1cQmulL_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cLstoreP0NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLRethrowNodeKmatch_edge6kMI_I_; text: .text%__1cFTypeFEhash6kM_i_; -text: .text%__1cHnmethodHoops_do6MpnKOopClosure__v_; text: .text%__1cFStateM_sub_Op_AddI6MpknENode__v_; text: .text%__1cOParseGeneratorIgenerate6MpnIJVMState__2_; text: .text%__1cFParseQcreate_entry_map6M_pnNSafePointNode__; -text: .text%__1cFArenaEused6kM_I_; text: .text%__1cFParseLbuild_exits6M_v_; text: .text%__1cFParseIdo_exits6M_v_; text: .text%__1cFParse2t6MpnIJVMState_pnIciMethod_f_v_; @@ -1213,17 +1134,13 @@ text: .text%__1cFParsePdo_method_entry6M_v_; text: .text%__1cNCallGeneratorKfor_inline6FpnIciMethod_f_p0_; text: .text%__1cbGJvmtiVMObjectAllocEventCollector2t6M_v_; text: .text%__1cbGJvmtiVMObjectAllocEventCollector2T6M_v_; -text: .text%__1cQconstMethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cRciVirtualCallDataOtranslate_from6MpnLProfileData__v_; text: .text%jni_IsSameObject: jni.o; text: .text%__1cMloadConINodeIpipeline6kM_pknIPipeline__; text: .text%__1cNbranchConNodeJlabel_set6MrnFLabel_I_v_; text: .text%__1cNbranchConNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQandL_reg_regNodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cLmethodKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cLsymbolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cIciObjectFklass6M_pnHciKlass__; -text: .text%__1cLSymbolTableFprobe6Fpkci_pnNsymbolOopDesc__; text: .text%__1cPThreadLocalNodeGOpcode6kM_i_; text: .text%__1cZPhaseConservativeCoalesceKupdate_ifg6MIIpnIIndexSet_2_v_; text: .text%__1cZPhaseConservativeCoalesceMunion_helper6MpnENode_2II222pnFBlock_I_v_; @@ -1240,14 +1157,11 @@ text: .text%__1cKCastPPNodeQIdeal_DU_postCCP6MpnIPhaseCCP__pnENode__; text: .text%__1cKstorePNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cOPhaseIdealLoopOsplit_thru_phi6MpnENode_2i_2_; text: .text%__1cENodeGOpcode6kM_i_; -text: .text%__1cRshrP_reg_imm5NodeIpipeline6kM_pknIPipeline__; text: .text%__1cQandI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cIciMethodbBinterpreter_call_site_count6Mi_i_; text: .text%__1cGBitMapIset_from6M0_v_; -text: .text%__1cNCompileBrokerOcompile_method6FnMmethodHandle_i1ipkcpnGThread__pnHnmethod__; text: .text%__1cTconstantPoolOopDescbDresolve_string_constants_impl6FnSconstantPoolHandle_pnGThread__v_; text: .text%__1cHSubNodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cFChunk2n6FII_pv_; text: .text%__1cTCallDynamicJavaNodeGOpcode6kM_i_; text: .text%__1cKstoreBNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cILoadNodeDcmp6kMrknENode__I_; @@ -1261,7 +1175,6 @@ text: .text%__1cHOrINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cFframeLreal_sender6kMpnLRegisterMap__0_; text: .text%__1cGRFrameGcaller6M_p0_; text: .text%__1cPCheckCastPPNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cRshrP_reg_imm5NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJJavaCallsEcall6FpnJJavaValue_nMmethodHandle_pnRJavaCallArguments_pnGThread__v_; text: .text%__1cXmembar_release_lockNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cJloadINodeOmemory_operand6kM_pknIMachOper__; @@ -1278,7 +1191,6 @@ text: .text%__1cNCatchProjNodeDcmp6kMrknENode__I_; text: .text%__1cKTypeOopPtrEhash6kM_i_; text: .text%__1cIMinINodeGOpcode6kM_i_; text: .text%__1cMURShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cFframeRoops_code_blob_do6MpnKOopClosure_pknLRegisterMap__v_; text: .text%__1cKTypeRawPtrFxmeet6kMpknEType__3_; text: .text%JVM_GetMethodIxModifiers; text: .text%__1cIMulLNodeLbottom_type6kM_pknEType__: classes.o; @@ -1289,8 +1201,6 @@ text: .text%JVM_IsInterface; text: .text%__1cPorI_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIDivINodeGOpcode6kM_i_; text: .text%__1cOGenerateOopMapTmerge_state_into_bb6MpnKBasicBlock__v_; -text: .text%__1cICodeHeapIallocate6MI_pv_; -text: .text%__1cICodeHeapPsearch_freelist6MI_pnJFreeBlock__; text: .text%__1cLOpaque1NodeLbottom_type6kM_pknEType__: connode.o; text: .text%__1cNloadRangeNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cLRShiftLNodeGOpcode6kM_i_; @@ -1315,7 +1225,6 @@ text: .text%__1cParrayKlassKlassToop_adjust_pointers6MpnHoopDesc__i_; text: .text%__1cParrayKlassKlassToop_follow_contents6MpnHoopDesc__v_; text: .text%__1cIGraphKitYcombine_exception_states6MpnNSafePointNode_2_v_; text: .text%__1cQmulL_reg_regNodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cRshrP_reg_imm5NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSconstMethodOopDescYchecked_exceptions_start6kM_pnXCheckedExceptionElement__; text: .text%__1cPClassFileParserYparse_checked_exceptions6MpHInSconstantPoolHandle_pnGThread__1_; text: .text%__1cKstoreLNodePoper_input_base6kM_I_: ad_sparc_misc.o; @@ -1325,7 +1234,6 @@ text: .text%__1cSconvI2D_helperNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cPClassFileStreamHskip_u26MipnGThread__v_; text: .text%__1cUcompI_iReg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOMacroAssemblerNverify_thread6M_v_; -text: .text%__1cIGraphKitZset_results_for_java_call6MpnMCallJavaNode__pnENode__; text: .text%__1cSbranchCon_longNodeIpipeline6kM_pknIPipeline__; text: .text%__1cHnmethodVcleanup_inline_caches6M_v_; text: .text%__1cTciConstantPoolCacheGinsert6Mipv_v_; @@ -1356,12 +1264,9 @@ text: .text%__1cKoopFactoryTnew_system_objArray6FipnGThread__pnPobjArrayOopDesc_ text: .text%__1cbDcatch_cleanup_find_cloned_def6FpnFBlock_pnENode_1rnLBlock_Array_i_3_: lcm.o; text: .text%__1cQxorI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cKstoreLNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cFciEnvVget_constant_by_index6MpnPciInstanceKlass_i_nKciConstant__; -text: .text%__1cFciEnvbAget_constant_by_index_impl6MpnPciInstanceKlass_i_nKciConstant__; text: .text%__1cOClearArrayNodeKmatch_edge6kMI_I_; text: .text%__1cPconvL2I_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJloadSNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cKJavaThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cSFixupMirrorClosureJdo_object6MpnHoopDesc__v_: universe.o; text: .text%__1cFStateP_sub_Op_LShiftI6MpknENode__v_; text: .text%__1cQandL_reg_regNodeLout_RegMask6kM_rknHRegMask__; @@ -1381,13 +1286,11 @@ text: .text%__1cRshlL_reg_imm6NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cQandI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cSandI_reg_imm13NodeIpipeline6kM_pknIPipeline__; text: .text%__1cRCardTableModRefBSPdirty_MemRegion6MnJMemRegion__v_; -text: .text%__1cZresource_reallocate_bytes6FpcII_0_; text: .text%__1cLConvL2INodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cOAbstractICacheQinvalidate_range6FpCi_v_; text: .text%__1cKstorePNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMaxINodeGOpcode6kM_i_; text: .text%__1cTDirectCallGeneratorIgenerate6MpnIJVMState__2_; -text: .text%__1cNCallGeneratorPfor_direct_call6FpnIciMethod__p0_; text: .text%__1cMWarmCallInfoLalways_cold6F_p0_; text: .text%__1cIimmDOperJconstantD6kM_d_: ad_sparc_clone.o; text: .text%__1cIPhaseIFGEinit6MI_v_; @@ -1415,7 +1318,6 @@ text: .text%__1cJloadPNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cMoutputStream2t6Mi_v_; text: .text%__1cMstringStreamJas_string6M_pc_; text: .text%__1cMstringStream2T6M_v_; -text: .text%__1cMstringStream2t6MI_v_; text: .text%__1cIGraphKitMreset_memory6M_pnENode__; text: .text%__1cZCallDynamicJavaDirectNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKstorePNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -1472,7 +1374,6 @@ text: .text%__1cSInterpreterRuntimebFexception_handler_for_exception6FpnKJavaThr text: .text%__1cOPhaseIdealLoopPis_counted_loop6MpnENode_pnNIdealLoopTree__2_; text: .text%__1cQComputeCallStackHdo_void6M_v_: generateOopMap.o; text: .text%__1cFKlassRinitialize_supers6MpnMklassOopDesc_pnGThread__v_; -text: .text%__1cKKlass_vtbl2n6FIrnLKlassHandle_ipnGThread__pv_; text: .text%__1cFKlassVbase_create_klass_oop6FrnLKlassHandle_irknKKlass_vtbl_pnGThread__pnMklassOopDesc__; text: .text%__1cQjava_lang_StringLutf8_length6FpnHoopDesc__i_; text: .text%jni_GetStringUTFLength: jni.o; @@ -1494,7 +1395,6 @@ text: .text%__1cQjava_lang_StringRas_unicode_string6FpnHoopDesc_ri_pH_; text: .text%JVM_InternString; text: .text%__1cLStringTableGintern6FpnHoopDesc_pnGThread__2_; text: .text%__1cCosGrandom6F_l_; -text: .text%__1cKimmP13OperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cVcompP_iRegP_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKoopFactoryXnew_permanent_byteArray6FipnGThread__pnQtypeArrayOopDesc__; text: .text%__1cRcompL_reg_regNodeIpipeline6kM_pknIPipeline__; @@ -1512,7 +1412,6 @@ text: .text%__1cPciObjectFactoryMvm_symbol_at6Fi_pnIciSymbol__; text: .text%__1cKDictionaryJadd_klass6MnMsymbolHandle_nGHandle_nLKlassHandle__v_; text: .text%__1cVshrL_reg_imm6_L2INodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cZCallDynamicJavaDirectNodePoper_input_base6kM_I_: ad_sparc_misc.o; -text: .text%__1cIGraphKitTcreate_and_xform_if6MpnENode_2ff_pnGIfNode__: graphKit.o; text: .text%__1cWImplicitExceptionTableGappend6MII_v_; text: .text%__1cRMachNullCheckNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLProfileDataPpost_initialize6MpnOBytecodeStream_pnRmethodDataOopDesc__v_: ciMethodData.o; @@ -1534,14 +1433,12 @@ text: .text%__1cFKlassMset_subklass6MpnMklassOopDesc__v_; text: .text%__1cOGenerateOopMapLmerge_state6Fp0ipi_v_; text: .text%__1cMTypeKlassPtrFxdual6kM_pknEType__; text: .text%__1cQSystemDictionaryVdefine_instance_class6FnTinstanceKlassHandle_pnGThread__v_; -text: .text%__1cSinstanceKlassKlassXallocate_instance_klass6MiiiinNReferenceType_pnGThread__pnMklassOopDesc__; text: .text%__1cPClassFileParserbBcheck_final_method_override6FnTinstanceKlassHandle_pnGThread__v_; text: .text%__1cJCodeCachebKnumber_of_nmethods_with_dependencies6F_i_; text: .text%__1cNinstanceKlassQinit_implementor6M_v_; text: .text%__1cPClassFileStream2t6MpCipc_v_; text: .text%__1cNinstanceKlassSprocess_interfaces6MpnGThread__v_; text: .text%__1cNinstanceKlassYcompute_secondary_supers6MipnGThread__pnPobjArrayOopDesc__; -text: .text%__1cKoopFactoryRnew_instanceKlass6FiiiinNReferenceType_pnGThread__pnMklassOopDesc__; text: .text%__1cNinstanceKlassWdo_local_static_fields6MpFpnPfieldDescriptor_pnGThread__v4_v_; text: .text%__1cPClassFileParserMsort_methods6MnOobjArrayHandle_111pnGThread__nPtypeArrayHandle__; text: .text%__1cFKlassKsuperklass6kM_pnNinstanceKlass__; @@ -1561,22 +1458,17 @@ text: .text%__1cISubINodeJideal_reg6kM_I_: classes.o; text: .text%__1cNinstanceKlassOset_alloc_size6MI_v_: instanceKlass.o; text: .text%__1cNinstanceKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: instanceKlass.o; text: .text%__1cHMemNodeHsize_of6kM_I_; -text: .text%__1cFVTuneQstart_class_load6F_v_; text: .text%__1cSThreadProfilerMark2T6M_v_; -text: .text%__1cFVTuneOend_class_load6F_v_; text: .text%__1cLClassLoaderOload_classfile6FnMsymbolHandle_pnGThread__nTinstanceKlassHandle__; text: .text%__1cJEventMark2t6MpkcE_v_: classLoader.o; text: .text%__1cSThreadProfilerMark2t6Mn0AGRegion__v_; text: .text%__1cQSystemDictionaryRload_shared_class6FnTinstanceKlassHandle_nGHandle_pnGThread__1_; -text: .text%__1cKklassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cPClassFileParserbKparse_classfile_sourcefile_attribute6MnSconstantPoolHandle_nTinstanceKlassHandle_pnGThread__v_; text: .text%__1cQmodI_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLRShiftINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cKCMoveINodeGOpcode6kM_i_; text: .text%__1cLLShiftLNodeGOpcode6kM_i_; text: .text%__1cYcompareAndSwapL_boolNodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cSinstanceKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cNinstanceKlassScopy_static_fields6MpnSPSPromotionManager__v_; text: .text%__1cMtlsLoadPNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateQ_sub_Op_URShiftI6MpknENode__v_; text: .text%__1cKcmpOpUOperGnegate6M_v_: ad_sparc_clone.o; @@ -1619,14 +1511,12 @@ text: .text%__1cLklassItableTcompute_itable_size6FnOobjArrayHandle__i_; text: .text%__1cQandI_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIXorINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cRmethodDataOopDescLbci_to_data6Mi_pnLProfileData__; -text: .text%__1cFframeZinterpreter_frame_set_bcx6Mi_v_; text: .text%__1cMnegF_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLstoreI0NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cTOopMapForCacheEntryZfill_stackmap_for_opcodes6MpnOBytecodeStream_pnNCellTypeState_4i_v_; text: .text%__1cSaddL_reg_imm13NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQshrL_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cKstoreLNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cNSharedRuntimebKexception_handler_for_return_address6FpC_1_; text: .text%__1cILoopNodeHsize_of6kM_I_: classes.o; text: .text%__1cHMatcherLfind_shared6MpnENode__v_; text: .text%__1cJStartNodeHsize_of6kM_I_; @@ -1643,8 +1533,6 @@ text: .text%__1cRcompL_reg_conNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cMLinkResolverbHlookup_instance_method_in_klasses6FrnMmethodHandle_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%__1cMnegF_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cNSharedRuntimebWnative_method_throw_unsatisfied_link_error_entry6F_pC_; -text: .text%__1cTStackWalkCompPolicyYmethod_back_branch_event6MnMmethodHandle_iipnGThread__v_; -text: .text%__1cRCompilationPolicybJreset_counter_for_back_branch_event6MnMmethodHandle__v_; text: .text%__1cOMethodLivenessQcompute_liveness6M_v_; text: .text%__1cOMethodLiveness2t6MpnFArena_pnIciMethod__v_; text: .text%__1cOMethodLivenessNinit_gen_kill6M_v_; @@ -1654,7 +1542,6 @@ text: .text%__1cIGraphKitHopt_iff6MpnENode_2_2_; text: .text%__1cLRShiftINodeIIdentity6MpnOPhaseTransform__pnENode__; text: .text%__1cJTimeStampGupdate6M_v_; text: .text%__1cRmethodDataOopDescKmileage_of6FpnNmethodOopDesc__i_; -text: .text%__1cWconstantPoolCacheKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cMloadConDNodeIpipeline6kM_pknIPipeline__; text: .text%__1cFParseQarray_addressing6MnJBasicType_ippknEType__pnENode__; text: .text%__1cNloadConP0NodeLout_RegMask6kM_rknHRegMask__; @@ -1666,14 +1553,11 @@ text: .text%__1cQcmovI_reg_ltNodeIpipeline6kM_pknIPipeline__; text: .text%__1cRsubI_zero_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cJcmpOpOperFequal6kM_i_: ad_sparc_clone.o; text: .text%__1cHCompilebAvarargs_C_out_slots_killed6kM_I_; -text: .text%__1cXJNI_ArgumentPusherVaArgHiterate6MX_v_: jni.o; -text: .text%__1cbBjava_lang_ref_SoftReferenceFclock6F_x_; text: .text%__1cOPhaseIdealLoopQset_subtree_ctrl6MpnENode__v_; text: .text%__1cWstatic_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocInfo.o; text: .text%__1cNflagsRegLOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cYciExceptionHandlerStreamPcount_remaining6M_i_; text: .text%__1cFParseXcatch_inline_exceptions6MpnNSafePointNode__v_; -text: .text%__1cRconstantPoolKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNobjArrayKlassKcopy_array6MpnMarrayOopDesc_i2iipnGThread__v_; text: .text%__1cKcmpOpUOperNgreater_equal6kM_i_: ad_sparc_clone.o; text: .text%JVM_GetFieldIxModifiers; @@ -1698,7 +1582,6 @@ text: .text%__1cKo0RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cIregDOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cNmethodOopDescTverified_code_entry6M_pC_; text: .text%__1cNSharedRuntimeXfind_callee_info_helper6FpnKJavaThread_rnMvframeStream_rnJBytecodesECode_rnICallInfo_pnGThread__nGHandle__; -text: .text%__1cPBytecode_invokeFindex6kM_i_; text: .text%__1cLRethrowNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cSPSKeepAliveClosureGdo_oop6MppnHoopDesc__v_: psScavenge.o; text: .text%__1cFParseFBlockRsuccessor_for_bci6Mi_p1_; @@ -1724,7 +1607,6 @@ text: .text%__1cLMachNopNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOPhaseIdealLoopNreorg_offsets6MpnNIdealLoopTree__v_; text: .text%__1cRshrL_reg_imm6NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cNmethodOopDescVset_signature_handler6MpC_v_; -text: .text%__1cbBjava_lang_ref_SoftReferenceJtimestamp6FpnHoopDesc__x_; text: .text%__1cPcompP_iRegPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cSxorI_reg_imm13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cOPhaseIdealLoopRsplit_thru_region6MpnENode_2_2_; @@ -1736,7 +1618,6 @@ text: .text%__1cJCodeCacheMfind_nmethod6Fpv_pnHnmethod__; text: .text%__1cOPhaseIdealLoopMdominated_by6MpnENode_2_v_; text: .text%__1cQshlI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cFParseNthrow_to_exit6MpnNSafePointNode__v_; -text: .text%__1cQinstanceRefKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cVConstantOopWriteValueIwrite_on6MpnUDebugInfoWriteStream__v_; text: .text%__1cJVectorSetGslamin6Mrk0_v_; text: .text%JVM_Clone; @@ -1772,7 +1653,6 @@ text: .text%__1cXmembar_release_lockNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cJNode_ListEyank6MpnENode__v_; text: .text%__1cMPhaseChaitinISimplify6M_v_; text: .text%__1cNIdealLoopTreeIset_nest6MI_i_; -text: .text%__1cSCallLeafDirectNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIMulLNodeImul_ring6kMpknEType_3_3_; text: .text%__1cMStartOSRNodeGOpcode6kM_i_; text: .text%__1cSCallLeafDirectNodeLout_RegMask6kM_rknHRegMask__; @@ -1792,7 +1672,6 @@ text: .text%__1cSMemBarVolatileNodeGOpcode6kM_i_; text: .text%__1cLstoreB0NodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cRshrI_reg_imm5NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc__pc_; -text: .text%__1cRcmpFastUnlockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNSafePointNodeLpop_monitor6M_v_; text: .text%__1cMPhaseChaitinVfind_base_for_derived6MppnENode_2rI_2_; text: .text%__1cLOptoRuntimebAcomplete_monitor_exit_Type6F_pknITypeFunc__; @@ -1813,7 +1692,6 @@ text: .text%__1cMindirectOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o text: .text%__1cMindirectOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cNSafePointNodeMpush_monitor6MpknMFastLockNode__v_; text: .text%__1cSCallLeafDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cSCallLeafDirectNodeKmethod_set6Mi_v_; text: .text%__1cIDivINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cJLoadBNodeJideal_reg6kM_I_: classes.o; text: .text%__1cJloadBNodeOmemory_operand6kM_pknIMachOper__; @@ -1824,8 +1702,6 @@ text: .text%__1cOGenerateOopMapGdo_ldc6Mii_v_; text: .text%__1cJCMoveNodeLis_cmove_id6FpnOPhaseTransform_pnENode_44pnIBoolNode__4_; text: .text%__1cKTypeAryPtrQcast_to_ptr_type6kMnHTypePtrDPTR__pknEType__; text: .text%__1cOPhaseIdealLoopKDominators6M_v_; -text: .text%__1cOPhaseIdealLoopPbuild_loop_late6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; -text: .text%__1cOPhaseIdealLoopQbuild_loop_early6MrnJVectorSet_rnJNode_List_rnKNode_Stack_pk0_v_; text: .text%jni_NewGlobalRef: jni.o; text: .text%__1cTciConstantPoolCache2t6MpnFArena_i_v_; text: .text%__1cIAndINodeJideal_reg6kM_I_: classes.o; @@ -1838,7 +1714,6 @@ text: .text%__1cZPhaseConservativeCoalesceGverify6M_v_; text: .text%__1cRcmpFastUnlockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQshlI_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cXmembar_release_lockNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKPSYoungGenNused_in_bytes6kM_I_; text: .text%__1cOMachEpilogNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKCompiledICSset_to_monomorphic6MrknOCompiledICInfo__v_; text: .text%__1cJloadFNodeIpipeline6kM_pknIPipeline__; @@ -1851,8 +1726,6 @@ text: .text%JVM_FillInStackTrace; text: .text%__1cKJavaThreadGactive6F_p0_; text: .text%__1cKstoreFNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cQjava_lang_StringOchar_converter6FnGHandle_HHpnGThread__1_; -text: .text%__1cMVirtualSpaceNreserved_size6kM_I_; -text: .text%__1cICodeHeapMmax_capacity6kM_I_; text: .text%__1cRsubI_zero_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cHTypePtrFxmeet6kMpknEType__3_; text: .text%__1cNflagsRegFOperEtype6kM_pknEType__: ad_sparc.o; @@ -1860,7 +1733,6 @@ text: .text%__1cIMinINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cFParseWensure_phis_everywhere6M_v_; text: .text%__1cLRethrowNodeEhash6kM_I_: classes.o; text: .text%__1cIDivLNodeGOpcode6kM_i_; -text: .text%__1cPlocal_vsnprintf6FpcIpkcpv_i_; text: .text%__1cNDispatchTableJset_entry6MirnKEntryPoint__v_; text: .text%__1cNmethodOopDescVclear_native_function6M_v_; text: .text%__1cOloadConL13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; @@ -1933,7 +1805,6 @@ text: .text%__1cIPhaseCFGQGlobalCodeMotion6MrnHMatcher_IrnJNode_List__v_; text: .text%__1cHMatcherTFixup_Save_On_Entry6M_v_; text: .text%__1cHMatcherPinit_spill_mask6MpnENode__v_; text: .text%__1cHCompileICode_Gen6M_v_; -text: .text%__1cFArena2t6MI_v_; text: .text%__1cUDebugInfoWriteStream2t6MpnYDebugInformationRecorder_i_v_; text: .text%__1cHMatcherVinit_first_stack_mask6M_v_; text: .text%__1cFArenaNmove_contents6Mp0_1_; @@ -1972,7 +1843,6 @@ text: .text%__1cRsubI_zero_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cHRetNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIConDNodeGOpcode6kM_i_; text: .text%__1cObranchConFNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cTresource_free_bytes6FpcI_v_; text: .text%__1cNmethodOopDescbDbuild_interpreter_method_data6FnMmethodHandle_pnGThread__v_; text: .text%__1cRcompL_reg_conNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cNMemoryManagerHoops_do6MpnKOopClosure__v_; @@ -1981,10 +1851,8 @@ text: .text%__1cFciEnvKcompile_id6M_I_; text: .text%__1cPmethodDataKlassIallocate6MnMmethodHandle_pnGThread__pnRmethodDataOopDesc__; text: .text%__1cKoopFactoryOnew_methodData6FnMmethodHandle_pnGThread__pnRmethodDataOopDesc__; text: .text%__1cIAndLNodeJideal_reg6kM_I_: classes.o; -text: .text%__1cKCodeBuffer2t6MpCi_v_; text: .text%__1cVshrL_reg_imm6_L2INodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cLConvL2INodeIIdentity6MpnOPhaseTransform__pnENode__; -text: .text%__1cIciMethodRinstructions_size6M_i_; text: .text%__1cSmulI_reg_imm13NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cCosXthread_local_storage_at6Fi_pv_; text: .text%__1cMindIndexOperNconstant_disp6kM_i_: ad_sparc.o; @@ -2013,10 +1881,8 @@ text: .text%__1cLOpaque2NodeLbottom_type6kM_pknEType__: connode.o; text: .text%__1cSconvI2D_helperNodeIpipeline6kM_pknIPipeline__; text: .text%__1cUPSGenerationCountersKupdate_all6M_v_: psGenerationCounters.o; text: .text%__1cQComputeCallStackHdo_long6M_v_: generateOopMap.o; -text: .text%__1cKTypeOopPtrSmake_from_constant6FpnIciObject__pk0_; text: .text%__1cQregP_to_stkPNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cOGenerateOopMapHppstore6MpnNCellTypeState_i_v_; -text: .text%__1cJTimeStampSticks_since_update6kM_x_; text: .text%__1cQmodI_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cIMulINodeImul_ring6kMpknEType_3_3_; text: .text%__1cURethrowExceptionNodeIpipeline6kM_pknIPipeline__; @@ -2027,18 +1893,15 @@ text: .text%__1cSaddI_reg_imm13NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cIModINodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cKklassKlassIoop_size6kMpnHoopDesc__i_; text: .text%__1cJcmpOpOperHgreater6kM_i_: ad_sparc_clone.o; -text: .text%__1cJimmL0OperJconstantL6kM_x_: ad_sparc_clone.o; text: .text%__1cJimmI0OperJnum_edges6kM_I_: ad_sparc_clone.o; text: .text%__1cFStateM_sub_Op_ConL6MpknENode__v_; text: .text%__1cOloadConL13NodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cNObjectMonitorHis_busy6kM_i_; text: .text%JVM_GetClassNameUTF; text: .text%__1cKloadUBNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cIXorINodeGadd_id6kM_pknEType__: classes.o; text: .text%__1cFStateM_sub_Op_AndI6MpknENode__v_; text: .text%__1cVshrL_reg_imm6_L2INodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cKcmpOpFOperJnum_edges6kM_I_: ad_sparc_clone.o; -text: .text%__1cLRuntimeStubHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cTmembar_volatileNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJloadFNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cFStateL_sub_Op_OrI6MpknENode__v_; @@ -2059,14 +1922,11 @@ text: .text%__1cNloadConL0NodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cFTypeFEmake6Ff_pk0_; text: .text%__1cIimmFOperJconstantF6kM_f_: ad_sparc_clone.o; text: .text%__1cEUTF8Ounicode_length6Fpkc_i_; -text: .text%__1cCosRcurrent_thread_id6F_i_; text: .text%__1cUSafepointSynchronizeFblock6FpnKJavaThread__v_; text: .text%__1cOGenerateOopMapJppdupswap6Mipkc_v_; -text: .text%__1cJttyLockerbCbreak_tty_lock_for_safepoint6Fi_v_; text: .text%__1cSmembar_acquireNodeIadr_type6kM_pknHTypePtr__; text: .text%__1cPorI_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIPhaseCFGOinsert_goto_at6MII_v_; -text: .text%__1cITypeLongFwiden6kMpknEType__3_; text: .text%__1cSThreadLocalStoragePget_thread_slow6F_pnGThread__; text: .text%__1cPCallRuntimeNodeGOpcode6kM_i_; text: .text%__1cJcmpOpOperNgreater_equal6kM_i_: ad_sparc_clone.o; @@ -2074,7 +1934,6 @@ text: .text%__1cMindIndexOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o text: .text%__1cMindIndexOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cMindIndexOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%JVM_FindClassFromClass; -text: .text%__1cRshrP_reg_imm5NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cObranchConFNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cQshrI_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cbDjava_lang_reflect_ConstructorFclazz6FpnHoopDesc__2_; @@ -2092,12 +1951,10 @@ text: .text%__1cSciExceptionHandlerLcatch_klass6M_pnPciInstanceKlass__; text: .text%__1cMloadConFNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cKcmpOpPOperNgreater_equal6kM_i_: ad_sparc_clone.o; text: .text%__1cLRShiftLNodeLbottom_type6kM_pknEType__: classes.o; -text: .text%__1cKimmL13OperJconstantL6kM_x_: ad_sparc_clone.o; text: .text%__1cSTailCalljmpIndNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cKstoreLNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cGIfNodeMdominated_by6MpnENode_pnMPhaseIterGVN__v_; text: .text%__1cOcompiledVFrame2t6MpknFframe_pknLRegisterMap_pnKJavaThread_pnJScopeDesc__v_; -text: .text%__1cJScopeDesc2t6MpknHnmethod_i_v_; text: .text%__1cQshlI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cOGenerateOopMapJdo_astore6Mi_v_; text: .text%__1cbFunnecessary_membar_volatileNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; @@ -2127,7 +1984,6 @@ text: .text%__1cLBoxLockNode2t6Mi_v_; text: .text%__1cPconvF2D_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cLOptoRuntimebBcomplete_monitor_enter_Type6F_pknITypeFunc__; text: .text%__1cIGraphKitLshared_lock6MpnENode__pnMFastLockNode__; -text: .text%__1cPcmpFastLockNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNloadConP0NodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cRorI_reg_imm13NodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKcmpOpUOperEless6kM_i_: ad_sparc_clone.o; @@ -2135,7 +1991,6 @@ text: .text%__1cQaddF_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cRLowMemoryDetectorWdetect_after_gc_memory6FpnKMemoryPool__v_; text: .text%lwp_mutex_init: os_solaris.o; text: .text%__1cRsubI_zero_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cFframeLnmethods_do6M_v_; text: .text%__1cQjava_lang_ThreadGthread6FpnHoopDesc__pnKJavaThread__; text: .text%__1cQnotemp_iRegIOperEtype6kM_pknEType__: ad_sparc.o; text: .text%__1cITemplateIbytecode6kM_nJBytecodesECode__; @@ -2174,11 +2029,9 @@ text: .text%jni_GetObjectClass: jni.o; text: .text%__1cSxorI_reg_imm13NodeIpipeline6kM_pknIPipeline__; text: .text%__1cOMacroAssemblerFalign6Mi_v_; text: .text%__1cRappend_interfaces6FnOobjArrayHandle_ripnPobjArrayOopDesc__v_; -text: .text%__1cKManagementJtimestamp6F_x_; text: .text%__1cIPSOldGenPupdate_counters6M_v_; text: .text%__1cQshrI_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cFForteNregister_stub6FpkcpC3_v_; -text: .text%__1cFVTuneNregister_stub6FpkcpC3_v_; text: .text%__1cNinstanceKlassbFlookup_method_in_all_interfaces6kMpnNsymbolOopDesc_2_pnNmethodOopDesc__; text: .text%__1cTloadL_unalignedNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cJloadLNodeOmemory_operand6kM_pknIMachOper__; @@ -2222,7 +2075,6 @@ text: .text%__1cMLinkResolverXresolve_invokeinterface6FrnICallInfo_nGHandle_nSco text: .text%__1cKC2CompilerOcompile_method6MpnFciEnv_pnIciMethod_i_v_; text: .text%JVM_GetClassLoader; text: .text%__1cNCompileBrokerZinvoke_compiler_on_method6FpnLCompileTask__v_; -text: .text%__1cCosRelapsed_frequency6F_x_; text: .text%__1cFStateP_sub_Op_ConvL2I6MpknENode__v_; text: .text%__1cOPhaseIdealLoopLdo_split_if6MpnENode__v_; text: .text%__1cLAccessFlagsRatomic_clear_bits6Mi_v_; @@ -2249,11 +2101,9 @@ text: .text%__1cSmembar_acquireNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cYDebugInformationRecorderHcopy_to6MpnHnmethod__v_; text: .text%__1cVExceptionHandlerTableHcopy_to6MpnHnmethod__v_; text: .text%__1cJCodeCacheGcommit6FpnICodeBlob__v_; -text: .text%__1cFVTuneOcreate_nmethod6FpnHnmethod__v_; text: .text%__1cHnmethodQcopy_scopes_data6MpCi_v_; text: .text%__1cFciEnvVnum_inlined_bytecodes6kM_i_; text: .text%__1cWImplicitExceptionTableHcopy_to6MpnHnmethod__v_; -text: .text%__1cLOopRecorderHcopy_to6MpnICodeBlob__v_; text: .text%__1cIciMethodRbuild_method_data6M_v_; text: .text%__1cHCompileIOptimize6M_v_; text: .text%__1cHCompileLFinish_Warm6M_v_; @@ -2287,7 +2137,6 @@ text: .text%__1cTmembar_volatileNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cNloadConL0NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQComputeCallStackGdo_int6M_v_: generateOopMap.o; text: .text%__1cXmembar_acquire_lockNodeIadr_type6kM_pknHTypePtr__; -text: .text%__1cKPSYoungGenRcapacity_in_bytes6kM_I_; text: .text%__1cNSafepointBlobbDpreserve_callee_argument_oops6MnFframe_pknLRegisterMap_pnKOopClosure__v_: codeBlob.o; text: .text%__1cOloadConI13NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cJloadSNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -2299,7 +2148,6 @@ text: .text%__1cNSignatureInfoIdo_short6M_v_: bytecode.o; text: .text%__1cLBoxLockNodeDcmp6kMrknENode__I_; text: .text%__1cSCompiledStaticCallSset_to_interpreted6MnMmethodHandle_pC_v_; text: .text%__1cSCompiledStaticCallJfind_stub6M_pC_; -text: .text%__1cRNativeMovConstRegIset_data6Mi_v_; text: .text%__1cFParsebLincrement_and_test_invocation_counter6Mi_v_; text: .text%__1cSsafePoint_pollNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMTailCallNodeGOpcode6kM_i_; @@ -2325,7 +2173,6 @@ text: .text%__1cKScopeValueJread_from6FpnTDebugInfoReadStream__p0_; text: .text%__1cKPerfMemoryMmark_updated6F_v_; text: .text%__1cSobjArrayKlassKlassbCallocate_objArray_klass_impl6FnYobjArrayKlassKlassHandle_inLKlassHandle_pnGThread__pnMklassOopDesc__; text: .text%__1cIPerfData2t6MnJCounterNS_pkcn0AFUnits_n0ALVariability__v_; -text: .text%__1cKPerfMemoryFalloc6FI_pc_; text: .text%__1cLStrCompNodeKmatch_edge6kMI_I_; text: .text%__1cQmulL_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cILocation2t6MpnTDebugInfoReadStream__v_; @@ -2359,13 +2206,11 @@ text: .text%__1cXJNI_ArgumentPusherVaArgHget_int6M_v_: jni.o; text: .text%__1cRbranchLoopEndNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cQaddF_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKcmpOpUOperHgreater6kM_i_: ad_sparc_clone.o; -text: .text%__1cUParallelScavengeHeapEused6kM_I_; text: .text%__1cIDivINodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cQmulF_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cQxorI_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cWCallLeafNoFPDirectNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLcmpD_ccNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cWCallLeafNoFPDirectNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJloadINodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cbBopt_virtual_call_RelocationLstatic_stub6M_pC_; text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_; @@ -2392,8 +2237,6 @@ text: .text%__1cSandI_reg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIimmLOperJnum_edges6kM_I_: ad_sparc_clone.o; text: .text%__1cFParseOmerge_new_path6Mi_v_; text: .text%__1cQregP_to_stkPNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; -text: .text%__1cQjava_lang_StringGoffset6FpnHoopDesc__i_; -text: .text%__1cQjava_lang_StringFvalue6FpnHoopDesc__pnQtypeArrayOopDesc__; text: .text%__1cQjava_lang_StringScreate_from_symbol6FnMsymbolHandle_pnGThread__nGHandle__; text: .text%__1cSmembar_releaseNodeLout_RegMask6kM_rknHRegMask__; text: .text%jni_NewByteArray: jni.o; @@ -2402,7 +2245,6 @@ text: .text%__1cJJavaCallsMcall_special6FpnJJavaValue_nGHandle_nLKlassHandle_nMs text: .text%__1cQSystemDictionarybAvalidate_protection_domain6FnTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cKDictionaryVadd_protection_domain6MiInTinstanceKlassHandle_nGHandle_2pnGThread__v_; text: .text%__1cFParseLdo_newarray6MnJBasicType__v_; -text: .text%__1cPmethodDataKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cNmethodOopDescKklass_name6kM_pnNsymbolOopDesc__; text: .text%__1cSconvI2D_helperNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cLstoreP0NodeLout_RegMask6kM_rknHRegMask__; @@ -2427,7 +2269,6 @@ text: .text%__1cSmulI_reg_imm13NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cZInterpreterMacroAssemblerZget_2_byte_integer_at_bcp6MipnMRegisterImpl_2n0ALsignedOrNot_n0AKsetCCOrNot__v_; text: .text%__1cQcmovI_reg_gtNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cURethrowExceptionNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPfieldDescriptorSlong_initial_value6kM_x_; text: .text%__1cISubLNodeDsub6kMpknEType_3_3_; text: .text%__1cPciObjArrayKlass2t6MnLKlassHandle__v_; text: .text%__1cJLoadINodeMstore_Opcode6kM_i_: classes.o; @@ -2443,7 +2284,6 @@ text: .text%__1cJCMoveNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%jni_GetStringCritical: jni.o; text: .text%__1cHciKlassSsuper_check_offset6M_I_; text: .text%__1cPciObjArrayKlassGloader6M_pnHoopDesc__: ciObjArrayKlass.o; -text: .text%__1cWCallLeafNoFPDirectNodeKmethod_set6Mi_v_; text: .text%__1cWCallLeafNoFPDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIDivLNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cPICStubInterfaceRcode_size_to_size6kMi_i_: icBuffer.o; @@ -2454,7 +2294,6 @@ text: .text%__1cJScopeDescGsender6kM_p0_; text: .text%__1cSxorI_reg_imm13NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOcompiledVFrameGsender6kM_pnGvframe__; text: .text%__1cZInterpreterMacroAssemblerDpop6MnITosState__v_; -text: .text%__1cGThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cQPlaceholderTableHoops_do6MpnKOopClosure__v_; text: .text%__1cXJvmtiCurrentBreakpointsHoops_do6FpnKOopClosure__v_; text: .text%__1cNMemoryServiceHoops_do6FpnKOopClosure__v_; @@ -2462,7 +2301,6 @@ text: .text%__1cNThreadServiceHoops_do6FpnKOopClosure__v_; text: .text%__1cKJNIHandlesHoops_do6FpnKOopClosure__v_; text: .text%__1cQSystemDictionaryRpreloaded_oops_do6FpnKOopClosure__v_; text: .text%__1cLJvmtiExportHoops_do6FpnKOopClosure__v_; -text: .text%__1cIVMThreadHoops_do6MpnKOopClosure__v_; text: .text%__1cKJNIHandlesMweak_oops_do6FpnRBoolObjectClosure_pnKOopClosure__v_; text: .text%__1cSObjectSynchronizerHoops_do6FpnKOopClosure__v_; text: .text%__1cMFlatProfilerHoops_do6FpnKOopClosure__v_; @@ -2481,7 +2319,6 @@ text: .text%__1cOCompiledRFrameKtop_method6kM_nMmethodHandle__: rframe.o; text: .text%__1cKReflectionTget_parameter_types6FnMmethodHandle_ippnHoopDesc_pnGThread__nOobjArrayHandle__; text: .text%__1cRtestI_reg_immNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cOcmovIL_immNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cJimmU6OperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cHRegMask2t6M_v_: matcher.o; text: .text%__1cOGenerateOopMapIcopy_cts6MpnNCellTypeState_2_i_; text: .text%__1cNObjectMonitorGEnterI6MpnGThread__v_; @@ -2494,7 +2331,6 @@ text: .text%__1cXvirtual_call_RelocationEtype6M_nJrelocInfoJrelocType__: relocIn text: .text%__1cPPerfDataManagerMcounter_name6Fpkc2_pc_; text: .text%__1cIModLNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cMloadConFNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cbBjava_lang_ref_SoftReferenceJset_clock6Fx_v_; text: .text%__1cbAPSGCAdaptivePolicyCountersbBupdate_counters_from_policy6M_v_; text: .text%__1cXTraceMemoryManagerStats2T6M_v_; text: .text%__1cQSystemDictionaryHoops_do6FpnKOopClosure__v_; @@ -2510,8 +2346,6 @@ text: .text%__1cMTypeKlassPtrFxmeet6kMpknEType__3_; text: .text%__1cKPSYoungGenPupdate_counters6M_v_; text: .text%__1cWThreadLocalAllocBufferbFaccumulate_statistics_before_gc6F_v_; text: .text%__1cWThreadLocalAllocBufferQresize_all_tlabs6F_v_; -text: .text%__1cPGCMemoryManagerIgc_begin6M_v_; -text: .text%__1cPGCMemoryManagerGgc_end6M_v_; text: .text%__1cRLowMemoryDetectorRdetect_low_memory6F_v_; text: .text%__1cNMemoryServiceStrack_memory_usage6F_v_; text: .text%__1cbAPSGCAdaptivePolicyCountersPupdate_counters6M_v_; @@ -2527,19 +2361,16 @@ text: .text%__1cORuntimeServicebDrecord_safepoint_synchronized6F_v_; text: .text%__1cQaddF_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cUSafepointSynchronizeFbegin6F_v_; text: .text%__1cKarrayKlassTallocate_arrayArray6MiipnGThread__pnPobjArrayOopDesc__; -text: .text%__1cONMethodSweeperFsweep6F_v_; text: .text%__1cCosbAmake_polling_page_readable6F_v_; text: .text%__1cUSafepointSynchronizeDend6F_v_; text: .text%__1cOcmovII_immNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cORuntimeServiceUrecord_safepoint_end6F_v_; -text: .text%__1cKimmU13OperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cQshlL_reg_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cUcompU_iReg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%JVM_GetCallerClass; text: .text%__1cNSignatureInfoHdo_byte6M_v_: bytecode.o; text: .text%__1cOcmovPP_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cKstoreBNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSobjArrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cLstoreC0NodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cTloadL_unalignedNodePoper_input_base6kM_I_: ad_sparc_misc.o; text: .text%__1cICmpFNodeGOpcode6kM_i_; @@ -2551,7 +2382,6 @@ text: .text%jni_IsAssignableFrom: jni.o; text: .text%jni_GetFieldID: jni.o; text: .text%__1cJLoadPNodeMstore_Opcode6kM_i_: classes.o; text: .text%__1cLstoreB0NodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cZInterpreterMacroAssemblerbAget_cache_and_index_at_bcp6MpnMRegisterImpl_2i_v_; text: .text%__1cHTypeAryFxdual6kM_pknEType__; text: .text%__1cMtlsLoadPNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIVMThreadHexecute6FpnMVM_Operation__v_; @@ -2582,9 +2412,6 @@ text: .text%__1cZSerialOldToYoungRootsTaskFdo_it6MpnNGCTaskManager_I_v_; text: .text%__1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_; text: .text%__1cZSerialOldToYoungRootsTaskEname6M_pc_: psTasks.o; text: .text%__1cKPSYoungGenLswap_spaces6M_v_; -text: .text%__1cUParallelScavengeHeapQresize_young_gen6MII_v_; -text: .text%__1cKPSYoungGenGresize6MII_v_; -text: .text%__1cKPSYoungGenNresize_spaces6MII_v_; text: .text%__1cSPSPromotionManagerbBvm_thread_promotion_manager6F_p0_; text: .text%__1cUWaitForBarrierGCTaskIwait_for6M_v_; text: .text%__1cPVM_GC_OperationNdoit_epilogue6M_v_; @@ -2626,9 +2453,7 @@ text: .text%__1cJloadSNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cRloadConP_pollNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNObjectMonitorHRecycle6M_v_; text: .text%__1cNSharedRuntimeSfind_callee_method6FpnKJavaThread_pnGThread__nMmethodHandle__; -text: .text%__1cMloadConLNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJloadDNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; -text: .text%__1cQSystemDictionaryTresolve_from_stream6FnMsymbolHandle_nGHandle_2pnPClassFileStream_pnGThread__pnMklassOopDesc__; text: .text%__1cQstkI_to_regFNodeIpipeline6kM_pknIPipeline__; text: .text%__1cQregP_to_stkPNodeIpipeline6kM_pknIPipeline__; text: .text%__1cZInterpreterMacroAssemblerFpop_i6MpnMRegisterImpl__v_; @@ -2636,9 +2461,7 @@ text: .text%__1cIMaxINodeGadd_id6kM_pknEType__: classes.o; text: .text%__1cNSharedRuntimeTreresolve_call_site6FpnKJavaThread_pnGThread__nMmethodHandle__; text: .text%__1cYcompareAndSwapL_boolNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNSCMemProjNodeJideal_reg6kM_I_: classes.o; -text: .text%__1cYcompareAndSwapL_boolNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIProjNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cIPSOldGenMmax_gen_size6M_I_: psOldGen.o; text: .text%__1cKExceptionsK_throw_msg6FpnGThread_pkcipnNsymbolOopDesc_4_v_; text: .text%__1cSdivL_reg_imm13NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cbDVM_ParallelGCFailedAllocationEdoit6M_v_; @@ -2659,7 +2482,6 @@ text: .text%__1cPstoreI_FregNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cKCMovePNodeGOpcode6kM_i_; text: .text%__1cLstoreC0NodeIpipeline6kM_pknIPipeline__; text: .text%JVM_MonitorWait; -text: .text%__1cSObjectSynchronizerEwait6FnGHandle_xpnGThread__v_; text: .text%__1cIAddLNodeIadd_ring6kMpknEType_3_3_; text: .text%__1cHciKlass2t6MpnIciSymbol_p0_v_; text: .text%__1cGciType2t6MpnHciKlass__v_; @@ -2678,7 +2500,6 @@ text: .text%__1cIciSymbolHbyte_at6Mi_i_; text: .text%__1cKCompiledICSset_ic_destination6MpC_v_; text: .text%__1cQaddD_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cCosTset_native_priority6FpnGThread_i_nIOSReturn__; -text: .text%__1cPPerfDataManagerUcreate_long_variable6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnQPerfLongVariable__; text: .text%__1cQset_lwp_priority6Fiii_i_; text: .text%__1cQjava_lang_StringTcreate_oop_from_str6FpkcpnGThread__pnHoopDesc__; text: .text%jni_NewStringUTF: jni.o; @@ -2689,7 +2510,6 @@ text: .text%__1cSbranchCon_longNodeGnegate6M_v_: ad_sparc_misc.o; text: .text%__1cKcmpOpUOperKless_equal6kM_i_: ad_sparc_clone.o; text: .text%__1cPciInstanceKlassNloader_handle6M_pnI_jobject__; text: .text%__1cPciInstanceKlassYprotection_domain_handle6M_pnI_jobject__; -text: .text%__1cUParallelScavengeHeapIcapacity6kM_I_; text: .text%__1cNmethodOopDescKjmethod_id6M_pnK_jmethodID__; text: .text%__1cSsubL_reg_reg_2NodeIpipeline6kM_pknIPipeline__; text: .text%JVM_DefineClassWithSource; @@ -2705,7 +2525,6 @@ text: .text%__1cOcmovPP_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cSThreadLocalStorageSset_thread_in_slot6FpnGThread__v_; text: .text%get_thread; text: .text%__1cKstoreCNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cSThreadLocalStoragebBget_thread_via_cache_slowly6FIi_pnGThread__; text: .text%__1cSThreadLocalStorageKset_thread6FpnGThread__v_; text: .text%jni_CallIntMethod: jni.o; text: .text%__1cSThreadLocalStorageNpd_set_thread6FpnGThread__v_; @@ -2735,7 +2554,6 @@ text: .text%__1cQregI_to_stkINodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cQmulF_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4nGHandle_5pnGThread__v_; text: .text%__1cXSignatureHandlerLibraryOpd_set_handler6FpC_v_; -text: .text%__1cSInterpreterRuntimeZSignatureHandlerGeneratorIgenerate6MX_v_; text: .text%JVM_IsPrimitiveClass; text: .text%__1cJimmU6OperJnum_edges6kM_I_: ad_sparc_clone.o; text: .text%__1cOPhaseIdealLoopUpeeled_dom_test_elim6MpnNIdealLoopTree_rnJNode_List__v_; @@ -2758,7 +2576,6 @@ text: .text%__1cKReflectionPnew_constructor6FnMmethodHandle_pnGThread__pnHoopDes text: .text%__1cOcmovII_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSdivL_reg_imm13NodeIpipeline6kM_pknIPipeline__; text: .text%__1cTloadL_unalignedNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cNSharedRuntimeDd2l6Fd_x_; text: .text%__1cJStubQdDueueRrequest_committed6Mi_pnEStub__; text: .text%__1cRInlineCacheBufferRic_stub_code_size6F_i_; text: .text%__1cFStateP_sub_Op_RShiftL6MpknENode__v_; @@ -2808,7 +2625,6 @@ text: .text%__1cJloadINodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cSdivL_reg_imm13NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRloadConP_pollNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cIModINodeJideal_reg6kM_I_: classes.o; -text: .text%__1cZCallDynamicJavaDirectNodeKmethod_set6Mi_v_; text: .text%__1cZCallDynamicJavaDirectNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cSconvD2I_helperNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cZCallDynamicJavaDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -2846,7 +2662,6 @@ text: .text%__1cYjava_lang_reflect_MethodWset_annotation_default6FpnHoopDesc_2_v text: .text%__1cYjava_lang_reflect_MethodTset_parameter_types6FpnHoopDesc_2_v_; text: .text%__1cYjava_lang_reflect_MethodTset_exception_types6FpnHoopDesc_2_v_; text: .text%__1cYjava_lang_reflect_MethodNset_modifiers6FpnHoopDesc_i_v_; -text: .text%__1cOimmI_32_63OperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cYjava_lang_reflect_MethodIset_name6FpnHoopDesc_2_v_; text: .text%__1cbFpartialSubtypeCheck_vs_zeroNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cSsubL_reg_reg_2NodeLout_RegMask6kM_rknHRegMask__; @@ -2855,7 +2670,6 @@ text: .text%__1cOstackSlotPOperEtype6kM_pknEType__: ad_sparc.o; text: .text%jni_GetMethodID: jni.o; text: .text%__1cQshlL_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cIMulINodeJideal_reg6kM_I_: classes.o; -text: .text%__1cNminI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRshlI_reg_imm5NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cOloadConL13NodeIpipeline6kM_pknIPipeline__; text: .text%__1cNObjectMonitorGnotify6MpnGThread__v_; @@ -2877,7 +2691,6 @@ text: .text%__1cQcmovI_reg_ltNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cNloadConL0NodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cKo1RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cSsubL_reg_reg_1NodeIpipeline6kM_pknIPipeline__; -text: .text%__1cIBytecodeIset_code6MnJBytecodesECode__v_; text: .text%__1cQshrL_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cRsarL_reg_imm6NodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cJloadFNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -2921,7 +2734,6 @@ text: .text%__1cGThread2t6M_v_; text: .text%__1cCosHSolarisPhotspot_sigmask6FpnGThread__v_; text: .text%__1cCosHSolarisVinit_thread_fpu_state6F_v_; text: .text%__1cFTypeFFxmeet6kMpknEType__3_; -text: .text%__1cCosScurrent_stack_size6F_I_; text: .text%__1cIOSThreadNpd_initialize6M_v_; text: .text%__1cCosScurrent_stack_base6F_pC_; text: .text%__1cIOSThread2t6MpFpv_i1_v_; @@ -2948,7 +2760,6 @@ text: .text%__1cFStateM_sub_Op_SubL6MpknENode__v_; text: .text%__1cKCompiledICMstub_address6kM_pC_; text: .text%__1cJvmSymbolsOsignature_type6FpnNsymbolOopDesc__nJBasicType__; text: .text%__1cQsubL_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cQmodI_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cISubDNodeGOpcode6kM_i_; text: .text%__1cQmodI_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPfieldDescriptorLannotations6kM_pnQtypeArrayOopDesc__; @@ -2984,13 +2795,10 @@ text: .text%__1cJMarkSweepMfollow_stack6F_v_; text: .text%__1cNimmP_pollOperJnum_edges6kM_I_: ad_sparc_clone.o; text: .text%__1cRtestI_reg_immNodeIpipeline6kM_pknIPipeline__; text: .text%__1cJMemRegionMintersection6kMk0_0_; -text: .text%__1cKJavaThread2t6MpFp0pnGThread__vI_v_; text: .text%__1cKJavaThreadDrun6M_v_; -text: .text%__1cNSafepointBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; text: .text%__1cPjava_lang_ClassOprimitive_type6FpnHoopDesc__nJBasicType__; text: .text%JVM_IsArrayClass; text: .text%jni_CallStaticVoidMethod: jni.o; -text: .text%__1cPPerfDataManagerTcreate_long_counter6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnPPerfLongCounter__; text: .text%__1cLConvF2DNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cNsymbolOopDescWas_klass_external_name6kM_pkc_; text: .text%__1cHnmethodbDpreserve_callee_argument_oops6MnFframe_pknLRegisterMap_pnKOopClosure__v_; @@ -3017,14 +2825,12 @@ text: .text%__1cXNativeSignatureIteratorGdo_int6M_v_: interpreterRT_sparc.o; text: .text%__1cINodeHashEgrow6M_v_; text: .text%__1cOGenerateOopMapPdo_monitorenter6Mi_v_; text: .text%__1cOcmovPP_regNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; -text: .text%__1cMloadConDNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cIMaxINodeIadd_ring6kMpknEType_3_3_; text: .text%__1cJloadSNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cOGenerateOopMapLcompute_map6MpnGThread__v_; text: .text%__1cLConvF2DNodeLbottom_type6kM_pknEType__: classes.o; text: .text%JVM_Open; text: .text%__1cRInvocationCounterFreset6M_v_; -text: .text%__1cRCompilationPolicybIreset_counter_for_invocation_event6MnMmethodHandle__v_; text: .text%__1cOGenerateOopMap2t6MnMmethodHandle__v_; text: .text%__1cOGenerateOopMapRdo_interpretation6M_v_; text: .text%__1cIRetTableRcompute_ret_table6MnMmethodHandle__v_; @@ -3042,7 +2848,6 @@ text: .text%__1cIGraphKitSprecision_rounding6MpnENode__2_; text: .text%__1cNPerfByteArray2t6MnJCounterNS_pkcnIPerfDataFUnits_n0CLVariability_i_v_; text: .text%__1cIGraphKitRcreate_and_map_if6MpnENode_2ff_pnGIfNode__: generateOptoStub.o; text: .text%__1cQjava_lang_ThreadIpriority6FpnHoopDesc__nOThreadPriority__; -text: .text%__1cQjava_lang_ThreadJstackSize6FpnHoopDesc__x_; text: .text%__1cMLinkResolverYresolve_interface_method6FrnMmethodHandle_rnLKlassHandle_nSconstantPoolHandle_ipnGThread__v_; text: .text%__1cKJavaThreadHprepare6MpnI_jobject_nOThreadPriority__v_; text: .text%__1cTLoadD_unalignedNodeGOpcode6kM_i_; @@ -3077,7 +2882,6 @@ text: .text%__1cSTailCalljmpIndNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cOGenerateOopMapEppop6MpnNCellTypeState__v_; text: .text%__1cSTailCalljmpIndNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cQsubF_reg_regNodeIpipeline6kM_pknIPipeline__; -text: .text%__1cRNativeMovConstRegEdata6kM_i_; text: .text%__1cbFunnecessary_membar_volatileNodeLbottom_type6kM_pknEType__: ad_sparc_misc.o; text: .text%__1cLcmpF_ccNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNObjectMonitorJnotifyAll6MpnGThread__v_; @@ -3144,7 +2948,6 @@ text: .text%__1cLstoreF0NodeIpipeline6kM_pknIPipeline__; text: .text%__1cIMinINodeIadd_ring6kMpknEType_3_3_; text: .text%JVM_GetInheritedAccessControlContext; text: .text%__1cPPerfDataManagerWcreate_string_constant6FnJCounterNS_pkc3pnGThread__pnSPerfStringConstant__; -text: .text%__1cNmaxI_eRegNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%JVM_NativePath; text: .text%__1cOMacroAssemblerNflush_windows6M_v_; text: .text%__1cSsubD_regD_regDNodeIpipeline6kM_pknIPipeline__; @@ -3157,19 +2960,15 @@ text: .text%__1cVinline_cache_regPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cKstorePNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cQObjectStartArrayFreset6M_v_; text: .text%__1cPconvI2D_memNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHThreadsHoops_do6FpnKOopClosure__v_; text: .text%__1cQaddD_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cLConvF2INodeGOpcode6kM_i_; text: .text%__1cVCallRuntimeDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJHashtableGunlink6MpnRBoolObjectClosure__v_; text: .text%__1cIPSOldGenPadjust_pointers6M_v_; -text: .text%__1cVCallRuntimeDirectNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOcmovPI_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cIPSOldGenHcompact6M_v_; text: .text%__1cMtlsLoadPNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cLcmpF_ccNodeErule6kM_I_: ad_sparc_misc.o; -text: .text%__1cVCallRuntimeDirectNodeKmethod_set6Mi_v_; -text: .text%__1cKimmI11OperIconstant6kM_i_: ad_sparc_clone.o; text: .text%__1cQcmovI_reg_gtNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cLstoreP0NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cOcmovIF_regNodeErule6kM_I_: ad_sparc_misc.o; @@ -3177,7 +2976,6 @@ text: .text%__1cOcmovLL_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%jni_GetStaticMethodID: jni.o; text: .text%__1cZInterpreterMacroAssemblerUupdate_mdp_by_offset6MipnMRegisterImpl__v_; text: .text%__1cRtestI_reg_immNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHnmethodbAmake_not_entrant_or_zombie6Mi_v_; text: .text%__1cPconvF2D_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cOPhaseIdealLoopKdo_peeling6MpnNIdealLoopTree_rnJNode_List__v_; text: .text%__1cOcmovLL_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; @@ -3210,7 +3008,6 @@ text: .text%__1cSaddD_regD_regDNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cSaddP_reg_imm13NodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cXconvI2D_regDHi_regDNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cKstoreFNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cPPerfDataManagerUcreate_long_constant6FnJCounterNS_pkcnIPerfDataFUnits_xpnGThread__pnQPerfLongConstant__; text: .text%__1cOMacroAssemblerNget_vm_result6MpnMRegisterImpl__v_; text: .text%__1cQsubF_reg_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cZInterpreterMacroAssemblerbIcompute_extra_locals_size_in_bytes6MpnMRegisterImpl_22_v_; @@ -3250,7 +3047,6 @@ text: .text%__1cQsubF_reg_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%jni_NewObjectV: jni.o; text: .text%__1cOcmovLI_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cPciInstanceKlassLjava_mirror6M_pnKciInstance__; -text: .text%__1cCosHSolarisKmmap_chunk6FpcIii_2_; text: .text%__1cXPartialSubtypeCheckNodeLbottom_type6kM_pknEType__: classes.o; text: .text%jni_EnsureLocalCapacity; text: .text%__1cLstoreI0NodeOmemory_operand6kM_pknIMachOper__; @@ -3278,7 +3074,6 @@ text: .text%__1cLcmpD_ccNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cJloadLNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cISubDNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cZInterpreterMacroAssemblerUprofile_taken_branch6MpnMRegisterImpl_2_v_; -text: .text%__1cLResourceObj2n6FIn0APallocation_type__pv_; text: .text%__1cNSafePointNodeQpeek_monitor_box6kM_pnENode__; text: .text%__1cFTypeFFxdual6kM_pknEType__; text: .text%__1cICmpFNodeFValue6kMpnOPhaseTransform__pknEType__; @@ -3290,7 +3085,6 @@ text: .text%__1cINegDNodeLbottom_type6kM_pknEType__: classes.o; text: .text%__1cLConvI2FNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cOcmovLL_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cRorI_reg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cTloadL_unalignedNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cTloadL_unalignedNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cKloadUBNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cXconvI2D_regDHi_regDNodeIpipeline6kM_pknIPipeline__; @@ -3320,7 +3114,6 @@ text: .text%__1cMTailJumpNodeKmatch_edge6kMI_I_; text: .text%__1cWloadConI_x41f00000NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cODeoptimizationbJupdate_method_data_from_interpreter6FnQmethodDataHandle_ii_v_; text: .text%__1cIimmDOperJnum_edges6kM_I_: ad_sparc_clone.o; -text: .text%__1cFframeZinterpreter_frame_set_mdx6Mi_v_; text: .text%__1cOstackSlotLOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cOstackSlotLOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cTloadD_unalignedNodeErule6kM_I_: ad_sparc_misc.o; @@ -3371,7 +3164,6 @@ text: .text%__1cYjava_lang_reflect_MethodEslot6FpnHoopDesc__i_; text: .text%__1cYjava_lang_reflect_MethodFclazz6FpnHoopDesc__2_; text: .text%__1cYinternal_word_RelocationGtarget6M_pC_; text: .text%__1cJStubQdDueueKremove_all6M_v_; -text: .text%__1cMloadConFNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cPconvI2D_memNodeIpipeline6kM_pknIPipeline__; text: .text%__1cPorL_reg_regNodeMideal_Opcode6kM_i_: ad_sparc_misc.o; text: .text%__1cZInterpreterMacroAssemblerLindex_check6MpnMRegisterImpl_2i22_v_; @@ -3405,12 +3197,10 @@ text: .text%__1cSInterpreterRuntimeQcreate_exception6FpnKJavaThread_pc3_v_; text: .text%__1cQComputeCallStackIdo_array6Mii_v_: generateOopMap.o; text: .text%__1cKPSYoungGenKprecompact6M_v_; text: .text%__1cXjava_lang_reflect_FieldEslot6FpnHoopDesc__i_; -text: .text%__1cSconvD2I_helperNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cMnegF_regNodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cHThreadsLgc_prologue6F_v_; text: .text%__1cHThreadsLgc_epilogue6F_v_; text: .text%__1cPconvI2L_regNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cPconvD2I_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4nGHandle_pnGThread__v_; text: .text%__1cUParallelScavengeHeapHcollect6MnHGCCauseFCause__v_; text: .text%__1cRCardTableModRefBSFclear6MnJMemRegion__v_; @@ -3441,18 +3231,12 @@ text: .text%__1cUPSMarkSweepDecoratorbIset_destination_decorator_perm_gen6F_v_; text: .text%__1cUPSMarkSweepDecoratorbHset_destination_decorator_tenured6F_v_; text: .text%__1cKDictionaryYalways_strong_classes_do6MpnKOopClosure__v_; text: .text%__1cQmulL_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_; -text: .text%__1cUPSAdaptiveSizePolicyUmajor_collection_end6MInHGCCauseFCause__v_; text: .text%__1cUPSAdaptiveSizePolicyWmajor_collection_begin6M_v_; text: .text%__1cIUniverseWupdate_heap_info_at_gc6F_v_; -text: .text%__1cJPSPermGenQcompute_new_size6MI_v_; text: .text%__1cKPSYoungGenHcompact6M_v_; text: .text%JVM_GetSystemPackage; text: .text%__1cPfieldDescriptorTfloat_initial_value6kM_f_; text: .text%__1cKPSYoungGenPadjust_pointers6M_v_; -text: .text%__1cQUncommonTrapBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cSDeoptimizationBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cNExceptionBlobHoops_do6MpnKOopClosure__v_: codeBlob.o; -text: .text%__1cJCodeCacheHoops_do6FpnKOopClosure__v_; text: .text%__1cJCodeCacheLgc_prologue6F_v_; text: .text%__1cJCodeCacheLgc_epilogue6F_v_; text: .text%__1cIXorINodeIadd_ring6kMpknEType_3_3_; @@ -3508,16 +3292,12 @@ text: .text%__1cSstring_compareNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%jni_GetEnv; text: .text%__1cJloadDNodeOmemory_operand6kM_pknIMachOper__; text: .text%__1cQstkI_to_regINodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cSstring_compareNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cXNativeSignatureIteratorHdo_bool6M_v_: interpreterRT_sparc.o; text: .text%Unsafe_GetNativeByte; text: .text%JVM_NanoTime; -text: .text%__1cCosNjavaTimeNanos6F_x_; text: .text%__1cOMacroAssemblerOrestore_thread6MkpnMRegisterImpl__v_; -text: .text%__1cVcompiledICHolderKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; text: .text%__1cQandL_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cIimmFOperJnum_edges6kM_I_: ad_sparc_clone.o; -text: .text%__1cHThreadsLnmethods_do6F_v_; text: .text%__1cKcmpOpFOperGnegate6M_v_: ad_sparc_clone.o; text: .text%__1cICodeBlobFflush6M_v_; text: .text%__1cFParseMdo_anewarray6M_v_; @@ -3537,8 +3317,6 @@ text: .text%__1cHnmethodSflush_dependencies6MpnRBoolObjectClosure__v_; text: .text%__1cKo2RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cQregI_to_stkINodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_method_entry6MnTAbstractInterpreterKMethodKind__pC_; -text: .text%__1cParrayKlassKlassRoop_copy_contents6MpnSPSPromotionManager_pnHoopDesc__v_; -text: .text%__1cFVTuneOdelete_nmethod6FpnHnmethod__v_; text: .text%__1cWloadConI_x43300000NodeIpipeline6kM_pknIPipeline__; text: .text%__1cFParseQdo_monitor_enter6M_v_; text: .text%__1cPorL_reg_regNodeIpipeline6kM_pknIPipeline__; @@ -3547,13 +3325,11 @@ text: .text%JVM_FindPrimitiveClass; text: .text%__1cVMoveL2D_stack_regNodeIpipeline6kM_pknIPipeline__; text: .text%__1cNTemplateTableEiop26Fn0AJOperation__v_; text: .text%__1cZInterpreterMacroAssemblerMdispatch_via6MnITosState_ppC_v_; -text: .text%__1cSmodL_reg_imm13NodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cRshrI_reg_imm5NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cJJavaCallsLcall_static6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnGThread__v_; text: .text%__1cSsubL_reg_reg_2NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cUmulL_reg_imm13_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cIDivDNodeFValue6kMpnOPhaseTransform__pknEType__; -text: .text%__1cPconvI2F_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNinstanceKlassUfind_interface_field6kMpnNsymbolOopDesc_2pnPfieldDescriptor__pnMklassOopDesc__; text: .text%__1cOstackSlotFOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cUdivL_reg_imm13_1NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; @@ -3561,7 +3337,6 @@ text: .text%__1cRSignatureIteratorHiterate6M_v_; text: .text%__1cOcmovLL_regNodeHtwo_adr6kM_I_: ad_sparc_misc.o; text: .text%__1cJname2type6Fpkc_nJBasicType__; text: .text%__1cSmulL_reg_imm13NodeIpipeline6kM_pknIPipeline__; -text: .text%__1cPBytecode_invokeLresult_type6kMpnGThread__nJBasicType__; text: .text%__1cOloadConL13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cKcmpOpFOperHgreater6kM_i_: ad_sparc_clone.o; text: .text%__1cIDivDNodeJideal_reg6kM_I_: classes.o; @@ -3569,7 +3344,6 @@ text: .text%__1cOMacroAssemblerKget_thread6M_v_; text: .text%__1cOcmovDF_regNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cOcmovIF_immNodeHtwo_adr6kM_I_: ad_sparc_misc.o; text: .text%__1cSconvI2F_helperNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cKVtableStub2n6FIi_pv_; text: .text%__1cbEJvmtiDynamicCodeEventCollector2T6M_v_; text: .text%__1cOtypeArrayKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: typeArrayKlass.o; text: .text%__1cPconvD2F_regNodeHsize_of6kM_I_: ad_sparc_misc.o; @@ -3589,7 +3363,6 @@ text: .text%__1cNTemplateTableQfast_accessfield6FnITosState__v_; text: .text%__1cKCompiledICSset_to_megamorphic6MpnICallInfo_nJBytecodesECode_pnGThread__v_; text: .text%Unsafe_StaticFieldOffset; text: .text%__1cQmulI_reg_regNodeHsize_of6kM_I_: ad_sparc_misc.o; -text: .text%__1cNTemplateTableXresolve_cache_and_index6FipnMRegisterImpl_2_v_; text: .text%__1cQaddI_reg_regNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cOcmovLI_regNodeHtwo_adr6kM_I_: ad_sparc_misc.o; text: .text%JVM_GetClassContext; @@ -3685,7 +3458,6 @@ text: .text%__1cLConvL2DNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cULinearLeastSquareFit2t6MI_v_; text: .text%__1cQdivL_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cPciObjectFactoryTget_unloaded_method6MpnPciInstanceKlass_pnIciSymbol_4_pnIciMethod__; -text: .text%__1cNReservedSpace2t6MI_v_; text: .text%__1cSCardTableExtensionVresize_covered_region6MnJMemRegion__v_; text: .text%__1cOloadI_fregNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cRCardTableModRefBSVresize_covered_region6MnJMemRegion__v_; @@ -3705,7 +3477,6 @@ text: .text%__1cOLibraryCallKitXgenerate_current_thread6MrpnENode__2_; text: .text%__1cOMacroAssemblerEfneg6MnRFloatRegisterImplFWidth_p13_v_; text: .text%__1cXNativeSignatureIteratorJdo_double6M_v_: interpreterRT_sparc.o; text: .text%__1cRtestI_reg_immNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; -text: .text%__1cNSpaceCounters2t6MpkciIpnMMutableSpace_pnSGenerationCounters__v_; text: .text%__1cLcmpF_ccNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cMNativeLookupTbase_library_lookup6Fpkc22_pC_; text: .text%jni_SetObjectField: jni.o; @@ -3725,7 +3496,6 @@ text: .text%__1cQmulD_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%Unsafe_AllocateMemory; text: .text%__1cSandL_reg_imm13NodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%JVM_GetLastErrorString; -text: .text%__1cQmodL_reg_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNTemplateTableElop26Fn0AJOperation__v_; text: .text%__1cQjava_lang_ThreadKset_daemon6FpnHoopDesc__v_; text: .text%__1cNTemplateTableEfop26Fn0AJOperation__v_; @@ -3738,7 +3508,6 @@ text: .text%__1cNTemplateTableGlstore6Fi_v_; text: .text%__1cLConvF2INodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cIciMethod2t6MpnPciInstanceKlass_pnIciSymbol_4_v_; text: .text%__1cRcompL_reg_regNodeHsize_of6kM_I_: ad_sparc_misc.o; -text: .text%__1cLconvI2BNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cLConvD2FNodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cSconvD2I_helperNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cRsubI_zero_regNodeHsize_of6kM_I_: ad_sparc_misc.o; @@ -3775,12 +3544,10 @@ text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpnMRegisterImpl_pC22_v_; text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpnMRegisterImpl_pC2_v_; text: .text%__1cTjava_lang_ThrowableLset_message6FpnHoopDesc_2_v_; text: .text%__1cOGenerateOopMapTret_jump_targets_do6MpnOBytecodeStream_pFp0ipi_vi4_v_; -text: .text%__1cPconvI2D_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%Unsafe_SetMemory; text: .text%__1cKstfSSFNodeErule6kM_I_: ad_sparc_misc.o; text: .text%__1cZInterpreterMacroAssemblerOthrow_if_not_x6MnJAssemblerJCondition_pCpnMRegisterImpl__v_; text: .text%__1cVMoveF2I_stack_regNodeLout_RegMask6kM_rknHRegMask__; -text: .text%__1cHTypePtrKadd_offset6kMi_pk0_; text: .text%__1cOcmovLI_regNodeHsize_of6kM_I_: ad_sparc_misc.o; text: .text%__1cNloadConL0NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cOcmovPI_regNodeEsize6kMpnNPhaseRegAlloc__I_; @@ -3798,7 +3565,6 @@ text: .text%__1cRMachSpillCopyNodeHsize_of6kM_I_: ad_sparc.o; text: .text%__1cQCompilerCounters2t6MpkcipnGThread__v_; text: .text%__1cOGenerateOopMapRdo_multianewarray6Mii_v_; text: .text%__1cNCompileBrokerUcompiler_thread_loop6F_v_; -text: .text%__1cbFpartialSubtypeCheck_vs_zeroNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%jni_CallStaticObjectMethodV: jni.o; text: .text%__1cNTemplateTableMfast_xaccess6FnITosState__v_; text: .text%__1cJMemRegionFminus6kMk0_0_; @@ -3836,12 +3602,10 @@ text: .text%__1cGThreadbArecord_stack_base_and_size6M_v_; text: .text%__1cNTemplateTableHcall_VM6FpnMRegisterImpl_pC2_v_; text: .text%JVM_RegisterSignal; text: .text%JVM_FindSignal; -text: .text%__1cTMaskFillerForNative2t6MnMmethodHandle_pIi_v_: oopMapCache.o; text: .text%jio_vsnprintf; text: .text%__1cQshrL_reg_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cZInterpreterMacroAssemblerTprofile_switch_case6MpnMRegisterImpl_222_v_; text: .text%__1cOCompilerThread2t6MpnMCompileQdDueue_pnQCompilerCounters__v_; -text: .text%__1cOPSVirtualSpace2t6MnNReservedSpace_I_v_; text: .text%__1cVcompiler_thread_entry6FpnKJavaThread_pnGThread__v_: thread.o; text: .text%__1cNIdealLoopTreeUmerge_many_backedges6MpnOPhaseIdealLoop__v_; text: .text%__1cODeoptimizationLUnrollBlock2T6M_v_; @@ -3857,17 +3621,13 @@ text: .text%__1cLstoreF0NodeLout_RegMask6kM_rknHRegMask__; text: .text%__1cZInterpreterMacroAssemblerWprofile_switch_default6MpnMRegisterImpl__v_; text: .text%__1cTAbstract_VM_VersionOvm_info_string6F_pkc_; text: .text%__1cJStubQdDueue2t6MpnNStubInterface_ipnFMutex_pkc_v_; -text: .text%__1cSconvF2I_helperNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cHThreadsbFdeoptimized_wrt_marked_nmethods6F_v_; -text: .text%__1cbAconvL2D_reg_slow_fxtofNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cOstackSlotFOperEdisp6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cOstackSlotFOperEbase6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; text: .text%__1cOstackSlotFOperFindex6kMpnNPhaseRegAlloc_pknENode_i_i_: ad_sparc.o; -text: .text%__1cPconvF2I_regNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cNTemplateTableGlconst6Fi_v_; text: .text%__1cLstoreC0NodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cMPeriodicTaskGenroll6M_v_; -text: .text%__1cMPeriodicTask2t6MI_v_; text: .text%__1cNTemplateTableHcastore6F_v_; text: .text%Unsafe_CompareAndSwapObject; text: .text%__1cLNamedThread2t6M_v_; @@ -3913,7 +3673,6 @@ text: .text%__1cLMoveF2INodeFValue6kMpnOPhaseTransform__pknEType__; text: .text%__1cLOptoRuntimeIl2f_Type6F_pknITypeFunc__; text: .text%__1cOMacroAssemblerUcalc_mem_param_words6MpnMRegisterImpl_2_v_; text: .text%__1cZInterpreterMacroAssemblerLprofile_ret6MnITosState_pnMRegisterImpl_3_v_; -text: .text%__1cZInterpreterMacroAssemblerUprofile_virtual_call6MpnMRegisterImpl_2_v_; text: .text%__1cZInterpreterMacroAssemblerMprofile_call6MpnMRegisterImpl__v_; text: .text%__1cLklassVtableQindex_of_miranda6MpnNsymbolOopDesc_2_i_; text: .text%__1cZInterpreterMacroAssemblerSupdate_mdp_for_ret6MnITosState_pnMRegisterImpl__v_; @@ -3922,7 +3681,6 @@ text: .text%__1cUInterpreterGeneratorLlock_method6M_v_; text: .text%__1cZInterpreterMacroAssemblerOthrow_if_not_26MpCpnMRegisterImpl_rnFLabel__v_; text: .text%__1cZInterpreterMacroAssemblerQthrow_if_not_1_x6MnJAssemblerJCondition_rnFLabel__v_; text: .text%__1cZInterpreterMacroAssemblerZget_4_byte_integer_at_bcp6MipnMRegisterImpl_2n0AKsetCCOrNot__v_; -text: .text%__1cCosHrealloc6FpvI_1_; text: .text%__1cODeoptimizationVdeoptimize_dependents6F_i_; text: .text%__1cFStateO_sub_Op_CMoveL6MpknENode__v_; text: .text%__1cZInterpreterMacroAssemblerRaccess_local_long6MpnMRegisterImpl_2_v_; @@ -4001,19 +3759,15 @@ text: .text%__1cSThreadLocalStorageHpd_init6F_v_; text: .text%__1cVMoveF2I_stack_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cVMoveL2D_stack_regNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_; text: .text%__1cWinvocationCounter_init6F_v_; -text: .text%__1cKTypeOopPtrEmake6FnHTypePtrDPTR_i_pk0_; text: .text%__1cKTypeOopPtrFxdual6kM_pknEType__; text: .text%__1cFParseMjump_if_join6MpnENode_2_2_; text: .text%__1cSinstanceKlassKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cSinstanceKlassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: instanceKlassKlass.o; -text: .text%__1cLconvP2BNodeGExpand6MpnFState_rnJNode_List__pnIMachNode__; text: .text%__1cETypeRInitialize_shared6FpnHCompile__v_; text: .text%__1cQinstanceRefKlassZupdate_nonstatic_oop_maps6FpnMklassOopDesc__v_; text: .text%__1cVInterfaceSupport_init6F_v_; -text: .text%__1cZInterpreterMacroAssemblerSsuper_call_VM_leaf6MpnMRegisterImpl_pC2_v_; text: .text%__1cPGenerationSizerQinitialize_flags6M_v_: parallelScavengeHeap.o; text: .text%__1cZInterpreterMacroAssemblerPdispatch_normal6MnITosState__v_; -text: .text%__1cJTimeStampMmilliseconds6kM_x_; text: .text%__1cDhpiZinitialize_socket_library6F_i_; text: .text%__1cDhpiYinitialize_get_interface6FpnIvm_calls__v_; text: .text%__1cWInlineCacheBuffer_init6F_v_; @@ -4030,14 +3784,12 @@ text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: ad_sparc_expand.o; text: .text%__1cMexit_globals6F_v_; text: .text%__1cSset_init_completed6F_v_; text: .text%__1cNinstanceKlassZrelease_C_heap_structures6M_v_; -text: .text%__1cJTimeStampJupdate_to6Mx_v_; text: .text%__1cUParallelScavengeHeapItop_addr6kM_ppnIHeapWord__: parallelScavengeHeap.o; text: .text%__1cCosHSolarisXinstall_signal_handlers6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: interp_masm_sparc.o; text: .text%__1cQinterpreter_init6F_v_; text: .text%__1cbCAbstractInterpreterGenerator2t6MpnJStubQdDueue__v_; text: .text%__1cRlwp_priocntl_init6F_i_: os_solaris.o; -text: .text%__1cNpriocntl_stub6FinGidtype_lipc_l_: os_solaris.o; text: .text%__1cbCAbstractInterpreterGeneratorMgenerate_all6M_v_; text: .text%__1cCosLsignal_wait6F_i_; text: .text%__1cCosNsignal_notify6Fi_v_; @@ -4050,7 +3802,6 @@ text: .text%__1cUParallelScavengeHeapEheap6F_p0_; text: .text%__1cUParallelScavengeHeapNgc_threads_do6kMpnNThreadClosure__v_; text: .text%__1cUParallelScavengeHeapYpermanent_object_iterate6MpnNObjectClosure__v_; text: .text%__1cKcmpOpFOperNgreater_equal6kM_i_: ad_sparc_clone.o; -text: .text%__1cUParallelScavengeHeapMmax_capacity6kM_I_; text: .text%__1cUParallelScavengeHeapPpost_initialize6M_v_; text: .text%__1cUParallelScavengeHeapKinitialize6M_i_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: parGCAllocBuffer.o; @@ -4067,8 +3818,6 @@ text: .text%__1cVjni_GetLongField_addr6F_pC_; text: .text%__1cNIdealLoopTreeQsplit_outer_loop6MpnOPhaseIdealLoop__v_; text: .text%__1cRLowMemoryDetectorKinitialize6F_v_; text: .text%__1cRLowMemoryDetectorbGlow_memory_detector_thread_entry6FpnKJavaThread_pnGThread__v_; -text: .text%__1cNReservedSpaceUpage_align_size_down6FI_I_; -text: .text%__1cNReservedSpaceYallocation_align_size_up6FI_I_; text: .text%__1cTloadL_unalignedNodeEsize6kMpnNPhaseRegAlloc__I_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: machnode.o; text: .text%__1cPmanagement_init6F_v_; @@ -4076,7 +3825,6 @@ text: .text%__1cOvmStructs_init6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: vmStructs.o; text: .text%__1cJvmSymbolsKinitialize6FpnGThread__v_; text: .text%__1cKManagementKinitialize6FpnGThread__v_; -text: .text%__1cKManagementWrecord_vm_startup_time6Fxx_v_; text: .text%__1cIVMThreadGcreate6F_v_; text: .text%__1cIVMThreadDrun6M_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: management.o; @@ -4103,11 +3851,9 @@ text: .text%__1cLmethodKlassOset_alloc_size6MI_v_: methodKlass.o; text: .text%__1cQvtableStubs_init6F_v_; text: .text%__1cKi0RegPOperKin_RegMask6kMi_pknHRegMask__; text: .text%__1cKg1RegPOperKin_RegMask6kMi_pknHRegMask__; -text: .text%__1cFVTuneEexit6F_v_; text: .text%__1cLmethodKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: methodKlass.o; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: methodLiveness.o; text: .text%__1cMMutableSpaceOobject_iterate6MpnNObjectClosure__v_; -text: .text%__1cKvtune_init6F_v_; text: .text%__1cKmutex_init6F_v_; text: .text%__1cQaccessFlags_init6F_v_; text: .text%__1cOMacroAssemblerMcall_VM_leaf6MpnMRegisterImpl_pC222_v_; @@ -4136,7 +3882,6 @@ text: .text%__1cQJNI_FastGetFieldbDgenerate_fast_get_short_field6F_pC_; text: .text%__1cQJNI_FastGetFieldbBgenerate_fast_get_int_field6F_pC_; text: .text%__1cQJNI_FastGetFieldbCgenerate_fast_get_long_field6F_pC_; text: .text%__1cTtypeArrayKlassKlassSallocate_permanent6kMrnLKlassHandle_ipnGThread__pv_: typeArrayKlassKlass.o; -text: .text%__1cIUniversePcheck_alignment6FIIpkc_v_; text: .text%__1cIUniverseHgenesis6FpnGThread__v_; text: .text%__1cVquicken_jni_functions6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: oopMap.o; @@ -4222,7 +3967,6 @@ text: .text%__1cJBytecodesNpd_initialize6F_v_; text: .text%__1cHCompileRpd_compiler2_init6F_v_; text: .text%__1cKC2CompilerKinitialize6M_v_; text: .text%__1cRCardTableModRefBS2t6MnJMemRegion_i_v_; -text: .text%__1cRCardTableModRefBSbBct_max_alignment_constraint6F_I_; text: .text%__1cMciArrayKlass2t6MpnIciSymbol_ipnHciKlass__v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: relocInfo.o; text: .text%__1cMciKlassKlassEmake6F_p0_; @@ -4267,13 +4011,9 @@ text: .text%__1cNTemplateTableDnop6F_v_; text: .text%__1cNTemplateTableSshouldnotreachhere6F_v_; text: .text%__1cNTemplateTableLaconst_null6F_v_; text: .text%__1cKPSYoungGenbCreset_survivors_after_shrink6M_v_; -text: .text%__1cKPSYoungGenQlimit_gen_shrink6MI_I_; -text: .text%__1cKPSYoungGenRavailable_to_live6M_I_; text: .text%__1cSDeoptimizationBlobGcreate6FpnKCodeBuffer_pnJOopMapSet_iiii_p0_; text: .text%__1cLOptoRuntimeUmultianewarray2_Type6F_pknITypeFunc__; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: ad_sparc_pipeline.o; -text: .text%__1cUAdjoiningGenerations2t6MnNReservedSpace_IIIIIII_v_; -text: .text%__1cWAdjoiningVirtualSpaces2t6MnNReservedSpace_III_v_; text: .text%__1cOchunkpool_init6F_v_; text: .text%__1cFChunkbDstart_chunk_pool_cleaner_task6F_v_; text: .text%__1cJArgumentsWinit_system_properties6F_v_; @@ -4367,7 +4107,6 @@ text: .text%__1cNGCTaskManagerKinitialize6M_v_; text: .text%__1cNGCTaskManagerKthreads_do6MpnNThreadClosure__v_; text: .text%__1cPPerfDataManagerHdestroy6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: genCollectedHeap.o; -text: .text%__1cJGenRemSetYmax_alignment_constraint6Fn0AEName__I_; text: .text%__1cWResolveOopMapConflictsUdo_potential_rewrite6MpnGThread__nMmethodHandle__; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: generateOopMap.o; text: .text%__1cOThreadCriticalKinitialize6F_v_; @@ -4389,7 +4128,6 @@ text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: fprofiler.o; text: .text%__1cFframeVinterpreter_frame_mdp6kM_pC_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: phase.o; text: .text%__1cKPerfMemoryUdelete_memory_region6F_v_; -text: .text%__1cKPerfMemoryUcreate_memory_region6FI_v_; text: .text%__1cbBcleanup_sharedmem_resources6Fpkc_v_: perfMemory_solaris.o; text: .text%__1cPperfMemory_exit6F_v_; text: .text%__1cPperfMemory_init6F_v_; @@ -4420,9 +4158,6 @@ text: .text%__1cNTemplateTableGcaload6F_v_; text: .text%__1cNTemplateTableMfast_icaload6F_v_; text: .text%__1cNTemplateTableGsaload6F_v_; text: .text%__1cKPSYoungGenPinitialize_work6M_v_; -text: .text%__1cKPSYoungGenKinitialize6MnNReservedSpace_I_v_; -text: .text%__1cKPSYoungGenYinitialize_virtual_space6MnNReservedSpace_I_v_; -text: .text%__1cKPSYoungGen2t6MIII_v_; text: .text%__1cNTemplateTableHaload_06F_v_; text: .text%__1cNTemplateTableGistore6F_v_; text: .text%__1cNTemplateTableGlstore6F_v_; @@ -4440,15 +4175,10 @@ text: .text%__1cNTemplateTableLtableswitch6F_v_; text: .text%__1cNTemplateTableMlookupswitch6F_v_; text: .text%__1cNTemplateTableRfast_linearswitch6F_v_; text: .text%__1cNTemplateTableRfast_binaryswitch6F_v_; -text: .text%__1cNCompileBrokerVinit_compiler_threads6Fi_v_; -text: .text%__1cJPSPermGen2t6MnNReservedSpace_IIIIpkci_v_; text: .text%__1cNCompileBrokerQset_should_block6F_v_; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: compileBroker.o; text: .text%__1cNTemplateTableIgetfield6Fi_v_; text: .text%__1cNTemplateTableJgetstatic6Fi_v_; -text: .text%__1cIPSOldGenKinitialize6MnNReservedSpace_Ipkci_v_; -text: .text%__1cIPSOldGen2t6MIIIpkci_v_; -text: .text%__1cIPSOldGen2t6MnNReservedSpace_IIIIpkci_v_; text: .text%__1cVcompiledICHolderKlassMcreate_klass6FpnGThread__pnMklassOopDesc__; text: .text%__1cU__STATIC_CONSTRUCTOR6F_v_: psMarkSweep.o; text: .text%__1cNTemplateTableIputfield6Fi_v_; From 2d791621a41bdbc9adf5aad41b6eea2aa02b8375 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Wed, 6 Oct 2010 12:19:54 +0400 Subject: [PATCH 051/722] 6853488: REGRESSION : A black background is seen for a transparent animated gif image for splash screen Reviewed-by: igor, prr --- jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c index bac88dc1166..a26dd2416be 100644 --- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c +++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c @@ -277,7 +277,7 @@ SplashDecodeGif(Splash * splash, GifFileType * gif) ImageRect dstRect; rgbquad_t fillColor = 0; // 0 is transparent - if (transparentColor > 0) { + if (transparentColor < 0) { fillColor= MAKE_QUAD_GIF( colorMap->Colors[gif->SBackGroundColor], 0xff); } From 7752677d6c68b629b05da5ce05121a3d324eddea Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Wed, 6 Oct 2010 16:42:15 +0400 Subject: [PATCH 052/722] 6979541: closed/javax/swing/plaf/basic/AWTEventListenerLeak/AWTEventListenerLeak.java fails Reviewed-by: anthony, ant --- jdk/src/share/classes/sun/awt/SunToolkit.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/classes/sun/awt/SunToolkit.java b/jdk/src/share/classes/sun/awt/SunToolkit.java index 984cb11cc69..21c0906d4aa 100644 --- a/jdk/src/share/classes/sun/awt/SunToolkit.java +++ b/jdk/src/share/classes/sun/awt/SunToolkit.java @@ -313,6 +313,11 @@ public abstract class SunToolkit extends Toolkit */ public static AppContext createNewAppContext() { ThreadGroup threadGroup = Thread.currentThread().getThreadGroup(); + // Create appContext before initialization of EventQueue, so all + // the calls to AppContext.getAppContext() from EventQueue ctor + // return correct values + AppContext appContext = new AppContext(threadGroup); + EventQueue eventQueue; String eqName = System.getProperty("AWT.EventQueueClass", "java.awt.EventQueue"); @@ -322,7 +327,6 @@ public abstract class SunToolkit extends Toolkit System.err.println("Failed loading " + eqName + ": " + e); eventQueue = new EventQueue(); } - AppContext appContext = new AppContext(threadGroup); appContext.put(AppContext.EVENT_QUEUE_KEY, eventQueue); PostEventQueue postEventQueue = new PostEventQueue(eventQueue); From f91d0d4e60e4e8ed3a27fe314cf1e234dbade4ad Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Thu, 7 Oct 2010 00:59:40 -0700 Subject: [PATCH 053/722] 6714797: InitialContext.close does not close NIO socket connections Reviewed-by: asaha --- .../transport/CorbaConnectionCacheBase.java | 11 ++++++++- .../transport/CorbaTransportManagerImpl.java | 11 ++++++++- .../SocketOrChannelConnectionImpl.java | 23 +++++++++++++++++++ .../se/pept/transport/ConnectionCache.java | 6 +++++ .../se/spi/transport/CorbaConnection.java | 4 ++++ 5 files changed, 53 insertions(+), 2 deletions(-) diff --git a/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaConnectionCacheBase.java b/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaConnectionCacheBase.java index d8608f21ab5..0cbce53ffc1 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaConnectionCacheBase.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaConnectionCacheBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import com.sun.corba.se.pept.transport.ConnectionCache; import com.sun.corba.se.spi.logging.CORBALogDomains; import com.sun.corba.se.spi.orb.ORB; +import com.sun.corba.se.spi.transport.CorbaConnection; import com.sun.corba.se.spi.transport.CorbaConnectionCache; import com.sun.corba.se.impl.logging.ORBUtilSystemException; @@ -87,6 +88,14 @@ public abstract class CorbaConnectionCacheBase } } + public void close() { + synchronized (backingStore()) { + for (Object obj : values()) { + ((CorbaConnection)obj).closeConnectionResources() ; + } + } + } + public long numberOfIdleConnections() { long count = 0; diff --git a/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaTransportManagerImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaTransportManagerImpl.java index 5f56b560a95..fae2d157969 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaTransportManagerImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/CorbaTransportManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,7 @@ import org.omg.CORBA.INTERNAL; import org.omg.CORBA.CompletionStatus; import com.sun.corba.se.pept.transport.Acceptor; +import com.sun.corba.se.pept.transport.ConnectionCache; import com.sun.corba.se.pept.transport.ByteBufferPool; import com.sun.corba.se.pept.transport.ContactInfo; import com.sun.corba.se.pept.transport.InboundConnectionCache; @@ -49,6 +50,8 @@ import com.sun.corba.se.spi.ior.ObjectAdapterId; import com.sun.corba.se.spi.orb.ORB; import com.sun.corba.se.spi.transport.CorbaAcceptor; import com.sun.corba.se.spi.transport.CorbaTransportManager; +import com.sun.corba.se.pept.transport.Connection; +import com.sun.corba.se.pept.transport.ConnectionCache; // REVISIT - impl/poa specific: import com.sun.corba.se.impl.oa.poa.Policies; @@ -182,6 +185,12 @@ public class CorbaTransportManagerImpl if (orb.transportDebugFlag) { dprint(".close->"); } + for (Object cc : outboundConnectionCaches.values()) { + ((ConnectionCache)cc).close() ; + } + for (Object cc : inboundConnectionCaches.values()) { + ((ConnectionCache)cc).close() ; + } getSelector(0).close(); } finally { if (orb.transportDebugFlag) { diff --git a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java index e294067184e..913cd903755 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java @@ -811,6 +811,7 @@ public class SocketOrChannelConnectionImpl dprint(".close: " + this, e); } } + closeConnectionResources(); } finally { if (orb.transportDebugFlag) { dprint(".close<-: " + this); @@ -818,6 +819,28 @@ public class SocketOrChannelConnectionImpl } } + public void closeConnectionResources() { + if (orb.transportDebugFlag) { + dprint(".closeConnectionResources->: " + this); + } + Selector selector = orb.getTransportManager().getSelector(0); + selector.unregisterForEvent(this); + try { + if (socketChannel != null) + socketChannel.close() ; + if (socket != null && !socket.isClosed()) + socket.close() ; + } catch (IOException e) { + if (orb.transportDebugFlag) { + dprint( ".closeConnectionResources: " + this, e ) ; + } + } + if (orb.transportDebugFlag) { + dprint(".closeConnectionResources<-: " + this); + } + } + + public Acceptor getAcceptor() { return acceptor; diff --git a/corba/src/share/classes/com/sun/corba/se/pept/transport/ConnectionCache.java b/corba/src/share/classes/com/sun/corba/se/pept/transport/ConnectionCache.java index d5bee7d927f..ac926d063c0 100644 --- a/corba/src/share/classes/com/sun/corba/se/pept/transport/ConnectionCache.java +++ b/corba/src/share/classes/com/sun/corba/se/pept/transport/ConnectionCache.java @@ -41,6 +41,12 @@ public interface ConnectionCache public long numberOfBusyConnections(); public boolean reclaim(); + + /** Close all connections in the connection cache. + * This is used as a final cleanup, and will result + * in abrupt termination of any pending communications. + */ + public void close(); } // End of file. diff --git a/corba/src/share/classes/com/sun/corba/se/spi/transport/CorbaConnection.java b/corba/src/share/classes/com/sun/corba/se/spi/transport/CorbaConnection.java index b0e3f6f04dc..c7ec1ac0aa1 100644 --- a/corba/src/share/classes/com/sun/corba/se/spi/transport/CorbaConnection.java +++ b/corba/src/share/classes/com/sun/corba/se/spi/transport/CorbaConnection.java @@ -163,6 +163,10 @@ public interface CorbaConnection // REVISIT - MessageMediator parameter? public void serverRequestProcessingBegins(); public void serverRequestProcessingEnds(); + + /** Clean up all connection resources. Used when shutting down an ORB. + */ + public void closeConnectionResources(); } // End of file. From 7720bcf09cf6dd5aa90a371882d25dbbe9683618 Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Thu, 7 Oct 2010 00:49:05 -0700 Subject: [PATCH 054/722] 6893109: memory leak in readObject() and writeObject() using idlj from jdk 1.6.0_14 Reviewed-by: asaha --- .../tools/corba/se/idl/toJavaPortable/Stub.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Stub.java b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Stub.java index 3efe5609535..2020fd68f89 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Stub.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Stub.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -344,17 +344,26 @@ public class Stub implements AuxGen stream.println (" String str = s.readUTF ();"); stream.println (" String[] args = null;"); stream.println (" java.util.Properties props = null;"); - stream.println (" org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);"); - stream.println (" org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();"); + stream.println (" org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);"); + stream.println (" try {"); + stream.println (" org.omg.CORBA.Object obj = orb.string_to_object (str);"); stream.println (" _set_delegate (delegate);"); + stream.println (" } finally {"); + stream.println (" orb.destroy() ;"); + stream.println (" }"); stream.println (" }"); stream.println (); stream.println (" private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException"); stream.println (" {"); stream.println (" String[] args = null;"); stream.println (" java.util.Properties props = null;"); - stream.println (" String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);"); + stream.println (" org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);"); + stream.println (" try {"); + stream.println (" String str = orb.object_to_string (this);"); stream.println (" s.writeUTF (str);"); + stream.println (" } finally {"); + stream.println (" orb.destroy() ;"); + stream.println (" }"); stream.println (" }"); } From d22fa91e8641aff09ee90c20deb7b054d39fbe07 Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Thu, 7 Oct 2010 00:51:42 -0700 Subject: [PATCH 055/722] 6896157: unsynchronized hashmap in com.sun.corba.se.impl.transport.SelectorImpl.createReaderThread Reviewed-by: asaha --- .../corba/se/impl/transport/SelectorImpl.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java index 8686439b84f..1c60088a7a3 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.util.ArrayList; import java.util.HashMap; +import java.util.Map; import java.util.Iterator; import java.util.List; @@ -66,7 +67,7 @@ public class SelectorImpl private List deferredRegistrations; private List interestOpsList; private HashMap listenerThreads; - private HashMap readerThreads; + private Map readerThreads; private boolean selectorStarted; private boolean closed; private ORBUtilSystemException wrapper ; @@ -81,7 +82,7 @@ public class SelectorImpl deferredRegistrations = new ArrayList(); interestOpsList = new ArrayList(); listenerThreads = new HashMap(); - readerThreads = new HashMap(); + readerThreads = java.util.Collections.synchronizedMap(new HashMap()); closed = false; wrapper = ORBUtilSystemException.get(orb,CORBALogDomains.RPC_TRANSPORT); } @@ -178,8 +179,13 @@ public class SelectorImpl } if (eventHandler.shouldUseSelectThreadToWait()) { - SelectionKey selectionKey = eventHandler.getSelectionKey(); - selectionKey.cancel(); + SelectionKey selectionKey ; + synchronized(deferredRegistrations) { + selectionKey = eventHandler.getSelectionKey(); + } + if (selectionKey != null) { + selectionKey.cancel(); + } selector.wakeup(); return; } From a30e55aedd15f22214327e9f6c27d0a87092a8e0 Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Thu, 7 Oct 2010 00:53:49 -0700 Subject: [PATCH 056/722] 6929137: java-corba: Locking too broad in com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl Reviewed-by: asaha --- .../protocol/CorbaClientRequestDispatcherImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java index 5c7555f3c70..d44873bd787 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,9 +122,6 @@ public class CorbaClientRequestDispatcherImpl implements ClientRequestDispatcher { - // Used for locking - private Object lock = new Object(); - public OutputObject beginRequest(Object self, String opName, boolean isOneWay, ContactInfo contactInfo) { @@ -151,7 +148,8 @@ public class CorbaClientRequestDispatcherImpl // This locking is done so that multiple connections are not created // for the same endpoint - synchronized (lock) { + //6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints + synchronized (contactInfo) { if (contactInfo.isConnectionBased()) { if (contactInfo.shouldCacheConnection()) { connection = (CorbaConnection) @@ -256,7 +254,7 @@ public class CorbaClientRequestDispatcherImpl registerWaiter(messageMediator); // Do connection reclaim now - synchronized (lock) { + synchronized (contactInfo) { if (contactInfo.isConnectionBased()) { if (contactInfo.shouldCacheConnection()) { OutboundConnectionCache connectionCache = From 9c7a01ef27f20d185410bc72765e02bf92beaab8 Mon Sep 17 00:00:00 2001 From: Sunita Koppar Date: Thu, 7 Oct 2010 01:03:51 -0700 Subject: [PATCH 057/722] 6948223: Corba issue, fail to reload object Reviewed-by: asaha --- .../sun/corba/se/impl/oa/poa/AOMEntry.java | 28 +++++++++++++++++-- .../impl/oa/poa/POAPolicyMediatorBase_R.java | 10 ++----- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/AOMEntry.java b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/AOMEntry.java index b7564e716e4..d906afef923 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/AOMEntry.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/AOMEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,6 +45,10 @@ import com.sun.corba.se.spi.orbutil.fsm.StateEngineFactory ; import com.sun.corba.se.impl.orbutil.concurrent.Mutex ; import com.sun.corba.se.impl.orbutil.concurrent.CondVar ; +import org.omg.CORBA.SystemException ; + +import org.omg.PortableServer.POAPackage.ObjectAlreadyActive ; + /** AOMEntry represents a Servant or potential Servant in the ActiveObjectMap. * It may be in several states to allow for long incarnate or etherealize operations. * The methods on this class mostly represent input symbols to the state machine @@ -121,6 +125,12 @@ public class AOMEntry extends FSMImpl { } } ; + private static Action oaaAction = new ActionBase( "throwObjectAlreadyActive" ) { + public void doIt( FSM fsm, Input in ) { + throw new RuntimeException( new ObjectAlreadyActive() ) ; + } + } ; + private static Guard waitGuard = new GuardBase( "wait" ) { public Guard.Result evaluate( FSM fsm, Input in ) { AOMEntry entry = (AOMEntry)fsm ; @@ -173,19 +183,23 @@ public class AOMEntry extends FSMImpl { engine.add( INCARN, START_ETH, waitGuard, null, INCARN ) ; engine.add( INCARN, INC_DONE, null, VALID ) ; engine.add( INCARN, INC_FAIL, decrementAction, INVALID ) ; + engine.add( INCARN, ACTIVATE, oaaAction, INCARN ) ; engine.add( VALID, ENTER, incrementAction, VALID ) ; engine.add( VALID, EXIT, decrementAction, VALID ) ; engine.add( VALID, START_ETH, greaterZeroGuard, null, ETHP ) ; engine.add( VALID, START_ETH, zeroGuard, null, ETH ) ; + engine.add( VALID, ACTIVATE, oaaAction, VALID ) ; engine.add( ETHP, ENTER, waitGuard, null, ETHP ) ; engine.add( ETHP, START_ETH, null, ETHP ) ; engine.add( ETHP, EXIT, greaterOneGuard, decrementAction, ETHP ) ; engine.add( ETHP, EXIT, oneGuard, decrementAction, ETH ) ; + engine.add( ETHP, ACTIVATE, oaaAction, ETHP ) ; engine.add( ETH, START_ETH, null, ETH ) ; engine.add( ETH, ETH_DONE, null, DESTROYED ) ; + engine.add( ETH, ACTIVATE, oaaAction, ETH ) ; engine.add( ETH, ENTER, waitGuard, null, ETH ) ; engine.setDefault( DESTROYED, throwIllegalStateExceptionAction, DESTROYED ) ; @@ -217,7 +231,17 @@ public class AOMEntry extends FSMImpl { public void etherealizeComplete() { doIt( ETH_DONE ) ; } public void incarnateComplete() { doIt( INC_DONE ) ; } public void incarnateFailure() { doIt( INC_FAIL ) ; } - public void activateObject() { doIt( ACTIVATE ) ; } + public void activateObject() throws ObjectAlreadyActive { + try { + doIt( ACTIVATE ) ; + } catch (RuntimeException exc) { + Throwable thr = exc.getCause() ; + if (thr instanceof ObjectAlreadyActive) + throw (ObjectAlreadyActive)thr ; + else + throw exc ; + } + } public void enter() { doIt( ENTER ) ; } public void exit() { doIt( EXIT ) ; } } diff --git a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java index b396ac5227d..1bc9130e109 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -107,13 +107,9 @@ public abstract class POAPolicyMediatorBase_R extends POAPolicyMediatorBase { throw new ServantAlreadyActive(); ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ; - // Note that this can't happen for system assigned IDs since the - // POA never hands out the same ID. However, we make this redundant - // check here to share the code. - if (activeObjectMap.containsKey(key)) - throw new ObjectAlreadyActive() ; - AOMEntry entry = activeObjectMap.get( key ) ; + + // Check for an ObjectAlreadyActive error entry.activateObject() ; activateServant( key, entry, servant ) ; } From 8b789531bf8198a9b1fe6b4d7fc75b5fd05b1abd Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Thu, 7 Oct 2010 12:25:23 +0400 Subject: [PATCH 058/722] 6975884: sun/java2d/SunGraphics2D/DrawImageBilinear.java failed Reviewed-by: prr --- .../sun/java2d/SunGraphics2D/DrawImageBilinear.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jdk/test/sun/java2d/SunGraphics2D/DrawImageBilinear.java b/jdk/test/sun/java2d/SunGraphics2D/DrawImageBilinear.java index cb664731e7b..ddc4b74e06b 100644 --- a/jdk/test/sun/java2d/SunGraphics2D/DrawImageBilinear.java +++ b/jdk/test/sun/java2d/SunGraphics2D/DrawImageBilinear.java @@ -104,7 +104,9 @@ public class DrawImageBilinear extends Canvas { // second time will be a texture->surface blit g2d.drawImage(bimg2, 80, 10, 40, 40, null); - g2d.drawImage(bimg2, 80, 10, 40, 40, null); + if (!skipOglTextureTest) { + g2d.drawImage(bimg2, 80, 10, 40, 40, null); + } // third time will be a pbuffer->surface blit if (vimg.validate(getGraphicsConfiguration()) != VolatileImage.IMAGE_OK) { @@ -150,6 +152,8 @@ public class DrawImageBilinear extends Canvas { } } + private static boolean skipOglTextureTest = false; + public static void main(String[] args) { boolean show = false; for (String arg : args) { @@ -158,6 +162,11 @@ public class DrawImageBilinear extends Canvas { } } + String arch = System.getProperty("os.arch"); + boolean isOglEnabled = Boolean.getBoolean("sun.java2d.opengl"); + skipOglTextureTest = isOglEnabled && ("sparc".equals(arch)); + System.out.println("Skip OpenGL texture test: " + skipOglTextureTest); + DrawImageBilinear test = new DrawImageBilinear(); Frame frame = new Frame(); frame.add(test); From cdf0f01c92a73c44d69eb26b6c2a01798d2f2bf2 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Thu, 7 Oct 2010 12:48:16 +0400 Subject: [PATCH 059/722] 6979793: closed/javax/swing/JFileChooser/6396844/TwentyThousandTest fails due FileNotFound exc Reviewed-by: malenkov --- .../6396844/TwentyThousandTest.java | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 jdk/test/javax/swing/JFileChooser/6396844/TwentyThousandTest.java diff --git a/jdk/test/javax/swing/JFileChooser/6396844/TwentyThousandTest.java b/jdk/test/javax/swing/JFileChooser/6396844/TwentyThousandTest.java new file mode 100644 index 00000000000..2e244a380d6 --- /dev/null +++ b/jdk/test/javax/swing/JFileChooser/6396844/TwentyThousandTest.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6396844 + * @summary Tests memory leak for 20000 files + * @author Sergey Malenkov + * @run main/othervm/timeout=1000 -mx256m TwentyThousandTest + */ + +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.FileWriter; + +public class TwentyThousandTest implements ActionListener, Runnable { + + private static final int FILES = 20000; + private static final int ATTEMPTS = 100; + private static final int INTERVAL = 100; + + private static final boolean ALWAYS_NEW_INSTANCE = false; + private static final boolean UPDATE_UI_EACH_INTERVAL = true; + private static final boolean AUTO_CLOSE_DIALOG = true; + + private static JFileChooser CHOOSER; + + private static String tmpDir; + + public static void main(String[] args) throws Exception { + tmpDir = System.getProperty("java.io.tmpdir"); + + if (tmpDir.length() == 0) { //'java.io.tmpdir' isn't guaranteed to be defined + tmpDir = System.getProperty("user.home"); + } + + System.out.println("Temp directory: " + tmpDir); + + System.out.println("Creating " + FILES + " files"); + + for (int i = 0; i < FILES; i++) { + File file = getTempFile(i); + + FileWriter writer = new FileWriter(file); + writer.write("File " + i); + writer.close(); + } + + for (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) { + if (laf.getClassName().contains("Motif")) { + continue; + } + + UIManager.setLookAndFeel(laf.getClassName()); + + System.out.println("Do " + ATTEMPTS + " attempts for " + laf.getClassName()); + + for ( int i = 0; i < ATTEMPTS; i++ ) { + System.out.print(i + " "); + + doAttempt(); + } + + System.out.println(); + + CHOOSER = null; + } + + System.out.println("Removing " + FILES + " files"); + + for (int i = 0; i < FILES; i++) { + getTempFile(i).delete(); + } + + System.out.println( "Test passed successfully" ); + } + + private static File getTempFile(int i) { + return new File(tmpDir, "temp" + i + ".txt"); + } + + private static void doAttempt() throws Exception { + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + if ( ALWAYS_NEW_INSTANCE || ( CHOOSER == null ) ) + CHOOSER = new JFileChooser(tmpDir); + + if ( UPDATE_UI_EACH_INTERVAL ) + CHOOSER.updateUI(); + + if ( AUTO_CLOSE_DIALOG ) { + Thread t = new Thread( new TwentyThousandTest( CHOOSER ) ); + t.start(); + CHOOSER.showOpenDialog( null ); + } else { + CHOOSER.showOpenDialog( null ); + } + } + }); + + // Allow to collect garbage by GC + Thread.sleep(1000); + + System.gc(); + } + + private final JFileChooser chooser; + + TwentyThousandTest( JFileChooser chooser ) { + this.chooser = chooser; + } + + public void run() { + while ( !this.chooser.isShowing() ) { + try { + Thread.sleep( 30 ); + } catch ( InterruptedException exception ) { + exception.printStackTrace(); + } + } + Timer timer = new Timer( INTERVAL, this ); + timer.setRepeats( false ); + timer.start(); + } + + public void actionPerformed( ActionEvent event ) { + this.chooser.cancelSelection(); + } +} From 1e7137761d9a750e9417c537b07bf4f5108c5ecd Mon Sep 17 00:00:00 2001 From: Alex Menkov Date: Thu, 7 Oct 2010 18:13:20 +0400 Subject: [PATCH 060/722] 6984047: sound sources needs vendor rebranding changes (jdk7 only) Reviewed-by: ohair --- .../share/classes/com/sun/media/sound/RealTimeSequencer.java | 2 +- jdk/src/share/classes/javax/sound/sampled/AudioSystem.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java b/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java index a66d672f258..96ea4775fe4 100644 --- a/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java +++ b/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java @@ -1069,7 +1069,7 @@ class RealTimeSequencer extends AbstractMidiDevice implements Sequencer, AutoCon private static class RealTimeSequencerInfo extends MidiDevice.Info { private static final String name = "Real Time Sequencer"; - private static final String vendor = "Sun Microsystems"; + private static final String vendor = "Oracle Corporation"; private static final String description = "Software sequencer"; private static final String version = "Version 1.0"; diff --git a/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java b/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java index d5f4e38c94e..3724cc2cdac 100644 --- a/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java +++ b/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java @@ -63,7 +63,7 @@ import com.sun.media.sound.JDK13Services; *

    Properties can be used to specify the default mixer * for specific line types. * Both system properties and a properties file are considered. - * In the Sun reference implementation, the properties file is + * In the Oracle reference implementation, the properties file is * "lib/sound.properties" in the JRE * directory. If a property exists both as a system property and in the * properties file, the system property takes precedence. If none is From b6584fa0ab933043fadc719d2050d96ab0a85edf Mon Sep 17 00:00:00 2001 From: Alex Menkov Date: Thu, 7 Oct 2010 18:23:13 +0400 Subject: [PATCH 061/722] 6986335: 10 regtest failures (test/javax/sound/midi/Gervil) due AudioFloatConverter.PCM_FLOAT not found Reviewed-by: dav --- .../midi/Gervill/AudioFloatConverter/ToFloatArray.java | 2 +- .../Gervill/SoftAudioSynthesizer/DummySourceDataLine.java | 8 ++++---- .../midi/Gervill/SoftSynthesizer/DummySourceDataLine.java | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jdk/test/javax/sound/midi/Gervill/AudioFloatConverter/ToFloatArray.java b/jdk/test/javax/sound/midi/Gervill/AudioFloatConverter/ToFloatArray.java index 639b9db34e9..52c0491f101 100644 --- a/jdk/test/javax/sound/midi/Gervill/AudioFloatConverter/ToFloatArray.java +++ b/jdk/test/javax/sound/midi/Gervill/AudioFloatConverter/ToFloatArray.java @@ -47,7 +47,7 @@ public class ToFloatArray { for (int big = 0; big < 2; big+=1) for (int bits = 32; bits <= 64; bits+=32) { AudioFormat frm = new AudioFormat( - AudioFloatConverter.PCM_FLOAT, + AudioFormat.Encoding.PCM_FLOAT, 44100, bits, 1, bits/8, 44100, big==1); byte[] buff = new byte[testarray.length * frm.getFrameSize()]; diff --git a/jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/DummySourceDataLine.java b/jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/DummySourceDataLine.java index ae8ea108971..9f3ff0c956a 100644 --- a/jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/DummySourceDataLine.java +++ b/jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/DummySourceDataLine.java @@ -84,16 +84,16 @@ public class DummySourceDataLine implements SourceDataLine { AudioSystem.NOT_SPECIFIED, bits, channels, channels * bits / 8, AudioSystem.NOT_SPECIFIED, true)); } - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4, AudioSystem.NOT_SPECIFIED, false)); - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4, AudioSystem.NOT_SPECIFIED, true)); - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8, AudioSystem.NOT_SPECIFIED, false)); - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8, AudioSystem.NOT_SPECIFIED, true)); } diff --git a/jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/DummySourceDataLine.java b/jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/DummySourceDataLine.java index ae8ea108971..9f3ff0c956a 100644 --- a/jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/DummySourceDataLine.java +++ b/jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/DummySourceDataLine.java @@ -84,16 +84,16 @@ public class DummySourceDataLine implements SourceDataLine { AudioSystem.NOT_SPECIFIED, bits, channels, channels * bits / 8, AudioSystem.NOT_SPECIFIED, true)); } - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4, AudioSystem.NOT_SPECIFIED, false)); - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4, AudioSystem.NOT_SPECIFIED, true)); - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8, AudioSystem.NOT_SPECIFIED, false)); - formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT, + formats.add(new AudioFormat(Encoding.PCM_FLOAT, AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8, AudioSystem.NOT_SPECIFIED, true)); } From 39992cab03e5c391d32977f557fa22f7d6d7d512 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Thu, 7 Oct 2010 08:06:06 -0700 Subject: [PATCH 062/722] 6983240: guarantee((Solaris::min_stack_allowed >= (StackYellowPages+StackRedPages...) wrong Min_stack_allowed is a compile time constant and Stack*Pages are settable Reviewed-by: dholmes, kvn --- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp | 2 +- hotspot/src/os/linux/vm/os_linux.cpp | 19 +++++++++++++++---- hotspot/src/os/solaris/vm/os_solaris.cpp | 13 ++++++------- hotspot/src/os/windows/vm/os_windows.cpp | 16 +++++++++++++++- hotspot/src/share/vm/runtime/arguments.cpp | 3 ++- hotspot/src/share/vm/utilities/exceptions.cpp | 14 +++++++++++++- 6 files changed, 52 insertions(+), 15 deletions(-) diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp index e8cd888cd71..b6c08684fff 100644 --- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp @@ -346,7 +346,7 @@ void trace_method_handle_stub(const char* adaptername, if (stack_dump_count > 64) stack_dump_count = 48; for (i = 0; i < stack_dump_count; i += 4) { printf(" dump at SP[%d] "INTPTR_FORMAT": "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT"\n", - i, &entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]); + i, (intptr_t)&entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]); } print_method_handle(mh); } diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index 38eea57f743..e42507f4aa7 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -827,8 +827,10 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) { switch (thr_type) { case os::java_thread: - // Java threads use ThreadStackSize which default value can be changed with the flag -Xss - if (JavaThread::stack_size_at_create() > 0) stack_size = JavaThread::stack_size_at_create(); + // Java threads use ThreadStackSize which default value can be + // changed with the flag -Xss + assert (JavaThread::stack_size_at_create() > 0, "this should be set"); + stack_size = JavaThread::stack_size_at_create(); break; case os::compiler_thread: if (CompilerThreadStackSize > 0) { @@ -3922,12 +3924,21 @@ jint os::init_2(void) Linux::signal_sets_init(); Linux::install_signal_handlers(); + // Check minimum allowable stack size for thread creation and to initialize + // the java system classes, including StackOverflowError - depends on page + // size. Add a page for compiler2 recursion in main thread. + // Add in 2*BytesPerWord times page size to account for VM stack during + // class initialization depending on 32 or 64 bit VM. + os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed, + (size_t)(StackYellowPages+StackRedPages+StackShadowPages+ + 2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size()); + size_t threadStackSizeInBytes = ThreadStackSize * K; if (threadStackSizeInBytes != 0 && - threadStackSizeInBytes < Linux::min_stack_allowed) { + threadStackSizeInBytes < os::Linux::min_stack_allowed) { tty->print_cr("\nThe stack size specified is too small, " "Specify at least %dk", - Linux::min_stack_allowed / K); + os::Linux::min_stack_allowed/ K); return JNI_ERR; } diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp index 0db63b82f10..08a16b76369 100644 --- a/hotspot/src/os/solaris/vm/os_solaris.cpp +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp @@ -4878,18 +4878,17 @@ jint os::init_2(void) { // Check minimum allowable stack size for thread creation and to initialize // the java system classes, including StackOverflowError - depends on page // size. Add a page for compiler2 recursion in main thread. - // Add in BytesPerWord times page size to account for VM stack during + // Add in 2*BytesPerWord times page size to account for VM stack during // class initialization depending on 32 or 64 bit VM. - guarantee((Solaris::min_stack_allowed >= - (StackYellowPages+StackRedPages+StackShadowPages+BytesPerWord - COMPILER2_PRESENT(+1)) * page_size), - "need to increase Solaris::min_stack_allowed on this platform"); + os::Solaris::min_stack_allowed = MAX2(os::Solaris::min_stack_allowed, + (size_t)(StackYellowPages+StackRedPages+StackShadowPages+ + 2*BytesPerWord COMPILER2_PRESENT(+1)) * page_size); size_t threadStackSizeInBytes = ThreadStackSize * K; if (threadStackSizeInBytes != 0 && - threadStackSizeInBytes < Solaris::min_stack_allowed) { + threadStackSizeInBytes < os::Solaris::min_stack_allowed) { tty->print_cr("\nThe stack size specified is too small, Specify at least %dk", - Solaris::min_stack_allowed/K); + os::Solaris::min_stack_allowed/K); return JNI_ERR; } diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp index 59b60df03f9..d0837200194 100644 --- a/hotspot/src/os/windows/vm/os_windows.cpp +++ b/hotspot/src/os/windows/vm/os_windows.cpp @@ -3311,7 +3311,6 @@ extern "C" { } } - // this is called _after_ the global arguments have been parsed jint os::init_2(void) { // Allocate a single page and mark it as readable for safepoint polling @@ -3390,6 +3389,21 @@ jint os::init_2(void) { actual_reserve_size = default_reserve_size; } + // Check minimum allowable stack size for thread creation and to initialize + // the java system classes, including StackOverflowError - depends on page + // size. Add a page for compiler2 recursion in main thread. + // Add in 2*BytesPerWord times page size to account for VM stack during + // class initialization depending on 32 or 64 bit VM. + size_t min_stack_allowed = + (size_t)(StackYellowPages+StackRedPages+StackShadowPages+ + 2*BytesPerWord COMPILER2_PRESENT(+1)) * os::vm_page_size(); + if (actual_reserve_size < min_stack_allowed) { + tty->print_cr("\nThe stack size specified is too small, " + "Specify at least %dk", + min_stack_allowed / K); + return JNI_ERR; + } + JavaThread::set_stack_size_at_create(stack_commit_size); // Calculate theoretical max. size of Threads to guard gainst artifical diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index f62565a4192..26d1f20e72d 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -1663,7 +1663,8 @@ bool Arguments::check_stack_pages() bool status = true; status = status && verify_min_value(StackYellowPages, 1, "StackYellowPages"); status = status && verify_min_value(StackRedPages, 1, "StackRedPages"); - status = status && verify_min_value(StackShadowPages, 1, "StackShadowPages"); + // greater stack shadow pages can't generate instruction to bang stack + status = status && verify_interval(StackShadowPages, 1, 50, "StackShadowPages"); return status; } diff --git a/hotspot/src/share/vm/utilities/exceptions.cpp b/hotspot/src/share/vm/utilities/exceptions.cpp index ef37af5071b..0c3cdf8ce32 100644 --- a/hotspot/src/share/vm/utilities/exceptions.cpp +++ b/hotspot/src/share/vm/utilities/exceptions.cpp @@ -61,6 +61,18 @@ bool Exceptions::special_exception(Thread* thread, const char* file, int line, H ShouldNotReachHere(); } +#ifdef ASSERT + // Check for trying to throw stack overflow before initialization is complete + // to prevent infinite recursion trying to initialize stack overflow without + // adequate stack space. + // This can happen with stress testing a large value of StackShadowPages + if (h_exception()->klass() == SystemDictionary::StackOverflowError_klass()) { + instanceKlass* ik = instanceKlass::cast(h_exception->klass()); + assert(ik->is_initialized(), + "need to increase min_stack_allowed calculation"); + } +#endif // ASSERT + if (thread->is_VM_thread() || thread->is_Compiler_thread() ) { // We do not care what kind of exception we get for the vm-thread or a thread which @@ -91,7 +103,6 @@ bool Exceptions::special_exception(Thread* thread, const char* file, int line, s thread->set_pending_exception(Universe::vm_exception(), file, line); return true; } - return false; } @@ -193,6 +204,7 @@ void Exceptions::throw_stack_overflow_exception(Thread* THREAD, const char* file klassOop k = SystemDictionary::StackOverflowError_klass(); oop e = instanceKlass::cast(k)->allocate_instance(CHECK); exception = Handle(THREAD, e); // fill_in_stack trace does gc + assert(instanceKlass::cast(k)->is_initialized(), "need to increase min_stack_allowed calculation"); if (StackTraceInThrowable) { java_lang_Throwable::fill_in_stack_trace(exception); } From 72616ad2bc05a562919155be8b1a688c2e3774d3 Mon Sep 17 00:00:00 2001 From: Bob Vandette Date: Thu, 7 Oct 2010 15:12:57 -0400 Subject: [PATCH 063/722] 6989297: Integrate additional portability improvements Reviewed-by: vladidan, dholmes --- hotspot/src/cpu/sparc/vm/globals_sparc.hpp | 2 ++ hotspot/src/cpu/x86/vm/globals_x86.hpp | 2 ++ hotspot/src/cpu/x86/vm/methodHandles_x86.cpp | 2 +- hotspot/src/cpu/zero/vm/globals_zero.hpp | 2 ++ hotspot/src/os/linux/vm/attachListener_linux.cpp | 4 ++-- hotspot/src/share/vm/includeDB_core | 1 + hotspot/src/share/vm/runtime/globals.hpp | 4 ++-- hotspot/src/share/vm/runtime/sharedRuntime.cpp | 3 +++ hotspot/src/share/vm/runtime/sharedRuntime.hpp | 3 +++ 9 files changed, 18 insertions(+), 5 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp index 2478ed38415..071f6b58d68 100644 --- a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp @@ -62,3 +62,5 @@ define_pd_global(intx, PreInflateSpin, 40); // Determined by running desi define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); + +define_pd_global(bool, UseMembar, false); diff --git a/hotspot/src/cpu/x86/vm/globals_x86.hpp b/hotspot/src/cpu/x86/vm/globals_x86.hpp index 307762d866b..e62e6748210 100644 --- a/hotspot/src/cpu/x86/vm/globals_x86.hpp +++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp @@ -63,3 +63,5 @@ define_pd_global(intx, PreInflateSpin, 10); define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); + +define_pd_global(bool, UseMembar, false); diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp index e8cd888cd71..b6c08684fff 100644 --- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp @@ -346,7 +346,7 @@ void trace_method_handle_stub(const char* adaptername, if (stack_dump_count > 64) stack_dump_count = 48; for (i = 0; i < stack_dump_count; i += 4) { printf(" dump at SP[%d] "INTPTR_FORMAT": "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT"\n", - i, &entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]); + i, (intptr_t)&entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]); } print_method_handle(mh); } diff --git a/hotspot/src/cpu/zero/vm/globals_zero.hpp b/hotspot/src/cpu/zero/vm/globals_zero.hpp index f9d1635cb4c..d55a9ca29ec 100644 --- a/hotspot/src/cpu/zero/vm/globals_zero.hpp +++ b/hotspot/src/cpu/zero/vm/globals_zero.hpp @@ -45,3 +45,5 @@ define_pd_global(intx, StackShadowPages, 5 LP64_ONLY(+1) DEBUG_ONLY(+3)); define_pd_global(bool, RewriteBytecodes, true); define_pd_global(bool, RewriteFrequentPairs, true); + +define_pd_global(bool, UseMembar, false); diff --git a/hotspot/src/os/linux/vm/attachListener_linux.cpp b/hotspot/src/os/linux/vm/attachListener_linux.cpp index 837410ab3bd..a97f5869b61 100644 --- a/hotspot/src/os/linux/vm/attachListener_linux.cpp +++ b/hotspot/src/os/linux/vm/attachListener_linux.cpp @@ -176,10 +176,10 @@ int LinuxAttachListener::init() { int n = snprintf(path, UNIX_PATH_MAX, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id()); - if (n <= (int)UNIX_PATH_MAX) { + if (n < (int)UNIX_PATH_MAX) { n = snprintf(initial_path, UNIX_PATH_MAX, "%s.tmp", path); } - if (n > (int)UNIX_PATH_MAX) { + if (n >= (int)UNIX_PATH_MAX) { return -1; } diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index faf7843fcb2..f7362cdedc4 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -3229,6 +3229,7 @@ orderAccess.hpp allocation.hpp orderAccess.hpp os.hpp orderAccess_.inline.hpp orderAccess.hpp +orderAccess_.inline.hpp vm_version_.hpp os.cpp allocation.inline.hpp os.cpp arguments.hpp diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 1fe8eb9a36b..167edb5f796 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -323,10 +323,10 @@ class CommandLineFlags { /* UseMembar is theoretically a temp flag used for memory barrier \ * removal testing. It was supposed to be removed before FCS but has \ * been re-added (see 6401008) */ \ - product(bool, UseMembar, false, \ + product_pd(bool, UseMembar, \ "(Unstable) Issues membars on thread state transitions") \ \ - /* Temporary: See 6948537 */ \ + /* Temporary: See 6948537 */ \ experimental(bool, UseMemSetInBOT, true, \ "(Unstable) uses memset in BOT updates in GC code") \ \ diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp index e35ecf2be61..0ecbdcc52ed 100644 --- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp +++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp @@ -302,6 +302,9 @@ double SharedRuntime::dabs(double f) { return (f <= (double)0.0) ? (double)0.0 - f : f; } +#endif + +#if defined(__SOFTFP__) || defined(PPC) double SharedRuntime::dsqrt(double f) { return sqrt(f); } diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.hpp b/hotspot/src/share/vm/runtime/sharedRuntime.hpp index 4f6d103f838..411d80eacf9 100644 --- a/hotspot/src/share/vm/runtime/sharedRuntime.hpp +++ b/hotspot/src/share/vm/runtime/sharedRuntime.hpp @@ -116,6 +116,9 @@ class SharedRuntime: AllStatic { #if defined(__SOFTFP__) || defined(E500V2) static double dabs(double f); +#endif + +#if defined(__SOFTFP__) || defined(PPC) static double dsqrt(double f); #endif From 1da6aa89d246a452bcf132e6eb5a4f4d099b0951 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 7 Oct 2010 15:26:32 -0700 Subject: [PATCH 064/722] 6990379: two examples fail under CheckExamples on Windows Reviewed-by: darcy --- langtools/test/tools/javac/diags/CheckExamples.java | 2 +- langtools/test/tools/javac/diags/FileManager.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/langtools/test/tools/javac/diags/CheckExamples.java b/langtools/test/tools/javac/diags/CheckExamples.java index f0111a72c03..5d516f75f8c 100644 --- a/langtools/test/tools/javac/diags/CheckExamples.java +++ b/langtools/test/tools/javac/diags/CheckExamples.java @@ -40,7 +40,7 @@ import java.util.*; * compiler.properties bundle. A list of exceptions may be given in the * not-yet.txt file. Entries on the not-yet.txt list should not be * covered by examples. - * When new keys are added to the resource buncle, it is strongly recommended + * When new keys are added to the resource bundle, it is strongly recommended * that corresponding new examples be added here, if at all practical, instead * of simply and lazily being added to the not-yet.txt list. */ diff --git a/langtools/test/tools/javac/diags/FileManager.java b/langtools/test/tools/javac/diags/FileManager.java index 4132d25557d..2019eef6da4 100644 --- a/langtools/test/tools/javac/diags/FileManager.java +++ b/langtools/test/tools/javac/diags/FileManager.java @@ -177,12 +177,14 @@ public class FileManager } void checkRead() throws IOException { - if (cantRead != null && cantRead.matcher(getName()).matches()) + String canonName = getName().replace(File.separatorChar, '/'); + if (cantRead != null && cantRead.matcher(canonName).matches()) throw new IOException("FileManager: Can't read"); } void checkWrite() throws IOException { - if (cantWrite != null && cantWrite.matcher(getName()).matches()) + String canonName = getName().replace(File.separatorChar, '/'); + if (cantWrite != null && cantWrite.matcher(canonName).matches()) throw new IOException("FileManager: Can't write"); } From 55f7d8222a6844ff8b492c5df17dee7ae26b64d2 Mon Sep 17 00:00:00 2001 From: Yuka Kamiya Date: Fri, 8 Oct 2010 09:50:56 +0900 Subject: [PATCH 065/722] 6970930: RuleBasedCollator.compare(String,null) throws IAE (should be NPE) Reviewed-by: okutsu --- .../classes/java/text/RuleBasedCollator.java | 6 ++ jdk/test/java/text/Collator/Bug6970930.java | 78 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 jdk/test/java/text/Collator/Bug6970930.java diff --git a/jdk/src/share/classes/java/text/RuleBasedCollator.java b/jdk/src/share/classes/java/text/RuleBasedCollator.java index 8d5aa510913..495ca917992 100644 --- a/jdk/src/share/classes/java/text/RuleBasedCollator.java +++ b/jdk/src/share/classes/java/text/RuleBasedCollator.java @@ -335,9 +335,15 @@ public class RuleBasedCollator extends Collator{ * collation rules. Returns information about whether a string is less * than, greater than or equal to another string in a language. * This can be overriden in a subclass. + * + * @exception NullPointerException if source or target is null. */ public synchronized int compare(String source, String target) { + if (source == null || target == null) { + throw new NullPointerException(); + } + // The basic algorithm here is that we use CollationElementIterators // to step through both the source and target strings. We compare each // collation element in the source string against the corresponding one diff --git a/jdk/test/java/text/Collator/Bug6970930.java b/jdk/test/java/text/Collator/Bug6970930.java new file mode 100644 index 00000000000..f20cd831a9b --- /dev/null +++ b/jdk/test/java/text/Collator/Bug6970930.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6970930 + * @summary verify that compare() throws NPE instead of IAE when an argument is null. + */ +import java.text.*; + +public class Bug6970930 { + + private static boolean err = false; + + public static void main(String[] args) { + // Check if compare() throws NPE. + test1(null, null); + test1("\"foo\"", null); + test1(null, "\"bar\""); + + if (err) { + throw new RuntimeException("Failed."); + } else { + System.out.println("Passed."); + } + } + + private static void test1(String s1, String s2) { + RuleBasedCollator col = null; + + try { + col = new RuleBasedCollator("< a < b"); + } + catch (ParseException e) { + err = true; + System.err.println(e); + } + + try { + col.compare("foo", "bar"); // This line is necessary to reproduce the bug. + col.compare(s1, s2); + + err = true; + System.err.println("No exception was thrown for compare(" + + s1 + ", " + s2 + ")."); + } + catch (NullPointerException e) { + System.out.println("NPE was thrown as expected for compare(" + + s1 + ", " + s2 + ")."); + } + catch (Exception e) { + err = true; + System.err.println("Unexpected exception was thrown for compare(" + + s1 + ", " + s2 + "): " + e); + } + } + +} From 39d16839d37dc5b6000082f234c5c740d9444352 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Thu, 7 Oct 2010 21:40:55 -0700 Subject: [PATCH 066/722] 6980792: Crash "exception happened outside interpreter, nmethods and vtable stubs (1)" Reviewed-by: kvn --- hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp | 4 ++-- hotspot/src/share/vm/opto/library_call.cpp | 4 ++-- hotspot/src/share/vm/opto/loopTransform.cpp | 7 +++++++ hotspot/src/share/vm/opto/runtime.cpp | 14 ++++++++------ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp index 7c64ab30fd5..8a4dc2ad9b9 100644 --- a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp @@ -2586,6 +2586,8 @@ class StubGenerator: public StubCodeGenerator { __ restore(); #endif + assert_clean_int(O2_count, G1); // Make sure 'count' is clean int. + #ifdef ASSERT // caller guarantees that the arrays really are different // otherwise, we would have to make conjoint checks @@ -2600,8 +2602,6 @@ class StubGenerator: public StubCodeGenerator { } #endif //ASSERT - assert_clean_int(O2_count, G1); // Make sure 'count' is clean int. - checkcast_copy_entry = __ pc(); // caller can pass a 64-bit byte count here (from generic stub) BLOCK_COMMENT("Entry:"); diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp index f48ed6f312b..053707b70ea 100644 --- a/hotspot/src/share/vm/opto/library_call.cpp +++ b/hotspot/src/share/vm/opto/library_call.cpp @@ -4761,7 +4761,7 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type, Node* cv = generate_checkcast_arraycopy(adr_type, dest_elem_klass, src, src_offset, dest, dest_offset, - copy_length); + ConvI2X(copy_length)); if (cv == NULL) cv = intcon(-1); // failure (no stub available) checked_control = control(); checked_i_o = i_o(); @@ -5206,7 +5206,7 @@ LibraryCallKit::generate_checkcast_arraycopy(const TypePtr* adr_type, int sco_offset = Klass::super_check_offset_offset_in_bytes() + sizeof(oopDesc); Node* p3 = basic_plus_adr(dest_elem_klass, sco_offset); Node* n3 = new(C, 3) LoadINode(NULL, memory(p3), p3, _gvn.type(p3)->is_ptr()); - Node* check_offset = _gvn.transform(n3); + Node* check_offset = ConvI2X(_gvn.transform(n3)); Node* check_value = dest_elem_klass; Node* src_start = array_element_address(src, src_offset, T_OBJECT); diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp index bb1587762ea..c4fce2d9869 100644 --- a/hotspot/src/share/vm/opto/loopTransform.cpp +++ b/hotspot/src/share/vm/opto/loopTransform.cpp @@ -2684,7 +2684,14 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) { fill_name, TypeAryPtr::get_array_body_type(t)); call->init_req(TypeFunc::Parms+0, from); call->init_req(TypeFunc::Parms+1, store_value); +#ifdef _LP64 + len = new (C, 2) ConvI2LNode(len); + _igvn.register_new_node_with_optimizer(len); +#endif call->init_req(TypeFunc::Parms+2, len); +#ifdef _LP64 + call->init_req(TypeFunc::Parms+3, C->top()); +#endif call->init_req( TypeFunc::Control, head->init_control()); call->init_req( TypeFunc::I_O , C->top() ) ; // does no i/o call->init_req( TypeFunc::Memory , mem_phi->in(LoopNode::EntryControl) ); diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp index 389c3f9ee7f..62a0c78716f 100644 --- a/hotspot/src/share/vm/opto/runtime.cpp +++ b/hotspot/src/share/vm/opto/runtime.cpp @@ -646,12 +646,14 @@ const TypeFunc* OptoRuntime::generic_arraycopy_Type() { const TypeFunc* OptoRuntime::array_fill_Type() { - // create input type (domain) - const Type** fields = TypeTuple::fields(3); - fields[TypeFunc::Parms+0] = TypePtr::NOTNULL; - fields[TypeFunc::Parms+1] = TypeInt::INT; - fields[TypeFunc::Parms+2] = TypeInt::INT; - const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms + 3, fields); + // create input type (domain): pointer, int, size_t + const Type** fields = TypeTuple::fields(3 LP64_ONLY( + 1)); + int argp = TypeFunc::Parms; + fields[argp++] = TypePtr::NOTNULL; + fields[argp++] = TypeInt::INT; + fields[argp++] = TypeX_X; // size in whatevers (size_t) + LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length + const TypeTuple *domain = TypeTuple::make(argp, fields); // create result type fields = TypeTuple::fields(1); From a10ec19a4dd2fd63b6d31582828c9b51cfb05bfe Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Fri, 8 Oct 2010 02:42:17 -0700 Subject: [PATCH 067/722] 6990549: Zero and Shark fixes after 6978355 and 6953144 Reviewed-by: twisti --- hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp | 8 ++++---- hotspot/src/share/vm/code/nmethod.cpp | 2 +- hotspot/src/share/vm/oops/methodOop.cpp | 2 +- hotspot/src/share/vm/shark/sharkCompiler.hpp | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp b/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp index 692450210a5..5ff34d99bb5 100644 --- a/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp +++ b/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp @@ -92,15 +92,15 @@ class SignatureHandlerGenerator : public SignatureHandlerGeneratorBase { public: SignatureHandlerGenerator(methodHandle method, CodeBuffer* buffer) - : SignatureHandlerGeneratorBase(method, (ffi_cif *) buffer->code_end()), + : SignatureHandlerGeneratorBase(method, (ffi_cif *) buffer->insts_end()), _cb(buffer) { - _cb->set_code_end((address) (cif() + 1)); + _cb->set_insts_end((address) (cif() + 1)); } private: void push(intptr_t value) { - intptr_t *dst = (intptr_t *) _cb->code_end(); - _cb->set_code_end((address) (dst + 1)); + intptr_t *dst = (intptr_t *) _cb->insts_end(); + _cb->set_insts_end((address) (dst + 1)); *dst = value; } }; diff --git a/hotspot/src/share/vm/code/nmethod.cpp b/hotspot/src/share/vm/code/nmethod.cpp index 9da564d277e..f7a2b7ff0f0 100644 --- a/hotspot/src/share/vm/code/nmethod.cpp +++ b/hotspot/src/share/vm/code/nmethod.cpp @@ -1421,7 +1421,7 @@ void nmethod::flush() { } #ifdef SHARK - ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin()); + ((SharkCompiler *) compiler())->free_compiled_method(insts_begin()); #endif // SHARK ((CodeBlob*)(this))->flush(); diff --git a/hotspot/src/share/vm/oops/methodOop.cpp b/hotspot/src/share/vm/oops/methodOop.cpp index 353a5f6762f..89a99c9877b 100644 --- a/hotspot/src/share/vm/oops/methodOop.cpp +++ b/hotspot/src/share/vm/oops/methodOop.cpp @@ -758,7 +758,7 @@ void methodOopDesc::set_code(methodHandle mh, nmethod *code) { OrderAccess::storestore(); #ifdef SHARK - mh->_from_interpreted_entry = code->instructions_begin(); + mh->_from_interpreted_entry = code->insts_begin(); #else mh->_from_compiled_entry = code->verified_entry_point(); OrderAccess::storestore(); diff --git a/hotspot/src/share/vm/shark/sharkCompiler.hpp b/hotspot/src/share/vm/shark/sharkCompiler.hpp index ddac631527b..be47dd52916 100644 --- a/hotspot/src/share/vm/shark/sharkCompiler.hpp +++ b/hotspot/src/share/vm/shark/sharkCompiler.hpp @@ -103,8 +103,7 @@ class SharkCompiler : public AbstractCompiler { // Global access public: static SharkCompiler* compiler() { - AbstractCompiler *compiler = - CompileBroker::compiler(CompLevel_fast_compile); + AbstractCompiler *compiler = CompileBroker::compiler(CompLevel_simple); assert(compiler->is_shark() && compiler->is_initialized(), "should be"); return (SharkCompiler *) compiler; } From 0e4ed251b80ff2f75d040e7a13aa28c25a74b0ad Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Mon, 11 Oct 2010 04:18:58 -0700 Subject: [PATCH 068/722] 6829194: JSR 292 needs to support compressed oops Reviewed-by: kvn, jrose --- hotspot/src/cpu/sparc/vm/assembler_sparc.cpp | 20 ++--- hotspot/src/cpu/sparc/vm/assembler_sparc.hpp | 3 +- .../src/cpu/sparc/vm/methodHandles_sparc.cpp | 35 ++++---- .../src/cpu/sparc/vm/stubRoutines_sparc.hpp | 2 +- .../src/cpu/sparc/vm/templateTable_sparc.cpp | 2 +- hotspot/src/cpu/x86/vm/assembler_x86.cpp | 79 +++++++++++-------- hotspot/src/cpu/x86/vm/assembler_x86.hpp | 16 ++-- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp | 68 ++++++++-------- .../src/cpu/x86/vm/stubRoutines_x86_64.hpp | 2 +- .../src/cpu/x86/vm/templateTable_x86_32.cpp | 11 ++- .../src/cpu/x86/vm/templateTable_x86_64.cpp | 10 ++- hotspot/src/share/vm/asm/codeBuffer.hpp | 4 +- hotspot/src/share/vm/ci/ciInstanceKlass.cpp | 2 +- hotspot/src/share/vm/ci/ciTypeFlow.cpp | 2 +- .../share/vm/classfile/classFileParser.cpp | 10 ++- hotspot/src/share/vm/oops/oop.inline.hpp | 2 +- 16 files changed, 141 insertions(+), 127 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp index e84e92a41c7..a677b20dfa0 100644 --- a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp @@ -3094,11 +3094,10 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass, void MacroAssembler::check_method_handle_type(Register mtype_reg, Register mh_reg, Register temp_reg, Label& wrong_method_type) { - if (UseCompressedOops) unimplemented("coop"); // field accesses must decode assert_different_registers(mtype_reg, mh_reg, temp_reg); // compare method type against that of the receiver RegisterOrConstant mhtype_offset = delayed_value(java_dyn_MethodHandle::type_offset_in_bytes, temp_reg); - ld_ptr(mh_reg, mhtype_offset, temp_reg); + load_heap_oop(mh_reg, mhtype_offset, temp_reg); cmp(temp_reg, mtype_reg); br(Assembler::notEqual, false, Assembler::pn, wrong_method_type); delayed()->nop(); @@ -3112,16 +3111,15 @@ void MacroAssembler::check_method_handle_type(Register mtype_reg, Register mh_re void MacroAssembler::load_method_handle_vmslots(Register vmslots_reg, Register mh_reg, Register temp_reg) { assert_different_registers(vmslots_reg, mh_reg, temp_reg); - if (UseCompressedOops) unimplemented("coop"); // field accesses must decode // load mh.type.form.vmslots if (java_dyn_MethodHandle::vmslots_offset_in_bytes() != 0) { // hoist vmslots into every mh to avoid dependent load chain - ld( Address(mh_reg, delayed_value(java_dyn_MethodHandle::vmslots_offset_in_bytes, temp_reg)), vmslots_reg); + ld( Address(mh_reg, delayed_value(java_dyn_MethodHandle::vmslots_offset_in_bytes, temp_reg)), vmslots_reg); } else { Register temp2_reg = vmslots_reg; - ld_ptr(Address(mh_reg, delayed_value(java_dyn_MethodHandle::type_offset_in_bytes, temp_reg)), temp2_reg); - ld_ptr(Address(temp2_reg, delayed_value(java_dyn_MethodType::form_offset_in_bytes, temp_reg)), temp2_reg); - ld( Address(temp2_reg, delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, temp_reg)), vmslots_reg); + load_heap_oop(Address(mh_reg, delayed_value(java_dyn_MethodHandle::type_offset_in_bytes, temp_reg)), temp2_reg); + load_heap_oop(Address(temp2_reg, delayed_value(java_dyn_MethodType::form_offset_in_bytes, temp_reg)), temp2_reg); + ld( Address(temp2_reg, delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, temp_reg)), vmslots_reg); } } @@ -3130,9 +3128,8 @@ void MacroAssembler::jump_to_method_handle_entry(Register mh_reg, Register temp_ assert(mh_reg == G3_method_handle, "caller must put MH object in G3"); assert_different_registers(mh_reg, temp_reg); - if (UseCompressedOops) unimplemented("coop"); // field accesses must decode - // pick out the interpreted side of the handler + // NOTE: vmentry is not an oop! ld_ptr(mh_reg, delayed_value(java_dyn_MethodHandle::vmentry_offset_in_bytes, temp_reg), temp_reg); // off we go... @@ -4653,6 +4650,11 @@ void MacroAssembler::load_heap_oop(Register s1, int simm13a, Register d) { } } +void MacroAssembler::load_heap_oop(Register s1, RegisterOrConstant s2, Register d) { + if (s2.is_constant()) load_heap_oop(s1, s2.as_constant(), d); + else load_heap_oop(s1, s2.as_register(), d); +} + void MacroAssembler::store_heap_oop(Register d, Register s1, Register s2) { if (UseCompressedOops) { assert(s1 != d && s2 != d, "not enough registers"); diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp index 4592ed81fea..7d56342c5dd 100644 --- a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp @@ -2103,6 +2103,7 @@ public: void load_heap_oop(const Address& s, Register d); void load_heap_oop(Register s1, Register s2, Register d); void load_heap_oop(Register s1, int simm13a, Register d); + void load_heap_oop(Register s1, RegisterOrConstant s2, Register d); void store_heap_oop(Register d, Register s1, Register s2); void store_heap_oop(Register d, Register s1, int simm13a); void store_heap_oop(Register d, const Address& a, int offset = 0); @@ -2225,7 +2226,7 @@ public: void stop(const char* msg); // prints msg, dumps registers and stops execution void warn(const char* msg); // prints msg, but don't stop void untested(const char* what = ""); - void unimplemented(const char* what = "") { char* b = new char[1024]; sprintf(b, "unimplemented: %s", what); stop(b); } + void unimplemented(const char* what = "") { char* b = new char[1024]; jio_snprintf(b, 1024, "unimplemented: %s", what); stop(b); } void should_not_reach_here() { stop("should not reach here"); } void print_CPU_state(); diff --git a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp index 887bfd63e63..94cc62217d4 100644 --- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp @@ -90,8 +90,8 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler* } // given the MethodType, find out where the MH argument is buried - __ ld_ptr(Address(G5_method_type, __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, O1_scratch)), O0_argslot); - __ ldsw( Address(O0_argslot, __ delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, O1_scratch)), O0_argslot); + __ load_heap_oop(Address(G5_method_type, __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, O1_scratch)), O0_argslot); + __ ldsw( Address(O0_argslot, __ delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, O1_scratch)), O0_argslot); __ ld_ptr(__ argument_address(O0_argslot), G3_method_handle); __ check_method_handle_type(G5_method_type, G3_method_handle, O1_scratch, wrong_method_type); @@ -348,7 +348,6 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan } address interp_entry = __ pc(); - if (UseCompressedOops) __ unimplemented("UseCompressedOops"); #ifndef PRODUCT if (TraceMethodHandles) { @@ -413,7 +412,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan case _invokestatic_mh: case _invokespecial_mh: { - __ ld_ptr(G3_mh_vmtarget, G5_method); // target is a methodOop + __ load_heap_oop(G3_mh_vmtarget, G5_method); // target is a methodOop __ verify_oop(G5_method); // Same as TemplateTable::invokestatic or invokespecial, // minus the CP setup and profiling: @@ -468,7 +467,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan // minus the CP setup and profiling: __ load_method_handle_vmslots(O0_argslot, G3_method_handle, O1_scratch); Register O1_intf = O1_scratch; - __ ld_ptr(G3_mh_vmtarget, O1_intf); + __ load_heap_oop(G3_mh_vmtarget, O1_intf); __ ldsw(G3_dmh_vmindex, G5_index); __ ld_ptr(__ argument_address(O0_argslot, -1), G3_method_handle); __ null_check(G3_method_handle, oopDesc::klass_offset_in_bytes()); @@ -523,7 +522,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan insert_arg_slots(_masm, arg_slots * stack_move_unit(), arg_mask, O0_argslot, O1_scratch, O2_scratch, G5_index); // Store bound argument into the new stack slot: - __ ld_ptr(G3_bmh_argument, O1_scratch); + __ load_heap_oop(G3_bmh_argument, O1_scratch); if (arg_type == T_OBJECT) { __ st_ptr(O1_scratch, Address(O0_argslot, 0)); } else { @@ -541,12 +540,12 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan } if (direct_to_method) { - __ ld_ptr(G3_mh_vmtarget, G5_method); // target is a methodOop + __ load_heap_oop(G3_mh_vmtarget, G5_method); // target is a methodOop __ verify_oop(G5_method); __ jump_indirect_to(G5_method_fie, O1_scratch); __ delayed()->nop(); } else { - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); // target is a methodOop + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); // target is a methodOop __ verify_oop(G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); } @@ -556,7 +555,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan case _adapter_retype_only: case _adapter_retype_raw: // Immediately jump to the next MH layer: - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); // This is OK when all parameter types widen. // It is also OK when a return type narrows. @@ -572,8 +571,8 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan Address vmarg = __ argument_address(O0_argslot); // What class are we casting to? - __ ld_ptr(G3_amh_argument, G5_klass); // This is a Class object! - __ ld_ptr(Address(G5_klass, java_lang_Class::klass_offset_in_bytes()), G5_klass); + __ load_heap_oop(G3_amh_argument, G5_klass); // This is a Class object! + __ load_heap_oop(Address(G5_klass, java_lang_Class::klass_offset_in_bytes()), G5_klass); Label done; __ ld_ptr(vmarg, O1_scratch); @@ -590,14 +589,14 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan // If we get here, the type check failed! __ ldsw(G3_amh_vmargslot, O0_argslot); // reload argslot field - __ ld_ptr(G3_amh_argument, O3_scratch); // required class + __ load_heap_oop(G3_amh_argument, O3_scratch); // required class __ ld_ptr(vmarg, O2_scratch); // bad object __ jump_to(AddressLiteral(from_interpreted_entry(_raise_exception)), O0_argslot); __ delayed()->mov(Bytecodes::_checkcast, O1_scratch); // who is complaining? __ bind(done); // Get the new MH: - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); } break; @@ -676,7 +675,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan __ st(O1_scratch, vmarg); // Get the new MH: - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); } break; @@ -721,7 +720,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan ShouldNotReachHere(); } - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); } break; @@ -851,7 +850,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan } } - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); } break; @@ -895,7 +894,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan __ brx(Assembler::less, false, Assembler::pt, loop); __ delayed()->nop(); // FILLME - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); } break; @@ -913,7 +912,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan remove_arg_slots(_masm, G5_stack_move, O0_argslot, O1_scratch, O2_scratch, O3_scratch); - __ ld_ptr(G3_mh_vmtarget, G3_method_handle); + __ load_heap_oop(G3_mh_vmtarget, G3_method_handle); __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); } break; diff --git a/hotspot/src/cpu/sparc/vm/stubRoutines_sparc.hpp b/hotspot/src/cpu/sparc/vm/stubRoutines_sparc.hpp index e02789d2530..d56655b3e3b 100644 --- a/hotspot/src/cpu/sparc/vm/stubRoutines_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/stubRoutines_sparc.hpp @@ -43,7 +43,7 @@ enum /* platform_dependent_constants */ { // MethodHandles adapters enum method_handles_platform_dependent_constants { - method_handles_adapters_code_size = 12000 + method_handles_adapters_code_size = 15000 }; class Sparc { diff --git a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp index b144985f132..756cd6ca5f3 100644 --- a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp @@ -3273,7 +3273,7 @@ void TemplateTable::invokedynamic(int byte_no) { __ sll(Rret, LogBytesPerWord, Rret); __ ld_ptr(Rtemp, Rret, Rret); // get return address - __ ld_ptr(G5_callsite, __ delayed_value(java_dyn_CallSite::target_offset_in_bytes, Rscratch), G3_method_handle); + __ load_heap_oop(G5_callsite, __ delayed_value(java_dyn_CallSite::target_offset_in_bytes, Rscratch), G3_method_handle); __ null_check(G3_method_handle); // Adjust Rret first so Llast_SP can be same as Rret diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp index 4f43327d304..c9794d4c674 100644 --- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp @@ -7709,9 +7709,14 @@ RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_ad void MacroAssembler::check_method_handle_type(Register mtype_reg, Register mh_reg, Register temp_reg, Label& wrong_method_type) { - if (UseCompressedOops) unimplemented(); // field accesses must decode + Address type_addr(mh_reg, delayed_value(java_dyn_MethodHandle::type_offset_in_bytes, temp_reg)); // compare method type against that of the receiver - cmpptr(mtype_reg, Address(mh_reg, delayed_value(java_dyn_MethodHandle::type_offset_in_bytes, temp_reg))); + if (UseCompressedOops) { + load_heap_oop(temp_reg, type_addr); + cmpptr(mtype_reg, temp_reg); + } else { + cmpptr(mtype_reg, type_addr); + } jcc(Assembler::notEqual, wrong_method_type); } @@ -7723,15 +7728,14 @@ void MacroAssembler::check_method_handle_type(Register mtype_reg, Register mh_re void MacroAssembler::load_method_handle_vmslots(Register vmslots_reg, Register mh_reg, Register temp_reg) { assert_different_registers(vmslots_reg, mh_reg, temp_reg); - if (UseCompressedOops) unimplemented(); // field accesses must decode // load mh.type.form.vmslots if (java_dyn_MethodHandle::vmslots_offset_in_bytes() != 0) { // hoist vmslots into every mh to avoid dependent load chain movl(vmslots_reg, Address(mh_reg, delayed_value(java_dyn_MethodHandle::vmslots_offset_in_bytes, temp_reg))); } else { Register temp2_reg = vmslots_reg; - movptr(temp2_reg, Address(mh_reg, delayed_value(java_dyn_MethodHandle::type_offset_in_bytes, temp_reg))); - movptr(temp2_reg, Address(temp2_reg, delayed_value(java_dyn_MethodType::form_offset_in_bytes, temp_reg))); + load_heap_oop(temp2_reg, Address(mh_reg, delayed_value(java_dyn_MethodHandle::type_offset_in_bytes, temp_reg))); + load_heap_oop(temp2_reg, Address(temp2_reg, delayed_value(java_dyn_MethodType::form_offset_in_bytes, temp_reg))); movl(vmslots_reg, Address(temp2_reg, delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, temp_reg))); } } @@ -7745,9 +7749,8 @@ void MacroAssembler::jump_to_method_handle_entry(Register mh_reg, Register temp_ assert(mh_reg == rcx, "caller must put MH object in rcx"); assert_different_registers(mh_reg, temp_reg); - if (UseCompressedOops) unimplemented(); // field accesses must decode - // pick out the interpreted side of the handler + // NOTE: vmentry is not an oop! movptr(temp_reg, Address(mh_reg, delayed_value(java_dyn_MethodHandle::vmentry_offset_in_bytes, temp_reg))); // off we go... @@ -8238,6 +8241,40 @@ void MacroAssembler::store_klass(Register dst, Register src) { movptr(Address(dst, oopDesc::klass_offset_in_bytes()), src); } +void MacroAssembler::load_heap_oop(Register dst, Address src) { +#ifdef _LP64 + if (UseCompressedOops) { + movl(dst, src); + decode_heap_oop(dst); + } else +#endif + movptr(dst, src); +} + +void MacroAssembler::store_heap_oop(Address dst, Register src) { +#ifdef _LP64 + if (UseCompressedOops) { + assert(!dst.uses(src), "not enough registers"); + encode_heap_oop(src); + movl(dst, src); + } else +#endif + movptr(dst, src); +} + +// Used for storing NULLs. +void MacroAssembler::store_heap_oop_null(Address dst) { +#ifdef _LP64 + if (UseCompressedOops) { + movl(dst, (int32_t)NULL_WORD); + } else { + movslq(dst, (int32_t)NULL_WORD); + } +#else + movl(dst, (int32_t)NULL_WORD); +#endif +} + #ifdef _LP64 void MacroAssembler::store_klass_gap(Register dst, Register src) { if (UseCompressedOops) { @@ -8246,34 +8283,6 @@ void MacroAssembler::store_klass_gap(Register dst, Register src) { } } -void MacroAssembler::load_heap_oop(Register dst, Address src) { - if (UseCompressedOops) { - movl(dst, src); - decode_heap_oop(dst); - } else { - movq(dst, src); - } -} - -void MacroAssembler::store_heap_oop(Address dst, Register src) { - if (UseCompressedOops) { - assert(!dst.uses(src), "not enough registers"); - encode_heap_oop(src); - movl(dst, src); - } else { - movq(dst, src); - } -} - -// Used for storing NULLs. -void MacroAssembler::store_heap_oop_null(Address dst) { - if (UseCompressedOops) { - movl(dst, (int32_t)NULL_WORD); - } else { - movslq(dst, (int32_t)NULL_WORD); - } -} - #ifdef ASSERT void MacroAssembler::verify_heapbase(const char* msg) { assert (UseCompressedOops, "should be compressed"); diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.hpp b/hotspot/src/cpu/x86/vm/assembler_x86.hpp index c9b25e02f19..88d082e5d81 100644 --- a/hotspot/src/cpu/x86/vm/assembler_x86.hpp +++ b/hotspot/src/cpu/x86/vm/assembler_x86.hpp @@ -1682,24 +1682,24 @@ class MacroAssembler: public Assembler { void load_klass(Register dst, Register src); void store_klass(Register dst, Register src); + void load_heap_oop(Register dst, Address src); + void store_heap_oop(Address dst, Register src); + + // Used for storing NULL. All other oop constants should be + // stored using routines that take a jobject. + void store_heap_oop_null(Address dst); + void load_prototype_header(Register dst, Register src); #ifdef _LP64 void store_klass_gap(Register dst, Register src); - void load_heap_oop(Register dst, Address src); - void store_heap_oop(Address dst, Register src); - // This dummy is to prevent a call to store_heap_oop from // converting a zero (like NULL) into a Register by giving // the compiler two choices it can't resolve void store_heap_oop(Address dst, void* dummy); - // Used for storing NULL. All other oop constants should be - // stored using routines that take a jobject. - void store_heap_oop_null(Address dst); - void encode_heap_oop(Register r); void decode_heap_oop(Register r); void encode_heap_oop_not_null(Register r); @@ -1927,7 +1927,7 @@ class MacroAssembler: public Assembler { void untested() { stop("untested"); } - void unimplemented(const char* what = "") { char* b = new char[1024]; jio_snprintf(b, sizeof(b), "unimplemented: %s", what); stop(b); } + void unimplemented(const char* what = "") { char* b = new char[1024]; jio_snprintf(b, 1024, "unimplemented: %s", what); stop(b); } void should_not_reach_here() { stop("should not reach here"); } diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp index 2343fbf2fc0..0a65e5a29f1 100644 --- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp @@ -123,11 +123,9 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler* } // given the MethodType, find out where the MH argument is buried - __ movptr(rdx_temp, Address(rax_mtype, - __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp))); + __ load_heap_oop(rdx_temp, Address(rax_mtype, __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp))); Register rdx_vmslots = rdx_temp; - __ movl(rdx_vmslots, Address(rdx_temp, - __ delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, rdi_temp))); + __ movl(rdx_vmslots, Address(rdx_temp, __ delayed_value(java_dyn_MethodTypeForm::vmslots_offset_in_bytes, rdi_temp))); __ movptr(rcx_recv, __ argument_address(rdx_vmslots)); trace_method_handle(_masm, "invokeExact"); @@ -154,20 +152,18 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler* rcx_argslot, rbx_temp, rdx_temp); // load up an adapter from the calling type (Java weaves this) - __ movptr(rdx_temp, Address(rax_mtype, - __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp))); + __ load_heap_oop(rdx_temp, Address(rax_mtype, __ delayed_value(java_dyn_MethodType::form_offset_in_bytes, rdi_temp))); Register rdx_adapter = rdx_temp; - // movptr(rdx_adapter, Address(rdx_temp, java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes())); + // __ load_heap_oop(rdx_adapter, Address(rdx_temp, java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes())); // deal with old JDK versions: - __ lea(rdi_temp, Address(rdx_temp, - __ delayed_value(java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes, rdi_temp))); + __ lea(rdi_temp, Address(rdx_temp, __ delayed_value(java_dyn_MethodTypeForm::genericInvoker_offset_in_bytes, rdi_temp))); __ cmpptr(rdi_temp, rdx_temp); Label sorry_no_invoke_generic; - __ jccb(Assembler::below, sorry_no_invoke_generic); + __ jcc(Assembler::below, sorry_no_invoke_generic); - __ movptr(rdx_adapter, Address(rdi_temp, 0)); + __ load_heap_oop(rdx_adapter, Address(rdi_temp, 0)); __ testptr(rdx_adapter, rdx_adapter); - __ jccb(Assembler::zero, sorry_no_invoke_generic); + __ jcc(Assembler::zero, sorry_no_invoke_generic); __ movptr(Address(rcx_argslot, 1 * Interpreter::stackElementSize), rdx_adapter); // As a trusted first argument, pass the type being called, so the adapter knows // the actual types of the arguments and return values. @@ -431,7 +427,6 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan } address interp_entry = __ pc(); - if (UseCompressedOops) __ unimplemented("UseCompressedOops"); trace_method_handle(_masm, entry_name(ek)); @@ -489,7 +484,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan case _invokespecial_mh: { Register rbx_method = rbx_temp; - __ movptr(rbx_method, rcx_mh_vmtarget); // target is a methodOop + __ load_heap_oop(rbx_method, rcx_mh_vmtarget); // target is a methodOop __ verify_oop(rbx_method); // same as TemplateTable::invokestatic or invokespecial, // minus the CP setup and profiling: @@ -546,8 +541,8 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan __ load_method_handle_vmslots(rax_argslot, rcx_recv, rdx_temp); Register rdx_intf = rdx_temp; Register rbx_index = rbx_temp; - __ movptr(rdx_intf, rcx_mh_vmtarget); - __ movl(rbx_index, rcx_dmh_vmindex); + __ load_heap_oop(rdx_intf, rcx_mh_vmtarget); + __ movl(rbx_index, rcx_dmh_vmindex); __ movptr(rcx_recv, __ argument_address(rax_argslot, -1)); __ null_check(rcx_recv, oopDesc::klass_offset_in_bytes()); @@ -602,7 +597,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan rax_argslot, rbx_temp, rdx_temp); // store bound argument into the new stack slot: - __ movptr(rbx_temp, rcx_bmh_argument); + __ load_heap_oop(rbx_temp, rcx_bmh_argument); Address prim_value_addr(rbx_temp, java_lang_boxing_object::value_offset_in_bytes(arg_type)); if (arg_type == T_OBJECT) { __ movptr(Address(rax_argslot, 0), rbx_temp); @@ -620,11 +615,11 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan if (direct_to_method) { Register rbx_method = rbx_temp; - __ movptr(rbx_method, rcx_mh_vmtarget); + __ load_heap_oop(rbx_method, rcx_mh_vmtarget); __ verify_oop(rbx_method); __ jmp(rbx_method_fie); } else { - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ verify_oop(rcx_recv); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); } @@ -634,7 +629,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan case _adapter_retype_only: case _adapter_retype_raw: // immediately jump to the next MH layer: - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ verify_oop(rcx_recv); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); // This is OK when all parameter types widen. @@ -651,13 +646,13 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan vmarg = __ argument_address(rax_argslot); // What class are we casting to? - __ movptr(rbx_klass, rcx_amh_argument); // this is a Class object! - __ movptr(rbx_klass, Address(rbx_klass, java_lang_Class::klass_offset_in_bytes())); + __ load_heap_oop(rbx_klass, rcx_amh_argument); // this is a Class object! + __ load_heap_oop(rbx_klass, Address(rbx_klass, java_lang_Class::klass_offset_in_bytes())); Label done; __ movptr(rdx_temp, vmarg); __ testptr(rdx_temp, rdx_temp); - __ jccb(Assembler::zero, done); // no cast if null + __ jcc(Assembler::zero, done); // no cast if null __ load_klass(rdx_temp, rdx_temp); // live at this point: @@ -672,14 +667,15 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan __ movl(rax_argslot, rcx_amh_vmargslot); // reload argslot field __ movptr(rdx_temp, vmarg); - __ pushptr(rcx_amh_argument); // required class - __ push(rdx_temp); // bad object - __ push((int)Bytecodes::_checkcast); // who is complaining? + __ load_heap_oop(rbx_klass, rcx_amh_argument); // required class + __ push(rbx_klass); + __ push(rdx_temp); // bad object + __ push((int)Bytecodes::_checkcast); // who is complaining? __ jump(ExternalAddress(from_interpreted_entry(_raise_exception))); __ bind(done); // get the new MH: - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); } break; @@ -741,7 +737,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan assert(CONV_VMINFO_SHIFT == 0, "preshifted"); // get the new MH: - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); // (now we are done with the old MH) // original 32-bit vmdata word must be of this form: @@ -816,7 +812,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan ShouldNotReachHere(); } - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); } break; @@ -858,7 +854,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan rax_argslot, rbx_temp, rdx_temp); } - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); } break; @@ -969,7 +965,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan } } - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); } break; @@ -1029,7 +1025,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan __ pop(rdi); // restore temp - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); } break; @@ -1052,7 +1048,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan __ pop(rdi); // restore temp - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); } break; @@ -1103,8 +1099,8 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan // Check the array type. Register rbx_klass = rbx_temp; - __ movptr(rbx_klass, rcx_amh_argument); // this is a Class object! - __ movptr(rbx_klass, Address(rbx_klass, java_lang_Class::klass_offset_in_bytes())); + __ load_heap_oop(rbx_klass, rcx_amh_argument); // this is a Class object! + __ load_heap_oop(rbx_klass, Address(rbx_klass, java_lang_Class::klass_offset_in_bytes())); Label ok_array_klass, bad_array_klass, bad_array_length; __ check_klass_subtype(rdx_array_klass, rbx_klass, rdi, ok_array_klass); @@ -1186,7 +1182,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan // Arguments are spread. Move to next method handle. UNPUSH_RSI_RDI; - __ movptr(rcx_recv, rcx_mh_vmtarget); + __ load_heap_oop(rcx_recv, rcx_mh_vmtarget); __ jump_to_method_handle_entry(rcx_recv, rdx_temp); __ bind(bad_array_klass); diff --git a/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp b/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp index 393d868d903..71a4115127b 100644 --- a/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp +++ b/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp @@ -35,7 +35,7 @@ enum platform_dependent_constants { // MethodHandles adapters enum method_handles_platform_dependent_constants { - method_handles_adapters_code_size = 26000 + method_handles_adapters_code_size = 40000 }; class x86 { diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp index 5da242409c0..e8417de1f96 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp @@ -3111,19 +3111,22 @@ void TemplateTable::invokedynamic(int byte_no) { // rax: CallSite object (f1) // rbx: unused (f2) + // rcx: receiver address // rdx: flags (unused) + Register rax_callsite = rax; + Register rcx_method_handle = rcx; + if (ProfileInterpreter) { - Label L; // %%% should make a type profile for any invokedynamic that takes a ref argument // profile this call __ profile_call(rsi); } - __ movptr(rcx, Address(rax, __ delayed_value(java_dyn_CallSite::target_offset_in_bytes, rcx))); - __ null_check(rcx); + __ movptr(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_dyn_CallSite::target_offset_in_bytes, rcx))); + __ null_check(rcx_method_handle); __ prepare_to_jump_from_interpreted(); - __ jump_to_method_handle_entry(rcx, rdx); + __ jump_to_method_handle_entry(rcx_method_handle, rdx); } //---------------------------------------------------------------------------------------------------- diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp index 4f46e9f800d..c2ec71c57ba 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp @@ -3120,17 +3120,19 @@ void TemplateTable::invokedynamic(int byte_no) { // rcx: receiver address // rdx: flags (unused) + Register rax_callsite = rax; + Register rcx_method_handle = rcx; + if (ProfileInterpreter) { - Label L; // %%% should make a type profile for any invokedynamic that takes a ref argument // profile this call __ profile_call(r13); } - __ movptr(rcx, Address(rax, __ delayed_value(java_dyn_CallSite::target_offset_in_bytes, rcx))); - __ null_check(rcx); + __ load_heap_oop(rcx_method_handle, Address(rax_callsite, __ delayed_value(java_dyn_CallSite::target_offset_in_bytes, rcx))); + __ null_check(rcx_method_handle); __ prepare_to_jump_from_interpreted(); - __ jump_to_method_handle_entry(rcx, rdx); + __ jump_to_method_handle_entry(rcx_method_handle, rdx); } diff --git a/hotspot/src/share/vm/asm/codeBuffer.hpp b/hotspot/src/share/vm/asm/codeBuffer.hpp index 16880dcfadd..da38c19e4a8 100644 --- a/hotspot/src/share/vm/asm/codeBuffer.hpp +++ b/hotspot/src/share/vm/asm/codeBuffer.hpp @@ -168,8 +168,8 @@ class CodeSection VALUE_OBJ_CLASS_SPEC { bool allocates(address pc) const { return pc >= _start && pc < _limit; } bool allocates2(address pc) const { return pc >= _start && pc <= _limit; } - void set_end(address pc) { assert(allocates2(pc),""); _end = pc; } - void set_mark(address pc) { assert(contains2(pc),"not in codeBuffer"); + void set_end(address pc) { assert(allocates2(pc), err_msg("not in CodeBuffer memory: " PTR_FORMAT " <= " PTR_FORMAT " <= " PTR_FORMAT, _start, pc, _limit)); _end = pc; } + void set_mark(address pc) { assert(contains2(pc), "not in codeBuffer"); _mark = pc; } void set_mark_off(int offset) { assert(contains2(offset+_start),"not in codeBuffer"); _mark = offset + _start; } diff --git a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp index cd75fd52409..8ad5bf91d8f 100644 --- a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp +++ b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp @@ -471,7 +471,7 @@ int ciInstanceKlass::compute_nonstatic_fields() { ciField* field = fields->at(i); int offset = field->offset_in_bytes(); int size = (field->_type == NULL) ? heapOopSize : field->size_in_bytes(); - assert(last_offset <= offset, "no field overlap"); + assert(last_offset <= offset, err_msg("no field overlap: %d <= %d", last_offset, offset)); if (last_offset > (int)sizeof(oopDesc)) assert((offset - last_offset) < BytesPerLong, "no big holes"); // Note: Two consecutive T_BYTE fields will be separated by wordSize-1 diff --git a/hotspot/src/share/vm/ci/ciTypeFlow.cpp b/hotspot/src/share/vm/ci/ciTypeFlow.cpp index 3071856b948..6a3390c4578 100644 --- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp +++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp @@ -1945,7 +1945,7 @@ ciTypeFlow::ciTypeFlow(ciEnv* env, ciMethod* method, int osr_bci) { _has_irreducible_entry = false; _osr_bci = osr_bci; _failure_reason = NULL; - assert(start_bci() >= 0 && start_bci() < code_size() , "correct osr_bci argument"); + assert(0 <= start_bci() && start_bci() < code_size() , err_msg("correct osr_bci argument: 0 <= %d < %d", start_bci(), code_size())); _work_list = NULL; _ciblock_count = _methodBlocks->num_blocks(); diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index 36085a754f8..01c6bb9b249 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -2702,13 +2702,15 @@ void ClassFileParser::java_dyn_MethodHandle_fix_pre(constantPoolHandle cp, // Adjust the field type from byte to an unmanaged pointer. assert(fac_ptr->nonstatic_byte_count > 0, ""); fac_ptr->nonstatic_byte_count -= 1; - (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, - word_sig_index); - fac_ptr->nonstatic_word_count += 1; + + (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, word_sig_index); + if (UseCompressedOops) fac_ptr->nonstatic_double_count += 1; + else fac_ptr->nonstatic_word_count += 1; FieldAllocationType atype = (FieldAllocationType) (*fields_ptr)->ushort_at(i + instanceKlass::low_offset); assert(atype == NONSTATIC_BYTE, ""); - FieldAllocationType new_atype = NONSTATIC_WORD; + FieldAllocationType new_atype = (wordSize == longSize) ? NONSTATIC_DOUBLE : NONSTATIC_WORD; + assert(wordSize == longSize || wordSize == jintSize, "ILP32 or LP64"); (*fields_ptr)->ushort_at_put(i + instanceKlass::low_offset, new_atype); found_vmentry = true; diff --git a/hotspot/src/share/vm/oops/oop.inline.hpp b/hotspot/src/share/vm/oops/oop.inline.hpp index c840f46f90b..dc3245d5851 100644 --- a/hotspot/src/share/vm/oops/oop.inline.hpp +++ b/hotspot/src/share/vm/oops/oop.inline.hpp @@ -173,7 +173,7 @@ inline oop oopDesc::decode_heap_oop_not_null(narrowOop v) { address base = Universe::narrow_oop_base(); int shift = Universe::narrow_oop_shift(); oop result = (oop)(void*)((uintptr_t)base + ((uintptr_t)v << shift)); - assert(check_obj_alignment(result), "Address not aligned"); + assert(check_obj_alignment(result), err_msg("address not aligned: " PTR_FORMAT, (void*) result)); return result; } From 0b7ceb02049d7b494e2b3f4ade6610ab3f56f71e Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 11 Oct 2010 10:19:57 -0700 Subject: [PATCH 069/722] 6990390: javah -help produces help screen with extraneous output Reviewed-by: darcy --- .../classes/com/sun/tools/javah/resources/l10n.properties | 2 +- langtools/test/tools/javah/TestHelpOpts.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties b/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties index 305e275b054..b284dad8a90 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties +++ b/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties @@ -94,7 +94,7 @@ main.opt.d=\ \ -d

    Output directory main.opt.v=\ \ -v -verbose Enable verbose output -main.opt.help=\ +main.opt.h=\ \ -h --help -? Print this message main.opt.version=\ \ -version Print version information diff --git a/langtools/test/tools/javah/TestHelpOpts.java b/langtools/test/tools/javah/TestHelpOpts.java index c4311674298..108be057b00 100644 --- a/langtools/test/tools/javah/TestHelpOpts.java +++ b/langtools/test/tools/javah/TestHelpOpts.java @@ -23,7 +23,7 @@ /* * @test - * @bug 6893932 + * @bug 6893932 6990390 * @summary javah help screen lists -h and -? but does not accept them */ @@ -68,6 +68,8 @@ public class TestHelpOpts { String flat = out.replaceAll("\\s+", " "); // canonicalize whitespace if (!flat.contains("Usage: javah [options] where [options] include:")) error("expected text not found"); + if (flat.contains("main.opt")) + error("key not found in resource bundle: " + flat.replaceAll(".*(main.opt.[^ ]*).*", "$1")); } void error(String msg) { From e87086669918b92edd3fd4b336a618765cc11926 Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Tue, 12 Oct 2010 02:21:06 -0700 Subject: [PATCH 070/722] 6991065: missed a review comment in 6829194 Reviewed-by: kvn --- hotspot/src/share/vm/classfile/classFileParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index 01c6bb9b249..a8de5afc5b1 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -2704,13 +2704,13 @@ void ClassFileParser::java_dyn_MethodHandle_fix_pre(constantPoolHandle cp, fac_ptr->nonstatic_byte_count -= 1; (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, word_sig_index); - if (UseCompressedOops) fac_ptr->nonstatic_double_count += 1; - else fac_ptr->nonstatic_word_count += 1; + assert(wordSize == longSize || wordSize == jintSize, "ILP32 or LP64"); + if (wordSize == longSize) fac_ptr->nonstatic_double_count += 1; + else fac_ptr->nonstatic_word_count += 1; FieldAllocationType atype = (FieldAllocationType) (*fields_ptr)->ushort_at(i + instanceKlass::low_offset); assert(atype == NONSTATIC_BYTE, ""); FieldAllocationType new_atype = (wordSize == longSize) ? NONSTATIC_DOUBLE : NONSTATIC_WORD; - assert(wordSize == longSize || wordSize == jintSize, "ILP32 or LP64"); (*fields_ptr)->ushort_at_put(i + instanceKlass::low_offset, new_atype); found_vmentry = true; From bc52d31ebdc817bffbaaa29ec7d7506a25d00eec Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Tue, 12 Oct 2010 15:52:58 +0400 Subject: [PATCH 071/722] 6895647: Frame may jump to an unpredicted location upon entering the non-opaque mode on X11 Make sure the size hints are set before mapping the window on the screen Reviewed-by: art, dcherepanov --- .../classes/sun/awt/X11/XDecoratedPeer.java | 6 +- .../Frame/FrameLocation/FrameLocation.java | 68 +++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/awt/Frame/FrameLocation/FrameLocation.java diff --git a/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java index 340747f689c..a47651ce53a 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java @@ -87,11 +87,15 @@ abstract class XDecoratedPeer extends XWindowPeer { } void postInit(XCreateWindowParams params) { + // The size hints must be set BEFORE mapping the window (see 6895647) + updateSizeHints(dimensions); + + // The super method maps the window if it's visible on the shared level super.postInit(params); + // The lines that follow need to be in a postInit, so they // happen after the X window is created. initResizability(); - updateSizeHints(dimensions); XWM.requestWMExtents(getWindow()); content = XContentWindow.createContent(this); diff --git a/jdk/test/java/awt/Frame/FrameLocation/FrameLocation.java b/jdk/test/java/awt/Frame/FrameLocation/FrameLocation.java new file mode 100644 index 00000000000..bd12a2f1c5b --- /dev/null +++ b/jdk/test/java/awt/Frame/FrameLocation/FrameLocation.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 6895647 + @summary X11 Frame locations should be what we set them to + @author anthony.petrov@oracle.com: area=awt.toplevel + @run main FrameLocation + */ + +import java.awt.*; + +public class FrameLocation { + private static final int X = 250; + private static final int Y = 250; + + public static void main(String[] args) { + Frame f = new Frame("test"); + f.setBounds(X, Y, 250, 250); // the size doesn't matter + f.setVisible(true); + + for (int i = 0; i < 10; i++) { + // 2 seconds must be enough for the WM to show the window + try { + Thread.sleep(2000); + } catch (InterruptedException ex) { + } + + // Check the location + int x = f.getX(); + int y = f.getY(); + + if (x != X || y != Y) { + throw new RuntimeException("The frame location is wrong! Current: " + x + ", " + y + "; expected: " + X + ", " + Y); + } + + // Emulate what happens when setGraphicsConfiguration() is called + synchronized (f.getTreeLock()) { + f.removeNotify(); + f.addNotify(); + } + } + + f.dispose(); + } +} + From 214842d862d24c4ae77d28b7c8bb4122e676f722 Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Tue, 12 Oct 2010 18:20:07 +0400 Subject: [PATCH 072/722] 6990352: SplashScreen.getSplashScreen() does not return null for implicitly closed splash screen Mark the splash screen closed when it happens implicitly Reviewed-by: art, dcherepanov --- jdk/src/share/classes/java/awt/SplashScreen.java | 6 ++++++ jdk/src/share/classes/java/awt/Window.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/jdk/src/share/classes/java/awt/SplashScreen.java b/jdk/src/share/classes/java/awt/SplashScreen.java index 64ec967d00f..e02a6172df7 100644 --- a/jdk/src/share/classes/java/awt/SplashScreen.java +++ b/jdk/src/share/classes/java/awt/SplashScreen.java @@ -318,6 +318,12 @@ public final class SplashScreen { checkVisible(); _close(splashPtr); image = null; + SplashScreen.markClosed(); + } + } + + static void markClosed() { + synchronized (SplashScreen.class) { wasClosed = true; theInstance = null; } diff --git a/jdk/src/share/classes/java/awt/Window.java b/jdk/src/share/classes/java/awt/Window.java index c603767dd74..7dce80e9564 100644 --- a/jdk/src/share/classes/java/awt/Window.java +++ b/jdk/src/share/classes/java/awt/Window.java @@ -928,7 +928,10 @@ public class Window extends Container implements Accessible { return; } if (beforeFirstWindowShown.getAndSet(false)) { + // We don't use SplashScreen.getSplashScreen() to avoid instantiating + // the object if it hasn't been requested by user code explicitly SunToolkit.closeSplashScreen(); + SplashScreen.markClosed(); } } From da95f5319ecd3ef0085a2c0b4947e2ab08191e30 Mon Sep 17 00:00:00 2001 From: Keith McGuigan Date: Tue, 12 Oct 2010 10:57:33 -0400 Subject: [PATCH 073/722] 6392697: Additional flag needed to supress Hotspot warning messages Apply PrintJvmWarnings flag to all warnings Reviewed-by: coleenp, phh --- hotspot/src/share/vm/runtime/globals.hpp | 3 +++ hotspot/src/share/vm/utilities/debug.cpp | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 167edb5f796..c2619205957 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -815,6 +815,9 @@ class CommandLineFlags { develop(bool, PrintJVMWarnings, false, \ "Prints warnings for unimplemented JVM functions") \ \ + product(bool, PrintWarnings, true, \ + "Prints JVM warnings to output stream") \ + \ notproduct(uintx, WarnOnStalledSpinLock, 0, \ "Prints warnings for stalled SpinLocks") \ \ diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp index 54282bf0740..c535ff0e5ab 100644 --- a/hotspot/src/share/vm/utilities/debug.cpp +++ b/hotspot/src/share/vm/utilities/debug.cpp @@ -51,14 +51,16 @@ void warning(const char* format, ...) { - // In case error happens before init or during shutdown - if (tty == NULL) ostream_init(); + if (PrintWarnings) { + // In case error happens before init or during shutdown + if (tty == NULL) ostream_init(); - tty->print("%s warning: ", VM_Version::vm_name()); - va_list ap; - va_start(ap, format); - tty->vprint_cr(format, ap); - va_end(ap); + tty->print("%s warning: ", VM_Version::vm_name()); + va_list ap; + va_start(ap, format); + tty->vprint_cr(format, ap); + va_end(ap); + } if (BreakAtWarning) BREAKPOINT; } From 02bad20969e7532c6ea6ac3fbd03e344a6f04f9e Mon Sep 17 00:00:00 2001 From: John Cuthbertson Date: Tue, 12 Oct 2010 09:36:48 -0700 Subject: [PATCH 074/722] 6971296: G1: simplify G1RemSet class hierarchy Remove G1RemSet base class and StupidG1RemSet class; rename HRInto_G1RemSet to just G1RemSet. Reviewed-by: ysr, tonyp --- .../gc_implementation/g1/g1CollectedHeap.cpp | 19 +-- .../vm/gc_implementation/g1/g1OopClosures.hpp | 2 - .../vm/gc_implementation/g1/g1RemSet.cpp | 82 ++++------ .../vm/gc_implementation/g1/g1RemSet.hpp | 153 +++++------------- .../gc_implementation/g1/g1RemSet.inline.hpp | 16 +- .../vm/gc_implementation/g1/g1_globals.hpp | 3 - .../vm/gc_implementation/includeDB_gc_g1 | 6 + 7 files changed, 99 insertions(+), 182 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index c72e154c494..6a9114268fe 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -791,7 +791,7 @@ class RebuildRSOutOfRegionClosure: public HeapRegionClosure { int _worker_i; public: RebuildRSOutOfRegionClosure(G1CollectedHeap* g1, int worker_i = 0) : - _cl(g1->g1_rem_set()->as_HRInto_G1RemSet(), worker_i), + _cl(g1->g1_rem_set(), worker_i), _worker_i(worker_i), _g1h(g1) { } @@ -890,7 +890,7 @@ void G1CollectedHeap::do_collection(bool explicit_gc, abandon_cur_alloc_region(); abandon_gc_alloc_regions(); assert(_cur_alloc_region == NULL, "Invariant."); - g1_rem_set()->as_HRInto_G1RemSet()->cleanupHRRS(); + g1_rem_set()->cleanupHRRS(); tear_down_region_lists(); set_used_regions_to_need_zero_fill(); @@ -1506,15 +1506,11 @@ jint G1CollectedHeap::initialize() { } // Also create a G1 rem set. - if (G1UseHRIntoRS) { - if (mr_bs()->is_a(BarrierSet::CardTableModRef)) { - _g1_rem_set = new HRInto_G1RemSet(this, (CardTableModRefBS*)mr_bs()); - } else { - vm_exit_during_initialization("G1 requires a cardtable mod ref bs."); - return JNI_ENOMEM; - } + if (mr_bs()->is_a(BarrierSet::CardTableModRef)) { + _g1_rem_set = new G1RemSet(this, (CardTableModRefBS*)mr_bs()); } else { - _g1_rem_set = new StupidG1RemSet(this); + vm_exit_during_initialization("G1 requires a cardtable mod ref bs."); + return JNI_ENOMEM; } // Carve out the G1 part of the heap. @@ -2706,8 +2702,7 @@ size_t G1CollectedHeap::max_pending_card_num() { } size_t G1CollectedHeap::cards_scanned() { - HRInto_G1RemSet* g1_rset = (HRInto_G1RemSet*) g1_rem_set(); - return g1_rset->cardsScanned(); + return g1_rem_set()->cardsScanned(); } void diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp index 2aef2518734..542e7b02615 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp @@ -25,8 +25,6 @@ class HeapRegion; class G1CollectedHeap; class G1RemSet; -class HRInto_G1RemSet; -class G1RemSet; class ConcurrentMark; class DirtyCardToOopClosure; class CMBitMap; diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp index 6c79abcf8ba..ca796df2e91 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp @@ -97,13 +97,6 @@ public: } }; -void -StupidG1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc, - int worker_i) { - IntoCSRegionClosure rc(_g1, oc); - _g1->heap_region_iterate(&rc); -} - class VerifyRSCleanCardOopClosure: public OopClosure { G1CollectedHeap* _g1; public: @@ -119,8 +112,9 @@ public: } }; -HRInto_G1RemSet::HRInto_G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) - : G1RemSet(g1), _ct_bs(ct_bs), _g1p(_g1->g1_policy()), +G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) + : _g1(g1), _conc_refine_cards(0), + _ct_bs(ct_bs), _g1p(_g1->g1_policy()), _cg1r(g1->concurrent_g1_refine()), _traversal_in_progress(false), _cset_rs_update_cl(NULL), @@ -134,7 +128,7 @@ HRInto_G1RemSet::HRInto_G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs) } } -HRInto_G1RemSet::~HRInto_G1RemSet() { +G1RemSet::~G1RemSet() { delete _seq_task; for (uint i = 0; i < n_workers(); i++) { assert(_cset_rs_update_cl[i] == NULL, "it should be"); @@ -277,7 +271,7 @@ public: // p threads // Then thread t will start at region t * floor (n/p) -HeapRegion* HRInto_G1RemSet::calculateStartRegion(int worker_i) { +HeapRegion* G1RemSet::calculateStartRegion(int worker_i) { HeapRegion* result = _g1p->collection_set(); if (ParallelGCThreads > 0) { size_t cs_size = _g1p->collection_set_size(); @@ -290,7 +284,7 @@ HeapRegion* HRInto_G1RemSet::calculateStartRegion(int worker_i) { return result; } -void HRInto_G1RemSet::scanRS(OopsInHeapRegionClosure* oc, int worker_i) { +void G1RemSet::scanRS(OopsInHeapRegionClosure* oc, int worker_i) { double rs_time_start = os::elapsedTime(); HeapRegion *startRegion = calculateStartRegion(worker_i); @@ -340,7 +334,7 @@ public: } }; -void HRInto_G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, int worker_i) { +void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, int worker_i) { double start = os::elapsedTime(); // Apply the given closure to all remaining log entries. RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq); @@ -439,12 +433,11 @@ public: } }; -void HRInto_G1RemSet::cleanupHRRS() { +void G1RemSet::cleanupHRRS() { HeapRegionRemSet::cleanup(); } -void -HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc, +void G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc, int worker_i) { #if CARD_REPEAT_HISTO ct_freq_update_histo_and_reset(); @@ -508,8 +501,7 @@ HRInto_G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc, _cset_rs_update_cl[worker_i] = NULL; } -void HRInto_G1RemSet:: -prepare_for_oops_into_collection_set_do() { +void G1RemSet::prepare_for_oops_into_collection_set_do() { #if G1_REM_SET_LOGGING PrintRSClosure cl; _g1->collection_set_iterate(&cl); @@ -581,7 +573,7 @@ public: // RSet updating, // * the post-write barrier shouldn't be logging updates to young // regions (but there is a situation where this can happen - see - // the comment in HRInto_G1RemSet::concurrentRefineOneCard below - + // the comment in G1RemSet::concurrentRefineOneCard below - // that should not be applicable here), and // * during actual RSet updating, the filtering of cards in young // regions in HeapRegion::oops_on_card_seq_iterate_careful is @@ -601,7 +593,7 @@ public: } }; -void HRInto_G1RemSet::cleanup_after_oops_into_collection_set_do() { +void G1RemSet::cleanup_after_oops_into_collection_set_do() { guarantee( _cards_scanned != NULL, "invariant" ); _total_cards_scanned = 0; for (uint i = 0; i < n_workers(); ++i) @@ -692,12 +684,12 @@ public: } }; -void HRInto_G1RemSet::scrub(BitMap* region_bm, BitMap* card_bm) { +void G1RemSet::scrub(BitMap* region_bm, BitMap* card_bm) { ScrubRSClosure scrub_cl(region_bm, card_bm); _g1->heap_region_iterate(&scrub_cl); } -void HRInto_G1RemSet::scrub_par(BitMap* region_bm, BitMap* card_bm, +void G1RemSet::scrub_par(BitMap* region_bm, BitMap* card_bm, int worker_num, int claim_val) { ScrubRSClosure scrub_cl(region_bm, card_bm); _g1->heap_region_par_iterate_chunked(&scrub_cl, worker_num, claim_val); @@ -741,7 +733,7 @@ public: virtual void do_oop(narrowOop* p) { do_oop_nv(p); } }; -bool HRInto_G1RemSet::concurrentRefineOneCard_impl(jbyte* card_ptr, int worker_i, +bool G1RemSet::concurrentRefineOneCard_impl(jbyte* card_ptr, int worker_i, bool check_for_refs_into_cset) { // Construct the region representing the card. HeapWord* start = _ct_bs->addr_for(card_ptr); @@ -820,7 +812,7 @@ bool HRInto_G1RemSet::concurrentRefineOneCard_impl(jbyte* card_ptr, int worker_i return trigger_cl.value(); } -bool HRInto_G1RemSet::concurrentRefineOneCard(jbyte* card_ptr, int worker_i, +bool G1RemSet::concurrentRefineOneCard(jbyte* card_ptr, int worker_i, bool check_for_refs_into_cset) { // If the card is no longer dirty, nothing to do. if (*card_ptr != CardTableModRefBS::dirty_card_val()) { @@ -995,7 +987,7 @@ public: } }; -void HRInto_G1RemSet::print_summary_info() { +void G1RemSet::print_summary_info() { G1CollectedHeap* g1 = G1CollectedHeap::heap(); #if CARD_REPEAT_HISTO @@ -1029,30 +1021,26 @@ void HRInto_G1RemSet::print_summary_info() { g1->concurrent_g1_refine()->threads_do(&p); gclog_or_tty->print_cr(""); - if (G1UseHRIntoRS) { - HRRSStatsIter blk; - g1->heap_region_iterate(&blk); - gclog_or_tty->print_cr(" Total heap region rem set sizes = " SIZE_FORMAT "K." - " Max = " SIZE_FORMAT "K.", - blk.total_mem_sz()/K, blk.max_mem_sz()/K); - gclog_or_tty->print_cr(" Static structures = " SIZE_FORMAT "K," - " free_lists = " SIZE_FORMAT "K.", - HeapRegionRemSet::static_mem_size()/K, - HeapRegionRemSet::fl_mem_size()/K); - gclog_or_tty->print_cr(" %d occupied cards represented.", - blk.occupied()); - gclog_or_tty->print_cr(" Max sz region = [" PTR_FORMAT ", " PTR_FORMAT " )" - ", cap = " SIZE_FORMAT "K, occ = " SIZE_FORMAT "K.", - blk.max_mem_sz_region()->bottom(), blk.max_mem_sz_region()->end(), - (blk.max_mem_sz_region()->rem_set()->mem_size() + K - 1)/K, - (blk.max_mem_sz_region()->rem_set()->occupied() + K - 1)/K); - gclog_or_tty->print_cr(" Did %d coarsenings.", - HeapRegionRemSet::n_coarsenings()); - - } + HRRSStatsIter blk; + g1->heap_region_iterate(&blk); + gclog_or_tty->print_cr(" Total heap region rem set sizes = " SIZE_FORMAT "K." + " Max = " SIZE_FORMAT "K.", + blk.total_mem_sz()/K, blk.max_mem_sz()/K); + gclog_or_tty->print_cr(" Static structures = " SIZE_FORMAT "K," + " free_lists = " SIZE_FORMAT "K.", + HeapRegionRemSet::static_mem_size()/K, + HeapRegionRemSet::fl_mem_size()/K); + gclog_or_tty->print_cr(" %d occupied cards represented.", + blk.occupied()); + gclog_or_tty->print_cr(" Max sz region = [" PTR_FORMAT ", " PTR_FORMAT " )" + ", cap = " SIZE_FORMAT "K, occ = " SIZE_FORMAT "K.", + blk.max_mem_sz_region()->bottom(), blk.max_mem_sz_region()->end(), + (blk.max_mem_sz_region()->rem_set()->mem_size() + K - 1)/K, + (blk.max_mem_sz_region()->rem_set()->occupied() + K - 1)/K); + gclog_or_tty->print_cr(" Did %d coarsenings.", HeapRegionRemSet::n_coarsenings()); } -void HRInto_G1RemSet::prepare_for_verify() { +void G1RemSet::prepare_for_verify() { if (G1HRRSFlushLogBuffersOnVerify && (VerifyBeforeGC || VerifyAfterGC) && !_g1->full_collection()) { diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp index fcb5ecd76cf..5e0e8ddb1c0 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp @@ -27,107 +27,18 @@ class G1CollectedHeap; class CardTableModRefBarrierSet; -class HRInto_G1RemSet; class ConcurrentG1Refine; +// A G1RemSet in which each heap region has a rem set that records the +// external heap references into it. Uses a mod ref bs to track updates, +// so that they can be used to update the individual region remsets. + class G1RemSet: public CHeapObj { protected: G1CollectedHeap* _g1; unsigned _conc_refine_cards; size_t n_workers(); -public: - G1RemSet(G1CollectedHeap* g1) : - _g1(g1), _conc_refine_cards(0) - {} - - // Invoke "blk->do_oop" on all pointers into the CS in object in regions - // outside the CS (having invoked "blk->set_region" to set the "from" - // region correctly beforehand.) The "worker_i" param is for the - // parallel case where the number of the worker thread calling this - // function can be helpful in partitioning the work to be done. It - // should be the same as the "i" passed to the calling thread's - // work(i) function. In the sequential case this param will be ingored. - virtual void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, - int worker_i) = 0; - - // Prepare for and cleanup after an oops_into_collection_set_do - // call. Must call each of these once before and after (in sequential - // code) any threads call oops into collection set do. (This offers an - // opportunity to sequential setup and teardown of structures needed by a - // parallel iteration over the CS's RS.) - virtual void prepare_for_oops_into_collection_set_do() = 0; - virtual void cleanup_after_oops_into_collection_set_do() = 0; - - // If "this" is of the given subtype, return "this", else "NULL". - virtual HRInto_G1RemSet* as_HRInto_G1RemSet() { return NULL; } - - // Record, if necessary, the fact that *p (where "p" is in region "from", - // and is, a fortiori, required to be non-NULL) has changed to its new value. - virtual void write_ref(HeapRegion* from, oop* p) = 0; - virtual void write_ref(HeapRegion* from, narrowOop* p) = 0; - virtual void par_write_ref(HeapRegion* from, oop* p, int tid) = 0; - virtual void par_write_ref(HeapRegion* from, narrowOop* p, int tid) = 0; - - // Requires "region_bm" and "card_bm" to be bitmaps with 1 bit per region - // or card, respectively, such that a region or card with a corresponding - // 0 bit contains no part of any live object. Eliminates any remembered - // set entries that correspond to dead heap ranges. - virtual void scrub(BitMap* region_bm, BitMap* card_bm) = 0; - // Like the above, but assumes is called in parallel: "worker_num" is the - // parallel thread id of the current thread, and "claim_val" is the - // value that should be used to claim heap regions. - virtual void scrub_par(BitMap* region_bm, BitMap* card_bm, - int worker_num, int claim_val) = 0; - - // Refine the card corresponding to "card_ptr". If "sts" is non-NULL, - // join and leave around parts that must be atomic wrt GC. (NULL means - // being done at a safepoint.) - // With some implementations of this routine, when check_for_refs_into_cset - // is true, a true result may be returned if the given card contains oops - // that have references into the current collection set. - virtual bool concurrentRefineOneCard(jbyte* card_ptr, int worker_i, - bool check_for_refs_into_cset) { - return false; - } - - // Print any relevant summary info. - virtual void print_summary_info() {} - - // Prepare remebered set for verification. - virtual void prepare_for_verify() {}; -}; - - -// The simplest possible G1RemSet: iterates over all objects in non-CS -// regions, searching for pointers into the CS. -class StupidG1RemSet: public G1RemSet { -public: - StupidG1RemSet(G1CollectedHeap* g1) : G1RemSet(g1) {} - - void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, - int worker_i); - - void prepare_for_oops_into_collection_set_do() {} - void cleanup_after_oops_into_collection_set_do() {} - - // Nothing is necessary in the version below. - void write_ref(HeapRegion* from, oop* p) {} - void write_ref(HeapRegion* from, narrowOop* p) {} - void par_write_ref(HeapRegion* from, oop* p, int tid) {} - void par_write_ref(HeapRegion* from, narrowOop* p, int tid) {} - - void scrub(BitMap* region_bm, BitMap* card_bm) {} - void scrub_par(BitMap* region_bm, BitMap* card_bm, - int worker_num, int claim_val) {} - -}; - -// A G1RemSet in which each heap region has a rem set that records the -// external heap references into it. Uses a mod ref bs to track updates, -// so that they can be used to update the individual region remsets. - -class HRInto_G1RemSet: public G1RemSet { protected: enum SomePrivateConstants { UpdateRStoMergeSync = 0, @@ -175,27 +86,31 @@ public: // scanned. void cleanupHRRS(); - HRInto_G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs); - ~HRInto_G1RemSet(); + G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs); + ~G1RemSet(); + // Invoke "blk->do_oop" on all pointers into the CS in objects in regions + // outside the CS (having invoked "blk->set_region" to set the "from" + // region correctly beforehand.) The "worker_i" param is for the + // parallel case where the number of the worker thread calling this + // function can be helpful in partitioning the work to be done. It + // should be the same as the "i" passed to the calling thread's + // work(i) function. In the sequential case this param will be ingored. void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, int worker_i); + // Prepare for and cleanup after an oops_into_collection_set_do + // call. Must call each of these once before and after (in sequential + // code) any threads call oops_into_collection_set_do. (This offers an + // opportunity to sequential setup and teardown of structures needed by a + // parallel iteration over the CS's RS.) void prepare_for_oops_into_collection_set_do(); void cleanup_after_oops_into_collection_set_do(); - void scanRS(OopsInHeapRegionClosure* oc, int worker_i); - template void scanNewRefsRS_work(OopsInHeapRegionClosure* oc, int worker_i); - void scanNewRefsRS(OopsInHeapRegionClosure* oc, int worker_i) { - if (UseCompressedOops) { - scanNewRefsRS_work(oc, worker_i); - } else { - scanNewRefsRS_work(oc, worker_i); - } - } - void updateRS(DirtyCardQueue* into_cset_dcq, int worker_i); - HeapRegion* calculateStartRegion(int i); - HRInto_G1RemSet* as_HRInto_G1RemSet() { return this; } + void scanRS(OopsInHeapRegionClosure* oc, int worker_i); + void updateRS(DirtyCardQueue* into_cset_dcq, int worker_i); + + HeapRegion* calculateStartRegion(int i); CardTableModRefBS* ct_bs() { return _ct_bs; } size_t cardsScanned() { return _total_cards_scanned; } @@ -219,17 +134,31 @@ public: bool self_forwarded(oop obj); + // Requires "region_bm" and "card_bm" to be bitmaps with 1 bit per region + // or card, respectively, such that a region or card with a corresponding + // 0 bit contains no part of any live object. Eliminates any remembered + // set entries that correspond to dead heap ranges. void scrub(BitMap* region_bm, BitMap* card_bm); + + // Like the above, but assumes is called in parallel: "worker_num" is the + // parallel thread id of the current thread, and "claim_val" is the + // value that should be used to claim heap regions. void scrub_par(BitMap* region_bm, BitMap* card_bm, int worker_num, int claim_val); - // If check_for_refs_into_cset is true then a true result is returned - // if the card contains oops that have references into the current - // collection set. + // Refine the card corresponding to "card_ptr". If "sts" is non-NULL, + // join and leave around parts that must be atomic wrt GC. (NULL means + // being done at a safepoint.) + // If check_for_refs_into_cset is true, a true result is returned + // if the given card contains oops that have references into the + // current collection set. virtual bool concurrentRefineOneCard(jbyte* card_ptr, int worker_i, bool check_for_refs_into_cset); + // Print any relevant summary info. virtual void print_summary_info(); + + // Prepare remembered set for verification. virtual void prepare_for_verify(); }; @@ -250,13 +179,13 @@ public: class UpdateRSOopClosure: public OopClosure { HeapRegion* _from; - HRInto_G1RemSet* _rs; + G1RemSet* _rs; int _worker_i; template void do_oop_work(T* p); public: - UpdateRSOopClosure(HRInto_G1RemSet* rs, int worker_i = 0) : + UpdateRSOopClosure(G1RemSet* rs, int worker_i = 0) : _from(NULL), _rs(rs), _worker_i(worker_i) { guarantee(_rs != NULL, "Requires an HRIntoG1RemSet"); } diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp index ce64065527b..672c1899683 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp @@ -30,16 +30,18 @@ inline size_t G1RemSet::n_workers() { } } -template inline void HRInto_G1RemSet::write_ref_nv(HeapRegion* from, T* p) { +template +inline void G1RemSet::write_ref_nv(HeapRegion* from, T* p) { par_write_ref_nv(from, p, 0); } -inline bool HRInto_G1RemSet::self_forwarded(oop obj) { +inline bool G1RemSet::self_forwarded(oop obj) { bool result = (obj->is_forwarded() && (obj->forwardee()== obj)); return result; } -template inline void HRInto_G1RemSet::par_write_ref_nv(HeapRegion* from, T* p, int tid) { +template +inline void G1RemSet::par_write_ref_nv(HeapRegion* from, T* p, int tid) { oop obj = oopDesc::load_decode_heap_oop(p); #ifdef ASSERT // can't do because of races @@ -77,7 +79,7 @@ template inline void HRInto_G1RemSet::par_write_ref_nv(HeapRegion* fro // Deferred updates to the CSet are either discarded (in the normal case), // or processed (if an evacuation failure occurs) at the end // of the collection. - // See HRInto_G1RemSet::cleanup_after_oops_into_collection_set_do(). + // See G1RemSet::cleanup_after_oops_into_collection_set_do(). } else { #if G1_REM_SET_LOGGING gclog_or_tty->print_cr("Adding " PTR_FORMAT " (" PTR_FORMAT ") to RS" @@ -91,12 +93,14 @@ template inline void HRInto_G1RemSet::par_write_ref_nv(HeapRegion* fro } } -template inline void UpdateRSOopClosure::do_oop_work(T* p) { +template +inline void UpdateRSOopClosure::do_oop_work(T* p) { assert(_from != NULL, "from region must be non-NULL"); _rs->par_write_ref(_from, p, _worker_i); } -template inline void UpdateRSetImmediate::do_oop_work(T* p) { +template +inline void UpdateRSetImmediate::do_oop_work(T* p) { assert(_from->is_in_reserved(p), "paranoia"); T heap_oop = oopDesc::load_heap_oop(p); if (!oopDesc::is_null(heap_oop) && !_from->is_survivor()) { diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp index 0abac8a1855..67dc4d1c40c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp @@ -40,9 +40,6 @@ develop(intx, G1PolicyVerbose, 0, \ "The verbosity level on G1 policy decisions") \ \ - develop(bool, G1UseHRIntoRS, true, \ - "Determines whether the 'advanced' HR Into rem set is used.") \ - \ develop(intx, G1MarkingVerboseLevel, 0, \ "Level (0-4) of verboseness of the marking code") \ \ diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 index d1476972275..073a48cad3c 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 @@ -310,10 +310,16 @@ heapRegionSeq.hpp heapRegion.hpp heapRegionSeq.inline.hpp heapRegionSeq.hpp +instanceKlass.cpp g1RemSet.inline.hpp + +instanceRefKlass.cpp g1RemSet.inline.hpp + klass.hpp g1OopClosures.hpp memoryService.cpp g1MemoryPool.hpp +objArrayKlass.cpp g1RemSet.inline.hpp + ptrQueue.cpp allocation.hpp ptrQueue.cpp allocation.inline.hpp ptrQueue.cpp mutex.hpp From d85b042fcadbb20aba0a162e24543af18e72de82 Mon Sep 17 00:00:00 2001 From: John Coomes Date: Tue, 12 Oct 2010 11:29:45 -0700 Subject: [PATCH 075/722] 6989448: G1: refactor and simplify G1ParScanThreadState Reviewed-by: iveresov, tonyp --- .../gc_implementation/g1/g1CollectedHeap.cpp | 112 +++++++++++++----- .../gc_implementation/g1/g1CollectedHeap.hpp | 108 +++-------------- 2 files changed, 96 insertions(+), 124 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index 6a9114268fe..d12e59fd316 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -3845,6 +3845,54 @@ G1ParScanThreadState::print_termination_stats(int i, undo_waste() * HeapWordSize / K); } +#ifdef ASSERT +bool G1ParScanThreadState::verify_ref(narrowOop* ref) const { + assert(ref != NULL, "invariant"); + assert(UseCompressedOops, "sanity"); + assert(!has_partial_array_mask(ref), err_msg("ref=" PTR_FORMAT, ref)); + oop p = oopDesc::load_decode_heap_oop(ref); + assert(_g1h->is_in_g1_reserved(p), + err_msg("ref=" PTR_FORMAT " p=" PTR_FORMAT, ref, intptr_t(p))); + return true; +} + +bool G1ParScanThreadState::verify_ref(oop* ref) const { + assert(ref != NULL, "invariant"); + if (has_partial_array_mask(ref)) { + // Must be in the collection set--it's already been copied. + oop p = clear_partial_array_mask(ref); + assert(_g1h->obj_in_cs(p), + err_msg("ref=" PTR_FORMAT " p=" PTR_FORMAT, ref, intptr_t(p))); + } else { + oop p = oopDesc::load_decode_heap_oop(ref); + assert(_g1h->is_in_g1_reserved(p), + err_msg("ref=" PTR_FORMAT " p=" PTR_FORMAT, ref, intptr_t(p))); + } + return true; +} + +bool G1ParScanThreadState::verify_task(StarTask ref) const { + if (ref.is_narrow()) { + return verify_ref((narrowOop*) ref); + } else { + return verify_ref((oop*) ref); + } +} +#endif // ASSERT + +void G1ParScanThreadState::trim_queue() { + StarTask ref; + do { + // Drain the overflow stack first, so other threads can steal. + while (refs()->pop_overflow(ref)) { + deal_with_reference(ref); + } + while (refs()->pop_local(ref)) { + deal_with_reference(ref); + } + } while (!refs()->is_empty()); +} + G1ParClosureSuper::G1ParClosureSuper(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) : _g1(g1), _g1_rem(_g1->g1_rem_set()), _cm(_g1->concurrent_mark()), _par_scan_state(par_scan_state) { } @@ -4047,39 +4095,40 @@ public: : _g1h(g1h), _par_scan_state(par_scan_state), _queues(queues), _terminator(terminator) {} - void do_void() { - G1ParScanThreadState* pss = par_scan_state(); - while (true) { - pss->trim_queue(); + void do_void(); - StarTask stolen_task; - if (queues()->steal(pss->queue_num(), pss->hash_seed(), stolen_task)) { - // slightly paranoid tests; I'm trying to catch potential - // problems before we go into push_on_queue to know where the - // problem is coming from - assert((oop*)stolen_task != NULL, "Error"); - if (stolen_task.is_narrow()) { - assert(UseCompressedOops, "Error"); - narrowOop* p = (narrowOop*) stolen_task; - assert(has_partial_array_mask(p) || - _g1h->is_in_g1_reserved(oopDesc::load_decode_heap_oop(p)), "Error"); - pss->push_on_queue(p); - } else { - oop* p = (oop*) stolen_task; - assert(has_partial_array_mask(p) || _g1h->is_in_g1_reserved(*p), "Error"); - pss->push_on_queue(p); - } - continue; - } - pss->start_term_time(); - if (terminator()->offer_termination()) break; - pss->end_term_time(); - } - pss->end_term_time(); - pss->retire_alloc_buffers(); - } +private: + inline bool offer_termination(); }; +bool G1ParEvacuateFollowersClosure::offer_termination() { + G1ParScanThreadState* const pss = par_scan_state(); + pss->start_term_time(); + const bool res = terminator()->offer_termination(); + pss->end_term_time(); + return res; +} + +void G1ParEvacuateFollowersClosure::do_void() { + StarTask stolen_task; + G1ParScanThreadState* const pss = par_scan_state(); + pss->trim_queue(); + + do { + while (queues()->steal(pss->queue_num(), pss->hash_seed(), stolen_task)) { + assert(pss->verify_task(stolen_task), "sanity"); + if (stolen_task.is_narrow()) { + pss->push_on_queue((narrowOop*) stolen_task); + } else { + pss->push_on_queue((oop*) stolen_task); + } + pss->trim_queue(); + } + } while (!offer_termination()); + + pss->retire_alloc_buffers(); +} + class G1ParTask : public AbstractGangTask { protected: G1CollectedHeap* _g1h; @@ -4177,8 +4226,7 @@ public: pss.print_termination_stats(i); } - assert(pss.refs_to_scan() == 0, "Task queue should be empty"); - assert(pss.overflowed_refs_to_scan() == 0, "Overflow queue should be empty"); + assert(pss.refs()->is_empty(), "should be empty"); double end_time_ms = os::elapsedTime() * 1000.0; _g1h->g1_policy()->record_gc_worker_end_time(i, end_time_ms); } diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index 50869e301fb..c474ce2ea5c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -1651,49 +1651,17 @@ public: size_t alloc_buffer_waste() const { return _alloc_buffer_waste; } size_t undo_waste() const { return _undo_waste; } - template void push_on_queue(T* ref) { - assert(ref != NULL, "invariant"); - assert(has_partial_array_mask(ref) || - _g1h->is_in_g1_reserved(oopDesc::load_decode_heap_oop(ref)), "invariant"); #ifdef ASSERT - if (has_partial_array_mask(ref)) { - oop p = clear_partial_array_mask(ref); - // Verify that we point into the CS - assert(_g1h->obj_in_cs(p), "Should be in CS"); - } -#endif + bool verify_ref(narrowOop* ref) const; + bool verify_ref(oop* ref) const; + bool verify_task(StarTask ref) const; +#endif // ASSERT + + template void push_on_queue(T* ref) { + assert(verify_ref(ref), "sanity"); refs()->push(ref); } - void pop_from_queue(StarTask& ref) { - if (refs()->pop_local(ref)) { - assert((oop*)ref != NULL, "pop_local() returned true"); - assert(UseCompressedOops || !ref.is_narrow(), "Error"); - assert(has_partial_array_mask((oop*)ref) || - _g1h->is_in_g1_reserved(ref.is_narrow() ? oopDesc::load_decode_heap_oop((narrowOop*)ref) - : oopDesc::load_decode_heap_oop((oop*)ref)), - "invariant"); - } else { - StarTask null_task; - ref = null_task; - } - } - - void pop_from_overflow_queue(StarTask& ref) { - StarTask new_ref; - refs()->pop_overflow(new_ref); - assert((oop*)new_ref != NULL, "pop() from a local non-empty stack"); - assert(UseCompressedOops || !new_ref.is_narrow(), "Error"); - assert(has_partial_array_mask((oop*)new_ref) || - _g1h->is_in_g1_reserved(new_ref.is_narrow() ? oopDesc::load_decode_heap_oop((narrowOop*)new_ref) - : oopDesc::load_decode_heap_oop((oop*)new_ref)), - "invariant"); - ref = new_ref; - } - - int refs_to_scan() { return (int)refs()->size(); } - int overflowed_refs_to_scan() { return (int)refs()->overflow_stack()->size(); } - template void update_rs(HeapRegion* from, T* p, int tid) { if (G1DeferredRSUpdate) { deferred_rs_update(from, p, tid); @@ -1818,59 +1786,15 @@ private: } } -public: - void trim_queue() { - // I've replicated the loop twice, first to drain the overflow - // queue, second to drain the task queue. This is better than - // having a single loop, which checks both conditions and, inside - // it, either pops the overflow queue or the task queue, as each - // loop is tighter. Also, the decision to drain the overflow queue - // first is not arbitrary, as the overflow queue is not visible - // to the other workers, whereas the task queue is. So, we want to - // drain the "invisible" entries first, while allowing the other - // workers to potentially steal the "visible" entries. - - while (refs_to_scan() > 0 || overflowed_refs_to_scan() > 0) { - while (overflowed_refs_to_scan() > 0) { - StarTask ref_to_scan; - assert((oop*)ref_to_scan == NULL, "Constructed above"); - pop_from_overflow_queue(ref_to_scan); - // We shouldn't have pushed it on the queue if it was not - // pointing into the CSet. - assert((oop*)ref_to_scan != NULL, "Follows from inner loop invariant"); - if (ref_to_scan.is_narrow()) { - assert(UseCompressedOops, "Error"); - narrowOop* p = (narrowOop*)ref_to_scan; - assert(!has_partial_array_mask(p) && - _g1h->is_in_g1_reserved(oopDesc::load_decode_heap_oop(p)), "sanity"); - deal_with_reference(p); - } else { - oop* p = (oop*)ref_to_scan; - assert((has_partial_array_mask(p) && _g1h->is_in_g1_reserved(clear_partial_array_mask(p))) || - _g1h->is_in_g1_reserved(oopDesc::load_decode_heap_oop(p)), "sanity"); - deal_with_reference(p); - } - } - - while (refs_to_scan() > 0) { - StarTask ref_to_scan; - assert((oop*)ref_to_scan == NULL, "Constructed above"); - pop_from_queue(ref_to_scan); - if ((oop*)ref_to_scan != NULL) { - if (ref_to_scan.is_narrow()) { - assert(UseCompressedOops, "Error"); - narrowOop* p = (narrowOop*)ref_to_scan; - assert(!has_partial_array_mask(p) && - _g1h->is_in_g1_reserved(oopDesc::load_decode_heap_oop(p)), "sanity"); - deal_with_reference(p); - } else { - oop* p = (oop*)ref_to_scan; - assert((has_partial_array_mask(p) && _g1h->obj_in_cs(clear_partial_array_mask(p))) || - _g1h->is_in_g1_reserved(oopDesc::load_decode_heap_oop(p)), "sanity"); - deal_with_reference(p); - } - } - } + void deal_with_reference(StarTask ref) { + assert(verify_task(ref), "sanity"); + if (ref.is_narrow()) { + deal_with_reference((narrowOop*)ref); + } else { + deal_with_reference((oop*)ref); } } + +public: + void trim_queue(); }; From 2baca00eeb3b6fc03d93ec315e41c004b4d9ce5c Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 12 Oct 2010 12:55:38 -0700 Subject: [PATCH 076/722] 6989457: javadoc test file test/tools/javadoc/T4994049/FileWithTabs.java probably does not Reviewed-by: mcimadamore --- .../tools/javadoc/T4994049/FileWithTabs.java | 2 +- .../test/tools/javadoc/T4994049/T4994049.java | 47 ++++++++++++++++--- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/langtools/test/tools/javadoc/T4994049/FileWithTabs.java b/langtools/test/tools/javadoc/T4994049/FileWithTabs.java index 2ac29d48ef3..63351a9fe38 100644 --- a/langtools/test/tools/javadoc/T4994049/FileWithTabs.java +++ b/langtools/test/tools/javadoc/T4994049/FileWithTabs.java @@ -22,5 +22,5 @@ */ public class FileWithTabs { - public void tabbedMethod() {} +\tpublic void tabbedMethod() {} } diff --git a/langtools/test/tools/javadoc/T4994049/T4994049.java b/langtools/test/tools/javadoc/T4994049/T4994049.java index f8017af9114..17848a141b6 100644 --- a/langtools/test/tools/javadoc/T4994049/T4994049.java +++ b/langtools/test/tools/javadoc/T4994049/T4994049.java @@ -30,7 +30,7 @@ */ import com.sun.javadoc.*; -import java.io.File; +import java.io.*; import static com.sun.tools.javadoc.Main.execute; public class T4994049 extends Doclet { @@ -52,12 +52,47 @@ public class T4994049 extends Doclet { return false; } - public static void main(String... args) { + public static void main(String... args) throws Exception { + File testSrc = new File(System.getProperty("test.src")); + File tmpSrc = new File("tmpSrc"); + initTabs(testSrc, tmpSrc); + for (String file : args) { - File source = new File(System.getProperty("test.src", "."), file); - if (execute("javadoc", "T4994049", T4994049.class.getClassLoader(), - new String[]{source.getPath()} ) != 0) - throw new Error(); + File source = new File(tmpSrc, file); + int rc = execute("javadoc", "T4994049", T4994049.class.getClassLoader(), + new String[]{ source.getPath() } ); + if (rc != 0) + throw new Error("Unexpected return code from javadoc: " + rc); + } + } + + static void initTabs(File from, File to) throws IOException { + for (File f: from.listFiles()) { + File t = new File(to, f.getName()); + if (f.isDirectory()) { + initTabs(f, t); + } else if (f.getName().endsWith(".java")) { + write(t, read(f).replace("\\t", "\t")); + } + } + } + + static String read(File f) throws IOException { + StringBuilder sb = new StringBuilder(); + try (BufferedReader in = new BufferedReader(new FileReader(f))) { + String line; + while ((line = in.readLine()) != null) { + sb.append(line); + sb.append("\n"); + } + } + return sb.toString(); + } + + static void write(File f, String s) throws IOException { + f.getParentFile().mkdirs(); + try (Writer out = new FileWriter(f)) { + out.write(s); } } From 3f57abb0ba4527f185f1abd3381cea7d35c9421b Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 12 Oct 2010 13:15:46 -0700 Subject: [PATCH 077/722] 6988407: javac crashes running processor on errant code; it used to print error message Reviewed-by: darcy --- .../com/sun/tools/javac/comp/MemberEnter.java | 4 +- .../sun/tools/javac/main/JavaCompiler.java | 2 +- .../tools/javac/api/6406133/Erroneous.java | 26 ++++++++++- .../errors/TestParseErrors/ParseErrors.java | 42 ++++++++++++++++++ .../TestParseErrors/TestParseErrors.java | 43 +++++++++++++++++++ .../TestParseErrors/TestParseErrors.out | 8 ++++ 6 files changed, 120 insertions(+), 5 deletions(-) create mode 100644 langtools/test/tools/javac/processing/errors/TestParseErrors/ParseErrors.java create mode 100644 langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.java create mode 100644 langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.out diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java index 73fe36cbf7d..340bd42d784 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java @@ -668,9 +668,9 @@ public class MemberEnter extends JCTree.Visitor implements Completer { public void visitTree(JCTree tree) { } - public void visitErroneous(JCErroneous tree) { - memberEnter(tree.errs, env); + if (tree.errs != null) + memberEnter(tree.errs, env); } public Env getMethodEnv(JCMethodDecl tree, Env env) { diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java index 7e1996a45d9..e439e8ed9a9 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java +++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java @@ -511,7 +511,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter { protected boolean shouldStop(CompileState cs) { if (shouldStopPolicy == null) - return (errorCount() > 0); + return (errorCount() > 0 || unrecoverableError()); else return cs.ordinal() > shouldStopPolicy.ordinal(); } diff --git a/langtools/test/tools/javac/api/6406133/Erroneous.java b/langtools/test/tools/javac/api/6406133/Erroneous.java index ecd230006ff..36b8c7c2422 100644 --- a/langtools/test/tools/javac/api/6406133/Erroneous.java +++ b/langtools/test/tools/javac/api/6406133/Erroneous.java @@ -1,4 +1,26 @@ +/* + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + @Deprecated -class A { - class A {} +class A extends Missing { } diff --git a/langtools/test/tools/javac/processing/errors/TestParseErrors/ParseErrors.java b/langtools/test/tools/javac/processing/errors/TestParseErrors/ParseErrors.java new file mode 100644 index 00000000000..9911916f5f9 --- /dev/null +++ b/langtools/test/tools/javac/processing/errors/TestParseErrors/ParseErrors.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.List; +import java.util.Vector; + +class test { + + public String m(List v, String s ) { + return null; + } + + public String m2(Vector vs, String s) { + return null; + } + + public void m3(testclass, +} + +class testclass { + T t; +} diff --git a/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.java b/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.java new file mode 100644 index 00000000000..bc094f31578 --- /dev/null +++ b/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6988407 + * @summary javac crashes running processor on errant code; it used to print error message + * @library ../../../lib + * @build JavacTestingAbstractProcessor TestParseErrors + * @compile/fail/ref=TestParseErrors.out -XDrawDiagnostics -proc:only -processor TestParseErrors ParseErrors.java + */ + +import java.util.*; +import javax.annotation.processing.*; +import javax.lang.model.element.*; + +public class TestParseErrors extends JavacTestingAbstractProcessor { + + public boolean process(Set annotations, + RoundEnvironment roundEnvironment) { + throw new Error("Should not be called"); + } +} diff --git a/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.out b/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.out new file mode 100644 index 00000000000..947e921dd4d --- /dev/null +++ b/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.out @@ -0,0 +1,8 @@ +ParseErrors.java:37:37: compiler.err.expected: token.identifier +ParseErrors.java:38:1: compiler.err.illegal.start.of.type +ParseErrors.java:38:2: compiler.err.expected: ')' +ParseErrors.java:40:6: compiler.err.expected: ';' +ParseErrors.java:40:20: compiler.err.illegal.start.of.type +ParseErrors.java:41:5: compiler.err.expected: '(' +ParseErrors.java:41:8: compiler.err.expected: token.identifier +7 errors From 8ce46043314031fabc2c329f1f7a1d3c26902828 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 12 Oct 2010 13:19:47 -0700 Subject: [PATCH 078/722] 4942232: missing param class processes without error Reviewed-by: darcy --- .../classes/com/sun/tools/javah/JNI.java | 118 ++++++++------- .../com/sun/tools/javah/JavahTask.java | 66 +++++--- .../classes/com/sun/tools/javah/LLNI.java | 32 ++-- .../classes/com/sun/tools/javah/Mangle.java | 2 +- .../com/sun/tools/javah/TypeSignature.java | 20 ++- .../sun/tools/javah/resources/l10n.properties | 2 + .../tools/javah/4942232/ParamClassTest.java | 36 +++++ langtools/test/tools/javah/4942232/Test.java | 141 ++++++++++++++++++ 8 files changed, 323 insertions(+), 94 deletions(-) create mode 100644 langtools/test/tools/javah/4942232/ParamClassTest.java create mode 100644 langtools/test/tools/javah/4942232/Test.java diff --git a/langtools/src/share/classes/com/sun/tools/javah/JNI.java b/langtools/src/share/classes/com/sun/tools/javah/JNI.java index f71d4d02830..91a444eaae9 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/JNI.java +++ b/langtools/src/share/classes/com/sun/tools/javah/JNI.java @@ -59,72 +59,76 @@ public class JNI extends Gen { } public void write(OutputStream o, TypeElement clazz) throws Util.Exit { - String cname = mangler.mangle(clazz.getQualifiedName(), Mangle.Type.CLASS); - PrintWriter pw = wrapWriter(o); - pw.println(guardBegin(cname)); - pw.println(cppGuardBegin()); + try { + String cname = mangler.mangle(clazz.getQualifiedName(), Mangle.Type.CLASS); + PrintWriter pw = wrapWriter(o); + pw.println(guardBegin(cname)); + pw.println(cppGuardBegin()); - /* Write statics. */ - List classfields = getAllFields(clazz); + /* Write statics. */ + List classfields = getAllFields(clazz); - for (VariableElement v: classfields) { - if (!v.getModifiers().contains(Modifier.STATIC)) - continue; - String s = null; - s = defineForStatic(clazz, v); - if (s != null) { - pw.println(s); + for (VariableElement v: classfields) { + if (!v.getModifiers().contains(Modifier.STATIC)) + continue; + String s = null; + s = defineForStatic(clazz, v); + if (s != null) { + pw.println(s); + } } - } - /* Write methods. */ - List classmethods = ElementFilter.methodsIn(clazz.getEnclosedElements()); - for (ExecutableElement md: classmethods) { - if(md.getModifiers().contains(Modifier.NATIVE)){ - TypeMirror mtr = types.erasure(md.getReturnType()); - String sig = signature(md); - TypeSignature newtypesig = new TypeSignature(elems); - CharSequence methodName = md.getSimpleName(); - boolean longName = false; - for (ExecutableElement md2: classmethods) { - if ((md2 != md) - && (methodName.equals(md2.getSimpleName())) - && (md2.getModifiers().contains(Modifier.NATIVE))) - longName = true; + /* Write methods. */ + List classmethods = ElementFilter.methodsIn(clazz.getEnclosedElements()); + for (ExecutableElement md: classmethods) { + if(md.getModifiers().contains(Modifier.NATIVE)){ + TypeMirror mtr = types.erasure(md.getReturnType()); + String sig = signature(md); + TypeSignature newtypesig = new TypeSignature(elems); + CharSequence methodName = md.getSimpleName(); + boolean longName = false; + for (ExecutableElement md2: classmethods) { + if ((md2 != md) + && (methodName.equals(md2.getSimpleName())) + && (md2.getModifiers().contains(Modifier.NATIVE))) + longName = true; - } - pw.println("/*"); - pw.println(" * Class: " + cname); - pw.println(" * Method: " + - mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); - pw.println(" * Signature: " + newtypesig.getTypeSignature(sig, mtr)); - pw.println(" */"); - pw.println("JNIEXPORT " + jniType(mtr) + - " JNICALL " + - mangler.mangleMethod(md, clazz, - (longName) ? - Mangle.Type.METHOD_JNI_LONG : - Mangle.Type.METHOD_JNI_SHORT)); - pw.print(" (JNIEnv *, "); - List paramargs = md.getParameters(); - List args = new ArrayList(); - for (VariableElement p: paramargs) { - args.add(types.erasure(p.asType())); - } - if (md.getModifiers().contains(Modifier.STATIC)) - pw.print("jclass"); - else - pw.print("jobject"); + } + pw.println("/*"); + pw.println(" * Class: " + cname); + pw.println(" * Method: " + + mangler.mangle(methodName, Mangle.Type.FIELDSTUB)); + pw.println(" * Signature: " + newtypesig.getTypeSignature(sig, mtr)); + pw.println(" */"); + pw.println("JNIEXPORT " + jniType(mtr) + + " JNICALL " + + mangler.mangleMethod(md, clazz, + (longName) ? + Mangle.Type.METHOD_JNI_LONG : + Mangle.Type.METHOD_JNI_SHORT)); + pw.print(" (JNIEnv *, "); + List paramargs = md.getParameters(); + List args = new ArrayList(); + for (VariableElement p: paramargs) { + args.add(types.erasure(p.asType())); + } + if (md.getModifiers().contains(Modifier.STATIC)) + pw.print("jclass"); + else + pw.print("jobject"); - for (TypeMirror arg: args) { - pw.print(", "); - pw.print(jniType(arg)); + for (TypeMirror arg: args) { + pw.print(", "); + pw.print(jniType(arg)); + } + pw.println(");" + lineSep); } - pw.println(");" + lineSep); } + pw.println(cppGuardEnd()); + pw.println(guardEnd(cname)); + } catch (TypeSignature.SignatureException e) { + util.error("jni.sigerror", e.getMessage()); } - pw.println(cppGuardEnd()); - pw.println(guardEnd(cname)); } diff --git a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java index 8a6a4d19b2e..51c290d027a 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java +++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java @@ -46,9 +46,9 @@ import java.util.Set; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.Messager; +import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedAnnotationTypes; -import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.ExecutableElement; @@ -71,6 +71,9 @@ import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.StandardLocation; import javax.tools.ToolProvider; +import static javax.tools.Diagnostic.Kind.*; + +import com.sun.tools.javac.code.Symbol.CompletionFailure; /** * Javah generates support files for native methods. @@ -233,6 +236,15 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask { task.doubleAlign = true; } }, + + new HiddenOption(false) { + boolean matches(String opt) { + return opt.startsWith("-XD"); + } + void process(JavahTask task, String opt, String arg) { + task.javac_extras.add(opt); + } + }, }; JavahTask() { @@ -326,6 +338,8 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask { } catch (InternalError e) { diagnosticListener.report(createDiagnostic("err.internal.error", e.getMessage())); return 1; + } catch (Util.Exit e) { + return e.exitValue; } finally { log.flush(); } @@ -475,7 +489,9 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask { ((JavahFileManager) fileManager).setIgnoreSymbolFile(true); JavaCompiler c = ToolProvider.getSystemJavaCompiler(); - List opts = Arrays.asList("-proc:only"); + List opts = new ArrayList(); + opts.add("-proc:only"); + opts.addAll(javac_extras); CompilationTask t = c.getTask(log, fileManager, diagnosticListener, opts, internalize(classes), null); JavahProcessor p = new JavahProcessor(g); t.setProcessors(Collections.singleton(p)); @@ -642,6 +658,7 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask { boolean doubleAlign; boolean force; boolean old; + Set javac_extras = new LinkedHashSet(); PrintWriter log; JavaFileManager fileManager; @@ -652,30 +669,45 @@ public class JavahTask implements NativeHeaderTool.NativeHeaderTask { private static final String progname = "javah"; @SupportedAnnotationTypes("*") - @SupportedSourceVersion(SourceVersion.RELEASE_7) class JavahProcessor extends AbstractProcessor { + private Messager messager; + JavahProcessor(Gen g) { this.g = g; } - public boolean process(Set annotations, RoundEnvironment roundEnv) { - Messager messager = processingEnv.getMessager(); - Set classes = getAllClasses(ElementFilter.typesIn(roundEnv.getRootElements())); - if (classes.size() > 0) { - checkMethodParameters(classes); - g.setProcessingEnvironment(processingEnv); - g.setClasses(classes); + @Override + public SourceVersion getSupportedSourceVersion() { + // since this is co-bundled with javac, we can assume it supports + // the latest source version + return SourceVersion.latest(); + } - try { + @Override + public void init(ProcessingEnvironment pEnv) { + super.init(pEnv); + messager = processingEnv.getMessager(); + } + + public boolean process(Set annotations, RoundEnvironment roundEnv) { + try { + Set classes = getAllClasses(ElementFilter.typesIn(roundEnv.getRootElements())); + if (classes.size() > 0) { + checkMethodParameters(classes); + g.setProcessingEnvironment(processingEnv); + g.setClasses(classes); g.run(); - } catch (ClassNotFoundException cnfe) { - messager.printMessage(Diagnostic.Kind.ERROR, getMessage("class.not.found", cnfe.getMessage())); - } catch (IOException ioe) { - messager.printMessage(Diagnostic.Kind.ERROR, getMessage("io.exception", ioe.getMessage())); - } catch (Util.Exit e) { - exit = e; } + } catch (CompletionFailure cf) { + messager.printMessage(ERROR, getMessage("class.not.found", cf.sym.getQualifiedName().toString())); + } catch (ClassNotFoundException cnfe) { + messager.printMessage(ERROR, getMessage("class.not.found", cnfe.getMessage())); + } catch (IOException ioe) { + messager.printMessage(ERROR, getMessage("io.exception", ioe.getMessage())); + } catch (Util.Exit e) { + exit = e; } + return true; } diff --git a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java index 405eba98532..111d1a9cc01 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java +++ b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java @@ -74,16 +74,21 @@ public class LLNI extends Gen { } protected void write(OutputStream o, TypeElement clazz) throws Util.Exit { - String cname = mangleClassName(clazz.getQualifiedName().toString()); - PrintWriter pw = wrapWriter(o); - fields = ElementFilter.fieldsIn(clazz.getEnclosedElements()); - methods = ElementFilter.methodsIn(clazz.getEnclosedElements()); - generateDeclsForClass(pw, clazz, cname); - // FIXME check if errors occurred on the PrintWriter and throw exception if so + try { + String cname = mangleClassName(clazz.getQualifiedName().toString()); + PrintWriter pw = wrapWriter(o); + fields = ElementFilter.fieldsIn(clazz.getEnclosedElements()); + methods = ElementFilter.methodsIn(clazz.getEnclosedElements()); + generateDeclsForClass(pw, clazz, cname); + // FIXME check if errors occurred on the PrintWriter and throw exception if so + } catch (TypeSignature.SignatureException e) { + util.error("llni.sigerror", e.getMessage()); + } } protected void generateDeclsForClass(PrintWriter pw, - TypeElement clazz, String cname) throws Util.Exit { + TypeElement clazz, String cname) + throws TypeSignature.SignatureException, Util.Exit { doneHandleTypes = new HashSet(); /* The following handle types are predefined in "typedefs.h". Suppress inclusion in the output by generating them "into the blue" here. */ @@ -127,7 +132,8 @@ public class LLNI extends Gen { .replace(innerDelim, '_'); } - protected void forwardDecls(PrintWriter pw, TypeElement clazz) { + protected void forwardDecls(PrintWriter pw, TypeElement clazz) + throws TypeSignature.SignatureException { TypeElement object = elems.getTypeElement("java.lang.Object"); if (clazz.equals(object)) return; @@ -403,7 +409,7 @@ public class LLNI extends Gen { protected void methodSectionForClass(PrintWriter pw, TypeElement clazz, String cname) - throws Util.Exit { + throws TypeSignature.SignatureException, Util.Exit { String methods = methodDecls(clazz, cname); if (methods.length() != 0) { @@ -418,7 +424,8 @@ public class LLNI extends Gen { } } - protected String methodDecls(TypeElement clazz, String cname) throws Util.Exit { + protected String methodDecls(TypeElement clazz, String cname) + throws TypeSignature.SignatureException, Util.Exit { String res = ""; for (ExecutableElement method: methods) { @@ -430,7 +437,7 @@ public class LLNI extends Gen { protected String methodDecl(ExecutableElement method, TypeElement clazz, String cname) - throws Util.Exit { + throws TypeSignature.SignatureException, Util.Exit { String res = null; TypeMirror retType = types.erasure(method.getReturnType()); @@ -474,7 +481,8 @@ public class LLNI extends Gen { } protected final String jniMethodName(ExecutableElement method, String cname, - boolean longName) { + boolean longName) + throws TypeSignature.SignatureException { String res = "Java_" + cname + "_" + method.getSimpleName(); if (longName) { diff --git a/langtools/src/share/classes/com/sun/tools/javah/Mangle.java b/langtools/src/share/classes/com/sun/tools/javah/Mangle.java index 709b00bc9cc..6b3791cdf1e 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/Mangle.java +++ b/langtools/src/share/classes/com/sun/tools/javah/Mangle.java @@ -114,7 +114,7 @@ public class Mangle { } public String mangleMethod(ExecutableElement method, TypeElement clazz, - int mtype) { + int mtype) throws TypeSignature.SignatureException { StringBuffer result = new StringBuffer(100); result.append("Java_"); diff --git a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java index c0ef12815f0..4613f3cb9da 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java +++ b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java @@ -51,7 +51,13 @@ import javax.lang.model.util.SimpleTypeVisitor7; * @author Sucheta Dambalkar */ -public class TypeSignature{ +public class TypeSignature { + static class SignatureException extends Exception { + private static final long serialVersionUID = 1L; + SignatureException(String reason) { + super(reason); + } + } Elements elems; @@ -78,14 +84,15 @@ public class TypeSignature{ /* * Returns the type signature of a field according to JVM specs */ - public String getTypeSignature(String javasignature){ + public String getTypeSignature(String javasignature) throws SignatureException { return getParamJVMSignature(javasignature); } /* * Returns the type signature of a method according to JVM specs */ - public String getTypeSignature(String javasignature, TypeMirror returnType){ + public String getTypeSignature(String javasignature, TypeMirror returnType) + throws SignatureException { String signature = null; //Java type signature. String typeSignature = null; //Internal type signature. List params = new ArrayList(); //List of parameters. @@ -166,7 +173,7 @@ public class TypeSignature{ /* * Returns internal signature of a parameter. */ - private String getParamJVMSignature(String paramsig) { + private String getParamJVMSignature(String paramsig) throws SignatureException { String paramJVMSig = ""; String componentType =""; @@ -197,7 +204,7 @@ public class TypeSignature{ /* * Returns internal signature of a component. */ - private String getComponentType(String componentType){ + private String getComponentType(String componentType) throws SignatureException { String JVMSig = ""; @@ -216,8 +223,7 @@ public class TypeSignature{ TypeElement classNameDoc = elems.getTypeElement(componentType); if(classNameDoc == null){ - System.out.println("Invalid class type for " + componentType); - new Exception().printStackTrace(); + throw new SignatureException(componentType); }else { String classname = classNameDoc.getQualifiedName().toString(); String newclassname = classname.replace('.', '/'); diff --git a/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties b/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties index b284dad8a90..297e2821146 100644 --- a/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties +++ b/langtools/src/share/classes/com/sun/tools/javah/resources/l10n.properties @@ -45,6 +45,8 @@ jni.llni.mixed=\ Can''t mix options -jni and -llni. Try -help. jni.no.stubs=\ JNI does not require stubs, please refer to the JNI documentation. +jni.sigerror=\ + Cannot determine signature for {0} dir.file.mixed=\ Can''t mix options -d and -o. Try -help. no.classes.specified=\ diff --git a/langtools/test/tools/javah/4942232/ParamClassTest.java b/langtools/test/tools/javah/4942232/ParamClassTest.java new file mode 100644 index 00000000000..143ae367e20 --- /dev/null +++ b/langtools/test/tools/javah/4942232/ParamClassTest.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class ParamClassTest { + static { + System.loadLibrary("Test"); + } + + public native void method(Param s); + + public static void main(String[] a) { + } +} + +class Param { +} diff --git a/langtools/test/tools/javah/4942232/Test.java b/langtools/test/tools/javah/4942232/Test.java new file mode 100644 index 00000000000..d108adf846f --- /dev/null +++ b/langtools/test/tools/javah/4942232/Test.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4942232 + * @summary missing param class processes without error + * @build ParamClassTest Test + * @run main Test + */ + +import java.io.*; +import java.util.*; + +public class Test { + public static void main(String... args) throws Exception { + new Test().run(); + } + + void run() throws Exception { + File testSrc = new File(System.getProperty("test.src")); + File testClasses = new File(System.getProperty("test.classes")); + + // standard use of javah on valid class file + String[] test1Args = { + "-d", mkdir("test1/out").getPath(), + "-classpath", testClasses.getPath(), + "ParamClassTest" + }; + test(test1Args, 0); + + // extended use of javah on valid source file + String[] test2Args = { + "-d", mkdir("test2/out").getPath(), + "-classpath", testSrc.getPath(), + "ParamClassTest" + }; + test(test2Args, 0); + + // javah on class file with missing referents + File test3Classes = mkdir("test3/classes"); + copy(new File(testClasses, "ParamClassTest.class"), test3Classes); + String[] test3Args = { + "-d", mkdir("test3/out").getPath(), + "-classpath", test3Classes.getPath(), + "ParamClassTest" + }; + test(test3Args, 1); + + // javah on source file with missing referents + File test4Src = mkdir("test4/src"); + String paramClassTestSrc = readFile(new File(testSrc, "ParamClassTest.java")); + writeFile(new File(test4Src, "ParamClassTest.java"), + paramClassTestSrc.replaceAll("class Param \\{\\s+\\}", "")); + String[] test4Args = { + "-d", mkdir("test4/out").getPath(), + "-classpath", test4Src.getPath(), + "ParamClassTest" + }; + test(test4Args, 15); + + if (errors > 0) + throw new Exception(errors + " errors occurred"); + } + + void test(String[] args, int expect) { + System.err.println("test: " + Arrays.asList(args)); + int rc = javah(args); + if (rc != expect) + error("Unexpected return code: " + rc + "; expected: " + expect); + } + + int javah(String... args) { + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + int rc = com.sun.tools.javah.Main.run(args, pw); + pw.close(); + String out = sw.toString(); + if (!out.isEmpty()) + System.err.println(out); + return rc; + } + + File mkdir(String path) { + File f = new File(path); + f.mkdirs(); + return f; + } + + void copy(File from, File to) throws IOException { + if (to.isDirectory()) + to = new File(to, from.getName()); + try (DataInputStream in = new DataInputStream(new FileInputStream(from)); + FileOutputStream out = new FileOutputStream(to)) { + byte[] buf = new byte[(int) from.length()]; + in.readFully(buf); + out.write(buf); + } + } + + String readFile(File f) throws IOException { + try (DataInputStream in = new DataInputStream(new FileInputStream(f))) { + byte[] buf = new byte[(int) f.length()]; + in.readFully(buf); + return new String(buf); + } + } + + void writeFile(File f, String body) throws IOException { + try (FileWriter out = new FileWriter(f)) { + out.write(body); + } + } + + void error(String msg) { + System.err.println(msg); + errors++; + } + + int errors; +} From 214427fe788a58806e422321b46a45860bebbd0f Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 12 Oct 2010 14:22:55 -0700 Subject: [PATCH 079/722] 6990133: AnnotationProxyMaker.ValueVisitor$1 contains non-transient non-serializable field Reviewed-by: darcy --- .../apt/mirror/declaration/AnnotationProxyMaker.java | 11 ++++++++--- .../sun/tools/javac/model/AnnotationProxyMaker.java | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java index 6dae6cd7d81..63f1de2483e 100644 --- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java +++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java @@ -250,9 +250,13 @@ class AnnotationProxyMaker { /** * Sets "value" to an ExceptionProxy indicating a type mismatch. */ - private void typeMismatch(final Method method, final Attribute attr) { - value = new ExceptionProxy() { + private void typeMismatch(Method method, final Attribute attr) { + class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy { private static final long serialVersionUID = 8473323277815075163L; + transient final Method method; + AnnotationTypeMismatchExceptionProxy(Method method) { + this.method = method; + } public String toString() { return ""; // eg: @Anno(value=) } @@ -260,7 +264,8 @@ class AnnotationProxyMaker { return new AnnotationTypeMismatchException(method, attr.type.toString()); } - }; + } + value = new AnnotationTypeMismatchExceptionProxy(method); } } diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java index b26f031c2ee..655fbc83ef5 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java +++ b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java @@ -250,9 +250,13 @@ public class AnnotationProxyMaker { /** * Sets "value" to an ExceptionProxy indicating a type mismatch. */ - private void typeMismatch(final Method method, final Attribute attr) { - value = new ExceptionProxy() { + private void typeMismatch(Method method, final Attribute attr) { + class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy { static final long serialVersionUID = 269; + transient final Method method; + AnnotationTypeMismatchExceptionProxy(Method method) { + this.method = method; + } public String toString() { return ""; // eg: @Anno(value=) } @@ -260,7 +264,8 @@ public class AnnotationProxyMaker { return new AnnotationTypeMismatchException(method, attr.type.toString()); } - }; + } + value = new AnnotationTypeMismatchExceptionProxy(method); } } From b4b4ed03ec5e5d25d2bfd12054ccebac599eccb2 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 12 Oct 2010 14:47:51 -0700 Subject: [PATCH 080/722] 6908476: test/tools/javac/T6705935.java fails if non-zip files found on platform class path Reviewed-by: darcy --- langtools/test/tools/javac/T6705935.java | 36 +++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/langtools/test/tools/javac/T6705935.java b/langtools/test/tools/javac/T6705935.java index 45e7454d140..2b5bd8082d1 100644 --- a/langtools/test/tools/javac/T6705935.java +++ b/langtools/test/tools/javac/T6705935.java @@ -31,6 +31,8 @@ import java.io.*; import java.util.*; import javax.tools.*; import com.sun.tools.javac.file.*; +import com.sun.tools.javac.file.ZipArchive.ZipFileObject; +import com.sun.tools.javac.file.ZipFileIndexArchive.ZipFileIndexFileObject; public class T6705935 { public static void main(String... args) throws Exception { @@ -43,11 +45,22 @@ public class T6705935 { java_home = java_home.getParentFile(); JavaCompiler c = ToolProvider.getSystemJavaCompiler(); - JavaFileManager fm = c.getStandardFileManager(null, null, null); + StandardJavaFileManager fm = c.getStandardFileManager(null, null, null); + //System.err.println("platform class path: " + asList(fm.getLocation(StandardLocation.PLATFORM_CLASS_PATH))); + for (JavaFileObject fo: fm.list(StandardLocation.PLATFORM_CLASS_PATH, "java.lang", Collections.singleton(JavaFileObject.Kind.CLASS), false)) { + test++; + + if (!(fo instanceof ZipFileObject || fo instanceof ZipFileIndexFileObject)) { + System.out.println("Skip " + fo.getClass().getSimpleName() + " " + fo.getName()); + skip++; + continue; + } + + //System.err.println(fo.getName()); String p = fo.getName(); int bra = p.indexOf("("); int ket = p.indexOf(")"); @@ -61,5 +74,26 @@ public class T6705935 { throw new Exception("bad path: " + p); } + + if (test == 0) + throw new Exception("no files found"); + + if (skip == 0) + System.out.println(test + " files found"); + else + System.out.println(test + " files found, " + skip + " files skipped"); + + if (test == skip) + System.out.println("Warning: all files skipped; no platform classes found in zip files."); } + + private List asList(Iterable items) { + List list = new ArrayList(); + for (T item: items) + list.add(item); + return list; + } + + private int skip; + private int test; } From 822884735dbaa7fb94f4b14143a6cdfb64b9fd47 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Tue, 12 Oct 2010 17:09:14 -0700 Subject: [PATCH 081/722] 6989440: tomcat test from dacapo benchmark fails with ConcurrentModificationException Reviewed-by: okutsu --- .../sun/util/LocaleServiceProviderPool.java | 16 +++-- jdk/test/java/util/Locale/Bug6989440.java | 62 +++++++++++++++++++ 2 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 jdk/test/java/util/Locale/Bug6989440.java diff --git a/jdk/src/share/classes/sun/util/LocaleServiceProviderPool.java b/jdk/src/share/classes/sun/util/LocaleServiceProviderPool.java index 8c45c6fd6c9..5b6c04e883b 100644 --- a/jdk/src/share/classes/sun/util/LocaleServiceProviderPool.java +++ b/jdk/src/share/classes/sun/util/LocaleServiceProviderPool.java @@ -84,7 +84,7 @@ public final class LocaleServiceProviderPool { * static. This could be non-static later, so that they could have * different sets for each locale sensitive services. */ - private static List availableJRELocales = null; + private static volatile List availableJRELocales = null; /** * Provider locales for this locale sensitive service. @@ -252,12 +252,16 @@ public final class LocaleServiceProviderPool { * * @return list of the available JRE locales */ - private synchronized List getJRELocales() { + private List getJRELocales() { if (availableJRELocales == null) { - Locale[] allLocales = LocaleData.getAvailableLocales(); - availableJRELocales = new ArrayList(allLocales.length); - for (Locale locale : allLocales) { - availableJRELocales.add(getLookupLocale(locale)); + synchronized (LocaleServiceProviderPool.class) { + if (availableJRELocales == null) { + Locale[] allLocales = LocaleData.getAvailableLocales(); + availableJRELocales = new ArrayList(allLocales.length); + for (Locale locale : allLocales) { + availableJRELocales.add(getLookupLocale(locale)); + } + } } } return availableJRELocales; diff --git a/jdk/test/java/util/Locale/Bug6989440.java b/jdk/test/java/util/Locale/Bug6989440.java new file mode 100644 index 00000000000..ebf62f98807 --- /dev/null +++ b/jdk/test/java/util/Locale/Bug6989440.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6989440 + * @summary Verify ConcurrentModificationException is not thrown with multiple + * thread accesses. + * @compile -XDignore.symbol.file=true Bug6989440.java + * @run main Bug6989440 + */ +import java.text.spi.DateFormatProvider; +import java.util.spi.LocaleNameProvider; +import java.util.spi.LocaleServiceProvider; +import java.util.spi.TimeZoneNameProvider; + +import sun.util.LocaleServiceProviderPool; + +public class Bug6989440 { + public static void main(String[] args) { + TestThread t1 = new TestThread(LocaleNameProvider.class); + TestThread t2 = new TestThread(TimeZoneNameProvider.class); + TestThread t3 = new TestThread(DateFormatProvider.class); + + t1.start(); + t2.start(); + t3.start(); + } + + static class TestThread extends Thread { + private Class cls; + + public TestThread(Class providerClass) { + cls = providerClass; + } + + public void run() { + LocaleServiceProviderPool pool = LocaleServiceProviderPool.getPool(cls); + pool.getAvailableLocales(); + } + } +} From 28a13e88e771845021a1dfa536ea97c5468d97df Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Tue, 12 Oct 2010 23:51:20 -0700 Subject: [PATCH 082/722] 6991512: G1 barriers fail with 64bit C1 Fix compare-and-swap intrinsic problem with G1 post-barriers and issue with branch ranges in G1 stubs on sparc Reviewed-by: never, kvn --- hotspot/src/cpu/sparc/vm/assembler_sparc.hpp | 6 ++++++ .../src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp | 18 ++++++++++++++---- .../src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp | 2 +- hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp | 2 -- hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp | 2 +- hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 1 + 6 files changed, 23 insertions(+), 8 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp index 7d56342c5dd..c8317fd37fd 100644 --- a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp @@ -825,6 +825,12 @@ class Assembler : public AbstractAssembler { // test if -4096 <= x <= 4095 static bool is_simm13(int x) { return is_simm(x, 13); } + // test if label is in simm16 range in words (wdisp16). + bool is_in_wdisp16_range(Label& L) { + intptr_t d = intptr_t(pc()) - intptr_t(target(L)); + return is_simm(d, 18); + } + enum ASIs { // page 72, v9 ASI_PRIMARY = 0x80, ASI_PRIMARY_LITTLE = 0x88 diff --git a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp index 4eb6680dfa8..effc007d7db 100644 --- a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp @@ -425,8 +425,13 @@ void G1PreBarrierStub::emit_code(LIR_Assembler* ce) { Register pre_val_reg = pre_val()->as_register(); ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false); - __ br_on_reg_cond(Assembler::rc_z, /*annul*/false, Assembler::pt, - pre_val_reg, _continuation); + if (__ is_in_wdisp16_range(_continuation)) { + __ br_on_reg_cond(Assembler::rc_z, /*annul*/false, Assembler::pt, + pre_val_reg, _continuation); + } else { + __ cmp(pre_val_reg, G0); + __ brx(Assembler::equal, false, Assembler::pn, _continuation); + } __ delayed()->nop(); __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_pre_barrier_slow_id)); @@ -452,8 +457,13 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) { assert(new_val()->is_register(), "Precondition."); Register addr_reg = addr()->as_pointer_register(); Register new_val_reg = new_val()->as_register(); - __ br_on_reg_cond(Assembler::rc_z, /*annul*/false, Assembler::pt, - new_val_reg, _continuation); + if (__ is_in_wdisp16_range(_continuation)) { + __ br_on_reg_cond(Assembler::rc_z, /*annul*/false, Assembler::pt, + new_val_reg, _continuation); + } else { + __ cmp(new_val_reg, G0); + __ brx(Assembler::equal, false, Assembler::pn, _continuation); + } __ delayed()->nop(); __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_post_barrier_slow_id)); diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp index 2566f3f8227..c5385a984b7 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @@ -664,7 +664,7 @@ void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) { // Use temps to avoid kills LIR_Opr t1 = FrameMap::G1_opr; LIR_Opr t2 = FrameMap::G3_opr; - LIR_Opr addr = new_pointer_register(); + LIR_Opr addr = (type == objectType) ? new_register(T_OBJECT) : new_pointer_register(); // get address of field obj.load_item(); diff --git a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp index fa0ef0c8bf5..e9ca3d885c7 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @@ -1941,8 +1941,6 @@ void LIR_Assembler::emit_compare_and_swap(LIR_OpCompareAndSwap* op) { __ cmpxchgptr(newval, Address(addr, 0)); } else if (op->code() == lir_cas_int) { __ cmpxchgl(newval, Address(addr, 0)); - } else { - LP64_ONLY(__ cmpxchgq(newval, Address(addr, 0))); } #ifdef _LP64 } else if (op->code() == lir_cas_long) { diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp index dd8bc8d9962..c9a26e7b1dd 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @@ -765,7 +765,7 @@ void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) { ShouldNotReachHere(); } - LIR_Opr addr = new_pointer_register(); + LIR_Opr addr = (type == objectType) ? new_register(T_OBJECT) : new_pointer_register(); LIR_Address* a; if(offset.result()->is_constant()) { a = new LIR_Address(obj.result(), diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp index 332f193e28e..dffc85c970d 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp @@ -1350,6 +1350,7 @@ void LIRGenerator::G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_Opr addr = ptr; } assert(addr->is_register(), "must be a register at this point"); + assert(addr->type() == T_OBJECT, "addr should point to an object"); LIR_Opr xor_res = new_pointer_register(); LIR_Opr xor_shift_res = new_pointer_register(); From 98e9ecf9dae7e00ad9bee72fe00cbbb31d80b697 Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Wed, 13 Oct 2010 01:19:43 -0700 Subject: [PATCH 083/722] 6987555: JSR 292 unboxing to a boolean value fails on big-endian SPARC Reviewed-by: never, jrose --- .../src/cpu/sparc/vm/methodHandles_sparc.cpp | 62 +++--- hotspot/src/share/vm/prims/methodHandles.cpp | 8 +- hotspot/src/share/vm/prims/methodHandles.hpp | 19 +- .../test/compiler/6987555/Test6987555.java | 177 ++++++++++++++++++ 4 files changed, 231 insertions(+), 35 deletions(-) create mode 100644 hotspot/test/compiler/6987555/Test6987555.java diff --git a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp index 94cc62217d4..40a9b05ec28 100644 --- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp @@ -27,6 +27,14 @@ #define __ _masm-> +#ifdef PRODUCT +#define BLOCK_COMMENT(str) /* nothing */ +#else +#define BLOCK_COMMENT(str) __ block_comment(str) +#endif + +#define BIND(label) bind(label); BLOCK_COMMENT(#label ":") + address MethodHandleEntry::start_compiled_entry(MacroAssembler* _masm, address interpreted_entry) { // Just before the actual machine code entry point, allocate space @@ -105,6 +113,7 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler* static void verify_argslot(MacroAssembler* _masm, Register argslot_reg, Register temp_reg, const char* error_message) { // Verify that argslot lies within (Gargs, FP]. Label L_ok, L_bad; + BLOCK_COMMENT("{ verify_argslot"); #ifdef _LP64 __ add(FP, STACK_BIAS, temp_reg); __ cmp(argslot_reg, temp_reg); @@ -119,6 +128,7 @@ static void verify_argslot(MacroAssembler* _masm, Register argslot_reg, Register __ bind(L_bad); __ stop(error_message); __ bind(L_ok); + BLOCK_COMMENT("} verify_argslot"); } #endif @@ -175,6 +185,7 @@ void MethodHandles::insert_arg_slots(MacroAssembler* _masm, // for (temp = sp + size; temp < argslot; temp++) // temp[-size] = temp[0] // argslot -= size; + BLOCK_COMMENT("insert_arg_slots {"); RegisterOrConstant offset = __ regcon_sll_ptr(arg_slots, LogBytesPerWord, temp3_reg); // Keep the stack pointer 2*wordSize aligned. @@ -187,7 +198,7 @@ void MethodHandles::insert_arg_slots(MacroAssembler* _masm, { Label loop; - __ bind(loop); + __ BIND(loop); // pull one word down each time through the loop __ ld_ptr(Address(temp_reg, 0), temp2_reg); __ st_ptr(temp2_reg, Address(temp_reg, offset)); @@ -199,6 +210,7 @@ void MethodHandles::insert_arg_slots(MacroAssembler* _masm, // Now move the argslot down, to point to the opened-up space. __ add(argslot_reg, offset, argslot_reg); + BLOCK_COMMENT("} insert_arg_slots"); } @@ -235,6 +247,7 @@ void MethodHandles::remove_arg_slots(MacroAssembler* _masm, } #endif // ASSERT + BLOCK_COMMENT("remove_arg_slots {"); // Pull up everything shallower than argslot. // Then remove the excess space on the stack. // The stacked return address gets pulled up with everything else. @@ -246,7 +259,7 @@ void MethodHandles::remove_arg_slots(MacroAssembler* _masm, __ sub(argslot_reg, wordSize, temp_reg); // source pointer for copy { Label loop; - __ bind(loop); + __ BIND(loop); // pull one word up each time through the loop __ ld_ptr(Address(temp_reg, 0), temp2_reg); __ st_ptr(temp2_reg, Address(temp_reg, offset)); @@ -265,29 +278,35 @@ void MethodHandles::remove_arg_slots(MacroAssembler* _masm, const int TwoWordAlignmentMask = right_n_bits(LogBytesPerWord + 1); RegisterOrConstant masked_offset = __ regcon_andn_ptr(offset, TwoWordAlignmentMask, temp_reg); __ add(SP, masked_offset, SP); + BLOCK_COMMENT("} remove_arg_slots"); } #ifndef PRODUCT extern "C" void print_method_handle(oop mh); void trace_method_handle_stub(const char* adaptername, - oop mh) { -#if 0 - intptr_t* entry_sp, - intptr_t* saved_sp, - intptr_t* saved_bp) { - // called as a leaf from native code: do not block the JVM! - intptr_t* last_sp = (intptr_t*) saved_bp[frame::interpreter_frame_last_sp_offset]; - intptr_t* base_sp = (intptr_t*) saved_bp[frame::interpreter_frame_monitor_block_top_offset]; - printf("MH %s mh="INTPTR_FORMAT" sp=("INTPTR_FORMAT"+"INTX_FORMAT") stack_size="INTX_FORMAT" bp="INTPTR_FORMAT"\n", - adaptername, (intptr_t)mh, (intptr_t)entry_sp, (intptr_t)(saved_sp - entry_sp), (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp); - if (last_sp != saved_sp) - printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp); -#endif - + oopDesc* mh) { printf("MH %s mh="INTPTR_FORMAT"\n", adaptername, (intptr_t) mh); print_method_handle(mh); } +void MethodHandles::trace_method_handle(MacroAssembler* _masm, const char* adaptername) { + if (!TraceMethodHandles) return; + BLOCK_COMMENT("trace_method_handle {"); + // save: Gargs, O5_savedSP + __ save_frame(16); + __ set((intptr_t) adaptername, O0); + __ mov(G3_method_handle, O1); + __ mov(G3_method_handle, L3); + __ mov(Gargs, L4); + __ mov(G5_method_type, L5); + __ call_VM_leaf(L7, CAST_FROM_FN_PTR(address, trace_method_handle_stub)); + + __ mov(L3, G3_method_handle); + __ mov(L4, Gargs); + __ mov(L5, G5_method_type); + __ restore(); + BLOCK_COMMENT("} trace_method_handle"); +} #endif // PRODUCT // which conversion op types are implemented here? @@ -349,16 +368,7 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan address interp_entry = __ pc(); -#ifndef PRODUCT - if (TraceMethodHandles) { - // save: Gargs, O5_savedSP - __ save(SP, -16*wordSize, SP); - __ set((intptr_t) entry_name(ek), O0); - __ mov(G3_method_handle, O1); - __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, trace_method_handle_stub)); - __ restore(SP, 16*wordSize, SP); - } -#endif // PRODUCT + trace_method_handle(_masm, entry_name(ek)); switch ((int) ek) { case _raise_exception: diff --git a/hotspot/src/share/vm/prims/methodHandles.cpp b/hotspot/src/share/vm/prims/methodHandles.cpp index 650b3d30917..d36745fa596 100644 --- a/hotspot/src/share/vm/prims/methodHandles.cpp +++ b/hotspot/src/share/vm/prims/methodHandles.cpp @@ -1568,7 +1568,7 @@ void MethodHandles::verify_BoundMethodHandle(Handle mh, Handle target, int argnu if (ptype != T_INT) { int value_offset = java_lang_boxing_object::value_offset_in_bytes(T_INT); jint value = argument->int_field(value_offset); - int vminfo = adapter_subword_vminfo(ptype); + int vminfo = adapter_unbox_subword_vminfo(ptype); jint subword = truncate_subword_from_vminfo(value, vminfo); if (value != subword) { err = "bound subword value does not fit into the subword type"; @@ -2018,12 +2018,12 @@ void MethodHandles::init_AdapterMethodHandle(Handle mh, Handle target, int argnu assert(src == T_INT || is_subword_type(src), "source is not float"); // Subword-related cases are int -> {boolean,byte,char,short}. ek_opt = _adapter_opt_i2i; - vminfo = adapter_subword_vminfo(dest); + vminfo = adapter_prim_to_prim_subword_vminfo(dest); break; case 2 *4+ 1: if (src == T_LONG && (dest == T_INT || is_subword_type(dest))) { ek_opt = _adapter_opt_l2i; - vminfo = adapter_subword_vminfo(dest); + vminfo = adapter_prim_to_prim_subword_vminfo(dest); } else if (src == T_DOUBLE && dest == T_FLOAT) { ek_opt = _adapter_opt_d2f; } else { @@ -2051,7 +2051,7 @@ void MethodHandles::init_AdapterMethodHandle(Handle mh, Handle target, int argnu switch (type2size[dest]) { case 1: ek_opt = _adapter_opt_unboxi; - vminfo = adapter_subword_vminfo(dest); + vminfo = adapter_unbox_subword_vminfo(dest); break; case 2: ek_opt = _adapter_opt_unboxl; diff --git a/hotspot/src/share/vm/prims/methodHandles.hpp b/hotspot/src/share/vm/prims/methodHandles.hpp index e6a6f2b00bb..71fcb11069e 100644 --- a/hotspot/src/share/vm/prims/methodHandles.hpp +++ b/hotspot/src/share/vm/prims/methodHandles.hpp @@ -226,11 +226,20 @@ class MethodHandles: AllStatic { } enum { CONV_VMINFO_SIGN_FLAG = 0x80 }; - static int adapter_subword_vminfo(BasicType dest) { - if (dest == T_BOOLEAN) return (BitsPerInt - 1); - if (dest == T_CHAR) return (BitsPerInt - 16); - if (dest == T_BYTE) return (BitsPerInt - 8) | CONV_VMINFO_SIGN_FLAG; - if (dest == T_SHORT) return (BitsPerInt - 16) | CONV_VMINFO_SIGN_FLAG; + // Shift values for prim-to-prim conversions. + static int adapter_prim_to_prim_subword_vminfo(BasicType dest) { + if (dest == T_BOOLEAN) return (BitsPerInt - 1); // boolean is 1 bit + if (dest == T_CHAR) return (BitsPerInt - BitsPerShort); + if (dest == T_BYTE) return (BitsPerInt - BitsPerByte ) | CONV_VMINFO_SIGN_FLAG; + if (dest == T_SHORT) return (BitsPerInt - BitsPerShort) | CONV_VMINFO_SIGN_FLAG; + return 0; // case T_INT + } + // Shift values for unboxing a primitive. + static int adapter_unbox_subword_vminfo(BasicType dest) { + if (dest == T_BOOLEAN) return (BitsPerInt - BitsPerByte ); // implemented as 1 byte + if (dest == T_CHAR) return (BitsPerInt - BitsPerShort); + if (dest == T_BYTE) return (BitsPerInt - BitsPerByte ) | CONV_VMINFO_SIGN_FLAG; + if (dest == T_SHORT) return (BitsPerInt - BitsPerShort) | CONV_VMINFO_SIGN_FLAG; return 0; // case T_INT } // Here is the transformation the i2i adapter must perform: diff --git a/hotspot/test/compiler/6987555/Test6987555.java b/hotspot/test/compiler/6987555/Test6987555.java new file mode 100644 index 00000000000..5e408039f5e --- /dev/null +++ b/hotspot/test/compiler/6987555/Test6987555.java @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/** + * @test + * @bug 6987555 + * @summary JSR 292 unboxing to a boolean value fails on big-endian SPARC + * + * @run main/othervm -Xint -ea -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6987555 + */ + +import java.dyn.*; + +public class Test6987555 { + private static final Class CLASS = Test6987555.class; + private static final String NAME = "foo"; + private static final boolean DEBUG = false; + + public static void main(String[] args) throws Throwable { + testboolean(); + testbyte(); + testchar(); + testshort(); + testint(); + } + + // boolean + static void testboolean() throws Throwable { + doboolean(false); + doboolean(true); + } + static void doboolean(boolean x) throws Throwable { + if (DEBUG) System.out.println("boolean=" + x); + MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(boolean.class, boolean.class)); + MethodHandle mh2 = mh1.asType(MethodType.methodType(boolean.class, Boolean.class)); + boolean a = mh1.invokeExact(x); + boolean b = mh2.invokeExact(Boolean.valueOf(x)); + assert a == b : a + " != " + b; + } + + // byte + static void testbyte() throws Throwable { + byte[] a = new byte[] { + Byte.MIN_VALUE, + Byte.MIN_VALUE + 1, + -0x0F, + -1, + 0, + 1, + 0x0F, + Byte.MAX_VALUE - 1, + Byte.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + dobyte(a[i]); + } + } + static void dobyte(byte x) throws Throwable { + if (DEBUG) System.out.println("byte=" + x); + MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(byte.class, byte.class)); + MethodHandle mh2 = mh1.asType(MethodType.methodType(byte.class, Byte.class)); + byte a = mh1.invokeExact(x); + byte b = mh2.invokeExact(Byte.valueOf(x)); + assert a == b : a + " != " + b; + } + + // char + static void testchar() throws Throwable { + char[] a = new char[] { + Character.MIN_VALUE, + Character.MIN_VALUE + 1, + 0x000F, + 0x00FF, + 0x0FFF, + Character.MAX_VALUE - 1, + Character.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + dochar(a[i]); + } + } + static void dochar(char x) throws Throwable { + if (DEBUG) System.out.println("char=" + x); + MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(char.class, char.class)); + MethodHandle mh2 = mh1.asType(MethodType.methodType(char.class, Character.class)); + char a = mh1.invokeExact(x); + char b = mh2.invokeExact(Character.valueOf(x)); + assert a == b : a + " != " + b; + } + + // short + static void testshort() throws Throwable { + short[] a = new short[] { + Short.MIN_VALUE, + Short.MIN_VALUE + 1, + -0x0FFF, + -0x00FF, + -0x000F, + -1, + 0, + 1, + 0x000F, + 0x00FF, + 0x0FFF, + Short.MAX_VALUE - 1, + Short.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + doshort(a[i]); + } + } + static void doshort(short x) throws Throwable { + if (DEBUG) System.out.println("short=" + x); + MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(short.class, short.class)); + MethodHandle mh2 = mh1.asType(MethodType.methodType(short.class, Short.class)); + short a = mh1.invokeExact(x); + short b = mh2.invokeExact(Short.valueOf(x)); + assert a == b : a + " != " + b; + } + + // int + static void testint() throws Throwable { + int[] a = new int[] { + Integer.MIN_VALUE, + Integer.MIN_VALUE + 1, + -0x00000FFF, + -0x000000FF, + -0x0000000F, + -1, + 0, + 1, + 0x0000000F, + 0x000000FF, + 0x00000FFF, + Integer.MAX_VALUE - 1, + Integer.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + doint(a[i]); + } + } + static void doint(int x) throws Throwable { + if (DEBUG) System.out.println("int=" + x); + MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(int.class, int.class)); + MethodHandle mh2 = mh1.asType(MethodType.methodType(int.class, Integer.class)); + int a = mh1.invokeExact(x); + int b = mh2.invokeExact(Integer.valueOf(x)); + assert a == b : a + " != " + b; + } + + public static boolean foo(boolean i) { return i; } + public static byte foo(byte i) { return i; } + public static char foo(char i) { return i; } + public static short foo(short i) { return i; } + public static int foo(int i) { return i; } +} From 08e2ead4030bd90d0d7827a455e9f0167958badf Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Wed, 13 Oct 2010 10:29:31 +0200 Subject: [PATCH 084/722] 6991211: assert failure on sparc: "can not have caller-save register operands at calls" Fixes sparc only assert failure following 6972540 Reviewed-by: never --- hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp b/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp index 4dfe4c5b640..f9aaf1f77e1 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp @@ -64,7 +64,7 @@ inline bool LinearScanWalker::pd_init_regs_for_alloc(Interval* cur) { _first_reg = pd_first_callee_saved_reg; _last_reg = pd_last_callee_saved_reg; return true; - } else if (cur->type() == T_INT || cur->type() == T_LONG || cur->type() == T_OBJECT) { + } else if (cur->type() == T_INT || cur->type() == T_LONG || cur->type() == T_OBJECT || cur->type() == T_ADDRESS) { _first_reg = pd_first_cpu_reg; _last_reg = pd_last_allocatable_cpu_reg; return true; From 571e75371e8253db32c7ea29a0597c1e3f51ea3b Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Wed, 13 Oct 2010 15:18:34 +0400 Subject: [PATCH 085/722] 6603635: links to tutorials broken in JTable API doc Reviewed-by: alexp --- jdk/src/share/classes/javax/swing/JTable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/javax/swing/JTable.java b/jdk/src/share/classes/javax/swing/JTable.java index 7842410e772..386b2a4628a 100644 --- a/jdk/src/share/classes/javax/swing/JTable.java +++ b/jdk/src/share/classes/javax/swing/JTable.java @@ -2491,7 +2491,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * The default value of this property is defined by the look * and feel implementation. *

    - * This is a JavaBeans bound property. + * This is a JavaBeans bound property. * * @param selectionForeground the Color to use in the foreground * for selected list items @@ -2529,7 +2529,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable * The default value of this property is defined by the look * and feel implementation. *

    - * This is a JavaBeans bound property. + * This is a JavaBeans bound property. * * @param selectionBackground the Color to use for the background * of selected cells From bbc2ed3f7459c8620567a49ef77f005f9e674555 Mon Sep 17 00:00:00 2001 From: Andrei Dmitriev Date: Wed, 13 Oct 2010 17:03:13 +0400 Subject: [PATCH 086/722] 6973199: java/awt/Robot/RobotWheelTest/RobotWheelTest.html failed on JDK7 b102 bug passed on b101 Reviewed-by: art, yan --- jdk/src/solaris/classes/sun/awt/X11/XWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java index 77ae9c522f6..c7626c3d4ba 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java @@ -779,7 +779,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { xbe.get_x_root(), xbe.get_y_root(), 1,false,MouseWheelEvent.WHEEL_UNIT_SCROLL, - 3,button==4 ? -1*clickCount : 1*clickCount); + 3,button==4 ? -1 : 1); postEventToEventQueue(mwe); } } From 6445f22ebc9d97fc2c1fd958830164afbf95d8c4 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Thu, 14 Oct 2010 13:33:00 +0400 Subject: [PATCH 087/722] 6984643: Unable to instantiate JFileChooser with a minimal BasicL&F descendant installed Reviewed-by: alexp --- .../swing/plaf/basic/BasicFileChooserUI.java | 16 +++++ .../swing/plaf/basic/BasicLookAndFeel.java | 1 + .../javax/swing/plaf/basic/Test6984643.java | 64 +++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 jdk/test/javax/swing/plaf/basic/Test6984643.java diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java index 6e2e8157f00..7ee7de687af 100644 --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java @@ -141,6 +141,22 @@ public class BasicFileChooserUI extends FileChooserUI { private JPanel accessoryPanel = null; private Handler handler; + /** + * Creates a {@code BasicFileChooserUI} implementation + * for the specified component. By default + * the {@code BasicLookAndFeel} class uses + * {@code createUI} methods of all basic UIs classes + * to instantiate UIs. + * + * @param c the {@code JFileChooser} which needs a UI + * @return the {@code BasicFileChooserUI} object + * + * @see UIDefaults#getUI(JComponent) + * @since 1.7 + */ + public static ComponentUI createUI(JComponent c) { + return new BasicFileChooserUI((JFileChooser) c); + } public BasicFileChooserUI(JFileChooser b) { } diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java index b451759eaaf..a41915a7278 100644 --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java @@ -269,6 +269,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab "InternalFrameUI", basicPackageName + "BasicInternalFrameUI", "DesktopPaneUI", basicPackageName + "BasicDesktopPaneUI", "DesktopIconUI", basicPackageName + "BasicDesktopIconUI", + "FileChooserUI", basicPackageName + "BasicFileChooserUI", "OptionPaneUI", basicPackageName + "BasicOptionPaneUI", "PanelUI", basicPackageName + "BasicPanelUI", "ViewportUI", basicPackageName + "BasicViewportUI", diff --git a/jdk/test/javax/swing/plaf/basic/Test6984643.java b/jdk/test/javax/swing/plaf/basic/Test6984643.java new file mode 100644 index 00000000000..57df156026a --- /dev/null +++ b/jdk/test/javax/swing/plaf/basic/Test6984643.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6984643 + * @summary Unable to instantiate JFileChooser with a minimal BasicL&F descendant installed + * @author Pavel Porvatov + */ + +import javax.swing.*; +import javax.swing.plaf.basic.BasicLookAndFeel; + +public class Test6984643 { + public static void main(String[] args) throws Exception { + UIManager.setLookAndFeel(new BasicLookAndFeel() { + public String getName() { + return "A name"; + } + + public String getID() { + return "An id"; + } + + public String getDescription() { + return "A description"; + } + + public boolean isNativeLookAndFeel() { + return false; + } + + public boolean isSupportedLookAndFeel() { + return true; + } + }); + + SwingUtilities.invokeLater(new Runnable() { + public void run() { + new JFileChooser(); + } + }); + } +} From 3ac6dde5fa3a71e7fc7f35dc4eec92ea7e4c280e Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Thu, 14 Oct 2010 14:07:50 +0400 Subject: [PATCH 088/722] 6989721: awt native code compiler warnings Reviewed-by: yan, uta --- .../classes/java/awt/event/InputEvent.java | 11 +++- .../share/classes/sun/awt/AWTAccessor.java | 30 ++++++++++ .../share/native/sun/awt/libpng/pngrtran.c | 2 +- .../share/native/sun/awt/libpng/pngrutil.c | 2 +- .../sun/awt/splashscreen/splashscreen_gif.c | 6 +- .../classes/sun/awt/X11/XRobotPeer.java | 10 +++- jdk/src/solaris/native/sun/awt/awt.h | 16 +----- .../native/sun/awt/awt_DrawingSurface.c | 2 +- .../solaris/native/sun/awt/awt_InputMethod.c | 57 +++++++++---------- jdk/src/solaris/native/sun/awt/awt_Robot.c | 25 +++----- .../solaris/native/sun/awt/awt_UNIXToolkit.c | 2 +- jdk/src/solaris/native/sun/xawt/XlibWrapper.c | 19 ++++--- jdk/src/solaris/native/sun/xawt/awt_Desktop.c | 20 ++++--- .../native/sun/windows/WPrinterJob.cpp | 2 +- .../native/sun/windows/awt_BitmapUtil.cpp | 4 +- .../sun/windows/awt_DesktopProperties.cpp | 2 +- .../native/sun/windows/awt_DrawingSurface.h | 3 +- .../windows/native/sun/windows/awt_Font.cpp | 4 +- .../native/sun/windows/awt_PrintJob.cpp | 2 +- .../native/sun/windows/awt_Toolkit.cpp | 18 +++--- .../sun/windows/awt_Win32GraphicsEnv.cpp | 4 +- .../windows/native/sun/windows/awt_Window.cpp | 10 ++-- 22 files changed, 139 insertions(+), 112 deletions(-) diff --git a/jdk/src/share/classes/java/awt/event/InputEvent.java b/jdk/src/share/classes/java/awt/event/InputEvent.java index af3dea1f1cb..b3b00dffed4 100644 --- a/jdk/src/share/classes/java/awt/event/InputEvent.java +++ b/jdk/src/share/classes/java/awt/event/InputEvent.java @@ -29,9 +29,11 @@ import java.awt.Event; import java.awt.Component; import java.awt.GraphicsEnvironment; import java.awt.Toolkit; -import sun.util.logging.PlatformLogger; import java.util.Arrays; +import sun.awt.AWTAccessor; +import sun.util.logging.PlatformLogger; + /** * The root event class for all component-level input events. * @@ -54,6 +56,7 @@ import java.util.Arrays; * @since 1.1 */ public abstract class InputEvent extends ComponentEvent { + private static final PlatformLogger logger = PlatformLogger.getLogger("java.awt.event.InputEvent"); /** @@ -288,6 +291,12 @@ public abstract class InputEvent extends ComponentEvent { if (!GraphicsEnvironment.isHeadless()) { initIDs(); } + AWTAccessor.setInputEventAccessor( + new AWTAccessor.InputEventAccessor() { + public int[] getButtonDownMasks() { + return getButtonDownMasks(); + } + }); } /** diff --git a/jdk/src/share/classes/sun/awt/AWTAccessor.java b/jdk/src/share/classes/sun/awt/AWTAccessor.java index 27609806967..2b65f647d7b 100644 --- a/jdk/src/share/classes/sun/awt/AWTAccessor.java +++ b/jdk/src/share/classes/sun/awt/AWTAccessor.java @@ -26,6 +26,7 @@ package sun.awt; import java.awt.*; +import java.awt.event.InputEvent; import java.awt.geom.Point2D; import java.awt.image.BufferedImage; @@ -303,6 +304,13 @@ public final class AWTAccessor { void setPosted(AWTEvent ev); } + public interface InputEventAccessor { + /* + * Accessor for InputEvent.getButtonDownMasks() + */ + int[] getButtonDownMasks(); + } + /* * An accessor for the java.awt.Frame class. */ @@ -435,6 +443,11 @@ public final class AWTAccessor { */ private static AWTEventAccessor awtEventAccessor; + /* + * The java.awt.event.InputEvent class accessor object. + */ + private static InputEventAccessor inputEventAccessor; + /* * The java.awt.Frame class accessor object. */ @@ -517,6 +530,23 @@ public final class AWTAccessor { return awtEventAccessor; } + /* + * Set an accessor object for the java.awt.event.InputEvent class. + */ + public static void setInputEventAccessor(InputEventAccessor iea) { + inputEventAccessor = iea; + } + + /* + * Retrieve the accessor object for the java.awt.event.InputEvent class. + */ + public static InputEventAccessor getInputEventAccessor() { + if (inputEventAccessor == null) { + unsafe.ensureClassInitialized(InputEvent.class); + } + return inputEventAccessor; + } + /* * Set an accessor object for the java.awt.Frame class. */ diff --git a/jdk/src/share/native/sun/awt/libpng/pngrtran.c b/jdk/src/share/native/sun/awt/libpng/pngrtran.c index e3e675eeee0..e50ee482737 100644 --- a/jdk/src/share/native/sun/awt/libpng/pngrtran.c +++ b/jdk/src/share/native/sun/awt/libpng/pngrtran.c @@ -3993,7 +3993,7 @@ png_do_dither(png_row_infop row_info, png_bytep row, #ifdef PNG_FLOATING_POINT_SUPPORTED #if defined(PNG_READ_GAMMA_SUPPORTED) -const static int png_gamma_shift[] = +static PNG_CONST int png_gamma_shift[] = {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00}; /* We build the 8- or 16-bit gamma tables here. Note that for 16-bit diff --git a/jdk/src/share/native/sun/awt/libpng/pngrutil.c b/jdk/src/share/native/sun/awt/libpng/pngrutil.c index bce2e210715..428f947e00a 100644 --- a/jdk/src/share/native/sun/awt/libpng/pngrutil.c +++ b/jdk/src/share/native/sun/awt/libpng/pngrutil.c @@ -209,7 +209,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, png_charp chunkdata, png_size_t chunklength, png_size_t prefix_size, png_size_t *newlength) { - const static char msg[] = "Error decoding compressed text"; + static PNG_CONST char msg[] = "Error decoding compressed text"; png_charp text; png_size_t text_size; diff --git a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c index bac88dc1166..2e03105fbcc 100644 --- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c +++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c @@ -51,7 +51,7 @@ static const char szNetscape20ext[11] = "NETSCAPE2.0"; #define NSEXT_LOOP 0x01 // Loop Count field code // convert libungif samples to our ones -#define MAKE_QUAD_GIF(c,a) MAKE_QUAD((c).Red, (c).Green, (c).Blue, (a)) +#define MAKE_QUAD_GIF(c,a) MAKE_QUAD((c).Red, (c).Green, (c).Blue, (unsigned)(a)) /* stdio FILE* and memory input functions for libungif */ int @@ -165,7 +165,7 @@ SplashDecodeGif(Splash * splash, GifFileType * gif) { int flag = pExtension[0]; - frameDelay = (pExtension[2] << 8) | pExtension[1]; + frameDelay = (((int)pExtension[2]) << 8) | pExtension[1]; if (frameDelay < 10) frameDelay = 10; if (flag & GIF_TRANSPARENT) { @@ -191,7 +191,7 @@ SplashDecodeGif(Splash * splash, GifFileType * gif) iSubCode = pExtension[0] & 0x07; if (iSubCode == NSEXT_LOOP) { splash->loopCount = - (pExtension[1] | (pExtension[2] << 8)) - 1; + (pExtension[1] | (((int)pExtension[2]) << 8)) - 1; } } break; diff --git a/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java index 270c0c12f02..dd960e4afdb 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java @@ -25,11 +25,15 @@ package sun.awt.X11; import java.awt.*; +import java.awt.event.InputEvent; import java.awt.peer.*; -import sun.awt.X11GraphicsConfig; + +import sun.awt.AWTAccessor; import sun.awt.SunToolkit; +import sun.awt.X11GraphicsConfig; class XRobotPeer implements RobotPeer { + private X11GraphicsConfig xgc = null; /* * native implementation uses some static shared data (pipes, processes) @@ -40,7 +44,7 @@ class XRobotPeer implements RobotPeer { XRobotPeer(GraphicsConfiguration gc) { this.xgc = (X11GraphicsConfig)gc; SunToolkit tk = (SunToolkit)Toolkit.getDefaultToolkit(); - setup(tk.getNumberOfButtons()); + setup(tk.getNumberOfButtons(), AWTAccessor.getInputEventAccessor().getButtonDownMasks()); } public void dispose() { @@ -83,7 +87,7 @@ class XRobotPeer implements RobotPeer { return pixelArray; } - private static native synchronized void setup(int numberOfButtons); + private static native synchronized void setup(int numberOfButtons, int[] buttonDownMasks); private static native synchronized void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y); private static native synchronized void mousePressImpl(int buttons); diff --git a/jdk/src/solaris/native/sun/awt/awt.h b/jdk/src/solaris/native/sun/awt/awt.h index abfbdb9bde1..e3b0d18c24c 100644 --- a/jdk/src/solaris/native/sun/awt/awt.h +++ b/jdk/src/solaris/native/sun/awt/awt.h @@ -159,20 +159,8 @@ extern int lastL; #endif /* DEBUG_AWT_LOCK && !XAWT */ #ifndef HEADLESS -extern Display *awt_display; /* awt_GraphicsEnv.c */ -extern XtAppContext awt_appContext; /* awt_MToolkit.c */ -extern Widget awt_root_shell; -extern Pixel awt_defaultBg; -extern Pixel awt_defaultFg; -extern int awt_multiclick_time; /* awt_MToolkit.c */ -extern int awt_multiclick_smudge; /* canvas.c */ -extern unsigned int awt_MetaMask; /* awt_MToolkit.c */ -extern unsigned int awt_AltMask; -extern unsigned int awt_NumLockMask; -extern unsigned int awt_ModeSwitchMask; -extern Cursor awt_scrollCursor; /* awt_MToolkit.c */ -extern Boolean awt_ModLockIsShiftLock; - +extern Display *awt_display; /* awt_GraphicsEnv.c */ +extern Boolean awt_ModLockIsShiftLock; /* XToolkit.c */ #endif /* !HEADLESS */ #endif /* ! _AWT_ */ diff --git a/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c b/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c index 1180b66b086..3504bb65dee 100644 --- a/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c +++ b/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c @@ -264,7 +264,7 @@ awt_DrawingSurface_GetDrawingSurfaceInfo(JAWT_DrawingSurface* ds) #ifndef XAWT px->drawable = XtWindow(cdata->widget); #else - px->drawable = JNU_GetLongFieldAsPtr(env, peer, windowID); + px->drawable = (*env)->GetLongField(env, peer, windowID); #endif px->display = awt_display; diff --git a/jdk/src/solaris/native/sun/awt/awt_InputMethod.c b/jdk/src/solaris/native/sun/awt/awt_InputMethod.c index fbaf35cfff3..abddc8a341e 100644 --- a/jdk/src/solaris/native/sun/awt/awt_InputMethod.c +++ b/jdk/src/solaris/native/sun/awt/awt_InputMethod.c @@ -46,8 +46,6 @@ #ifdef XAWT #include #include - -#define XtWindow(w) (w) #else /* !XAWT */ #include #include @@ -670,7 +668,8 @@ static StatusWindow *createStatusWindow( int mccr = 0; char *dsr; Pixel bg, fg, light, dim; - int x, y, w, h, bw, depth, off_x, off_y, xx, yy; + int x, y, off_x, off_y, xx, yy; + unsigned int w, h, bw, depth; XGCValues values; unsigned long valuemask = 0; /*ignore XGCvalue and use defaults*/ int screen = 0; @@ -709,7 +708,7 @@ static StatusWindow *createStatusWindow( light = adata->AwtColorMatch(195, 195, 195, adata); dim = adata->AwtColorMatch(128, 128, 128, adata); - XGetWindowAttributes(dpy, XtWindow(parent), &xwa); + XGetWindowAttributes(dpy, parent, &xwa); bw = 2; /*xwa.border_width does not have the correct value*/ /*compare the size difference between parent container @@ -717,7 +716,7 @@ static StatusWindow *createStatusWindow( and title bar height (?)*/ XQueryTree( dpy, - XtWindow(parent), + parent, &rootWindow, &containerWindow, &ignoreWindowPtr, @@ -731,7 +730,7 @@ static StatusWindow *createStatusWindow( XGetWindowAttributes(dpy, rootWindow, &xxwa); XTranslateCoordinates(dpy, - XtWindow(parent), xwa.root, + parent, xwa.root, xwa.x, xwa.y, &x, &y, &child); @@ -833,9 +832,9 @@ static void onoffStatusWindow(X11InputMethodData* pX11IMData, if (statusWindow->parent != parent){ statusWindow->parent = parent; } - XGetWindowAttributes(dpy, XtWindow(parent), &xwa); + XGetWindowAttributes(dpy, parent, &xwa); XTranslateCoordinates(dpy, - XtWindow(parent), xwa.root, + parent, xwa.root, xwa.x, xwa.y, &x, &y, &child); @@ -966,9 +965,9 @@ void adjustStatusWindow(Widget shell){ XWindowAttributes xwa; int x, y; Window child; - XGetWindowAttributes(dpy, XtWindow(shell), &xwa); + XGetWindowAttributes(dpy, shell, &xwa); XTranslateCoordinates(dpy, - XtWindow(shell), xwa.root, + shell, xwa.root, xwa.x, xwa.y, &x, &y, &child); @@ -1033,7 +1032,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, return False; } #ifdef XAWT - if (w == NULL) { + if (!w) { return False; } #else /* !XAWT */ @@ -1148,8 +1147,8 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, goto err; pX11IMData->statusWindow = createStatusWindow(w); pX11IMData->ic_active = XCreateIC(X11im, - XNClientWindow, XtWindow(w), - XNFocusWindow, XtWindow(w), + XNClientWindow, w, + XNFocusWindow, w, XNInputStyle, active_styles, XNPreeditAttributes, preedit, XNStatusAttributes, status, @@ -1166,8 +1165,8 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, goto err; pX11IMData->statusWidget = awt_util_getXICStatusAreaWindow(w); pX11IMData->ic_active = XCreateIC(X11im, - XNClientWindow, XtWindow(pX11IMData->statusWidget), - XNFocusWindow, XtWindow(w), + XNClientWindow, pX11IMData->statusWidget, + XNFocusWindow, w, XNInputStyle, active_styles, XNPreeditAttributes, preedit, XNStatusAttributes, status, @@ -1176,8 +1175,8 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, } else { #endif /* XAWT */ pX11IMData->ic_active = XCreateIC(X11im, - XNClientWindow, XtWindow(w), - XNFocusWindow, XtWindow(w), + XNClientWindow, w, + XNFocusWindow, w, XNInputStyle, active_styles, XNPreeditAttributes, preedit, NULL); @@ -1187,15 +1186,15 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, XFree((void *)preedit); #endif /* __linux__ */ pX11IMData->ic_passive = XCreateIC(X11im, - XNClientWindow, XtWindow(w), - XNFocusWindow, XtWindow(w), + XNClientWindow, w, + XNFocusWindow, w, XNInputStyle, passive_styles, NULL); } else { pX11IMData->ic_active = XCreateIC(X11im, - XNClientWindow, XtWindow(w), - XNFocusWindow, XtWindow(w), + XNClientWindow, w, + XNFocusWindow, w, XNInputStyle, active_styles, NULL); pX11IMData->ic_passive = pX11IMData->ic_active; @@ -1213,7 +1212,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, { XIMCallback cb; cb.client_data = (XPointer) pX11IMData->x11inputmethod; - cb.callback = CommitStringCallback; + cb.callback = (XIMProc) CommitStringCallback; XSetICValues (pX11IMData->ic_active, XNCommitStringCallback, &cb, NULL); if (pX11IMData->ic_active != pX11IMData->ic_passive) { XSetICValues (pX11IMData->ic_passive, XNCommitStringCallback, &cb, NULL); @@ -1506,7 +1505,7 @@ Java_sun_awt_motif_MInputMethod_openXIMNative(JNIEnv *env, AWT_LOCK(); #ifdef XAWT - dpy = (Display *)display; + dpy = (Display *)jlong_to_ptr(display); #else dpy = awt_display; #endif @@ -1516,7 +1515,7 @@ Java_sun_awt_motif_MInputMethod_openXIMNative(JNIEnv *env, */ #ifdef __linux__ registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL, - NULL, (XIMProc)OpenXIMCallback, NULL); + NULL, (XIDProc)OpenXIMCallback, NULL); if (!registered) { /* directly call openXIM callback */ #endif @@ -1551,7 +1550,7 @@ Java_sun_awt_motif_MInputMethod_createXICNative(JNIEnv *env, AWT_LOCK(); #ifdef XAWT - if (window == NULL) { + if (!window) { #else /* !XAWT */ if (JNU_IsNull(env, comp)) { #endif /* XAWT */ @@ -1660,7 +1659,7 @@ Java_sun_awt_motif_MInputMethod_reconfigureXICNative(JNIEnv *env, * On Solaris2.6, setXICWindowFocus() has to be invoked * before setting focus. */ - setXICWindowFocus(pX11IMData->current_ic, XtWindow(cdata->widget)); + setXICWindowFocus(pX11IMData->current_ic, cdata->widget); setXICFocus(pX11IMData->current_ic, True); } else { destroyX11InputMethodData((JNIEnv *) NULL, pX11IMData); @@ -1701,7 +1700,7 @@ Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv *env, if (req) { #ifdef XAWT - if (w == NULL) { + if (!w) { AWT_UNLOCK(); return; } @@ -1734,10 +1733,10 @@ Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv *env, #ifndef XAWT w = cdata->widget; #endif /* XAWT */ - setXICWindowFocus(pX11IMData->current_ic, XtWindow(w)); + setXICWindowFocus(pX11IMData->current_ic, w); setXICFocus(pX11IMData->current_ic, req); currentX11InputMethodInstance = pX11IMData->x11inputmethod; - currentFocusWindow = XtWindow(w); + currentFocusWindow = w; #ifdef __linux__ if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on) onoffStatusWindow(pX11IMData, w, True); diff --git a/jdk/src/solaris/native/sun/awt/awt_Robot.c b/jdk/src/solaris/native/sun/awt/awt_Robot.c index 59df59689dd..5bb67772489 100644 --- a/jdk/src/solaris/native/sun/awt/awt_Robot.c +++ b/jdk/src/solaris/native/sun/awt/awt_Robot.c @@ -165,41 +165,34 @@ static XImage *getWindowImage(Display * display, Window window, // this should be called from XRobotPeer constructor JNIEXPORT void JNICALL -Java_sun_awt_X11_XRobotPeer_setup (JNIEnv * env, jclass cls, jint numberOfButtons) { +Java_sun_awt_X11_XRobotPeer_setup (JNIEnv * env, jclass cls, jint numberOfButtons, jintArray buttonDownMasks) +{ int32_t xtestAvailable; + jint *tmp; + int i; DTRACE_PRINTLN("RobotPeer: setup()"); num_buttons = numberOfButtons; - - jclass inputEventClazz = (*env)->FindClass(env, "java/awt/event/InputEvent"); - jmethodID getButtonDownMasksID = (*env)->GetStaticMethodID(env, inputEventClazz, "getButtonDownMasks", "()[I"); - jintArray obj = (jintArray)(*env)->CallStaticObjectMethod(env, inputEventClazz, getButtonDownMasksID); - jint * tmp = (*env)->GetIntArrayElements(env, obj, JNI_FALSE); - - masks = (jint *)malloc(sizeof(jint) * num_buttons); + tmp = (*env)->GetIntArrayElements(env, buttonDownMasks, JNI_FALSE); + masks = (jint *)malloc(sizeof(jint) * num_buttons); if (masks == (jint *) NULL) { JNU_ThrowOutOfMemoryError((JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2), NULL); - goto finally; + (*env)->ReleaseIntArrayElements(env, buttonDownMasks, tmp, 0); + return; } - - int i; for (i = 0; i < num_buttons; i++) { masks[i] = tmp[i]; } - (*env)->ReleaseIntArrayElements(env, obj, tmp, 0); - (*env)->DeleteLocalRef(env, obj); + (*env)->ReleaseIntArrayElements(env, buttonDownMasks, tmp, 0); AWT_LOCK(); xtestAvailable = isXTestAvailable(); DTRACE_PRINTLN1("RobotPeer: XTest available = %d", xtestAvailable); if (!xtestAvailable) { JNU_ThrowByName(env, "java/awt/AWTException", "java.awt.Robot requires your X server support the XTEST extension version 2.2"); - AWT_UNLOCK(); - return; } - finally: AWT_UNLOCK(); } diff --git a/jdk/src/solaris/native/sun/awt/awt_UNIXToolkit.c b/jdk/src/solaris/native/sun/awt/awt_UNIXToolkit.c index 3ee64ca57ea..3cf61df90a3 100644 --- a/jdk/src/solaris/native/sun/awt/awt_UNIXToolkit.c +++ b/jdk/src/solaris/native/sun/awt/awt_UNIXToolkit.c @@ -112,7 +112,7 @@ jboolean _icon_upcall(JNIEnv *env, jobject this, GdkPixbuf *pixbuf) /* Copy the data array into a Java structure so we can pass it back. */ jbyteArray data = (*env)->NewByteArray(env, (row_stride * height)); (*env)->SetByteArrayRegion(env, data, 0, (row_stride * height), - pixbuf_data); + (jbyte *)pixbuf_data); /* Release the pixbuf. */ (*fp_g_object_unref)(pixbuf); diff --git a/jdk/src/solaris/native/sun/xawt/XlibWrapper.c b/jdk/src/solaris/native/sun/xawt/XlibWrapper.c index 85a462523a8..28629d8acf1 100644 --- a/jdk/src/solaris/native/sun/xawt/XlibWrapper.c +++ b/jdk/src/solaris/native/sun/xawt/XlibWrapper.c @@ -484,8 +484,8 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XlibWrapper_XkbLibraryVersion (JNIEnv *env, jclass clazz, jlong lib_major_in_out, jlong lib_minor_in_out) { AWT_CHECK_HAVE_LOCK(); - *((int *)lib_major_in_out) = XkbMajorVersion; - *((int *)lib_minor_in_out) = XkbMinorVersion; + *((int *)jlong_to_ptr(lib_major_in_out)) = XkbMajorVersion; + *((int *)jlong_to_ptr(lib_minor_in_out)) = XkbMinorVersion; return XkbLibraryVersion((int *)jlong_to_ptr(lib_major_in_out), (int *)jlong_to_ptr(lib_minor_in_out)); } @@ -1229,7 +1229,6 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XlibWrapper_IsKanaKeyboard (JNIEnv *env, jclass clazz, jlong display) { int xx; - AWT_CHECK_HAVE_LOCK(); static jboolean result = JNI_FALSE; int32_t minKeyCode, maxKeyCode, keySymsPerKeyCode; @@ -1237,6 +1236,8 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XlibWrapper_IsKanaKeyboard int32_t i; int32_t kanaCount = 0; + AWT_CHECK_HAVE_LOCK(); + // There's no direct way to determine whether the keyboard has // a kana lock key. From available keyboard mapping tables, it looks // like only keyboards with the kana lock key can produce keysyms @@ -1337,12 +1338,14 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_XlibWrapper_PrintXErrorEvent JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XInternAtoms (JNIEnv *env, jclass clazz, jlong display, jobjectArray names_arr, jboolean only_if_exists, jlong atoms) { - int length = (*env)->GetArrayLength(env, names_arr); char ** names = (char**)malloc(length*sizeof(char*)); jboolean copy; int index, name_index = 0; int status; + + AWT_CHECK_HAVE_LOCK(); + for (index = 0; index < length; index++) { jstring str = (*env)->GetObjectArrayElement(env, names_arr, index); if (!JNU_IsNull(env, str)) { @@ -1352,7 +1355,6 @@ JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XInternAtoms (*env)->DeleteLocalRef(env, str); } } - AWT_CHECK_HAVE_LOCK(); status = XInternAtoms((Display*)jlong_to_ptr(display), names, name_index, only_if_exists, (Atom*) jlong_to_ptr(atoms)); for (index = 0; index < length; index++) { free(names[index]); @@ -2186,12 +2188,12 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_XlibWrapper_SetZOrder (JNIEnv *env, jclass clazz, jlong display, jlong window, jlong above) { - AWT_CHECK_HAVE_LOCK(); + unsigned int value_mask = CWStackMode; XWindowChanges wc; wc.sibling = (Window)jlong_to_ptr(above); - unsigned int value_mask = CWStackMode; + AWT_CHECK_HAVE_LOCK(); if (above == 0) { wc.stack_mode = Above; @@ -2219,6 +2221,7 @@ Java_sun_awt_X11_XlibWrapper_SetBitmapShape jboolean isCopy = JNI_FALSE; size_t worstBufferSize = (size_t)((width / 2 + 1) * height); RECT_T * pRect; + int numrects; AWT_CHECK_HAVE_LOCK(); @@ -2237,7 +2240,7 @@ Java_sun_awt_X11_XlibWrapper_SetBitmapShape /* Note: the values[0] and values[1] are supposed to contain the width * and height (see XIconInfo.getIntData() for details). So, we do +2. */ - int numrects = BitmapToYXBandedRectangles(32, (int)width, (int)height, + numrects = BitmapToYXBandedRectangles(32, (int)width, (int)height, (unsigned char *)(values + 2), pRect); XShapeCombineRectangles((Display *)jlong_to_ptr(display), (Window)jlong_to_ptr(window), diff --git a/jdk/src/solaris/native/sun/xawt/awt_Desktop.c b/jdk/src/solaris/native/sun/xawt/awt_Desktop.c index 9ebab6a4473..f8c56dd3eea 100644 --- a/jdk/src/solaris/native/sun/xawt/awt_Desktop.c +++ b/jdk/src/solaris/native/sun/xawt/awt_Desktop.c @@ -28,12 +28,15 @@ typedef int gboolean; -gboolean (*gnome_url_show) (const char *url, void **error); +typedef gboolean (GNOME_URL_SHOW_TYPE)(const char *, void **); +typedef gboolean (GNOME_VFS_INIT_TYPE)(void); + +GNOME_URL_SHOW_TYPE *gnome_url_show; +GNOME_VFS_INIT_TYPE *gnome_vfs_init; int init(){ void *vfs_handle; void *gnome_handle; - gboolean (*gnome_vfs_init) (void); const char *errmsg; vfs_handle = dlopen("libgnomevfs-2.so.0", RTLD_LAZY); @@ -44,7 +47,7 @@ int init(){ return 0; } dlerror(); /* Clear errors */ - gnome_vfs_init = dlsym(vfs_handle, "gnome_vfs_init"); + gnome_vfs_init = (GNOME_VFS_INIT_TYPE*)dlsym(vfs_handle, "gnome_vfs_init"); if ((errmsg = dlerror()) != NULL) { #ifdef INTERNAL_BUILD fprintf(stderr, "can not find symble gnome_vfs_init\n"); @@ -62,7 +65,7 @@ int init(){ return 0; } dlerror(); /* Clear errors */ - gnome_url_show = dlsym(gnome_handle, "gnome_url_show"); + gnome_url_show = (GNOME_URL_SHOW_TYPE*)dlsym(gnome_handle, "gnome_url_show"); if ((errmsg = dlerror()) != NULL) { #ifdef INTERNAL_BUILD fprintf(stderr, "can not find symble gnome_url_show\n"); @@ -94,14 +97,15 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XDesktopPeer_gnome_1url_1show (JNIEnv *env, jobject obj, jbyteArray url_j) { gboolean success; + const char* url_c; - const char* url_c = (*env)->GetByteArrayElements(env, url_j, NULL); - - if (gnome_url_show == NULL) return JNI_FALSE; + if (gnome_url_show == NULL) { + return JNI_FALSE; + } + url_c = (char*)(*env)->GetByteArrayElements(env, url_j, NULL); // call gnome_url_show(const char* , GError**) success = (*gnome_url_show)(url_c, NULL); - (*env)->ReleaseByteArrayElements(env, url_j, (signed char*)url_c, 0); return success ? JNI_TRUE : JNI_FALSE; diff --git a/jdk/src/windows/native/sun/windows/WPrinterJob.cpp b/jdk/src/windows/native/sun/windows/WPrinterJob.cpp index 5d24aaf9c4f..c35e9197ed3 100644 --- a/jdk/src/windows/native/sun/windows/WPrinterJob.cpp +++ b/jdk/src/windows/native/sun/windows/WPrinterJob.cpp @@ -639,7 +639,7 @@ static BOOL IsDCPostscript( HDC hDC ) if( ::ExtEscape( hDC, GETTECHNOLOGY, 0, NULL, MAX_PATH, (LPSTR)szTechnology ) <= 0 ) return FALSE; - strupr( szTechnology ); + _strupr_s(szTechnology, MAX_PATH); if(!strstr( szTechnology, "POSTSCRIPT" ) == NULL ) return TRUE; diff --git a/jdk/src/windows/native/sun/windows/awt_BitmapUtil.cpp b/jdk/src/windows/native/sun/windows/awt_BitmapUtil.cpp index 92c0e6ef450..5e8d3540b0c 100644 --- a/jdk/src/windows/native/sun/windows/awt_BitmapUtil.cpp +++ b/jdk/src/windows/native/sun/windows/awt_BitmapUtil.cpp @@ -246,7 +246,7 @@ HRGN BitmapUtil::BitmapToRgn(HBITMAP hBitmap) UINT height = abs(bi.bmiHeader.biHeight); BYTE * buf = (BYTE*)safe_Malloc(bi.bmiHeader.biSizeImage); - bi.bmiHeader.biHeight = -height; + bi.bmiHeader.biHeight = -(INT)height; ::GetDIBits(hdc, hBitmap, 0, height, buf, reinterpret_cast(&bi), DIB_RGB_COLORS); @@ -305,7 +305,7 @@ HBITMAP BitmapUtil::BlendCopy(HBITMAP hSrcBitmap, COLORREF blendColor, UINT height = abs(bi.bmiHeader.biHeight); BYTE * buf = (BYTE*)safe_Malloc(bi.bmiHeader.biSizeImage); - bi.bmiHeader.biHeight = -height; + bi.bmiHeader.biHeight = -(INT)height; ::GetDIBits(hdc, hSrcBitmap, 0, height, buf, reinterpret_cast(&bi), DIB_RGB_COLORS); diff --git a/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp b/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp index 50d305fd511..0e6148d058a 100644 --- a/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp +++ b/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp @@ -238,7 +238,7 @@ void AwtDesktopProperties::GetNonClientParameters() { // when running on XP. However this can't be referenced at compile time // with the older SDK, so there use 'lfMessageFont' plus its size. if (!IS_WINVISTA) { -#if defined(_MSC_VER) && (_MSC_VER >= 1600) { +#if defined(_MSC_VER) && (_MSC_VER >= 1600) ncmetrics.cbSize = offsetof(NONCLIENTMETRICS, iPaddedBorderWidth); #else ncmetrics.cbSize = offsetof(NONCLIENTMETRICS,lfMessageFont) + sizeof(LOGFONT); diff --git a/jdk/src/windows/native/sun/windows/awt_DrawingSurface.h b/jdk/src/windows/native/sun/windows/awt_DrawingSurface.h index da10b7d223a..2b14806a4e1 100644 --- a/jdk/src/windows/native/sun/windows/awt_DrawingSurface.h +++ b/jdk/src/windows/native/sun/windows/awt_DrawingSurface.h @@ -159,7 +159,8 @@ extern "C" { void JNICALL DSUnlockAWT(JNIEnv* env); _JNI_IMPORT_OR_EXPORT_ - jobject JNICALL DSGetComponent(JNIEnv* env, void* platformInfo); + jobject JNICALL DSGetComponent( + JNIEnv* env, void* platformInfo); #ifdef __cplusplus } /* extern "C" */ diff --git a/jdk/src/windows/native/sun/windows/awt_Font.cpp b/jdk/src/windows/native/sun/windows/awt_Font.cpp index e1544e6ac65..ec2520c54d3 100644 --- a/jdk/src/windows/native/sun/windows/awt_Font.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Font.cpp @@ -1189,7 +1189,7 @@ LONG AwtFontCache::DecRefCount(Item* item){ AwtFontCache::Item::Item(const WCHAR* s, HFONT f, AwtFontCache::Item* n ) { - name = wcsdup(s); + name = _wcsdup(s); font = f; next = n; refCount = 1; @@ -1237,7 +1237,7 @@ void CSegTableComponent::Create(LPCWSTR name) free(m_lpszFontName); m_lpszFontName = NULL; } - m_lpszFontName = wcsdup(name); + m_lpszFontName = _wcsdup(name); DASSERT(m_lpszFontName); } diff --git a/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp b/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp index fbaf4a6ae55..001e94c0d89 100644 --- a/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp +++ b/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp @@ -1050,7 +1050,7 @@ static LPTSTR GetPrinterPort(JNIEnv *env, LPTSTR printer) { return NULL; } - LPTSTR port = wcsdup(info2->pPortName); + LPTSTR port = _wcsdup(info2->pPortName); ::GlobalFree(info2); return port; } diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp index 2beb5191bd2..3905b86fa91 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -23,16 +23,12 @@ * questions. */ +#define _JNI_IMPLEMENTATION_ + #include "awt.h" #include #include -//#if defined(_DEBUG) && defined(_MSC_VER) && _MSC_VER >= 1000 -//#include -//#endif - -#define _JNI_IMPLEMENTATION_ - #include "awt_DrawingSurface.h" #include "awt_AWTEvent.h" #include "awt_Component.h" @@ -2224,21 +2220,21 @@ Java_sun_awt_windows_WToolkit_getWindowsVersion(JNIEnv *env, jclass cls) WCHAR szVer[128]; DWORD version = ::GetVersion(); - swprintf(szVer, L"0x%x = %ld", version, version); + swprintf(szVer, 128, L"0x%x = %ld", version, version); int l = lstrlen(szVer); if (IS_WIN2000) { if (IS_WINXP) { if (IS_WINVISTA) { - swprintf(szVer + l, L" (Windows Vista)"); + swprintf(szVer + l, 128, L" (Windows Vista)"); } else { - swprintf(szVer + l, L" (Windows XP)"); + swprintf(szVer + l, 128, L" (Windows XP)"); } } else { - swprintf(szVer + l, L" (Windows 2000)"); + swprintf(szVer + l, 128, L" (Windows 2000)"); } } else { - swprintf(szVer + l, L" (Unknown)"); + swprintf(szVer + l, 128, L" (Unknown)"); } return JNU_NewStringPlatform(env, szVer); diff --git a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp index c971ee79483..20b1f805147 100644 --- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp @@ -269,7 +269,7 @@ Java_sun_awt_Win32FontManager_getEUDCFontFile(JNIEnv *env, jclass cl) { //if the fontPath includes %SystemRoot% LPWSTR systemRoot = _wgetenv(L"SystemRoot"); if (systemRoot != NULL - && swprintf(tmpPath, L"%s%s", systemRoot, fontPath + 12) != -1) { + && swprintf(tmpPath, MAX_PATH, L"%s%s", systemRoot, fontPath + 12) != -1) { fontPath = tmpPath; } else { @@ -279,7 +279,7 @@ Java_sun_awt_Win32FontManager_getEUDCFontFile(JNIEnv *env, jclass cl) { //else to see if it only inludes "EUDC.TTE" WCHAR systemRoot[MAX_PATH + 1]; if (GetWindowsDirectory(systemRoot, MAX_PATH + 1) != 0) { - swprintf(tmpPath, L"%s\\FONTS\\EUDC.TTE", systemRoot); + swprintf(tmpPath, MAX_PATH, L"%s\\FONTS\\EUDC.TTE", systemRoot); fontPath = tmpPath; } else { diff --git a/jdk/src/windows/native/sun/windows/awt_Window.cpp b/jdk/src/windows/native/sun/windows/awt_Window.cpp index 6023e10531f..561d9d2f56b 100644 --- a/jdk/src/windows/native/sun/windows/awt_Window.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Window.cpp @@ -219,7 +219,7 @@ AwtWindow::AwtWindow() { ::InitializeCriticalSection(&contentBitmapCS); - m_windowType = Type::NORMAL; + m_windowType = NORMAL; m_alwaysOnTop = false; } @@ -1016,9 +1016,9 @@ void AwtWindow::InitType(JNIEnv *env, jobject peer) } if (strcmp(valueNative, "UTILITY") == 0) { - m_windowType = Type::UTILITY; + m_windowType = UTILITY; } else if (strcmp(valueNative, "POPUP") == 0) { - m_windowType = Type::POPUP; + m_windowType = POPUP; } env->ReleaseStringUTFChars(value, valueNative); @@ -1029,10 +1029,10 @@ void AwtWindow::InitType(JNIEnv *env, jobject peer) void AwtWindow::TweakStyle(DWORD & style, DWORD & exStyle) { switch (GetType()) { - case Type::UTILITY: + case UTILITY: exStyle |= WS_EX_TOOLWINDOW; break; - case Type::POPUP: + case POPUP: style &= ~WS_OVERLAPPED; style |= WS_POPUP; break; From f3d579d254bf53f9cf59f57856f5cadf886ac8ba Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Thu, 14 Oct 2010 18:24:36 +0400 Subject: [PATCH 089/722] 6991992: Need to forward-port AWT's part of the fix for 6691674 Reviewed-by: art --- jdk/src/share/classes/java/awt/AWTEvent.java | 13 ++++++++++ .../classes/java/awt/SequencedEvent.java | 3 +++ .../share/classes/sun/awt/AWTAccessor.java | 11 ++++++++ jdk/src/share/classes/sun/awt/SunToolkit.java | 25 +++++++++++++++++++ .../classes/sun/awt/X11/InfoWindow.java | 2 +- .../classes/sun/awt/X11/XTextAreaPeer.java | 8 +++++- .../classes/sun/awt/X11/XTrayIconPeer.java | 2 +- .../solaris/classes/sun/awt/X11/XWindow.java | 2 ++ .../classes/sun/awt/X11/XWindowPeer.java | 4 ++- 9 files changed, 66 insertions(+), 4 deletions(-) diff --git a/jdk/src/share/classes/java/awt/AWTEvent.java b/jdk/src/share/classes/java/awt/AWTEvent.java index d45e958b9e8..e52a8d7e555 100644 --- a/jdk/src/share/classes/java/awt/AWTEvent.java +++ b/jdk/src/share/classes/java/awt/AWTEvent.java @@ -100,6 +100,12 @@ public abstract class AWTEvent extends EventObject { transient boolean focusManagerIsDispatching = false; transient boolean isPosted; + /** + * Indicates whether this AWTEvent was generated by the system as + * opposed to by user code. + */ + private transient boolean isSystemGenerated; + /** * The event mask for selecting component events. */ @@ -235,6 +241,12 @@ public abstract class AWTEvent extends EventObject { public void setPosted(AWTEvent ev) { ev.isPosted = true; } + public void setSystemGenerated(AWTEvent ev) { + ev.isSystemGenerated = true; + } + public boolean isSystemGenerated(AWTEvent ev) { + return ev.isSystemGenerated; + } }); } @@ -554,6 +566,7 @@ public abstract class AWTEvent extends EventObject { } } } + that.isSystemGenerated = this.isSystemGenerated; } void dispatched() { diff --git a/jdk/src/share/classes/java/awt/SequencedEvent.java b/jdk/src/share/classes/java/awt/SequencedEvent.java index e8f2f7d5fcc..9072c5027dd 100644 --- a/jdk/src/share/classes/java/awt/SequencedEvent.java +++ b/jdk/src/share/classes/java/awt/SequencedEvent.java @@ -64,6 +64,9 @@ class SequencedEvent extends AWTEvent implements ActiveEvent { public SequencedEvent(AWTEvent nested) { super(nested.getSource(), ID); this.nested = nested; + // All AWTEvents that are wrapped in SequencedEvents are (at + // least currently) implicitly generated by the system + SunToolkit.setSystemGenerated(nested); synchronized (SequencedEvent.class) { list.add(this); } diff --git a/jdk/src/share/classes/sun/awt/AWTAccessor.java b/jdk/src/share/classes/sun/awt/AWTAccessor.java index 2b65f647d7b..b9171ce9798 100644 --- a/jdk/src/share/classes/sun/awt/AWTAccessor.java +++ b/jdk/src/share/classes/sun/awt/AWTAccessor.java @@ -302,6 +302,17 @@ public final class AWTAccessor { * Marks the event as posted. */ void setPosted(AWTEvent ev); + + /** + * Sets the flag on this AWTEvent indicating that it was + * generated by the system. + */ + void setSystemGenerated(AWTEvent ev); + + /** + * Indicates whether this AWTEvent was generated by the system. + */ + boolean isSystemGenerated(AWTEvent ev); } public interface InputEventAccessor { diff --git a/jdk/src/share/classes/sun/awt/SunToolkit.java b/jdk/src/share/classes/sun/awt/SunToolkit.java index 21c0906d4aa..07b231951c4 100644 --- a/jdk/src/share/classes/sun/awt/SunToolkit.java +++ b/jdk/src/share/classes/sun/awt/SunToolkit.java @@ -591,6 +591,12 @@ public abstract class SunToolkit extends Toolkit if (event == null) { throw new NullPointerException(); } + // All events posted via this method are system-generated. + // Placing the following call here reduces considerably the + // number of places throughout the toolkit that would + // otherwise have to be modified to precisely identify + // system-generated events. + setSystemGenerated(event); AppContext eventContext = targetToAppContext(event.getSource()); if (eventContext != null && !eventContext.equals(appContext)) { log.fine("Event posted on wrong app context : " + event); @@ -2093,6 +2099,25 @@ public abstract class SunToolkit extends Toolkit } return isInstanceOf(cls.getSuperclass(), type); } + + /////////////////////////////////////////////////////////////////////////// + // + // The following methods help set and identify whether a particular + // AWTEvent object was produced by the system or by user code. As of this + // writing the only consumer is the Java Plug-In, although this information + // could be useful to more clients and probably should be formalized in + // the public API. + // + /////////////////////////////////////////////////////////////////////////// + + public static void setSystemGenerated(AWTEvent e) { + AWTAccessor.getAWTEventAccessor().setSystemGenerated(e); + } + + public static boolean isSystemGenerated(AWTEvent e) { + return AWTAccessor.getAWTEventAccessor().isSystemGenerated(e); + } + } // class SunToolkit diff --git a/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java b/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java index 6728e356591..a4ae0a739cf 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java +++ b/jdk/src/solaris/classes/sun/awt/X11/InfoWindow.java @@ -432,7 +432,7 @@ public abstract class InfoWindow extends Window { ActionEvent aev = new ActionEvent(target, ActionEvent.ACTION_PERFORMED, liveArguments.getActionCommand(), e.getWhen(), e.getModifiers()); - Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(aev); + XToolkit.postEvent(XToolkit.targetToAppContext(aev.getSource()), aev); } } } diff --git a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java index fcc5659e5cb..a4ddea1f4b8 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java @@ -61,6 +61,7 @@ import javax.swing.plaf.BorderUIResource; import java.awt.im.InputMethodRequests; import sun.awt.CausedFocusEvent; import sun.awt.AWTAccessor; +import sun.awt.SunToolkit; class XTextAreaPeer extends XComponentPeer implements TextAreaPeer { @@ -1318,13 +1319,18 @@ class XTextAreaPeer extends XComponentPeer implements TextAreaPeer { Component source, Point point, MouseEvent template ) { MouseEvent e = template; - return new MouseEvent( + MouseEvent nme = new MouseEvent( source, e.getID(), e.getWhen(), e.getModifiersEx() | e.getModifiers(), point.x, point.y, e.getXOnScreen(), e.getYOnScreen(), e.getClickCount(), e.isPopupTrigger(), e.getButton() ); + // Because these MouseEvents are dispatched directly to + // their target, we need to mark them as being + // system-generated here + SunToolkit.setSystemGenerated(nme); + return nme; } private void setCursor() { diff --git a/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java index dc9130927b6..8b11f0e1cef 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java @@ -454,7 +454,7 @@ public class XTrayIconPeer implements TrayIconPeer, ActionEvent aev = new ActionEvent(xtiPeer.target, ActionEvent.ACTION_PERFORMED, xtiPeer.target.getActionCommand(), e.getWhen(), e.getModifiers()); - Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(aev); + XToolkit.postEvent(XToolkit.targetToAppContext(aev.getSource()), aev); } if (xtiPeer.balloon.isVisible()) { xtiPeer.balloon.hide(); diff --git a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java index c7626c3d4ba..d7b3eebb2cb 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java @@ -401,6 +401,8 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { if (isPostedField == null) { isPostedField = SunToolkit.getField(AWTEvent.class, "isPosted"); } + // The uses of this method imply that the incoming event is system-generated + SunToolkit.setSystemGenerated(e); PeerEvent pe = new PeerEvent(Toolkit.getDefaultToolkit(), new Runnable() { public void run() { try { diff --git a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java index 058cf966a50..579854d73e7 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java @@ -604,7 +604,9 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, public void handleWindowFocusIn_Dispatch() { if (EventQueue.isDispatchThread()) { XKeyboardFocusManagerPeer.setCurrentNativeFocusedWindow((Window) target); - target.dispatchEvent(new WindowEvent((Window)target, WindowEvent.WINDOW_GAINED_FOCUS)); + WindowEvent we = new WindowEvent((Window)target, WindowEvent.WINDOW_GAINED_FOCUS); + SunToolkit.setSystemGenerated(we); + target.dispatchEvent(we); } } From e79a62412fb64ca5783fb536aa2640bf814304d9 Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Thu, 14 Oct 2010 10:38:14 -0400 Subject: [PATCH 090/722] 6990359: G1: don't push a stolen entry on the taskqueue, deal with it directly When an entry is stolen, don't push it on the task queue but process it directly. Reviewed-by: iveresov, ysr, jcoomes --- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 8 ++++++-- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index d12e59fd316..c6cd6607eb4 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -4118,10 +4118,14 @@ void G1ParEvacuateFollowersClosure::do_void() { while (queues()->steal(pss->queue_num(), pss->hash_seed(), stolen_task)) { assert(pss->verify_task(stolen_task), "sanity"); if (stolen_task.is_narrow()) { - pss->push_on_queue((narrowOop*) stolen_task); + pss->deal_with_reference((narrowOop*) stolen_task); } else { - pss->push_on_queue((oop*) stolen_task); + pss->deal_with_reference((oop*) stolen_task); } + + // We've just processed a reference and we might have made + // available new entries on the queues. So we have to make sure + // we drain the queues as necessary. pss->trim_queue(); } } while (!offer_termination()); diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index c474ce2ea5c..b97d8710a64 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -1772,7 +1772,6 @@ public: } } -private: template void deal_with_reference(T* ref_to_scan) { if (has_partial_array_mask(ref_to_scan)) { _partial_scan_cl->do_oop_nv(ref_to_scan); From b269b5a65cda7ee81bb0dd1275e5cc901ff0e03e Mon Sep 17 00:00:00 2001 From: Alexander Potochkin Date: Thu, 14 Oct 2010 18:46:05 +0400 Subject: [PATCH 091/722] 6986385: JLayer should implement accessible interface Reviewed-by: rupashka --- jdk/src/share/classes/javax/swing/JLayer.java | 19 +++++++- .../accessibility/6986385/bug6986385.java | 47 +++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 jdk/test/javax/accessibility/6986385/bug6986385.java diff --git a/jdk/src/share/classes/javax/swing/JLayer.java b/jdk/src/share/classes/javax/swing/JLayer.java index eab0bf4ab2f..c01c4450767 100644 --- a/jdk/src/share/classes/javax/swing/JLayer.java +++ b/jdk/src/share/classes/javax/swing/JLayer.java @@ -29,6 +29,7 @@ import sun.awt.AWTAccessor; import javax.swing.plaf.LayerUI; import javax.swing.border.Border; +import javax.accessibility.*; import java.awt.*; import java.awt.event.*; import java.beans.PropertyChangeEvent; @@ -149,7 +150,7 @@ import java.security.PrivilegedAction; */ public final class JLayer extends JComponent - implements Scrollable, PropertyChangeListener { + implements Scrollable, PropertyChangeListener, Accessible { private V view; // this field is necessary because JComponent.ui is transient // when layerUI is serializable @@ -665,6 +666,22 @@ public final class JLayer } } + /** + * Gets the AccessibleContext associated with this {@code JLayer}. + * + * @return the AccessibleContext associated with this {@code JLayer}. + */ + public AccessibleContext getAccessibleContext() { + if (accessibleContext == null) { + accessibleContext = new AccessibleJComponent() { + public AccessibleRole getAccessibleRole() { + return AccessibleRole.PANEL; + } + }; + } + return accessibleContext; + } + /** * static AWTEventListener to be shared with all AbstractLayerUIs */ diff --git a/jdk/test/javax/accessibility/6986385/bug6986385.java b/jdk/test/javax/accessibility/6986385/bug6986385.java new file mode 100644 index 00000000000..8ad6078f7b1 --- /dev/null +++ b/jdk/test/javax/accessibility/6986385/bug6986385.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 6986385 + @summary JLayer should implement accessible interface + @author Alexander Potochkin + @run main bug6986385 +*/ + +import javax.swing.*; +import javax.accessibility.AccessibleContext; +import javax.accessibility.AccessibleRole; + +public class bug6986385 { + + public static void main(String... args) throws Exception { + JLayer l = new JLayer(); + AccessibleContext acc = l.getAccessibleContext(); + if (acc == null) { + throw new RuntimeException("JLayer's AccessibleContext is null"); + } + if (acc.getAccessibleRole() != AccessibleRole.PANEL) { + throw new RuntimeException("JLayer's AccessibleRole must be PANEL"); + } + } +} From d849b89a039fa2b42924c475ebfbc459bb4d2b7d Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Thu, 14 Oct 2010 18:59:15 +0400 Subject: [PATCH 092/722] 6979568: Test failure: test\closed\java\awt\Component\VisibleHwInLwContTest\VisibleHwInLwContTest.html Extend iteration to this container in isRecursivelyVisibleUpToHeavyweightContainer() Reviewed-by: art, dcherepanov --- jdk/src/share/classes/java/awt/Container.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/awt/Container.java b/jdk/src/share/classes/java/awt/Container.java index e39918d5349..bf635fd45ac 100644 --- a/jdk/src/share/classes/java/awt/Container.java +++ b/jdk/src/share/classes/java/awt/Container.java @@ -4187,7 +4187,7 @@ public class Container extends Component { return true; } - for (Container cont = getContainer(); + for (Container cont = this; cont != null && cont.isLightweight(); cont = cont.getContainer()) { From 0af2737f3acf25586c7a8a3981cc2d4521730350 Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Thu, 14 Oct 2010 18:56:18 +0400 Subject: [PATCH 093/722] 6838089: java.awt.Window.setOpacity() doesn't throw IllegalComponentStateException for two-display conf Reviewed-by: art, anthony --- jdk/src/share/classes/java/awt/Canvas.java | 11 +-- .../classes/sun/awt/windows/WWindowPeer.java | 7 +- ...slucencyThrowsExceptionWhenFullScreen.java | 70 +++++++++++++++++++ 3 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 jdk/test/java/awt/Multiscreen/TranslucencyThrowsExceptionWhenFullScreen/TranslucencyThrowsExceptionWhenFullScreen.java diff --git a/jdk/src/share/classes/java/awt/Canvas.java b/jdk/src/share/classes/java/awt/Canvas.java index 27c8ca4c427..c20c5231837 100644 --- a/jdk/src/share/classes/java/awt/Canvas.java +++ b/jdk/src/share/classes/java/awt/Canvas.java @@ -71,12 +71,13 @@ public class Canvas extends Component implements Accessible { @Override void setGraphicsConfiguration(GraphicsConfiguration gc) { - CanvasPeer peer = (CanvasPeer)getPeer(); - if (peer != null) { - gc = peer.getAppropriateGraphicsConfiguration(gc); + synchronized(getTreeLock()) { + CanvasPeer peer = (CanvasPeer)getPeer(); + if (peer != null) { + gc = peer.getAppropriateGraphicsConfiguration(gc); + } + super.setGraphicsConfiguration(gc); } - - super.setGraphicsConfiguration(gc); } /** diff --git a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java index d3ccd4db4d9..bffdfecbc75 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java @@ -487,13 +487,8 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, newDev.addDisplayChangedListener(this); } - SunToolkit.executeOnEventHandlerThread((Component)target, - new Runnable() { - public void run() { - AWTAccessor.getComponentAccessor(). + AWTAccessor.getComponentAccessor(). setGraphicsConfiguration((Component)target, winGraphicsConfig); - } - }); } /** diff --git a/jdk/test/java/awt/Multiscreen/TranslucencyThrowsExceptionWhenFullScreen/TranslucencyThrowsExceptionWhenFullScreen.java b/jdk/test/java/awt/Multiscreen/TranslucencyThrowsExceptionWhenFullScreen/TranslucencyThrowsExceptionWhenFullScreen.java new file mode 100644 index 00000000000..f044b1b6cc5 --- /dev/null +++ b/jdk/test/java/awt/Multiscreen/TranslucencyThrowsExceptionWhenFullScreen/TranslucencyThrowsExceptionWhenFullScreen.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + @test + @bug 6838089 + @summary Translucent windows should throw exception in FS mode + @author dmitry.cherepanov@oracle.com: area=awt-multiscreen + @run main TranslucencyThrowsExceptionWhenFullScreen +*/ + +import java.awt.*; +import java.lang.reflect.InvocationTargetException; + +public class TranslucencyThrowsExceptionWhenFullScreen +{ + public static void main(String[] args) + throws InvocationTargetException, InterruptedException + { + EventQueue.invokeAndWait( + new Runnable(){ + public void run() { + Frame frame = new Frame(); + frame.setBounds(100,100,100,100); + frame.setVisible(true); + + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + GraphicsDevice[] devices = ge.getScreenDevices(); + for (GraphicsDevice device : devices) { + testGraphicsDevice(device, frame); + } + + frame.dispose(); + } + } + ); + } + + private static void testGraphicsDevice(GraphicsDevice device, Frame frame) { + device.setFullScreenWindow(frame); + try { + frame.setOpacity(0.5f); + throw new RuntimeException("Test fails, there's no exception for device="+device); + } catch(IllegalComponentStateException e) { + device.setFullScreenWindow(null); + } + } +} From 1fdf430197ba69b00bc7ffccb07a2f241cdd3197 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Thu, 14 Oct 2010 11:37:22 -0700 Subject: [PATCH 094/722] 6575419: Solaris : XSetICFoucs is not called with Java application at appropriate timing Reviewed-by: okutsu --- jdk/src/solaris/classes/sun/awt/X11InputMethod.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/src/solaris/classes/sun/awt/X11InputMethod.java b/jdk/src/solaris/classes/sun/awt/X11InputMethod.java index b87877c8386..d958283afa6 100644 --- a/jdk/src/solaris/classes/sun/awt/X11InputMethod.java +++ b/jdk/src/solaris/classes/sun/awt/X11InputMethod.java @@ -96,6 +96,7 @@ public abstract class X11InputMethod extends InputMethodAdapter { private Component awtFocussedComponent = null; private Component lastXICFocussedComponent = null; private boolean isLastXICActive = false; + private boolean isLastTemporary = false; private boolean isActive = false; private boolean isActiveClient = false; private static Map[] highlightStyles; @@ -349,7 +350,7 @@ public abstract class X11InputMethod extends InputMethodAdapter { current focussed component, change the XIC focus to the newly focussed component. */ - if (lastXICFocussedComponentPeer != awtFocussedComponentPeer || + if (isLastTemporary || lastXICFocussedComponentPeer != awtFocussedComponentPeer || isLastXICActive != haveActiveClient()) { if (lastXICFocussedComponentPeer != null) { setXICFocus(lastXICFocussedComponentPeer, false, isLastXICActive); @@ -401,6 +402,7 @@ public abstract class X11InputMethod extends InputMethodAdapter { */ lastXICFocussedComponent = awtFocussedComponent; isLastXICActive = isAc; + isLastTemporary = isTemporary; isActive = false; } From 9fc2bd47e3bc29e9a2685197d819fd8796bb1193 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Thu, 14 Oct 2010 12:33:20 -0700 Subject: [PATCH 095/722] 6991013: Serialized form for java.util.Locale contains typos Reviewed-by: peytoia --- jdk/src/share/classes/java/util/Locale.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/java/util/Locale.java b/jdk/src/share/classes/java/util/Locale.java index 1043c8792c4..4fad48f2d92 100644 --- a/jdk/src/share/classes/java/util/Locale.java +++ b/jdk/src/share/classes/java/util/Locale.java @@ -1941,7 +1941,7 @@ public final class Locale implements Cloneable, Serializable { * @serialField variant String * variant subtags separated by LOWLINE characters. (See getVariant()) * @serialField hashcode int - * deprectated, for forward compatibility only + * deprecated, for forward compatibility only * @serialField script String * script subtag in title case (See getScript()) * @serialField extensions String @@ -1979,7 +1979,7 @@ public final class Locale implements Cloneable, Serializable { } /** - * Deserialize this Locale. + * Deserializes this Locale. * @param in the ObjectInputStream to read * @throws IOException * @throws ClassNotFoundException From daea1b7ef4343a178340637e9534d1da694ddbc8 Mon Sep 17 00:00:00 2001 From: Erik Trimble Date: Thu, 14 Oct 2010 16:05:59 -0700 Subject: [PATCH 096/722] 6992267: Bump the HS20 build number to 02 Update the HS20 build number to 02 Reviewed-by: jcoomes --- hotspot/make/hotspot_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version index dfc53081cb3..583e018cdcd 100644 --- a/hotspot/make/hotspot_version +++ b/hotspot/make/hotspot_version @@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2010 HS_MAJOR_VER=20 HS_MINOR_VER=0 -HS_BUILD_NUMBER=01 +HS_BUILD_NUMBER=02 JDK_MAJOR_VER=1 JDK_MINOR_VER=7 From b9a07ccad7591bd15463027cbac5ac325fed6dd6 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 14 Oct 2010 19:24:47 -0700 Subject: [PATCH 097/722] Added tag jdk7-b114 for changeset fec780096b1f --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 91c72f80940..72a2a02cb70 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -88,3 +88,4 @@ f8be576feefce0c6695f188ef97ec16b73ad9cfd jdk7-b104 9702d6fef68e17533ee7fcf5923b11ead3e912ce jdk7-b111 b852103caf73da70068473777ae867a457bb3ae1 jdk7-b112 c1df968c4527bfab5f97662a89245f15d12d378b jdk7-b113 +27985a5c6e5268014d25d55886e0ecb96af4763d jdk7-b114 From 5e71d608335ad504b799a29de38fe79e1f846e09 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 14 Oct 2010 19:24:52 -0700 Subject: [PATCH 098/722] Added tag jdk7-b114 for changeset a8770885b5cb --- corba/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/corba/.hgtags b/corba/.hgtags index 03eadfbbb1b..02247612caf 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -88,3 +88,4 @@ c3dd858e09b20206459d9e7b0ead99d27ab00eab jdk7-b109 640fa4d4e2ad4c2d7e4815c955026740d8c52b7a jdk7-b111 cc67fdc4fee9a5b25caee4e71b51a8ff24ae7d1a jdk7-b112 a89a6c5be9d1a754868d3d359cbf7ad36aa95631 jdk7-b113 +88fddb73c5c4a4b50c319cbae9380caf5172ab45 jdk7-b114 From c37a3a68efbc6dce05e451bbe8b3f1eb8871faee Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 14 Oct 2010 19:24:57 -0700 Subject: [PATCH 099/722] Added tag jdk7-b114 for changeset 21dec68c50e9 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index da1bccd72ad..b93c02fafd6 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -123,3 +123,4 @@ cc4bb3022b3144dc5db0805b9ef6c7eff2aa3b81 jdk7-b109 07b042e13dde4f3479ba9ec55120fcd5e8623323 jdk7-b111 5511edd5d719f3fc9fdd04879482026a3d2c8652 jdk7-b112 beef35b96b81129c375d572357fb9548d9020db1 jdk7-b113 +68d6141ea19de3a9ba98ef753f0da41a61f736a0 jdk7-b114 From edef1c5aef160be910b92dd900fd2764cacaa06f Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 14 Oct 2010 19:25:02 -0700 Subject: [PATCH 100/722] Added tag jdk7-b114 for changeset 83c0366b459c --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index e3050dd6df5..c4257fd0000 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -88,3 +88,4 @@ d422dbdd09766269344b796b3a46a5b3f74557e1 jdk7-b110 8106c747067c905d814a737a57fea0e29057b33f jdk7-b111 1b05254242881527b4d5d711295c0fe708c8823a jdk7-b112 bc0c84ce54c34d3e8b0604b94da0d7c75c26755e jdk7-b113 +d57197d22c2bfc39d1a860040f655b466ab46f52 jdk7-b114 From fd66f3bd4c3e879142b55b74b8502dec349d44e9 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 14 Oct 2010 19:25:03 -0700 Subject: [PATCH 101/722] Added tag jdk7-b114 for changeset 645f70db28dc --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 12e62c797d0..2441201e31f 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -88,3 +88,4 @@ b1ca39340238a239ba6d8489ad5315215e1366ca jdk7-b108 2575ebca96c7fb1b78f6ae025a97321210aba309 jdk7-b111 8e0f0054817f0f73fb33e80fb1333fb45b1d513d jdk7-b112 d35c94fd22362f478f75b4bfcd2bef6a83cb9b3f jdk7-b113 +400f494c81c5ec87714b705648afbb3cb680bf73 jdk7-b114 From 77580cfc93c646b3fc081bdfb97c70a8e349dfa3 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 14 Oct 2010 19:25:10 -0700 Subject: [PATCH 102/722] Added tag jdk7-b114 for changeset 59be7b5071f2 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index b49ddeec2f9..a0bc7e5f6e8 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -88,3 +88,4 @@ ab0d3f54a63f2aadfcdd2e14b81f79362ce454e2 jdk7-b109 fb63a2688db807a73e2a3de7d9bab298f1bff0e8 jdk7-b111 b53f226b1d91473ac54184afa827be07b87e0319 jdk7-b112 61d3b9fbb26bdef56cfa41b9af5bc312a22cbeb8 jdk7-b113 +e250cef36ea05e627e7e6f7d75e5e19f529e2ba3 jdk7-b114 From e79e8416365827dcc9a0a6559ca558639d891e50 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 14 Oct 2010 19:25:23 -0700 Subject: [PATCH 103/722] Added tag jdk7-b114 for changeset 114c3761ebd8 --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index 0d6cdae403a..26f2fa3183b 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -88,3 +88,4 @@ a408ebb8b3d427dbb3d8ce153dfaeb060564a0a4 jdk7-b108 8bec624274ef8535720cff553374347c2f4f5fb2 jdk7-b111 fd2579b80b83bf5d4289426016c7d29174ba5dd9 jdk7-b112 6dbd2d869b0573fa5b799a23cccff47d20c12696 jdk7-b113 +e4e7408cdc5b3d91d39161e1e94aad576ecc2dcd jdk7-b114 From 134dfead44b9682040920d3f7b084082b8b79400 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Fri, 15 Oct 2010 10:42:39 +0400 Subject: [PATCH 104/722] 6725821: Compiler warnings in medialib code Reviewed-by: igor, prr --- jdk/make/sun/image/generic/Makefile | 5 +- .../sun/awt/medialib/mlib_ImageLookUp_64.c | 6 +- .../medialib/mlib_v_ImageLookUpS32S16Func.c | 24 ++++--- .../medialib/mlib_v_ImageLookUpS32U16Func.c | 24 ++++--- .../medialib/mlib_v_ImageLookUpSIS32S16Func.c | 72 +++++++++++-------- .../medialib/mlib_v_ImageLookUpSIS32U16Func.c | 72 +++++++++++-------- 6 files changed, 118 insertions(+), 85 deletions(-) diff --git a/jdk/make/sun/image/generic/Makefile b/jdk/make/sun/image/generic/Makefile index 1f05b15a308..a588af1b050 100644 --- a/jdk/make/sun/image/generic/Makefile +++ b/jdk/make/sun/image/generic/Makefile @@ -69,5 +69,8 @@ CPPFLAGS += \ -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES -OTHER_LDLIBS = $(LIBM) -ldl + +ifneq ($(PLATFORM), windows) + OTHER_LDLIBS = $(LIBM) -ldl +endif diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c index 320ecfd8fa3..2b5272be435 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c @@ -558,10 +558,11 @@ void mlib_ImageLookUp_S32_D64(const mlib_s32 *src, const mlib_d64 **table) { const mlib_d64 *table_base[4]; + mlib_u32 shift = TABLE_SHIFT_S32; mlib_s32 c; for (c = 0; c < csize; c++) { - table_base[c] = &table[c][TABLE_SHIFT_S32]; + table_base[c] = &table[c][shift]; } MLIB_C_IMAGELOOKUP(mlib_d64, mlib_s32, table_base); @@ -1039,10 +1040,11 @@ void mlib_ImageLookUpSI_S32_D64(const mlib_s32 *src, const mlib_d64 **table) { const mlib_d64 *table_base[4]; + mlib_u32 shift = TABLE_SHIFT_S32; mlib_s32 c; for (c = 0; c < csize; c++) { - table_base[c] = &table[c][TABLE_SHIFT_S32]; + table_base[c] = &table[c][shift]; } MLIB_C_IMAGELOOKUPSI(mlib_d64, mlib_s32, table_base); diff --git a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c index 0af3bed3b4e..d0b645d05de 100644 --- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c +++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c @@ -169,7 +169,8 @@ void mlib_v_ImageLookUp_S32_S16_1(const mlib_s32 * src, { mlib_s32 *sl; mlib_s16 *dl; - const mlib_s16 *tab = &table[0][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab = &table[0][shift]; mlib_s32 j, i; sl = (void *)src; @@ -209,6 +210,7 @@ void mlib_v_ImageLookUp_S32_S16_2(const mlib_s32 * src, { mlib_s32 *sl; mlib_s16 *dl; + mlib_u32 shift = 2147483648u; const mlib_s16 *tab; mlib_s32 j, i; @@ -220,8 +222,8 @@ void mlib_v_ImageLookUp_S32_S16_2(const mlib_s32 * src, mlib_s32 *sp = sl; mlib_s16 *dp = dl; mlib_s32 off, size = xsize * 2; - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1); @@ -261,6 +263,7 @@ void mlib_v_ImageLookUp_S32_S16_4(const mlib_s32 * src, { mlib_s32 *sl; mlib_s16 *dl; + mlib_u32 shift = 2147483648u; const mlib_s16 *tab; mlib_s32 j; @@ -271,10 +274,10 @@ void mlib_v_ImageLookUp_S32_S16_4(const mlib_s32 * src, for (j = 0; j < ysize; j++) { mlib_s32 *sp = sl; mlib_s16 *dp = dl; - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; + const mlib_s16 *tab3 = &table[3][shift]; mlib_s32 off, size = xsize * 4; off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1); @@ -453,6 +456,7 @@ void mlib_v_ImageLookUp_S32_S16_3(const mlib_s32 * src, { mlib_s32 *sl; mlib_s16 *dl; + mlib_u32 shift = 2147483648u; const mlib_s16 *tab; mlib_s32 j, i; @@ -463,9 +467,9 @@ void mlib_v_ImageLookUp_S32_S16_3(const mlib_s32 * src, for (j = 0; j < ysize; j++) { mlib_s32 *sp = sl; mlib_s16 *dp = dl; - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; mlib_s32 off, size = xsize * 3; off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1); diff --git a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c index c68e1209a2c..cf87815b134 100644 --- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c +++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c @@ -170,7 +170,8 @@ void mlib_v_ImageLookUp_S32_U16_1(const mlib_s32 *src, { mlib_s32 *sl; mlib_u16 *dl; - const mlib_u16 *tab = &table[0][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab = &table[0][shift]; mlib_s32 j, i; sl = (void *)src; @@ -211,6 +212,7 @@ void mlib_v_ImageLookUp_S32_U16_2(const mlib_s32 *src, { mlib_s32 *sl; mlib_u16 *dl; + mlib_u32 shift = 2147483648u; const mlib_u16 *tab; mlib_s32 j, i; @@ -222,8 +224,8 @@ void mlib_v_ImageLookUp_S32_U16_2(const mlib_s32 *src, mlib_s32 *sp = sl; mlib_u16 *dp = dl; mlib_s32 off, size = xsize * 2; - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1); @@ -264,6 +266,7 @@ void mlib_v_ImageLookUp_S32_U16_4(const mlib_s32 *src, { mlib_s32 *sl; mlib_u16 *dl; + mlib_u32 shift = 2147483648u; const mlib_u16 *tab; mlib_s32 j; @@ -274,10 +277,10 @@ void mlib_v_ImageLookUp_S32_U16_4(const mlib_s32 *src, for (j = 0; j < ysize; j++) { mlib_s32 *sp = sl; mlib_u16 *dp = dl; - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; + const mlib_u16 *tab3 = &table[3][shift]; mlib_s32 off, size = xsize * 4; off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1); @@ -457,6 +460,7 @@ void mlib_v_ImageLookUp_S32_U16_3(const mlib_s32 *src, { mlib_s32 *sl; mlib_u16 *dl; + mlib_u32 shift = 2147483648u; const mlib_u16 *tab; mlib_s32 j, i; @@ -467,9 +471,9 @@ void mlib_v_ImageLookUp_S32_U16_3(const mlib_s32 *src, for (j = 0; j < ysize; j++) { mlib_s32 *sp = sl; mlib_u16 *dp = dl; - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; mlib_s32 off, size = xsize * 3; off = (mlib_s32) (((8 - ((mlib_addr) dp & 7)) & 7) >> 1); diff --git a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c index d9988938d06..71de078b95d 100644 --- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c +++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c @@ -81,8 +81,9 @@ void mlib_v_ImageLookUpSI_S32_S16_2_DstA8D1(const mlib_s32 *src, mlib_d64 t0, t1, t2; /* destination data */ mlib_d64 t3, acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; sp = (void *)src; dl = dst; @@ -145,8 +146,9 @@ void mlib_v_ImageLookUpSI_S32_S16_2_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2; /* destination data */ mlib_d64 t3, acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; sp = (void *)src; dl = dst; @@ -220,8 +222,9 @@ void mlib_v_ImageLookUpSI_S32_S16_2(const mlib_s32 *src, mlib_s32 *sl; mlib_s16 *dl; mlib_s32 j; - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; sl = (void *)src; dl = dst; @@ -268,9 +271,10 @@ void mlib_v_ImageLookUpSI_S32_S16_3_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc0, acc1, acc2; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; mlib_s32 s00, s01, s02, s03; sp = (void *)src; @@ -379,9 +383,10 @@ void mlib_v_ImageLookUpSI_S32_S16_3(const mlib_s32 *src, mlib_s32 *sl; mlib_s16 *dl; mlib_s32 i, j; - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; sl = (void *)src; dl = dst; @@ -425,10 +430,11 @@ void mlib_v_ImageLookUpSI_S32_S16_4_DstOff0_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; + const mlib_s16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -479,10 +485,11 @@ void mlib_v_ImageLookUpSI_S32_S16_4_DstOff1_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; + const mlib_s16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -543,10 +550,11 @@ void mlib_v_ImageLookUpSI_S32_S16_4_DstOff2_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; + const mlib_s16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -606,10 +614,11 @@ void mlib_v_ImageLookUpSI_S32_S16_4_DstOff3_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_s16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; + const mlib_s16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -667,9 +676,10 @@ void mlib_v_ImageLookUpSI_S32_S16_4(const mlib_s32 *src, mlib_s32 *sl; mlib_s16 *dl; mlib_s32 j; - const mlib_s16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_s16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_s16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_s16 *tab0 = &table[0][shift]; + const mlib_s16 *tab1 = &table[1][shift]; + const mlib_s16 *tab2 = &table[2][shift]; sl = (void *)src; dl = dst; diff --git a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c index ebe71f34943..1e6c3265933 100644 --- a/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c +++ b/jdk/src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c @@ -81,8 +81,9 @@ void mlib_v_ImageLookUpSI_S32_U16_2_DstA8D1(const mlib_s32 *src, mlib_d64 t0, t1, t2; /* destination data */ mlib_d64 t3, acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; sp = (void *)src; dl = dst; @@ -145,8 +146,9 @@ void mlib_v_ImageLookUpSI_S32_U16_2_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2; /* destination data */ mlib_d64 t3, acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; sp = (void *)src; dl = dst; @@ -220,8 +222,9 @@ void mlib_v_ImageLookUpSI_S32_U16_2(const mlib_s32 *src, mlib_s32 *sl; mlib_u16 *dl; mlib_s32 j; - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; sl = (void *)src; dl = dst; @@ -268,9 +271,10 @@ void mlib_v_ImageLookUpSI_S32_U16_3_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc0, acc1, acc2; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; mlib_s32 s00, s01, s02, s03; sp = (void *)src; @@ -379,9 +383,10 @@ void mlib_v_ImageLookUpSI_S32_U16_3(const mlib_s32 *src, mlib_s32 *sl; mlib_u16 *dl; mlib_s32 i, j; - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; sl = (void *)src; dl = dst; @@ -425,10 +430,11 @@ void mlib_v_ImageLookUpSI_S32_U16_4_DstOff0_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; + const mlib_u16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -479,10 +485,11 @@ void mlib_v_ImageLookUpSI_S32_U16_4_DstOff1_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; + const mlib_u16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -543,10 +550,11 @@ void mlib_v_ImageLookUpSI_S32_U16_4_DstOff2_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; + const mlib_u16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -606,10 +614,11 @@ void mlib_v_ImageLookUpSI_S32_U16_4_DstOff3_D1(const mlib_s32 *src, mlib_d64 t0, t1, t2, t3; /* destination data */ mlib_d64 acc; /* destination data */ mlib_s32 i; /* loop variable */ - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; - const mlib_u16 *tab3 = &table[3][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; + const mlib_u16 *tab3 = &table[3][shift]; sp = (void *)src; dl = dst; @@ -667,9 +676,10 @@ void mlib_v_ImageLookUpSI_S32_U16_4(const mlib_s32 *src, mlib_s32 *sl; mlib_u16 *dl; mlib_s32 j; - const mlib_u16 *tab0 = &table[0][(mlib_u32) 2147483648u]; - const mlib_u16 *tab1 = &table[1][(mlib_u32) 2147483648u]; - const mlib_u16 *tab2 = &table[2][(mlib_u32) 2147483648u]; + mlib_u32 shift = 2147483648u; + const mlib_u16 *tab0 = &table[0][shift]; + const mlib_u16 *tab1 = &table[1][shift]; + const mlib_u16 *tab2 = &table[2][shift]; sl = (void *)src; dl = dst; From 5e04c64e9e18c558b13147b8adacb46b699ecbe6 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Fri, 15 Oct 2010 11:26:43 +0400 Subject: [PATCH 105/722] 6773022: java.awt.image.SampleModel.getDataElements() does't throw ArrayIndexOutOfBoundsEx for Integer.MAX_V Reviewed-by: igor, prr --- .../classes/java/awt/image/SampleModel.java | 29 ++++++--- .../java/awt/image/GetDataElementsTest.java | 62 +++++++++++++++++++ 2 files changed, 81 insertions(+), 10 deletions(-) create mode 100644 jdk/test/java/awt/image/GetDataElementsTest.java diff --git a/jdk/src/share/classes/java/awt/image/SampleModel.java b/jdk/src/share/classes/java/awt/image/SampleModel.java index a2b02c44a62..0bdb6a5ba97 100644 --- a/jdk/src/share/classes/java/awt/image/SampleModel.java +++ b/jdk/src/share/classes/java/awt/image/SampleModel.java @@ -358,6 +358,15 @@ public abstract class SampleModel int cnt = 0; Object o = null; + int x1 = x + w; + int y1 = y + h; + + if (x < 0 || x1 < x || x1 > width || + y < 0 || y1 < y || y1 > height) + { + throw new ArrayIndexOutOfBoundsException("Invalid coordinates."); + } + switch(type) { case DataBuffer.TYPE_BYTE: @@ -370,8 +379,8 @@ public abstract class SampleModel else bdata = (byte[])obj; - for (int i=y; i Date: Fri, 15 Oct 2010 09:38:20 +0200 Subject: [PATCH 106/722] 6991577: add IfOp optimization to C1 Ifop optimization for c1 Reviewed-by: never, phh, iveresov --- hotspot/src/share/vm/c1/c1_Compilation.hpp | 8 +- hotspot/src/share/vm/c1/c1_IR.cpp | 2 +- hotspot/src/share/vm/c1/c1_Instruction.cpp | 38 ++- hotspot/src/share/vm/c1/c1_Instruction.hpp | 22 +- hotspot/src/share/vm/c1/c1_Optimizer.cpp | 346 ++++++++++++--------- hotspot/src/share/vm/c1/c1_globals.hpp | 3 + 6 files changed, 246 insertions(+), 173 deletions(-) diff --git a/hotspot/src/share/vm/c1/c1_Compilation.hpp b/hotspot/src/share/vm/c1/c1_Compilation.hpp index cb3ae41c421..0e217614fc3 100644 --- a/hotspot/src/share/vm/c1/c1_Compilation.hpp +++ b/hotspot/src/share/vm/c1/c1_Compilation.hpp @@ -178,15 +178,11 @@ class Compilation: public StackObj { return (int) NMethodSizeLimit; // default 256K or 512K #else // conditional branches on PPC are restricted to 16 bit signed - return MAX2((unsigned int)NMethodSizeLimit,32*K); + return MIN2((unsigned int)NMethodSizeLimit,32*K); #endif } static int desired_max_constant_size() { -#ifndef PPC - return (int) NMethodSizeLimit / 10; // about 25K -#else - return (MAX2((unsigned int)NMethodSizeLimit, 32*K)) / 10; -#endif + return desired_max_code_buffer_size() / 10; } static void setup_code_buffer(CodeBuffer* cb, int call_stub_estimate); diff --git a/hotspot/src/share/vm/c1/c1_IR.cpp b/hotspot/src/share/vm/c1/c1_IR.cpp index d916f04ffc6..8bdc076af53 100644 --- a/hotspot/src/share/vm/c1/c1_IR.cpp +++ b/hotspot/src/share/vm/c1/c1_IR.cpp @@ -321,7 +321,7 @@ class UseCountComputer: public ValueVisitor, BlockClosure { void visit(Value* n) { // Local instructions and Phis for expression stack values at the // start of basic blocks are not added to the instruction list - if (!(*n)->is_linked()&& (*n)->can_be_linked()) { + if (!(*n)->is_linked() && (*n)->can_be_linked()) { assert(false, "a node was not appended to the graph"); Compilation::current()->bailout("a node was not appended to the graph"); } diff --git a/hotspot/src/share/vm/c1/c1_Instruction.cpp b/hotspot/src/share/vm/c1/c1_Instruction.cpp index 14c834d1f42..50553ec1fbb 100644 --- a/hotspot/src/share/vm/c1/c1_Instruction.cpp +++ b/hotspot/src/share/vm/c1/c1_Instruction.cpp @@ -415,28 +415,26 @@ bool Constant::is_equal(Value v) const { return false; } - -BlockBegin* Constant::compare(Instruction::Condition cond, Value right, - BlockBegin* true_sux, BlockBegin* false_sux) { +Constant::CompareResult Constant::compare(Instruction::Condition cond, Value right) const { Constant* rc = right->as_Constant(); // other is not a constant - if (rc == NULL) return NULL; + if (rc == NULL) return not_comparable; ValueType* lt = type(); ValueType* rt = rc->type(); // different types - if (lt->base() != rt->base()) return NULL; + if (lt->base() != rt->base()) return not_comparable; switch (lt->tag()) { case intTag: { int x = lt->as_IntConstant()->value(); int y = rt->as_IntConstant()->value(); switch (cond) { - case If::eql: return x == y ? true_sux : false_sux; - case If::neq: return x != y ? true_sux : false_sux; - case If::lss: return x < y ? true_sux : false_sux; - case If::leq: return x <= y ? true_sux : false_sux; - case If::gtr: return x > y ? true_sux : false_sux; - case If::geq: return x >= y ? true_sux : false_sux; + case If::eql: return x == y ? cond_true : cond_false; + case If::neq: return x != y ? cond_true : cond_false; + case If::lss: return x < y ? cond_true : cond_false; + case If::leq: return x <= y ? cond_true : cond_false; + case If::gtr: return x > y ? cond_true : cond_false; + case If::geq: return x >= y ? cond_true : cond_false; } break; } @@ -444,12 +442,12 @@ BlockBegin* Constant::compare(Instruction::Condition cond, Value right, jlong x = lt->as_LongConstant()->value(); jlong y = rt->as_LongConstant()->value(); switch (cond) { - case If::eql: return x == y ? true_sux : false_sux; - case If::neq: return x != y ? true_sux : false_sux; - case If::lss: return x < y ? true_sux : false_sux; - case If::leq: return x <= y ? true_sux : false_sux; - case If::gtr: return x > y ? true_sux : false_sux; - case If::geq: return x >= y ? true_sux : false_sux; + case If::eql: return x == y ? cond_true : cond_false; + case If::neq: return x != y ? cond_true : cond_false; + case If::lss: return x < y ? cond_true : cond_false; + case If::leq: return x <= y ? cond_true : cond_false; + case If::gtr: return x > y ? cond_true : cond_false; + case If::geq: return x >= y ? cond_true : cond_false; } break; } @@ -459,14 +457,14 @@ BlockBegin* Constant::compare(Instruction::Condition cond, Value right, assert(xvalue != NULL && yvalue != NULL, "not constants"); if (xvalue->is_loaded() && yvalue->is_loaded()) { switch (cond) { - case If::eql: return xvalue == yvalue ? true_sux : false_sux; - case If::neq: return xvalue != yvalue ? true_sux : false_sux; + case If::eql: return xvalue == yvalue ? cond_true : cond_false; + case If::neq: return xvalue != yvalue ? cond_true : cond_false; } } break; } } - return NULL; + return not_comparable; } diff --git a/hotspot/src/share/vm/c1/c1_Instruction.hpp b/hotspot/src/share/vm/c1/c1_Instruction.hpp index fa684e4b1a5..5c42ee883b9 100644 --- a/hotspot/src/share/vm/c1/c1_Instruction.hpp +++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp @@ -443,7 +443,7 @@ class Instruction: public CompilationResourceObj { // generic virtual Instruction* as_Instruction() { return this; } // to satisfy HASHING1 macro - virtual Phi* as_Phi() { return NULL; } + virtual Phi* as_Phi() { return NULL; } virtual Local* as_Local() { return NULL; } virtual Constant* as_Constant() { return NULL; } virtual AccessField* as_AccessField() { return NULL; } @@ -650,8 +650,24 @@ LEAF(Constant, Instruction) virtual intx hash() const; virtual bool is_equal(Value v) const; - virtual BlockBegin* compare(Instruction::Condition condition, Value right, - BlockBegin* true_sux, BlockBegin* false_sux); + + enum CompareResult { not_comparable = -1, cond_false, cond_true }; + + virtual CompareResult compare(Instruction::Condition condition, Value right) const; + BlockBegin* compare(Instruction::Condition cond, Value right, + BlockBegin* true_sux, BlockBegin* false_sux) const { + switch (compare(cond, right)) { + case not_comparable: + return NULL; + case cond_false: + return false_sux; + case cond_true: + return true_sux; + default: + ShouldNotReachHere(); + return NULL; + } + } }; diff --git a/hotspot/src/share/vm/c1/c1_Optimizer.cpp b/hotspot/src/share/vm/c1/c1_Optimizer.cpp index bb5cd837ecd..12b8a4748fc 100644 --- a/hotspot/src/share/vm/c1/c1_Optimizer.cpp +++ b/hotspot/src/share/vm/c1/c1_Optimizer.cpp @@ -38,18 +38,20 @@ class CE_Eliminator: public BlockClosure { private: IR* _hir; int _cee_count; // the number of CEs successfully eliminated + int _ifop_count; // the number of IfOps successfully simplified int _has_substitution; public: - CE_Eliminator(IR* hir) : _cee_count(0), _hir(hir) { + CE_Eliminator(IR* hir) : _cee_count(0), _ifop_count(0), _hir(hir) { _has_substitution = false; _hir->iterate_preorder(this); if (_has_substitution) { - // substituted some phis so resolve the substitution + // substituted some ifops/phis, so resolve the substitution SubstitutionResolver sr(_hir); } } int cee_count() const { return _cee_count; } + int ifop_count() const { return _ifop_count; } void adjust_exception_edges(BlockBegin* block, BlockBegin* sux) { int e = sux->number_of_exception_handlers(); @@ -68,156 +70,214 @@ class CE_Eliminator: public BlockClosure { } } - virtual void block_do(BlockBegin* block) { - // 1) find conditional expression - // check if block ends with an If - If* if_ = block->end()->as_If(); - if (if_ == NULL) return; + virtual void block_do(BlockBegin* block); - // check if If works on int or object types - // (we cannot handle If's working on long, float or doubles yet, - // since IfOp doesn't support them - these If's show up if cmp - // operations followed by If's are eliminated) - ValueType* if_type = if_->x()->type(); - if (!if_type->is_int() && !if_type->is_object()) return; - - BlockBegin* t_block = if_->tsux(); - BlockBegin* f_block = if_->fsux(); - Instruction* t_cur = t_block->next(); - Instruction* f_cur = f_block->next(); - - // one Constant may be present between BlockBegin and BlockEnd - Value t_const = NULL; - Value f_const = NULL; - if (t_cur->as_Constant() != NULL && !t_cur->can_trap()) { - t_const = t_cur; - t_cur = t_cur->next(); - } - if (f_cur->as_Constant() != NULL && !f_cur->can_trap()) { - f_const = f_cur; - f_cur = f_cur->next(); - } - - // check if both branches end with a goto - Goto* t_goto = t_cur->as_Goto(); - if (t_goto == NULL) return; - Goto* f_goto = f_cur->as_Goto(); - if (f_goto == NULL) return; - - // check if both gotos merge into the same block - BlockBegin* sux = t_goto->default_sux(); - if (sux != f_goto->default_sux()) return; - - // check if at least one word was pushed on sux_state - ValueStack* sux_state = sux->state(); - if (sux_state->stack_size() <= if_->state()->stack_size()) return; - - // check if phi function is present at end of successor stack and that - // only this phi was pushed on the stack - Value sux_phi = sux_state->stack_at(if_->state()->stack_size()); - if (sux_phi == NULL || sux_phi->as_Phi() == NULL || sux_phi->as_Phi()->block() != sux) return; - if (sux_phi->type()->size() != sux_state->stack_size() - if_->state()->stack_size()) return; - - // get the values that were pushed in the true- and false-branch - Value t_value = t_goto->state()->stack_at(if_->state()->stack_size()); - Value f_value = f_goto->state()->stack_at(if_->state()->stack_size()); - - // backend does not support floats - assert(t_value->type()->base() == f_value->type()->base(), "incompatible types"); - if (t_value->type()->is_float_kind()) return; - - // check that successor has no other phi functions but sux_phi - // this can happen when t_block or f_block contained additonal stores to local variables - // that are no longer represented by explicit instructions - for_each_phi_fun(sux, phi, - if (phi != sux_phi) return; - ); - // true and false blocks can't have phis - for_each_phi_fun(t_block, phi, return; ); - for_each_phi_fun(f_block, phi, return; ); - - // 2) substitute conditional expression - // with an IfOp followed by a Goto - // cut if_ away and get node before - Instruction* cur_end = if_->prev(block); - - // append constants of true- and false-block if necessary - // clone constants because original block must not be destroyed - assert((t_value != f_const && f_value != t_const) || t_const == f_const, "mismatch"); - if (t_value == t_const) { - t_value = new Constant(t_const->type()); - NOT_PRODUCT(t_value->set_printable_bci(if_->printable_bci())); - cur_end = cur_end->set_next(t_value); - } - if (f_value == f_const) { - f_value = new Constant(f_const->type()); - NOT_PRODUCT(f_value->set_printable_bci(if_->printable_bci())); - cur_end = cur_end->set_next(f_value); - } - - // it is very unlikely that the condition can be statically decided - // (this was checked previously by the Canonicalizer), so always - // append IfOp - Value result = new IfOp(if_->x(), if_->cond(), if_->y(), t_value, f_value); - NOT_PRODUCT(result->set_printable_bci(if_->printable_bci())); - cur_end = cur_end->set_next(result); - - // append Goto to successor - ValueStack* state_before = if_->is_safepoint() ? if_->state_before() : NULL; - Goto* goto_ = new Goto(sux, state_before, if_->is_safepoint() || t_goto->is_safepoint() || f_goto->is_safepoint()); - - // prepare state for Goto - ValueStack* goto_state = if_->state(); - while (sux_state->scope() != goto_state->scope()) { - goto_state = goto_state->caller_state(); - assert(goto_state != NULL, "states do not match up"); - } - goto_state = goto_state->copy(ValueStack::StateAfter, goto_state->bci()); - goto_state->push(result->type(), result); - assert(goto_state->is_same(sux_state), "states must match now"); - goto_->set_state(goto_state); - - cur_end = cur_end->set_next(goto_, goto_state->bci()); - - // Adjust control flow graph - BlockBegin::disconnect_edge(block, t_block); - BlockBegin::disconnect_edge(block, f_block); - if (t_block->number_of_preds() == 0) { - BlockBegin::disconnect_edge(t_block, sux); - } - adjust_exception_edges(block, t_block); - if (f_block->number_of_preds() == 0) { - BlockBegin::disconnect_edge(f_block, sux); - } - adjust_exception_edges(block, f_block); - - // update block end - block->set_end(goto_); - - // substitute the phi if possible - if (sux_phi->as_Phi()->operand_count() == 1) { - assert(sux_phi->as_Phi()->operand_at(0) == result, "screwed up phi"); - sux_phi->set_subst(result); - _has_substitution = true; - } - - // 3) successfully eliminated a conditional expression - _cee_count++; - if (PrintCEE) { - tty->print_cr("%d. CEE in B%d (B%d B%d)", cee_count(), block->block_id(), t_block->block_id(), f_block->block_id()); - } - - _hir->verify(); - } + private: + Value make_ifop(Value x, Instruction::Condition cond, Value y, Value tval, Value fval); }; +void CE_Eliminator::block_do(BlockBegin* block) { + // 1) find conditional expression + // check if block ends with an If + If* if_ = block->end()->as_If(); + if (if_ == NULL) return; + + // check if If works on int or object types + // (we cannot handle If's working on long, float or doubles yet, + // since IfOp doesn't support them - these If's show up if cmp + // operations followed by If's are eliminated) + ValueType* if_type = if_->x()->type(); + if (!if_type->is_int() && !if_type->is_object()) return; + + BlockBegin* t_block = if_->tsux(); + BlockBegin* f_block = if_->fsux(); + Instruction* t_cur = t_block->next(); + Instruction* f_cur = f_block->next(); + + // one Constant may be present between BlockBegin and BlockEnd + Value t_const = NULL; + Value f_const = NULL; + if (t_cur->as_Constant() != NULL && !t_cur->can_trap()) { + t_const = t_cur; + t_cur = t_cur->next(); + } + if (f_cur->as_Constant() != NULL && !f_cur->can_trap()) { + f_const = f_cur; + f_cur = f_cur->next(); + } + + // check if both branches end with a goto + Goto* t_goto = t_cur->as_Goto(); + if (t_goto == NULL) return; + Goto* f_goto = f_cur->as_Goto(); + if (f_goto == NULL) return; + + // check if both gotos merge into the same block + BlockBegin* sux = t_goto->default_sux(); + if (sux != f_goto->default_sux()) return; + + // check if at least one word was pushed on sux_state + ValueStack* sux_state = sux->state(); + if (sux_state->stack_size() <= if_->state()->stack_size()) return; + + // check if phi function is present at end of successor stack and that + // only this phi was pushed on the stack + Value sux_phi = sux_state->stack_at(if_->state()->stack_size()); + if (sux_phi == NULL || sux_phi->as_Phi() == NULL || sux_phi->as_Phi()->block() != sux) return; + if (sux_phi->type()->size() != sux_state->stack_size() - if_->state()->stack_size()) return; + + // get the values that were pushed in the true- and false-branch + Value t_value = t_goto->state()->stack_at(if_->state()->stack_size()); + Value f_value = f_goto->state()->stack_at(if_->state()->stack_size()); + + // backend does not support floats + assert(t_value->type()->base() == f_value->type()->base(), "incompatible types"); + if (t_value->type()->is_float_kind()) return; + + // check that successor has no other phi functions but sux_phi + // this can happen when t_block or f_block contained additonal stores to local variables + // that are no longer represented by explicit instructions + for_each_phi_fun(sux, phi, + if (phi != sux_phi) return; + ); + // true and false blocks can't have phis + for_each_phi_fun(t_block, phi, return; ); + for_each_phi_fun(f_block, phi, return; ); + + // 2) substitute conditional expression + // with an IfOp followed by a Goto + // cut if_ away and get node before + Instruction* cur_end = if_->prev(block); + + // append constants of true- and false-block if necessary + // clone constants because original block must not be destroyed + assert((t_value != f_const && f_value != t_const) || t_const == f_const, "mismatch"); + if (t_value == t_const) { + t_value = new Constant(t_const->type()); + NOT_PRODUCT(t_value->set_printable_bci(if_->printable_bci())); + cur_end = cur_end->set_next(t_value); + } + if (f_value == f_const) { + f_value = new Constant(f_const->type()); + NOT_PRODUCT(f_value->set_printable_bci(if_->printable_bci())); + cur_end = cur_end->set_next(f_value); + } + + Value result = make_ifop(if_->x(), if_->cond(), if_->y(), t_value, f_value); + assert(result != NULL, "make_ifop must return a non-null instruction"); + if (!result->is_linked() && result->can_be_linked()) { + NOT_PRODUCT(result->set_printable_bci(if_->printable_bci())); + cur_end = cur_end->set_next(result); + } + + // append Goto to successor + ValueStack* state_before = if_->is_safepoint() ? if_->state_before() : NULL; + Goto* goto_ = new Goto(sux, state_before, if_->is_safepoint() || t_goto->is_safepoint() || f_goto->is_safepoint()); + + // prepare state for Goto + ValueStack* goto_state = if_->state(); + while (sux_state->scope() != goto_state->scope()) { + goto_state = goto_state->caller_state(); + assert(goto_state != NULL, "states do not match up"); + } + goto_state = goto_state->copy(ValueStack::StateAfter, goto_state->bci()); + goto_state->push(result->type(), result); + assert(goto_state->is_same(sux_state), "states must match now"); + goto_->set_state(goto_state); + + cur_end = cur_end->set_next(goto_, goto_state->bci()); + + // Adjust control flow graph + BlockBegin::disconnect_edge(block, t_block); + BlockBegin::disconnect_edge(block, f_block); + if (t_block->number_of_preds() == 0) { + BlockBegin::disconnect_edge(t_block, sux); + } + adjust_exception_edges(block, t_block); + if (f_block->number_of_preds() == 0) { + BlockBegin::disconnect_edge(f_block, sux); + } + adjust_exception_edges(block, f_block); + + // update block end + block->set_end(goto_); + + // substitute the phi if possible + if (sux_phi->as_Phi()->operand_count() == 1) { + assert(sux_phi->as_Phi()->operand_at(0) == result, "screwed up phi"); + sux_phi->set_subst(result); + _has_substitution = true; + } + + // 3) successfully eliminated a conditional expression + _cee_count++; + if (PrintCEE) { + tty->print_cr("%d. CEE in B%d (B%d B%d)", cee_count(), block->block_id(), t_block->block_id(), f_block->block_id()); + tty->print_cr("%d. IfOp in B%d", ifop_count(), block->block_id()); + } + + _hir->verify(); +} + +Value CE_Eliminator::make_ifop(Value x, Instruction::Condition cond, Value y, Value tval, Value fval) { + if (!OptimizeIfOps) { + return new IfOp(x, cond, y, tval, fval); + } + + tval = tval->subst(); + fval = fval->subst(); + if (tval == fval) { + _ifop_count++; + return tval; + } + + x = x->subst(); + y = y->subst(); + + Constant* y_const = y->as_Constant(); + if (y_const != NULL) { + IfOp* x_ifop = x->as_IfOp(); + if (x_ifop != NULL) { // x is an ifop, y is a constant + Constant* x_tval_const = x_ifop->tval()->subst()->as_Constant(); + Constant* x_fval_const = x_ifop->fval()->subst()->as_Constant(); + + if (x_tval_const != NULL && x_fval_const != NULL) { + Instruction::Condition x_ifop_cond = x_ifop->cond(); + + Constant::CompareResult t_compare_res = x_tval_const->compare(cond, y_const); + Constant::CompareResult f_compare_res = x_fval_const->compare(cond, y_const); + + guarantee(t_compare_res != Constant::not_comparable && f_compare_res != Constant::not_comparable, "incomparable constants in IfOp"); + + Value new_tval = t_compare_res == Constant::cond_true ? tval : fval; + Value new_fval = f_compare_res == Constant::cond_true ? tval : fval; + + _ifop_count++; + if (new_tval == new_fval) { + return new_tval; + } else { + return new IfOp(x_ifop->x(), x_ifop_cond, x_ifop->y(), new_tval, new_fval); + } + } + } else { + Constant* x_const = x->as_Constant(); + if (x_const != NULL) { // x and y are constants + Constant::CompareResult x_compare_res = x_const->compare(cond, y_const); + guarantee(x_compare_res != Constant::not_comparable, "incomparable constants in IfOp"); + + _ifop_count++; + return x_compare_res == Constant::cond_true ? tval : fval; + } + } + } + return new IfOp(x, cond, y, tval, fval); +} void Optimizer::eliminate_conditional_expressions() { // find conditional expressions & replace them with IfOps CE_Eliminator ce(ir()); } - class BlockMerger: public BlockClosure { private: IR* _hir; diff --git a/hotspot/src/share/vm/c1/c1_globals.hpp b/hotspot/src/share/vm/c1/c1_globals.hpp index e6a3f6ad7ca..52ff1593317 100644 --- a/hotspot/src/share/vm/c1/c1_globals.hpp +++ b/hotspot/src/share/vm/c1/c1_globals.hpp @@ -75,6 +75,9 @@ develop(bool, SelectivePhiFunctions, true, \ "create phi functions at loop headers only when necessary") \ \ + develop(bool, OptimizeIfOps, true, \ + "Optimize multiple IfOps") \ + \ develop(bool, DoCEE, true, \ "Do Conditional Expression Elimination to simplify CFG") \ \ From b3cbd07d1ab672752f73482419eff717f9ad947d Mon Sep 17 00:00:00 2001 From: Masayoshi Okutsu Date: Fri, 15 Oct 2010 16:46:18 +0900 Subject: [PATCH 107/722] 6638110: (tz) TimeZone.getDisplayName(...) spec is inconsistent with implementation for unavailable locales Reviewed-by: peytoia --- jdk/src/share/classes/java/util/TimeZone.java | 94 +++++++++++++------ 1 file changed, 64 insertions(+), 30 deletions(-) diff --git a/jdk/src/share/classes/java/util/TimeZone.java b/jdk/src/share/classes/java/util/TimeZone.java index b759f9126d5..682c3323754 100644 --- a/jdk/src/share/classes/java/util/TimeZone.java +++ b/jdk/src/share/classes/java/util/TimeZone.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -302,60 +302,94 @@ abstract public class TimeZone implements Serializable, Cloneable { } /** - * Returns a name of this time zone suitable for presentation to the user - * in the default locale. - * This method returns the long name, not including daylight savings. - * If the display name is not available for the locale, - * then this method returns a string in the - * normalized custom ID format. + * Returns a long standard time name of this {@code TimeZone} suitable for + * presentation to the user in the default locale. + * + *

    This method is equivalent to: + *

    + * getDisplayName(false, {@link #LONG}, + * Locale.getDefault({@link Locale.Category#DISPLAY})) + *
    + * * @return the human-readable name of this time zone in the default locale. * @since 1.2 + * @see #getDisplayName(boolean, int, Locale) + * @see Locale#getDefault(Locale.Category) + * @see Locale.Category */ public final String getDisplayName() { - return getDisplayName(false, LONG, Locale.getDefault(Locale.Category.DISPLAY)); + return getDisplayName(false, LONG, + Locale.getDefault(Locale.Category.DISPLAY)); } /** - * Returns a name of this time zone suitable for presentation to the user - * in the specified locale. - * This method returns the long name, not including daylight savings. - * If the display name is not available for the locale, - * then this method returns a string in the - * normalized custom ID format. + * Returns a long standard time name of this {@code TimeZone} suitable for + * presentation to the user in the specified {@code locale}. + * + *

    This method is equivalent to: + *

    + * getDisplayName(false, {@link #LONG}, locale) + *
    + * * @param locale the locale in which to supply the display name. * @return the human-readable name of this time zone in the given locale. + * @exception NullPointerException if {@code locale} is {@code null}. * @since 1.2 + * @see #getDisplayName(boolean, int, Locale) */ public final String getDisplayName(Locale locale) { return getDisplayName(false, LONG, locale); } /** - * Returns a name of this time zone suitable for presentation to the user - * in the default locale. - * If the display name is not available for the locale, then this - * method returns a string in the - * normalized custom ID format. - * @param daylight if true, return the daylight savings name. - * @param style either LONG or SHORT + * Returns a name in the specified {@code style} of this {@code TimeZone} + * suitable for presentation to the user in the default locale. If the + * specified {@code daylight} is {@code true}, a daylight saving time name + * is returned. Otherwise, a standard time name is returned. + * + *

    This method is equivalent to: + *

    + * getDisplayName(daylight, style, + * Locale.getDefault({@link Locale.Category#DISPLAY})) + *
    + * + * @param daylight if {@code true}, return the daylight saving time name. + * @param style either {@link #LONG} or {@link #SHORT} * @return the human-readable name of this time zone in the default locale. + * @exception IllegalArgumentException if {@code style} is invalid. * @since 1.2 + * @see #getDisplayName(boolean, int, Locale) + * @see Locale#getDefault(Locale.Category) + * @see Locale.Category */ public final String getDisplayName(boolean daylight, int style) { - return getDisplayName(daylight, style, Locale.getDefault(Locale.Category.DISPLAY)); + return getDisplayName(daylight, style, + Locale.getDefault(Locale.Category.DISPLAY)); } /** - * Returns a name of this time zone suitable for presentation to the user - * in the specified locale. - * If the display name is not available for the locale, - * then this method returns a string in the - * normalized custom ID format. - * @param daylight if true, return the daylight savings name. - * @param style either LONG or SHORT + * Returns a name in the specified {@code style} of this {@code TimeZone} + * suitable for presentation to the user in the specified {@code + * locale}. If the specified {@code daylight} is {@code true}, a daylight + * saving time name is returned. Otherwise, a standard time name is + * returned. + * + *

    When looking up a time zone name, the {@linkplain + * ResourceBundle.Control#getCandidateLocales(String,Locale) default + * Locale search path of ResourceBundle} derived + * from the specified {@code locale} is used. (No {@linkplain + * ResourceBundle.Control#getFallbackLocale(String,Locale) fallback + * Locale} search is performed.) If a time zone name in any + * {@code Locale} of the search path, including {@link Locale#ROOT}, is + * found, the name is returned. Otherwise, a string in the + * normalized custom ID format is returned. + * + * @param daylight if {@code true}, return the daylight saving time name. + * @param style either {@link #LONG} or {@link #SHORT} * @param locale the locale in which to supply the display name. * @return the human-readable name of this time zone in the given locale. - * @exception IllegalArgumentException style is invalid. + * @exception IllegalArgumentException if {@code style} is invalid. + * @exception NullPointerException if {@code locale} is {@code null}. * @since 1.2 */ public String getDisplayName(boolean daylight, int style, Locale locale) { From cd9f7232bb59f50e41bbae56a41f16d27c1456d0 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Fri, 15 Oct 2010 12:02:06 +0400 Subject: [PATCH 108/722] 6984033: imageio vendor references need to change (jdk7 only) Reviewed-by: prr, ohair --- .../classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java | 2 +- .../classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java | 2 +- .../classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java | 2 +- .../classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java | 2 +- jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java | 2 +- .../classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java | 2 +- .../classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java | 2 +- .../com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java | 2 +- .../com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java | 2 +- .../classes/com/sun/imageio/spi/FileImageInputStreamSpi.java | 2 +- .../classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java | 2 +- .../com/sun/imageio/spi/InputStreamImageInputStreamSpi.java | 2 +- .../com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java | 2 +- .../classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java | 2 +- .../classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java index c07750fc1c5..f1cd8f7d5ae 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java @@ -45,7 +45,7 @@ public class BMPImageReaderSpi extends ImageReaderSpi { private boolean registered = false; public BMPImageReaderSpi() { - super("Sun Microsystems, Inc.", + super("Oracle Corporation", "1.0", formatNames, entensions, diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java index fc8531a5b9d..8a0ad17ef6e 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java @@ -50,7 +50,7 @@ public class BMPImageWriterSpi extends ImageWriterSpi { private boolean registered = false; public BMPImageWriterSpi() { - super("Sun Microsystems, Inc.", + super("Oracle Corporation", "1.0", formatNames, entensions, diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java index 53702a625b3..45418667047 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java @@ -36,7 +36,7 @@ import javax.imageio.stream.ImageInputStream; public class GIFImageReaderSpi extends ImageReaderSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java index 8660d3c0612..c8ec748b096 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java @@ -36,7 +36,7 @@ import com.sun.imageio.plugins.common.PaletteBuilder; public class GIFImageWriterSpi extends ImageWriterSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java index 17c9f9e5350..1ed33906710 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java @@ -169,7 +169,7 @@ public class JPEG { public static final int ADOBE_YCCK = 2; // Spi initialization stuff - public static final String vendor = "Sun Microsystems, Inc."; + public static final String vendor = "Oracle Corporation"; public static final String version = "0.5"; // Names of the formats we can read or write public static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"}; diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java index a0f58ad97f5..d6d277d5353 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java @@ -36,7 +36,7 @@ import javax.imageio.stream.ImageInputStream; public class PNGImageReaderSpi extends ImageReaderSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java index 9a007c50faf..312c413f6a4 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java @@ -38,7 +38,7 @@ import javax.imageio.stream.ImageOutputStream; public class PNGImageWriterSpi extends ImageWriterSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java index 8beb36b35da..485d1105ac4 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java @@ -49,7 +49,7 @@ public class WBMPImageReaderSpi extends ImageReaderSpi { private boolean registered = false; public WBMPImageReaderSpi() { - super("Sun Microsystems, Inc.", + super("Oracle Corporation", "1.0", formatNames, entensions, diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java index 9ba4fd3fc56..43a2bfae649 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java @@ -49,7 +49,7 @@ public class WBMPImageWriterSpi extends ImageWriterSpi { private boolean registered = false; public WBMPImageWriterSpi() { - super("Sun Microsystems, Inc.", + super("Oracle Corporation", "1.0", formatNames, entensions, diff --git a/jdk/src/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java b/jdk/src/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java index 09b77006ff3..48f854aa6c2 100644 --- a/jdk/src/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java @@ -33,7 +33,7 @@ import javax.imageio.stream.FileImageInputStream; public class FileImageInputStreamSpi extends ImageInputStreamSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java b/jdk/src/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java index 98285999054..f947f19adf0 100644 --- a/jdk/src/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java @@ -33,7 +33,7 @@ import javax.imageio.stream.FileImageOutputStream; public class FileImageOutputStreamSpi extends ImageOutputStreamSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java b/jdk/src/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java index 7f7abb725ce..62f62294229 100644 --- a/jdk/src/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java @@ -36,7 +36,7 @@ import javax.imageio.stream.MemoryCacheImageInputStream; public class InputStreamImageInputStreamSpi extends ImageInputStreamSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java b/jdk/src/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java index eae89a31af2..b1a6b0c40dd 100644 --- a/jdk/src/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java @@ -36,7 +36,7 @@ import javax.imageio.stream.MemoryCacheImageOutputStream; public class OutputStreamImageOutputStreamSpi extends ImageOutputStreamSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java b/jdk/src/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java index ac15f6c2982..7d6107a6925 100644 --- a/jdk/src/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java @@ -34,7 +34,7 @@ import javax.imageio.stream.FileImageInputStream; public class RAFImageInputStreamSpi extends ImageInputStreamSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; diff --git a/jdk/src/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java b/jdk/src/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java index 9122b2b51da..037cdcf5071 100644 --- a/jdk/src/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java +++ b/jdk/src/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java @@ -34,7 +34,7 @@ import javax.imageio.stream.FileImageOutputStream; public class RAFImageOutputStreamSpi extends ImageOutputStreamSpi { - private static final String vendorName = "Sun Microsystems, Inc."; + private static final String vendorName = "Oracle Corporation"; private static final String version = "1.0"; From 1ff2431b71f38c38aeb8b1309d962884ed5ae597 Mon Sep 17 00:00:00 2001 From: Jennifer Godinez Date: Fri, 15 Oct 2010 11:20:31 -0700 Subject: [PATCH 109/722] 6804454: RFE: Provide a way to control the printing dpi resolution from MSIE browser print. See also 6801859 Reviewed-by: igor, prr --- .../sun/awt/windows/WEmbeddedFrame.java | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/jdk/src/windows/classes/sun/awt/windows/WEmbeddedFrame.java b/jdk/src/windows/classes/sun/awt/windows/WEmbeddedFrame.java index 18489f91db4..a0d29aba160 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WEmbeddedFrame.java +++ b/jdk/src/windows/classes/sun/awt/windows/WEmbeddedFrame.java @@ -33,6 +33,7 @@ import java.util.*; import java.awt.color.*; import java.awt.image.*; import sun.awt.image.ByteInterleavedRaster; +import sun.security.action.GetPropertyAction; import java.lang.reflect.*; public class WEmbeddedFrame extends EmbeddedFrame { @@ -48,8 +49,12 @@ public class WEmbeddedFrame extends EmbeddedFrame { private int imgWid = 0; private int imgHgt = 0; + private static int pScale = 0; private static final int MAX_BAND_SIZE = (1024*30); + private static String printScale = (String) java.security.AccessController + .doPrivileged(new GetPropertyAction("sun.java2d.print.pluginscalefactor")); + public WEmbeddedFrame() { this((long)0); } @@ -114,8 +119,7 @@ public class WEmbeddedFrame extends EmbeddedFrame { * real resolution of the destination so */ if (isPrinterDC(hdc)) { - xscale = 4; - yscale = 4; + xscale = yscale = getPrintScaleFactor(); } int frameHeight = getHeight(); @@ -168,6 +172,37 @@ public class WEmbeddedFrame extends EmbeddedFrame { } } + protected static int getPrintScaleFactor() { + // check if value is already cached + if (pScale != 0) + return pScale; + if (printScale == null) { + // if no system property is specified, + // check for environment setting + printScale = (String) java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Object run() { + return System.getenv("JAVA2D_PLUGIN_PRINT_SCALE"); + } + } + ); + } + int default_printDC_scale = 4; + int scale = default_printDC_scale; + if (printScale != null) { + try { + scale = Integer.parseInt(printScale); + if (scale > 8 || scale < 1) { + scale = default_printDC_scale; + } + } catch (NumberFormatException nfe) { + } + } + pScale = scale; + return pScale; + } + + protected native boolean isPrinterDC(long hdc); protected native void printBand(long hdc, byte[] data, int offset, From e4f08bc1950f4f4c73bfd414bfaac585a10ecf46 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Fri, 15 Oct 2010 14:21:11 -0700 Subject: [PATCH 110/722] 6992477: fix for 6991512 broke sparc barriers Reviewed-by: kvn, iveresov --- hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp | 2 +- hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp | 2 +- hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp | 2 +- hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp index c5385a984b7..2566f3f8227 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @@ -664,7 +664,7 @@ void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) { // Use temps to avoid kills LIR_Opr t1 = FrameMap::G1_opr; LIR_Opr t2 = FrameMap::G3_opr; - LIR_Opr addr = (type == objectType) ? new_register(T_OBJECT) : new_pointer_register(); + LIR_Opr addr = new_pointer_register(); // get address of field obj.load_item(); diff --git a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp index f5bea330c2f..b6f9eea591b 100644 --- a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp @@ -499,7 +499,7 @@ void G1PostBarrierStub::emit_code(LIR_Assembler* ce) { Register new_val_reg = new_val()->as_register(); __ cmpptr(new_val_reg, (int32_t) NULL_WORD); __ jcc(Assembler::equal, _continuation); - ce->store_parameter(addr()->as_register(), 0); + ce->store_parameter(addr()->as_pointer_register(), 0); __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::g1_post_barrier_slow_id))); __ jmp(_continuation); } diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp index c9a26e7b1dd..dd8bc8d9962 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @@ -765,7 +765,7 @@ void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) { ShouldNotReachHere(); } - LIR_Opr addr = (type == objectType) ? new_register(T_OBJECT) : new_pointer_register(); + LIR_Opr addr = new_pointer_register(); LIR_Address* a; if(offset.result()->is_constant()) { a = new LIR_Address(obj.result(), diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp index dffc85c970d..332f193e28e 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp @@ -1350,7 +1350,6 @@ void LIRGenerator::G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_Opr addr = ptr; } assert(addr->is_register(), "must be a register at this point"); - assert(addr->type() == T_OBJECT, "addr should point to an object"); LIR_Opr xor_res = new_pointer_register(); LIR_Opr xor_shift_res = new_pointer_register(); From 0c9bfb6003cbd798f8e9a71be2334d415144f921 Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Fri, 15 Oct 2010 17:26:56 -0400 Subject: [PATCH 111/722] 6992189: G1: inconsistent base used in sparse rem set iterator The remembered set iterator for sparse tables incorrectly assumes that index 0 corresponds to the bottom of the heap, not address 0 as it is the case. Reviewed-by: ysr, jmasa --- .../gc_implementation/g1/heapRegionRemSet.cpp | 4 +--- .../vm/gc_implementation/g1/sparsePRT.cpp | 5 +---- .../vm/gc_implementation/g1/sparsePRT.hpp | 18 ++++-------------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp index c4c87327484..5d055f65597 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @@ -1159,9 +1159,7 @@ HeapRegionRemSetIterator() : _hrrs(NULL), _g1h(G1CollectedHeap::heap()), _bosa(NULL), - _sparse_iter(size_t(G1CollectedHeap::heap()->reserved_region().start()) - >> CardTableModRefBS::card_shift) -{} + _sparse_iter() { } void HeapRegionRemSetIterator::initialize(const HeapRegionRemSet* hrrs) { _hrrs = hrrs; diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp index 5bc3ab29c70..86eaa729d3f 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp @@ -323,10 +323,7 @@ CardIdx_t /* RSHashTable:: */ RSHashTableIter::find_first_card_in_list() { } size_t /* RSHashTable:: */ RSHashTableIter::compute_card_ind(CardIdx_t ci) { - return - _heap_bot_card_ind - + (_rsht->entry(_bl_ind)->r_ind() * HeapRegion::CardsPerRegion) - + ci; + return (_rsht->entry(_bl_ind)->r_ind() * HeapRegion::CardsPerRegion) + ci; } bool /* RSHashTable:: */ RSHashTableIter::has_next(size_t& card_index) { diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp index 7812ac4fb53..92a69b4d5cc 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp @@ -169,7 +169,6 @@ class RSHashTableIter VALUE_OBJ_CLASS_SPEC { int _bl_ind; // [-1, 0.._rsht->_capacity) short _card_ind; // [0..SparsePRTEntry::cards_num()) RSHashTable* _rsht; - size_t _heap_bot_card_ind; // If the bucket list pointed to by _bl_ind contains a card, sets // _bl_ind to the index of that entry, and returns the card. @@ -183,13 +182,11 @@ class RSHashTableIter VALUE_OBJ_CLASS_SPEC { size_t compute_card_ind(CardIdx_t ci); public: - RSHashTableIter(size_t heap_bot_card_ind) : + RSHashTableIter() : _tbl_ind(RSHashTable::NullEntry), _bl_ind(RSHashTable::NullEntry), _card_ind((SparsePRTEntry::cards_num() - 1)), - _rsht(NULL), - _heap_bot_card_ind(heap_bot_card_ind) - {} + _rsht(NULL) {} void init(RSHashTable* rsht) { _rsht = rsht; @@ -280,19 +277,12 @@ public: bool contains_card(RegionIdx_t region_id, CardIdx_t card_index) const { return _next->contains_card(region_id, card_index); } - -#if 0 - void verify_is_cleared(); - void print(); -#endif }; -class SparsePRTIter: public /* RSHashTable:: */RSHashTableIter { +class SparsePRTIter: public RSHashTableIter { public: - SparsePRTIter(size_t heap_bot_card_ind) : - /* RSHashTable:: */RSHashTableIter(heap_bot_card_ind) - {} + SparsePRTIter() : RSHashTableIter() { } void init(const SparsePRT* sprt) { RSHashTableIter::init(sprt->cur()); From f6acb9efb026a05ee7f436fbf8f276857562ece4 Mon Sep 17 00:00:00 2001 From: John Cuthbertson Date: Mon, 18 Oct 2010 15:01:41 -0700 Subject: [PATCH 112/722] 6988458: G1: assert(mr.end() <= _cm->finger()) failed: otherwise the region shouldn't be on the stack The changes from 6941395 did not clear the CMTask::_aborted_region fields when concurrent marking aborted because of overflow. As a result, the next time around we could see a memory region whose start address was above the global finger and the assertion tripped. Moved the clearing of the aborted regions to ConcurrentMark::clear_marking_state, which is executed on all of the exit paths. Reviewed-by: tonyp, ysr, jmasa --- hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp index 5bf7faec667..ec9c9da4f81 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -2418,6 +2418,8 @@ void ConcurrentMark::clear_marking_state() { for (int i = 0; i < (int)_max_task_num; ++i) { OopTaskQueue* queue = _task_queues->queue(i); queue->set_empty(); + // Clear any partial regions from the CMTasks + _tasks[i]->clear_aborted_region(); } } @@ -2706,7 +2708,6 @@ void ConcurrentMark::abort() { clear_marking_state(); for (int i = 0; i < (int)_max_task_num; ++i) { _tasks[i]->clear_region_fields(); - _tasks[i]->clear_aborted_region(); } _has_aborted = true; @@ -2985,7 +2986,7 @@ void CMTask::reset(CMBitMap* nextMarkBitMap) { _nextMarkBitMap = nextMarkBitMap; clear_region_fields(); - clear_aborted_region(); + assert(_aborted_region.is_empty(), "should have been cleared"); _calls = 0; _elapsed_time_ms = 0.0; From 0c660e1f60c4bd37086a92e807ce071a1d948efa Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Sat, 16 Oct 2010 17:12:19 -0400 Subject: [PATCH 113/722] 6991377: G1: race between concurrent refinement and humongous object allocation There is a race between the concurrent refinement threads and the humongous object allocation that can cause the concurrent refinement threads to corrupt the part of the BOT that it is being initialized by the humongous object allocation operation. The solution is to do the humongous object allocation in careful steps to ensure that the concurrent refinement threads always have a consistent view over the BOT, region contents, and top. The fix includes some very minor tidying up in sparsePRT. Reviewed-by: jcoomes, johnc, ysr --- .../g1/g1BlockOffsetTable.cpp | 21 ++- .../g1/g1BlockOffsetTable.hpp | 4 + .../vm/gc_implementation/g1/heapRegion.cpp | 37 +++--- .../vm/gc_implementation/g1/heapRegion.hpp | 11 +- .../vm/gc_implementation/g1/heapRegionSeq.cpp | 122 +++++++++++++++--- .../vm/gc_implementation/g1/sparsePRT.cpp | 6 +- .../vm/gc_implementation/g1/sparsePRT.hpp | 2 - 7 files changed, 149 insertions(+), 54 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp index 106c521698a..8eb6607ae14 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp @@ -175,7 +175,7 @@ G1BlockOffsetArray::set_remainder_to_point_to_start_incl(size_t start_card, size } assert(start_card > _array->index_for(_bottom), "Cannot be first card"); assert(_array->offset_array(start_card-1) <= N_words, - "Offset card has an unexpected value"); + "Offset card has an unexpected value"); size_t start_card_for_region = start_card; u_char offset = max_jubyte; for (int i = 0; i < BlockOffsetArray::N_powers; i++) { @@ -577,6 +577,16 @@ void G1BlockOffsetArray::alloc_block_work2(HeapWord** threshold_, size_t* index_ #endif } +void +G1BlockOffsetArray::set_for_starts_humongous(HeapWord* new_end) { + assert(_end == new_end, "_end should have already been updated"); + + // The first BOT entry should have offset 0. + _array->set_offset_array(_array->index_for(_bottom), 0); + // The rest should point to the first one. + set_remainder_to_point_to_start(_bottom + N_words, new_end); +} + ////////////////////////////////////////////////////////////////////// // G1BlockOffsetArrayContigSpace ////////////////////////////////////////////////////////////////////// @@ -626,3 +636,12 @@ void G1BlockOffsetArrayContigSpace::zero_bottom_entry() { "Precondition of call"); _array->set_offset_array(bottom_index, 0); } + +void +G1BlockOffsetArrayContigSpace::set_for_starts_humongous(HeapWord* new_end) { + G1BlockOffsetArray::set_for_starts_humongous(new_end); + + // Make sure _next_offset_threshold and _next_offset_index point to new_end. + _next_offset_threshold = new_end; + _next_offset_index = _array->index_for(new_end); +} diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp index 7ce92971839..28c29502c7c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp @@ -436,6 +436,8 @@ public: } void check_all_cards(size_t left_card, size_t right_card) const; + + virtual void set_for_starts_humongous(HeapWord* new_end); }; // A subtype of BlockOffsetArray that takes advantage of the fact @@ -484,4 +486,6 @@ class G1BlockOffsetArrayContigSpace: public G1BlockOffsetArray { HeapWord* block_start_unsafe(const void* addr); HeapWord* block_start_unsafe_const(const void* addr) const; + + virtual void set_for_starts_humongous(HeapWord* new_end); }; diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp index 58b55123aae..dbe2d24a6ce 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -377,10 +377,26 @@ void HeapRegion::calc_gc_efficiency() { } // -void HeapRegion::set_startsHumongous() { +void HeapRegion::set_startsHumongous(HeapWord* new_end) { + assert(end() == _orig_end, + "Should be normal before the humongous object allocation"); + assert(top() == bottom(), "should be empty"); + _humongous_type = StartsHumongous; _humongous_start_region = this; - assert(end() == _orig_end, "Should be normal before alloc."); + + set_end(new_end); + _offsets.set_for_starts_humongous(new_end); +} + +void HeapRegion::set_continuesHumongous(HeapRegion* start) { + assert(end() == _orig_end, + "Should be normal before the humongous object allocation"); + assert(top() == bottom(), "should be empty"); + assert(start->startsHumongous(), "pre-condition"); + + _humongous_type = ContinuesHumongous; + _humongous_start_region = start; } bool HeapRegion::claimHeapRegion(jint claimValue) { @@ -500,23 +516,6 @@ CompactibleSpace* HeapRegion::next_compaction_space() const { return blk.result(); } -void HeapRegion::set_continuesHumongous(HeapRegion* start) { - // The order is important here. - start->add_continuingHumongousRegion(this); - _humongous_type = ContinuesHumongous; - _humongous_start_region = start; -} - -void HeapRegion::add_continuingHumongousRegion(HeapRegion* cont) { - // Must join the blocks of the current H region seq with the block of the - // added region. - offsets()->join_blocks(bottom(), cont->bottom()); - arrayOop obj = (arrayOop)(bottom()); - obj->set_length((int) (obj->length() + cont->capacity()/jintSize)); - set_end(cont->end()); - set_top(cont->end()); -} - void HeapRegion::save_marks() { set_saved_mark(); } diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp index 42e96bbfb50..48118ceb7e8 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp @@ -395,14 +395,12 @@ class HeapRegion: public G1OffsetTableContigSpace { // Causes the current region to represent a humongous object spanning "n" // regions. - virtual void set_startsHumongous(); + void set_startsHumongous(HeapWord* new_end); // The regions that continue a humongous sequence should be added using // this method, in increasing address order. void set_continuesHumongous(HeapRegion* start); - void add_continuingHumongousRegion(HeapRegion* cont); - // If the region has a remembered set, return a pointer to it. HeapRegionRemSet* rem_set() const { return _rem_set; @@ -733,13 +731,6 @@ class HeapRegion: public G1OffsetTableContigSpace { FilterOutOfRegionClosure* cl, bool filter_young); - // The region "mr" is entirely in "this", and starts and ends at block - // boundaries. The caller declares that all the contained blocks are - // coalesced into one. - void declare_filled_region_to_BOT(MemRegion mr) { - _offsets.single_block(mr.start(), mr.end()); - } - // A version of block start that is guaranteed to find *some* block // boundary at or before "p", but does not object iteration, and may // therefore be used safely when the heap is unparseable. diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp index b71cf1918c9..0640cbe0d39 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp @@ -91,34 +91,118 @@ HeapRegionSeq::alloc_obj_from_region_index(int ind, size_t word_size) { } if (sumSizes >= word_size) { _alloc_search_start = cur; - // Mark the allocated regions as allocated. + + // We need to initialize the region(s) we just discovered. This is + // a bit tricky given that it can happen concurrently with + // refinement threads refining cards on these regions and + // potentially wanting to refine the BOT as they are scanning + // those cards (this can happen shortly after a cleanup; see CR + // 6991377). So we have to set up the region(s) carefully and in + // a specific order. + + // Currently, allocs_are_zero_filled() returns false. The zero + // filling infrastructure will be going away soon (see CR 6977804). + // So no need to do anything else here. bool zf = G1CollectedHeap::heap()->allocs_are_zero_filled(); + assert(!zf, "not supported"); + + // This will be the "starts humongous" region. HeapRegion* first_hr = _regions.at(first); - for (int i = first; i < cur; i++) { - HeapRegion* hr = _regions.at(i); - if (zf) - hr->ensure_zero_filled(); + { + MutexLockerEx x(ZF_mon, Mutex::_no_safepoint_check_flag); + first_hr->set_zero_fill_allocated(); + } + // The header of the new object will be placed at the bottom of + // the first region. + HeapWord* new_obj = first_hr->bottom(); + // This will be the new end of the first region in the series that + // should also match the end of the last region in the seriers. + // (Note: sumSizes = "region size" x "number of regions we found"). + HeapWord* new_end = new_obj + sumSizes; + // This will be the new top of the first region that will reflect + // this allocation. + HeapWord* new_top = new_obj + word_size; + + // First, we need to zero the header of the space that we will be + // allocating. When we update top further down, some refinement + // threads might try to scan the region. By zeroing the header we + // ensure that any thread that will try to scan the region will + // come across the zero klass word and bail out. + // + // NOTE: It would not have been correct to have used + // CollectedHeap::fill_with_object() and make the space look like + // an int array. The thread that is doing the allocation will + // later update the object header to a potentially different array + // type and, for a very short period of time, the klass and length + // fields will be inconsistent. This could cause a refinement + // thread to calculate the object size incorrectly. + Copy::fill_to_words(new_obj, oopDesc::header_size(), 0); + + // We will set up the first region as "starts humongous". This + // will also update the BOT covering all the regions to reflect + // that there is a single object that starts at the bottom of the + // first region. + first_hr->set_startsHumongous(new_end); + + // Then, if there are any, we will set up the "continues + // humongous" regions. + HeapRegion* hr = NULL; + for (int i = first + 1; i < cur; ++i) { + hr = _regions.at(i); { MutexLockerEx x(ZF_mon, Mutex::_no_safepoint_check_flag); hr->set_zero_fill_allocated(); } - size_t sz = hr->capacity() / HeapWordSize; - HeapWord* tmp = hr->allocate(sz); - assert(tmp != NULL, "Humongous allocation failure"); - MemRegion mr = MemRegion(tmp, sz); - CollectedHeap::fill_with_object(mr); - hr->declare_filled_region_to_BOT(mr); - if (i == first) { - first_hr->set_startsHumongous(); + hr->set_continuesHumongous(first_hr); + } + // If we have "continues humongous" regions (hr != NULL), then the + // end of the last one should match new_end. + assert(hr == NULL || hr->end() == new_end, "sanity"); + + // Up to this point no concurrent thread would have been able to + // do any scanning on any region in this series. All the top + // fields still point to bottom, so the intersection between + // [bottom,top] and [card_start,card_end] will be empty. Before we + // update the top fields, we'll do a storestore to make sure that + // no thread sees the update to top before the zeroing of the + // object header and the BOT initialization. + OrderAccess::storestore(); + + // Now that the BOT and the object header have been initialized, + // we can update top of the "starts humongous" region. + assert(first_hr->bottom() < new_top && new_top <= first_hr->end(), + "new_top should be in this region"); + first_hr->set_top(new_top); + + // Now, we will update the top fields of the "continues humongous" + // regions. The reason we need to do this is that, otherwise, + // these regions would look empty and this will confuse parts of + // G1. For example, the code that looks for a consecutive number + // of empty regions will consider them empty and try to + // re-allocate them. We can extend is_empty() to also include + // !continuesHumongous(), but it is easier to just update the top + // fields here. + hr = NULL; + for (int i = first + 1; i < cur; ++i) { + hr = _regions.at(i); + if ((i + 1) == cur) { + // last continues humongous region + assert(hr->bottom() < new_top && new_top <= hr->end(), + "new_top should fall on this region"); + hr->set_top(new_top); } else { - assert(i > first, "sanity"); - hr->set_continuesHumongous(first_hr); + // not last one + assert(new_top > hr->end(), "new_top should be above this region"); + hr->set_top(hr->end()); } } - HeapWord* first_hr_bot = first_hr->bottom(); - HeapWord* obj_end = first_hr_bot + word_size; - first_hr->set_top(obj_end); - return first_hr_bot; + // If we have continues humongous regions (hr != NULL), then the + // end of the last one should match new_end and its top should + // match new_top. + assert(hr == NULL || + (hr->end() == new_end && hr->top() == new_top), "sanity"); + + return new_obj; } else { // If we started from the beginning, we want to know why we can't alloc. return NULL; diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp index 86eaa729d3f..896b5ee70b3 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp @@ -308,7 +308,7 @@ void RSHashTable::add_entry(SparsePRTEntry* e) { assert(e2->num_valid_cards() > 0, "Postcondition."); } -CardIdx_t /* RSHashTable:: */ RSHashTableIter::find_first_card_in_list() { +CardIdx_t RSHashTableIter::find_first_card_in_list() { CardIdx_t res; while (_bl_ind != RSHashTable::NullEntry) { res = _rsht->entry(_bl_ind)->card(0); @@ -322,11 +322,11 @@ CardIdx_t /* RSHashTable:: */ RSHashTableIter::find_first_card_in_list() { return SparsePRTEntry::NullEntry; } -size_t /* RSHashTable:: */ RSHashTableIter::compute_card_ind(CardIdx_t ci) { +size_t RSHashTableIter::compute_card_ind(CardIdx_t ci) { return (_rsht->entry(_bl_ind)->r_ind() * HeapRegion::CardsPerRegion) + ci; } -bool /* RSHashTable:: */ RSHashTableIter::has_next(size_t& card_index) { +bool RSHashTableIter::has_next(size_t& card_index) { _card_ind++; CardIdx_t ci; if (_card_ind < SparsePRTEntry::cards_num() && diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp index 92a69b4d5cc..715a5515eba 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp @@ -282,8 +282,6 @@ public: class SparsePRTIter: public RSHashTableIter { public: - SparsePRTIter() : RSHashTableIter() { } - void init(const SparsePRT* sprt) { RSHashTableIter::init(sprt->cur()); } From 14d9ac3169d5d466bef0f53a98a6b62b383d6201 Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Mon, 18 Oct 2010 01:54:24 -0700 Subject: [PATCH 114/722] 6991596: JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC Reviewed-by: kvn, jrose, dsamersoff --- .../src/cpu/sparc/vm/methodHandles_sparc.cpp | 10 +- hotspot/test/Makefile | 6 +- .../test/compiler/6991596/Test6991596.java | 447 ++++++++++++++++++ 3 files changed, 460 insertions(+), 3 deletions(-) create mode 100644 hotspot/test/compiler/6991596/Test6991596.java diff --git a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp index 40a9b05ec28..a503baa918d 100644 --- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp @@ -630,10 +630,16 @@ void MethodHandles::generate_method_handle_stub(MacroAssembler* _masm, MethodHan switch (ek) { case _adapter_opt_i2i: - case _adapter_opt_l2i: - __ unimplemented(entry_name(ek)); value = vmarg; break; + case _adapter_opt_l2i: + { + // just delete the extra slot + __ add(Gargs, __ argument_offset(O0_argslot), O0_argslot); + remove_arg_slots(_masm, -stack_move_unit(), O0_argslot, O1_scratch, O2_scratch, O3_scratch); + value = vmarg = Address(O0_argslot, 0); + } + break; case _adapter_opt_unboxi: { // Load the value up from the heap. diff --git a/hotspot/test/Makefile b/hotspot/test/Makefile index 19636293255..8e245d120fc 100644 --- a/hotspot/test/Makefile +++ b/hotspot/test/Makefile @@ -78,7 +78,11 @@ ZIP = zip TEST_ROOT := $(shell pwd) # Root of all test results -ABS_BUILD_ROOT = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH) +ifdef ALT_OUTPUTDIR + ABS_BUILD_ROOT = $(ALT_OUTPUTDIR)/$(PLATFORM)-$(ARCH) +else + ABS_BUILD_ROOT = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH) +endif ABS_TEST_OUTPUT_DIR = $(ABS_BUILD_ROOT)/testoutput # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) diff --git a/hotspot/test/compiler/6991596/Test6991596.java b/hotspot/test/compiler/6991596/Test6991596.java new file mode 100644 index 00000000000..3809be35c0f --- /dev/null +++ b/hotspot/test/compiler/6991596/Test6991596.java @@ -0,0 +1,447 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/** + * @test + * @bug 6991596 + * @summary JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC + * + * @run main/othervm -ea -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6991596 + */ + +import java.dyn.*; + +public class Test6991596 { + private static final Class CLASS = Test6991596.class; + private static final String NAME = "foo"; + private static final boolean DEBUG = false; + + public static void main(String[] args) throws Throwable { + testboolean(); + testbyte(); + testchar(); + testshort(); + testint(); + testlong(); + } + + // Helpers to get various methods. + static MethodHandle getmh1(Class ret, Class arg) { + return MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(ret, arg)); + } + static MethodHandle getmh2(MethodHandle mh1, Class ret, Class arg) { + return MethodHandles.convertArguments(mh1, MethodType.methodType(ret, arg)); + } + static MethodHandle getmh3(MethodHandle mh1, Class ret, Class arg) { + return MethodHandles.convertArguments(mh1, MethodType.methodType(ret, arg)); + } + + // test adapter_opt_i2i + static void testboolean() throws Throwable { + boolean[] a = new boolean[] { + true, + false + }; + for (int i = 0; i < a.length; i++) { + doboolean(a[i]); + } + } + static void doboolean(boolean x) throws Throwable { + if (DEBUG) System.out.println("boolean=" + x); + + // boolean + { + MethodHandle mh1 = getmh1( boolean.class, boolean.class); + MethodHandle mh2 = getmh2(mh1, boolean.class, boolean.class); + // TODO add this for all cases when the bugs are fixed. + //MethodHandle mh3 = getmh3(mh1, boolean.class, boolean.class); + boolean a = mh1.invokeExact((boolean) x); + boolean b = mh2.invokeExact(x); + //boolean c = mh3.invokeExact((boolean) x); + assert a == b : a + " != " + b; + //assert c == x : c + " != " + x; + } + + // byte + { + MethodHandle mh1 = getmh1( byte.class, byte.class ); + MethodHandle mh2 = getmh2(mh1, byte.class, boolean.class); + byte a = mh1.invokeExact((byte) (x ? 1 : 0)); + byte b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // char + { + MethodHandle mh1 = getmh1( char.class, char.class); + MethodHandle mh2 = getmh2(mh1, char.class, boolean.class); + char a = mh1.invokeExact((char) (x ? 1 : 0)); + char b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // short + { + MethodHandle mh1 = getmh1( short.class, short.class); + MethodHandle mh2 = getmh2(mh1, short.class, boolean.class); + short a = mh1.invokeExact((short) (x ? 1 : 0)); + short b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + } + + static void testbyte() throws Throwable { + byte[] a = new byte[] { + Byte.MIN_VALUE, + Byte.MIN_VALUE + 1, + -0x0F, + -1, + 0, + 1, + 0x0F, + Byte.MAX_VALUE - 1, + Byte.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + dobyte(a[i]); + } + } + static void dobyte(byte x) throws Throwable { + if (DEBUG) System.out.println("byte=" + x); + + // boolean + { + MethodHandle mh1 = getmh1( boolean.class, boolean.class); + MethodHandle mh2 = getmh2(mh1, boolean.class, byte.class); + boolean a = mh1.invokeExact((x & 1) == 1); + boolean b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // byte + { + MethodHandle mh1 = getmh1( byte.class, byte.class); + MethodHandle mh2 = getmh2(mh1, byte.class, byte.class); + byte a = mh1.invokeExact((byte) x); + byte b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // char + { + MethodHandle mh1 = getmh1( char.class, char.class); + MethodHandle mh2 = getmh2(mh1, char.class, byte.class); + char a = mh1.invokeExact((char) x); + char b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // short + { + MethodHandle mh1 = getmh1( short.class, short.class); + MethodHandle mh2 = getmh2(mh1, short.class, byte.class); + short a = mh1.invokeExact((short) x); + short b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + } + + static void testchar() throws Throwable { + char[] a = new char[] { + Character.MIN_VALUE, + Character.MIN_VALUE + 1, + 0x000F, + 0x00FF, + 0x0FFF, + Character.MAX_VALUE - 1, + Character.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + dochar(a[i]); + } + } + static void dochar(char x) throws Throwable { + if (DEBUG) System.out.println("char=" + x); + + // boolean + { + MethodHandle mh1 = getmh1( boolean.class, boolean.class); + MethodHandle mh2 = getmh2(mh1, boolean.class, char.class); + boolean a = mh1.invokeExact((x & 1) == 1); + boolean b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // byte + { + MethodHandle mh1 = getmh1( byte.class, byte.class); + MethodHandle mh2 = getmh2(mh1, byte.class, char.class); + byte a = mh1.invokeExact((byte) x); + byte b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // char + { + MethodHandle mh1 = getmh1( char.class, char.class); + MethodHandle mh2 = getmh2(mh1, char.class, char.class); + char a = mh1.invokeExact((char) x); + char b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // short + { + MethodHandle mh1 = getmh1( short.class, short.class); + MethodHandle mh2 = getmh2(mh1, short.class, char.class); + short a = mh1.invokeExact((short) x); + short b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + } + + static void testshort() throws Throwable { + short[] a = new short[] { + Short.MIN_VALUE, + Short.MIN_VALUE + 1, + -0x0FFF, + -0x00FF, + -0x000F, + -1, + 0, + 1, + 0x000F, + 0x00FF, + 0x0FFF, + Short.MAX_VALUE - 1, + Short.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + doshort(a[i]); + } + } + static void doshort(short x) throws Throwable { + if (DEBUG) System.out.println("short=" + x); + + // boolean + { + MethodHandle mh1 = getmh1( boolean.class, boolean.class); + MethodHandle mh2 = getmh2(mh1, boolean.class, short.class); + boolean a = mh1.invokeExact((x & 1) == 1); + boolean b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // byte + { + MethodHandle mh1 = getmh1( byte.class, byte.class); + MethodHandle mh2 = getmh2(mh1, byte.class, short.class); + byte a = mh1.invokeExact((byte) x); + byte b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // char + { + MethodHandle mh1 = getmh1( char.class, char.class); + MethodHandle mh2 = getmh2(mh1, char.class, short.class); + char a = mh1.invokeExact((char) x); + char b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // short + { + MethodHandle mh1 = getmh1( short.class, short.class); + MethodHandle mh2 = getmh2(mh1, short.class, short.class); + short a = mh1.invokeExact((short) x); + short b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + } + + static void testint() throws Throwable { + int[] a = new int[] { + Integer.MIN_VALUE, + Integer.MIN_VALUE + 1, + -0x0FFFFFFF, + -0x00FFFFFF, + -0x000FFFFF, + -0x0000FFFF, + -0x00000FFF, + -0x000000FF, + -0x0000000F, + -1, + 0, + 1, + 0x0000000F, + 0x000000FF, + 0x00000FFF, + 0x0000FFFF, + 0x000FFFFF, + 0x00FFFFFF, + 0x0FFFFFFF, + Integer.MAX_VALUE - 1, + Integer.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + doint(a[i]); + } + } + static void doint(int x) throws Throwable { + if (DEBUG) System.out.println("int=" + x); + + // boolean + { + MethodHandle mh1 = getmh1( boolean.class, boolean.class); + MethodHandle mh2 = getmh2(mh1, boolean.class, int.class); + boolean a = mh1.invokeExact((x & 1) == 1); + boolean b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // byte + { + MethodHandle mh1 = getmh1( byte.class, byte.class); + MethodHandle mh2 = getmh2(mh1, byte.class, int.class); + byte a = mh1.invokeExact((byte) x); + byte b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // char + { + MethodHandle mh1 = getmh1( char.class, char.class); + MethodHandle mh2 = getmh2(mh1, char.class, int.class); + char a = mh1.invokeExact((char) x); + char b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // short + { + MethodHandle mh1 = getmh1( short.class, short.class); + MethodHandle mh2 = getmh2(mh1, short.class, int.class); + short a = mh1.invokeExact((short) x); + short b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // int + { + MethodHandle mh1 = getmh1( int.class, int.class); + MethodHandle mh2 = getmh2(mh1, int.class, int.class); + int a = mh1.invokeExact((int) x); + int b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + } + + // test adapter_opt_l2i + static void testlong() throws Throwable { + long[] a = new long[] { + Long.MIN_VALUE, + Long.MIN_VALUE + 1, + -0x000000000FFFFFFFL, + -0x0000000000FFFFFFL, + -0x00000000000FFFFFL, + -0x000000000000FFFFL, + -0x0000000000000FFFL, + -0x00000000000000FFL, + -0x000000000000000FL, + -1L, + 0L, + 1L, + 0x000000000000000FL, + 0x00000000000000FFL, + 0x0000000000000FFFL, + 0x0000000000000FFFL, + 0x000000000000FFFFL, + 0x00000000000FFFFFL, + 0x0000000000FFFFFFL, + 0x000000000FFFFFFFL, + Long.MAX_VALUE - 1, + Long.MAX_VALUE + }; + for (int i = 0; i < a.length; i++) { + dolong(a[i]); + } + } + static void dolong(long x) throws Throwable { + if (DEBUG) System.out.println("long=" + x); + + // boolean + { + MethodHandle mh1 = getmh1( boolean.class, boolean.class); + MethodHandle mh2 = getmh2(mh1, boolean.class, long.class); + boolean a = mh1.invokeExact((x & 1L) == 1L); + boolean b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // byte + { + MethodHandle mh1 = getmh1( byte.class, byte.class); + MethodHandle mh2 = getmh2(mh1, byte.class, long.class); + byte a = mh1.invokeExact((byte) x); + byte b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // char + { + MethodHandle mh1 = getmh1( char.class, char.class); + MethodHandle mh2 = getmh2(mh1, char.class, long.class); + char a = mh1.invokeExact((char) x); + char b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // short + { + MethodHandle mh1 = getmh1( short.class, short.class); + MethodHandle mh2 = getmh2(mh1, short.class, long.class); + short a = mh1.invokeExact((short) x); + short b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + // int + { + MethodHandle mh1 = getmh1( int.class, int.class); + MethodHandle mh2 = getmh2(mh1, int.class, long.class); + int a = mh1.invokeExact((int) x); + int b = mh2.invokeExact(x); + assert a == b : a + " != " + b; + } + + } + + // to int + public static boolean foo(boolean i) { return i; } + public static byte foo(byte i) { return i; } + public static char foo(char i) { return i; } + public static short foo(short i) { return i; } + public static int foo(int i) { return i; } +} From 1ba350e5ebb507b7b5802a3a2af04e5374c0806a Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Mon, 18 Oct 2010 16:51:26 +0100 Subject: [PATCH 115/722] 6992545: FindBugs scan - Malicious code vulnerability Warnings in com.sun.net.httpserver.HttpsParameters.* Reviewed-by: alanb --- .../net/httpserver/BasicAuthenticator.java | 4 ---- .../com/sun/net/httpserver/Filter.java | 8 +------ .../com/sun/net/httpserver/Headers.java | 22 ++++++++----------- .../sun/net/httpserver/HttpsParameters.java | 12 +++++----- 4 files changed, 15 insertions(+), 31 deletions(-) diff --git a/jdk/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java b/jdk/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java index 2b1303b406d..666ab0b2c1b 100644 --- a/jdk/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java +++ b/jdk/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java @@ -24,9 +24,6 @@ */ package com.sun.net.httpserver; -import java.net.*; -import java.io.*; -import java.util.*; /** * BasicAuthenticator provides an implementation of HTTP Basic @@ -57,7 +54,6 @@ public abstract class BasicAuthenticator extends Authenticator { public Result authenticate (HttpExchange t) { - HttpContext context = t.getHttpContext(); Headers rmap = (Headers) t.getRequestHeaders(); /* * look for auth token diff --git a/jdk/src/share/classes/com/sun/net/httpserver/Filter.java b/jdk/src/share/classes/com/sun/net/httpserver/Filter.java index 7e8c6e7a957..a870d6518d3 100644 --- a/jdk/src/share/classes/com/sun/net/httpserver/Filter.java +++ b/jdk/src/share/classes/com/sun/net/httpserver/Filter.java @@ -25,11 +25,7 @@ package com.sun.net.httpserver; -import java.net.*; -import java.io.*; -import java.nio.*; -import java.nio.channels.*; -import sun.net.www.MessageHeader; +import java.io.IOException; import java.util.*; /** @@ -56,12 +52,10 @@ public abstract class Filter { /* the last element in the chain must invoke the users * handler */ - private List filters; private ListIterator iter; private HttpHandler handler; public Chain (List filters, HttpHandler handler) { - this.filters = filters; iter = filters.listIterator(); this.handler = handler; } diff --git a/jdk/src/share/classes/com/sun/net/httpserver/Headers.java b/jdk/src/share/classes/com/sun/net/httpserver/Headers.java index efac6042861..b9176917368 100644 --- a/jdk/src/share/classes/com/sun/net/httpserver/Headers.java +++ b/jdk/src/share/classes/com/sun/net/httpserver/Headers.java @@ -26,7 +26,6 @@ package com.sun.net.httpserver; import java.util.*; -import java.io.*; /** * HTTP request and response headers are represented by this class which implements @@ -77,19 +76,16 @@ public class Headers implements Map> { if (len == 0) { return key; } - char[] b = new char [len]; - String s = null; - b = key.toCharArray(); - if (b[0] >= 'a' && b[0] <= 'z') { - b[0] = (char)(b[0] - ('a' - 'A')); + char[] b = key.toCharArray(); + if (b[0] >= 'a' && b[0] <= 'z') { + b[0] = (char)(b[0] - ('a' - 'A')); + } + for (int i=1; i= 'A' && b[i] <= 'Z') { + b[i] = (char) (b[i] + ('a' - 'A')); } - for (int i=1; i= 'A' && b[i] <= 'Z') { - b[i] = (char) (b[i] + ('a' - 'A')); - } - } - s = new String (b); - return s; + } + return new String(b); } public int size() {return map.size();} diff --git a/jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java b/jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java index 13ddc3e658c..c54e917c02e 100644 --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java @@ -24,9 +24,7 @@ */ package com.sun.net.httpserver; -import java.net.*; -import java.io.*; -import java.util.*; +import java.net.InetSocketAddress; import javax.net.ssl.SSLParameters; /** @@ -90,7 +88,7 @@ public abstract class HttpsParameters { * have been set. */ public String[] getCipherSuites() { - return cipherSuites; + return cipherSuites != null ? cipherSuites.clone() : null; } /** @@ -99,7 +97,7 @@ public abstract class HttpsParameters { * @param cipherSuites the array of ciphersuites (or null) */ public void setCipherSuites(String[] cipherSuites) { - this.cipherSuites = cipherSuites; + this.cipherSuites = cipherSuites != null ? cipherSuites.clone() : null; } /** @@ -110,7 +108,7 @@ public abstract class HttpsParameters { * have been set. */ public String[] getProtocols() { - return protocols; + return protocols != null ? protocols.clone() : null; } /** @@ -119,7 +117,7 @@ public abstract class HttpsParameters { * @param protocols the array of protocols (or null) */ public void setProtocols(String[] protocols) { - this.protocols = protocols; + this.protocols = protocols != null ? protocols.clone() : null; } /** From 9b05f554fada73a4c954d3bcc495b8b1397f71de Mon Sep 17 00:00:00 2001 From: Sean Coffey Date: Mon, 18 Oct 2010 18:04:02 +0100 Subject: [PATCH 116/722] 6974104: TEST: sun/nio/ch/6645197.java should be fixed in 1.5.0u25b05 and jdk6 workspace Reviewed-by: alanb --- .../channels/Selector/TemporarySelector.java | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 jdk/test/java/nio/channels/Selector/TemporarySelector.java diff --git a/jdk/test/java/nio/channels/Selector/TemporarySelector.java b/jdk/test/java/nio/channels/Selector/TemporarySelector.java new file mode 100644 index 00000000000..c131c327fa7 --- /dev/null +++ b/jdk/test/java/nio/channels/Selector/TemporarySelector.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 6645197 + * @run main/othervm -Xmx5m TemporarySelector + * @summary Timed read with socket adaptor throws ClosedSelectorException if temporary selector GC'ed. + */ +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; +import java.nio.channels.ServerSocketChannel; +import java.nio.channels.SocketChannel; + +public class TemporarySelector { + + static volatile boolean done = false; + + public static void main(String[] args) throws Exception { + + Runnable r = new Runnable() { + public void run() { + while (!done) { + System.gc(); + try { + Thread.sleep(1000); + } catch (Exception e) { + } + } + } + }; + + try { + // Create a server socket that will open and accept on loopback connection + ServerSocketChannel ssc = ServerSocketChannel.open(); + final ServerSocket ss = ssc.socket(); + ss.bind(new InetSocketAddress(0)); + int localPort = ss.getLocalPort(); + + // Create a client socket that will connect and read + System.out.println("Connecting to server socket"); + System.out.flush(); + SocketChannel channel = SocketChannel.open(new InetSocketAddress("localhost", localPort)); + System.out.println("Connected to server socket"); + System.out.flush(); + + // Create a thread to try and cause the GC to run + Thread t = new Thread(r); + t.start(); + byte[] buffer = new byte[500]; + System.out.println("Reading from socket input stream"); + System.out.flush(); + Socket socket = channel.socket(); + socket.setSoTimeout(10000); // The timeout must be set + // to trigger this bug + try { + socket.getInputStream().read(buffer); + } catch (java.net.SocketTimeoutException ste) { + // no java.nio.channels.ClosedSelectorException + } + } finally { + done = true; + } + } +} From 4e9ee94a4d658470d2f17c16b61a066827a755d5 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Mon, 18 Oct 2010 19:14:36 +0100 Subject: [PATCH 117/722] 6991980: polymorphic signature calls don't share the same CP entries Wrong use of attr env in Infer.java prevents sharing of CP entries for PS calls Reviewed-by: darcy, jrose --- .../com/sun/tools/javac/comp/Infer.java | 20 +++- langtools/test/tools/javac/meth/TestCP.java | 111 ++++++++++++++++++ 2 files changed, 127 insertions(+), 4 deletions(-) create mode 100644 langtools/test/tools/javac/meth/TestCP.java diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java index b7d28fdaa6f..0e60e5e7fd9 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java @@ -553,12 +553,24 @@ public class Infer { //the enclosing tree E, as follows: if E is a cast, then use the //target type of the cast expression as a return type; if E is an //expression statement, the return type is 'void' - otherwise the - //return type is simply 'Object'. - switch (env.outer.tree.getTag()) { + //return type is simply 'Object'. A correctness check ensures that + //env.next refers to the lexically enclosing environment in which + //the polymorphic signature call environment is nested. + + switch (env.next.tree.getTag()) { case JCTree.TYPECAST: - restype = ((JCTypeCast)env.outer.tree).clazz.type; break; + JCTypeCast castTree = (JCTypeCast)env.next.tree; + restype = (castTree.expr == env.tree) ? + castTree.clazz.type : + syms.objectType; + break; case JCTree.EXEC: - restype = syms.voidType; break; + JCTree.JCExpressionStatement execTree = + (JCTree.JCExpressionStatement)env.next.tree; + restype = (execTree.expr == env.tree) ? + syms.voidType : + syms.objectType; + break; default: restype = syms.objectType; } diff --git a/langtools/test/tools/javac/meth/TestCP.java b/langtools/test/tools/javac/meth/TestCP.java new file mode 100644 index 00000000000..bbcb5bf9e39 --- /dev/null +++ b/langtools/test/tools/javac/meth/TestCP.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6991980 + * @summary polymorphic signature calls don't share the same CP entries + * @run main TestCP + */ + +import com.sun.tools.classfile.Instruction; +import com.sun.tools.classfile.Attribute; +import com.sun.tools.classfile.ClassFile; +import com.sun.tools.classfile.Code_attribute; +import com.sun.tools.classfile.ConstantPool.*; +import com.sun.tools.classfile.Method; + +import java.dyn.*; +import java.io.*; + +public class TestCP { + + static class TestClass { + void test(MethodHandle mh) throws Throwable { + Number n = mh.invokeExact("daddy",1,'n'); + n = (Number)mh.invokeExact("bunny",1,'d'); + } + } + + static final String PS_TYPE = "(Ljava/lang/String;IC)Ljava/lang/Number;"; + static final int PS_CALLS_COUNT = 2; + static final String SUBTEST_NAME = TestClass.class.getName() + ".class"; + static final String TEST_METHOD_NAME = "test"; + + public static void main(String... args) throws Exception { + new TestCP().run(); + } + + public void run() throws Exception { + String workDir = System.getProperty("test.classes"); + File compiledTest = new File(workDir, SUBTEST_NAME); + verifyMethodHandleInvocationDescriptors(compiledTest); + } + + void verifyMethodHandleInvocationDescriptors(File f) { + System.err.println("verify: " + f); + try { + int count = 0; + ClassFile cf = ClassFile.read(f); + Method testMethod = null; + for (Method m : cf.methods) { + if (m.getName(cf.constant_pool).equals(TEST_METHOD_NAME)) { + testMethod = m; + break; + } + } + if (testMethod == null) { + throw new Error("Test method not found"); + } + Code_attribute ea = (Code_attribute)testMethod.attributes.get(Attribute.Code); + if (testMethod == null) { + throw new Error("Code attribute for test() method not found"); + } + int instr_count = 0; + int cp_entry = -1; + + for (Instruction i : ea.getInstructions()) { + if (i.getMnemonic().equals("invokevirtual")) { + instr_count++; + if (cp_entry == -1) { + cp_entry = i.getUnsignedShort(1); + } else if (cp_entry != i.getUnsignedShort(1)) { + throw new Error("Unexpected CP entry in polymorphic signature call"); + } + CONSTANT_Methodref_info methRef = + (CONSTANT_Methodref_info)cf.constant_pool.get(cp_entry); + String type = methRef.getNameAndTypeInfo().getType(); + if (!type.equals(PS_TYPE)) { + throw new Error("Unexpected type in polymorphic signature call: " + type); + } + } + } + if (instr_count != PS_CALLS_COUNT) { + throw new Error("Wrong number of polymorphic signature call found: " + instr_count); + } + } catch (Exception e) { + e.printStackTrace(); + throw new Error("error reading " + f +": " + e); + } + } +} From 8df28ab0e3a21732bb3622c78cc74a15ce656f51 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Mon, 18 Oct 2010 14:45:00 -0700 Subject: [PATCH 118/722] 6992272: I18N: Locale.getDisplayName() and toString() return empty if just script is set Reviewed-by: srl --- jdk/src/share/classes/java/util/Locale.java | 46 +++++++++++------ .../java/util/Locale/LocaleEnhanceTest.java | 49 +++++++++++++++++++ 2 files changed, 80 insertions(+), 15 deletions(-) diff --git a/jdk/src/share/classes/java/util/Locale.java b/jdk/src/share/classes/java/util/Locale.java index 4fad48f2d92..483da25f431 100644 --- a/jdk/src/share/classes/java/util/Locale.java +++ b/jdk/src/share/classes/java/util/Locale.java @@ -1715,6 +1715,7 @@ public final class Locale implements Cloneable, Serializable { OpenListResourceBundle bundle = LocaleData.getLocaleNames(inLocale); String languageName = getDisplayLanguage(inLocale); + String scriptName = getDisplayScript(inLocale); String countryName = getDisplayCountry(inLocale); String[] variantNames = getDisplayVariantArray(bundle, inLocale); @@ -1735,25 +1736,40 @@ public final class Locale implements Cloneable, Serializable { String mainName = null; String[] qualifierNames = null; - // The main name is the language, or if there is no language, the country. - // If there is neither language nor country (an anomalous situation) then - // the display name is simply the variant's display name. - if (languageName.length() != 0) { - mainName = languageName; - if (countryName.length() != 0) { - qualifierNames = new String[variantNames.length + 1]; - System.arraycopy(variantNames, 0, qualifierNames, 1, variantNames.length); - qualifierNames[0] = countryName; + // The main name is the language, or if there is no language, the script, + // then if no script, the country. If there is no language/script/country + // (an anomalous situation) then the display name is simply the variant's + // display name. + if (languageName.length() == 0 && scriptName.length() == 0 && countryName.length() == 0) { + if (variantNames.length == 0) { + return ""; + } else { + return formatList(variantNames, listPattern, listCompositionPattern); } - else qualifierNames = variantNames; } - else if (countryName.length() != 0) { - mainName = countryName; - qualifierNames = variantNames; + ArrayList names = new ArrayList(4); + if (languageName.length() != 0) { + names.add(languageName); } - else { - return formatList(variantNames, listPattern, listCompositionPattern); + if (scriptName.length() != 0) { + names.add(scriptName); } + if (countryName.length() != 0) { + names.add(countryName); + } + if (variantNames.length != 0) { + for (String var : variantNames) { + names.add(var); + } + } + + // The first one in the main name + mainName = names.get(0); + + // Others are qualifiers + int numNames = names.size(); + qualifierNames = (numNames > 1) ? + names.subList(1, numNames).toArray(new String[numNames - 1]) : new String[0]; // Create an array whose first element is the number of remaining // elements. This serves as a selector into a ChoiceFormat pattern from diff --git a/jdk/test/java/util/Locale/LocaleEnhanceTest.java b/jdk/test/java/util/Locale/LocaleEnhanceTest.java index a4416a4789e..44e6eaadff8 100644 --- a/jdk/test/java/util/Locale/LocaleEnhanceTest.java +++ b/jdk/test/java/util/Locale/LocaleEnhanceTest.java @@ -614,6 +614,55 @@ public class LocaleEnhanceTest extends LocaleTestFmwk { assertEquals("hans DE", "Simplified Han", hansLocale.getDisplayScript(Locale.GERMANY)); } + public void testGetDisplayName() { + final Locale[] testLocales = { + Locale.ROOT, + new Locale("en"), + new Locale("en", "US"), + new Locale("", "US"), + new Locale("no", "NO", "NY"), + new Locale("", "", "NY"), + Locale.forLanguageTag("zh-Hans"), + Locale.forLanguageTag("zh-Hant"), + Locale.forLanguageTag("zh-Hans-CN"), + Locale.forLanguageTag("und-Hans"), + }; + + final String[] displayNameEnglish = { + "", + "English", + "English (United States)", + "United States", + "Norwegian (Norway,Nynorsk)", + "Nynorsk", + "Chinese (Simplified Han)", + "Chinese (Traditional Han)", + "Chinese (Simplified Han,China)", + "Simplified Han", + }; + + final String[] displayNameSimplifiedChinese = { + "", + "\u82f1\u6587", + "\u82f1\u6587 (\u7f8e\u56fd)", + "\u7f8e\u56fd", + "\u632a\u5a01\u6587 (\u632a\u5a01,Nynorsk)", + "Nynorsk", + "\u4e2d\u6587 (\u7b80\u4f53\u4e2d\u6587)", + "\u4e2d\u6587 (\u7e41\u4f53\u4e2d\u6587)", + "\u4e2d\u6587 (\u7b80\u4f53\u4e2d\u6587,\u4e2d\u56fd)", + "\u7b80\u4f53\u4e2d\u6587", + }; + + for (int i = 0; i < testLocales.length; i++) { + Locale loc = testLocales[i]; + assertEquals("English display name for " + loc.toLanguageTag(), + displayNameEnglish[i], loc.getDisplayName(Locale.ENGLISH)); + assertEquals("Simplified Chinese display name for " + loc.toLanguageTag(), + displayNameSimplifiedChinese[i], loc.getDisplayName(Locale.CHINA)); + } + } + /// /// Builder tests /// From 564807c643b5f561411f537ca4f8ae77832b175e Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Tue, 19 Oct 2010 11:47:17 +0530 Subject: [PATCH 119/722] 6551367: javadoc throws ClassCastException when an @link tries to reference constructor Reviewed-by: jjg, mcimadamore --- .../com/sun/tools/javadoc/ClassDocImpl.java | 7 ++- .../classes/com/sun/tools/javadoc/DocEnv.java | 2 + langtools/test/tools/javadoc/T6551367.java | 54 +++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javadoc/T6551367.java diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java b/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java index b0908b9b2f7..0b083af6d8c 100644 --- a/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java +++ b/langtools/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java @@ -850,6 +850,12 @@ public class ClassDocImpl extends ProgramElementDocImpl implements ClassDoc { String[] paramTypes, Set searched) { //### Note that this search is not necessarily what the compiler would do! + Names names = tsym.name.table.names; + // do not match constructors + if (names.init.contentEquals(methodName)) { + return null; + } + ClassDocImpl cdi; MethodDocImpl mdi; @@ -876,7 +882,6 @@ public class ClassDocImpl extends ProgramElementDocImpl implements ClassDoc { *---------------------------------*/ // search current class - Names names = tsym.name.table.names; Scope.Entry e = tsym.members().lookup(names.fromString(methodName)); //### Using modifier filter here isn't really correct, diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java index 5673bcfc92d..b10e2d740a6 100644 --- a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java +++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java @@ -637,6 +637,7 @@ public class DocEnv { * Should be called only on symbols representing methods. */ public MethodDocImpl getMethodDoc(MethodSymbol meth) { + assert !meth.isConstructor() : "not expecting a constructor symbol"; MethodDocImpl result = (MethodDocImpl)methodMap.get(meth); if (result != null) return result; result = new MethodDocImpl(this, meth); @@ -665,6 +666,7 @@ public class DocEnv { * Should be called only on symbols representing constructors. */ public ConstructorDocImpl getConstructorDoc(MethodSymbol meth) { + assert meth.isConstructor() : "expecting a constructor symbol"; ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth); if (result != null) return result; result = new ConstructorDocImpl(this, meth); diff --git a/langtools/test/tools/javadoc/T6551367.java b/langtools/test/tools/javadoc/T6551367.java new file mode 100644 index 00000000000..04e6bdc1bde --- /dev/null +++ b/langtools/test/tools/javadoc/T6551367.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 6551367 + * @summary javadoc throws ClassCastException when an link tag tries to reference constructor. + * @author A. Sundararajan + * @run main T6551367 T6551367.java + */ + +import com.sun.javadoc.*; +import java.io.File; +import static com.sun.tools.javadoc.Main.execute; + +public class T6551367 extends com.sun.tools.doclets.standard.Standard { + public T6551367() {} + + /** Here, in the javadoc for this method, I try to link to + * {@link # a constructor}. + */ + public static void main(String... args) { + File testSrc = new File(System.getProperty("test.src", ".")); + File destDir = new File(System.getProperty("user.dir", ".")); + for (String file : args) { + File source = new File(testSrc, file); + int rc = execute("javadoc", "T6551367", + T6551367.class.getClassLoader(), + new String[]{source.getPath(), "-d", destDir.getAbsolutePath()}); + if (rc != 0) + throw new Error("unexpected exit from javadoc: " + rc); + } + } +} From 9cabdbf770497840a42b1af36998b5ca9c804fb2 Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Tue, 19 Oct 2010 02:52:57 -0700 Subject: [PATCH 120/722] 6990192: VM crashes in ciTypeFlow::get_block_for() Reviewed-by: never --- .../share/vm/classfile/systemDictionary.cpp | 37 ++++++++----------- .../vm/interpreter/interpreterRuntime.cpp | 8 ++-- hotspot/src/share/vm/oops/cpCacheOop.cpp | 22 ++++++++++- hotspot/src/share/vm/oops/cpCacheOop.hpp | 3 +- hotspot/src/share/vm/runtime/thread.cpp | 1 + 5 files changed, 42 insertions(+), 29 deletions(-) diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp index b9ba2062dda..14361bc188d 100644 --- a/hotspot/src/share/vm/classfile/systemDictionary.cpp +++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,12 +26,12 @@ # include "incls/_systemDictionary.cpp.incl" -Dictionary* SystemDictionary::_dictionary = NULL; -PlaceholderTable* SystemDictionary::_placeholders = NULL; -Dictionary* SystemDictionary::_shared_dictionary = NULL; -LoaderConstraintTable* SystemDictionary::_loader_constraints = NULL; -ResolutionErrorTable* SystemDictionary::_resolution_errors = NULL; -SymbolPropertyTable* SystemDictionary::_invoke_method_table = NULL; +Dictionary* SystemDictionary::_dictionary = NULL; +PlaceholderTable* SystemDictionary::_placeholders = NULL; +Dictionary* SystemDictionary::_shared_dictionary = NULL; +LoaderConstraintTable* SystemDictionary::_loader_constraints = NULL; +ResolutionErrorTable* SystemDictionary::_resolution_errors = NULL; +SymbolPropertyTable* SystemDictionary::_invoke_method_table = NULL; int SystemDictionary::_number_of_modifications = 0; @@ -1727,8 +1727,7 @@ void SystemDictionary::always_strong_classes_do(OopClosure* blk) { placeholders_do(blk); // Visit extra methods - if (invoke_method_table() != NULL) - invoke_method_table()->oops_do(blk); + invoke_method_table()->oops_do(blk); // Loader constraints. We must keep the symbolOop used in the name alive. constraints()->always_strong_classes_do(blk); @@ -1766,8 +1765,7 @@ void SystemDictionary::oops_do(OopClosure* f) { dictionary()->oops_do(f); // Visit extra methods - if (invoke_method_table() != NULL) - invoke_method_table()->oops_do(f); + invoke_method_table()->oops_do(f); // Partially loaded classes placeholders()->oops_do(f); @@ -1841,8 +1839,7 @@ void SystemDictionary::placeholders_do(void f(symbolOop, oop)) { void SystemDictionary::methods_do(void f(methodOop)) { dictionary()->methods_do(f); - if (invoke_method_table() != NULL) - invoke_method_table()->methods_do(f); + invoke_method_table()->methods_do(f); } // ---------------------------------------------------------------------------- @@ -1870,12 +1867,12 @@ void SystemDictionary::initialize(TRAPS) { // Allocate arrays assert(dictionary() == NULL, "SystemDictionary should only be initialized once"); - _dictionary = new Dictionary(_nof_buckets); - _placeholders = new PlaceholderTable(_nof_buckets); + _dictionary = new Dictionary(_nof_buckets); + _placeholders = new PlaceholderTable(_nof_buckets); _number_of_modifications = 0; - _loader_constraints = new LoaderConstraintTable(_loader_constraint_size); - _resolution_errors = new ResolutionErrorTable(_resolution_error_size); - // _invoke_method_table is allocated lazily in find_method_handle_invoke() + _loader_constraints = new LoaderConstraintTable(_loader_constraint_size); + _resolution_errors = new ResolutionErrorTable(_resolution_error_size); + _invoke_method_table = new SymbolPropertyTable(_invoke_method_size); // Allocate private object used as system class loader lock _system_loader_lock_obj = oopFactory::new_system_objArray(0, CHECK); @@ -2346,10 +2343,6 @@ methodOop SystemDictionary::find_method_handle_invoke(symbolHandle name, KlassHandle accessing_klass, TRAPS) { if (!EnableMethodHandles) return NULL; - if (invoke_method_table() == NULL) { - // create this side table lazily - _invoke_method_table = new SymbolPropertyTable(_invoke_method_size); - } vmSymbols::SID name_id = vmSymbols::find_sid(name()); assert(name_id != vmSymbols::NO_SID, "must be a known name"); unsigned int hash = invoke_method_table()->compute_hash(signature, name_id); diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp index fd867a4cfd0..3a3bd193c4f 100644 --- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp +++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp @@ -720,8 +720,8 @@ IRT_ENTRY(void, InterpreterRuntime::resolve_invokedynamic(JavaThread* thread)) { // first resolve the signature to a MH.invoke methodOop if (!pool->cache()->entry_at(main_index)->is_resolved(bytecode)) { JvmtiHideSingleStepping jhss(thread); - CallInfo info; - LinkResolver::resolve_invoke(info, Handle(), pool, + CallInfo callinfo; + LinkResolver::resolve_invoke(callinfo, Handle(), pool, site_index, bytecode, CHECK); // The main entry corresponds to a JVM_CONSTANT_InvokeDynamic, and serves // as a common reference point for all invokedynamic call sites with @@ -729,8 +729,8 @@ IRT_ENTRY(void, InterpreterRuntime::resolve_invokedynamic(JavaThread* thread)) { // as if it were an invokevirtual of MethodHandle.invoke. pool->cache()->entry_at(main_index)->set_method( bytecode, - info.resolved_method(), - info.vtable_index()); + callinfo.resolved_method(), + callinfo.vtable_index()); } // The method (f2 entry) of the main entry is the MH.invoke for the diff --git a/hotspot/src/share/vm/oops/cpCacheOop.cpp b/hotspot/src/share/vm/oops/cpCacheOop.cpp index eb27f1658ab..c49c934dc60 100644 --- a/hotspot/src/share/vm/oops/cpCacheOop.cpp +++ b/hotspot/src/share/vm/oops/cpCacheOop.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,6 +87,19 @@ void ConstantPoolCacheEntry::set_bytecode_2(Bytecodes::Code code) { OrderAccess::release_store_ptr(&_indices, _indices | ((u_char)code << 24)); } +// Atomically sets f1 if it is still NULL, otherwise it keeps the +// current value. +void ConstantPoolCacheEntry::set_f1_if_null_atomic(oop f1) { + // Use barriers as in oop_store + HeapWord* f1_addr = (HeapWord*) &_f1; + update_barrier_set_pre(f1_addr, f1); + void* result = Atomic::cmpxchg_ptr(f1, f1_addr, NULL); + bool success = (result == NULL); + if (success) { + update_barrier_set((void*) f1_addr, f1); + } + } + #ifdef ASSERT // It is possible to have two different dummy methodOops created // when the resolve code for invoke interface executes concurrently @@ -165,7 +178,12 @@ void ConstantPoolCacheEntry::set_method(Bytecodes::Code invoke_code, } assert(method->can_be_statically_bound(), "must be a MH invoker method"); assert(AllowTransitionalJSR292 || _f2 >= constantPoolOopDesc::CPCACHE_INDEX_TAG, "BSM index initialized"); - set_f1(method()); + // SystemDictionary::find_method_handle_invoke only caches + // methods which signature classes are on the boot classpath, + // otherwise the newly created method is returned. To avoid + // races in that case we store the first one coming in into the + // cp-cache atomically if it's still unset. + set_f1_if_null_atomic(method()); needs_vfinal_flag = false; // _f2 is not an oop assert(!is_vfinal(), "f2 not an oop"); byte_no = 1; // coordinate this with bytecode_number & is_resolved diff --git a/hotspot/src/share/vm/oops/cpCacheOop.hpp b/hotspot/src/share/vm/oops/cpCacheOop.hpp index 68460717fe0..aa0bd2c5113 100644 --- a/hotspot/src/share/vm/oops/cpCacheOop.hpp +++ b/hotspot/src/share/vm/oops/cpCacheOop.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -130,6 +130,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC { assert(existing_f1 == NULL || existing_f1 == f1, "illegal field change"); oop_store(&_f1, f1); } + void set_f1_if_null_atomic(oop f1); void set_f2(intx f2) { assert(_f2 == 0 || _f2 == f2, "illegal field change"); _f2 = f2; } int as_flags(TosState state, bool is_final, bool is_vfinal, bool is_volatile, bool is_method_interface, bool is_method); diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 514785b00cb..b17718f9c17 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1199,6 +1199,7 @@ void JavaThread::initialize() { _exception_pc = 0; _exception_handler_pc = 0; _exception_stack_size = 0; + _is_method_handle_return = 0; _jvmti_thread_state= NULL; _should_post_on_exceptions_flag = JNI_FALSE; _jvmti_get_loaded_classes_closure = NULL; From 441155f0d90983e829cdf59b32b4f5b34c25d42f Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Tue, 19 Oct 2010 09:49:08 -0700 Subject: [PATCH 121/722] 6992968: test/java/lang/management/MemoryMXBean/CollectionUsageThresholdConcMarkSweepGC.sh should not hang Reviewed-by: alanb, dholmes --- .../CollectionUsageThreshold.java | 103 ++++++++---------- ...CollectionUsageThresholdConcMarkSweepGC.sh | 1 + 2 files changed, 44 insertions(+), 60 deletions(-) diff --git a/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java b/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java index b7a04e0307d..22e1dc16572 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java +++ b/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThreshold.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4959889 + * @bug 4959889 6992968 * @summary Basic unit test of memory management testing: * 1) setCollectionUsageThreshold() and getCollectionUsageThreshold() * 2) test notification emitted for two different memory pools. @@ -34,8 +34,10 @@ * @run main/timeout=300 CollectionUsageThreshold */ +import java.lang.Thread.*; import java.lang.management.*; import java.util.*; +import java.util.concurrent.*; import javax.management.*; import javax.management.openmbean.CompositeData; @@ -52,6 +54,12 @@ public class CollectionUsageThreshold { private static Checker checker; private static int numGCs = 0; + // semaphore to signal the arrival of a low memory notification + private static Semaphore signals = new Semaphore(0); + // barrier for the main thread to wait until the checker thread + // finishes checking the low memory notification result + private static CyclicBarrier barrier = new CyclicBarrier(2); + static class PoolRecord { private MemoryPoolMXBean pool; private int listenerInvoked = 0; @@ -98,10 +106,9 @@ public class CollectionUsageThreshold { } pr.addNotification(minfo); synchronized (this) { + System.out.println("notifying the checker thread to check result"); numNotifs++; - if (numNotifs > 0 && (numNotifs % EXPECTED_NUM_POOLS) == 0) { - checker.goCheckResult(); - } + signals.release(); } } } @@ -134,6 +141,9 @@ public class CollectionUsageThreshold { } try { + // This test creates a checker thread responsible for checking + // the low memory notifications. It blocks until a permit + // from the signals semaphore is available. checker = new Checker("Checker thread"); checker.setDaemon(true); checker.start(); @@ -148,9 +158,18 @@ public class CollectionUsageThreshold { NotificationEmitter emitter = (NotificationEmitter) mm; emitter.addNotificationListener(listener, null, null); + // The main thread invokes GC to trigger the VM to perform + // low memory detection and then waits until the checker thread + // finishes its work to check for a low-memory notification. + // + // At GC time, VM will issue low-memory notification and invoke + // the listener which will release a permit to the signals semaphore. + // When the checker thread acquires the permit and finishes + // checking the low-memory notification, it will also call + // barrier.await() to signal the main thread to resume its work. for (int i = 0; i < NUM_GCS; i++) { invokeGC(); - checker.waitForCheckResult(); + barrier.await(); } } finally { // restore the default @@ -166,6 +185,7 @@ public class CollectionUsageThreshold { } + private static void invokeGC() { System.out.println("Calling System.gc()"); numGCs++; @@ -180,8 +200,6 @@ public class CollectionUsageThreshold { } static class Checker extends Thread { - private Object lock = new Object(); - private Object go = new Object(); private boolean checkerReady = false; private int waiters = 0; private boolean readyToCheck = false; @@ -190,83 +208,48 @@ public class CollectionUsageThreshold { }; public void run() { while (true) { - synchronized (lock) { - checkerReady = true; - try { - lock.wait(); - } catch (InterruptedException e) { - // ignore - } + try { + signals.acquire(EXPECTED_NUM_POOLS); checkResult(); - checkerReady = false; + } catch (InterruptedException e) { + throw new RuntimeException(e); + } catch (BrokenBarrierException e) { + throw new RuntimeException(e); } } } - private void checkResult() { + private void checkResult() throws InterruptedException, BrokenBarrierException { for (PoolRecord pr : result.values()) { if (pr.getListenerInvokedCount() != numGCs) { - throw new RuntimeException("Listeners invoked count = " + + fail("Listeners invoked count = " + pr.getListenerInvokedCount() + " expected to be " + numGCs); } if (pr.getNotifCount() != numGCs) { - throw new RuntimeException("Notif Count = " + + fail("Notif Count = " + pr.getNotifCount() + " expected to be " + numGCs); } long count = pr.getPool().getCollectionUsageThresholdCount(); if (count != numGCs) { - throw new RuntimeException("CollectionUsageThresholdCount = " + + fail("CollectionUsageThresholdCount = " + count + " expected to be " + numGCs); } if (!pr.getPool().isCollectionUsageThresholdExceeded()) { - throw new RuntimeException("isCollectionUsageThresholdExceeded" + + fail("isCollectionUsageThresholdExceeded" + " expected to be true"); } } - synchronized (go) { - // wait until the main thread is waiting for notification - while (waiters == 0) { - try { - go.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - - System.out.println(Thread.currentThread().getName() + - " notifying main thread to continue - result checking finished"); - go.notify(); - } - } - public void goCheckResult() { - System.out.println(Thread.currentThread().getName() + - " notifying to check result"); - synchronized (lock) { - while (!checkerReady) { - try { - lock.wait(50); - } catch (InterruptedException e) { - // ignore - } - } - lock.notify(); - } + // wait until the main thread is waiting for notification + barrier.await(); + System.out.println("notifying main thread to continue - result checking finished"); } - public void waitForCheckResult() { - System.out.println(Thread.currentThread().getName() + - " waiting for result checking finishes"); - synchronized (go) { - waiters++; - try { - go.wait(); - } catch (InterruptedException e) { - // ignore - } - waiters--; - } + private void fail(String msg) { + // reset the barrier to cause BrokenBarrierException to avoid hanging + barrier.reset(); + throw new RuntimeException(msg); } } } diff --git a/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThresholdConcMarkSweepGC.sh b/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThresholdConcMarkSweepGC.sh index 3dac6c5d5af..6e005a0257f 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThresholdConcMarkSweepGC.sh +++ b/jdk/test/java/lang/management/MemoryMXBean/CollectionUsageThresholdConcMarkSweepGC.sh @@ -27,6 +27,7 @@ # @summary Test CollectionUsageThreshold with concurrent marksweep collector # @author Mandy Chung # +# @ignore 6982965 # @run build CollectionUsageThreshold # @run shell/timeout=300 CollectionUsageThresholdConcMarkSweepGC.sh # From d0f3de3b59f19c9e440e782466a7ced03f84f2c7 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Tue, 19 Oct 2010 10:02:25 -0700 Subject: [PATCH 122/722] 6992121: StringBuilder.ensureCapacity(int minCap) throws OutOfMemoryError with minCap=Integer.MIN_VALUE Reviewed-by: dholmes, alanb --- .../java/lang/AbstractStringBuilder.java | 4 +- .../share/classes/java/util/ArrayList.java | 13 ++- jdk/src/share/classes/java/util/Vector.java | 6 +- .../lang/StringBuilder/EnsureCapacity.java | 81 +++++++++++++++++++ .../java/util/ArrayList/EnsureCapacity.java | 64 +++++++++++++++ 5 files changed, 161 insertions(+), 7 deletions(-) create mode 100644 jdk/test/java/lang/StringBuilder/EnsureCapacity.java create mode 100644 jdk/test/java/util/ArrayList/EnsureCapacity.java diff --git a/jdk/src/share/classes/java/lang/AbstractStringBuilder.java b/jdk/src/share/classes/java/lang/AbstractStringBuilder.java index 46a14a0aa20..d495f07c3f6 100644 --- a/jdk/src/share/classes/java/lang/AbstractStringBuilder.java +++ b/jdk/src/share/classes/java/lang/AbstractStringBuilder.java @@ -100,7 +100,8 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * @param minimumCapacity the minimum desired capacity. */ public void ensureCapacity(int minimumCapacity) { - ensureCapacityInternal(minimumCapacity); + if (minimumCapacity > 0) + ensureCapacityInternal(minimumCapacity); } /** @@ -108,6 +109,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * never synchronized. */ private void ensureCapacityInternal(int minimumCapacity) { + // overflow-conscious code if (minimumCapacity - value.length > 0) expandCapacity(minimumCapacity); } diff --git a/jdk/src/share/classes/java/util/ArrayList.java b/jdk/src/share/classes/java/util/ArrayList.java index 4b746ea0124..7c6eded3a83 100644 --- a/jdk/src/share/classes/java/util/ArrayList.java +++ b/jdk/src/share/classes/java/util/ArrayList.java @@ -176,6 +176,11 @@ public class ArrayList extends AbstractList * @param minCapacity the desired minimum capacity */ public void ensureCapacity(int minCapacity) { + if (minCapacity > 0) + ensureCapacityInternal(minCapacity); + } + + private void ensureCapacityInternal(int minCapacity) { modCount++; // overflow-conscious code if (minCapacity - elementData.length > 0) @@ -403,7 +408,7 @@ public class ArrayList extends AbstractList * @return true (as specified by {@link Collection#add}) */ public boolean add(E e) { - ensureCapacity(size + 1); // Increments modCount!! + ensureCapacityInternal(size + 1); // Increments modCount!! elementData[size++] = e; return true; } @@ -420,7 +425,7 @@ public class ArrayList extends AbstractList public void add(int index, E element) { rangeCheckForAdd(index); - ensureCapacity(size + 1); // Increments modCount!! + ensureCapacityInternal(size + 1); // Increments modCount!! System.arraycopy(elementData, index, elementData, index + 1, size - index); elementData[index] = element; @@ -524,7 +529,7 @@ public class ArrayList extends AbstractList public boolean addAll(Collection c) { Object[] a = c.toArray(); int numNew = a.length; - ensureCapacity(size + numNew); // Increments modCount + ensureCapacityInternal(size + numNew); // Increments modCount System.arraycopy(a, 0, elementData, size, numNew); size += numNew; return numNew != 0; @@ -550,7 +555,7 @@ public class ArrayList extends AbstractList Object[] a = c.toArray(); int numNew = a.length; - ensureCapacity(size + numNew); // Increments modCount + ensureCapacityInternal(size + numNew); // Increments modCount int numMoved = size - index; if (numMoved > 0) diff --git a/jdk/src/share/classes/java/util/Vector.java b/jdk/src/share/classes/java/util/Vector.java index 8517b887746..e508aa5b5c0 100644 --- a/jdk/src/share/classes/java/util/Vector.java +++ b/jdk/src/share/classes/java/util/Vector.java @@ -222,8 +222,10 @@ public class Vector * @param minCapacity the desired minimum capacity */ public synchronized void ensureCapacity(int minCapacity) { - modCount++; - ensureCapacityHelper(minCapacity); + if (minCapacity > 0) { + modCount++; + ensureCapacityHelper(minCapacity); + } } /** diff --git a/jdk/test/java/lang/StringBuilder/EnsureCapacity.java b/jdk/test/java/lang/StringBuilder/EnsureCapacity.java new file mode 100644 index 00000000000..f1ef16ee8d3 --- /dev/null +++ b/jdk/test/java/lang/StringBuilder/EnsureCapacity.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 6955504 6992121 + * @summary Test the StringBuilder.ensureCapacity() with negative minimumCapacity + * and append() method with negative length input argument. + * Also, test the StringBuffer class. + */ + +import java.util.ArrayList; +import java.util.Vector; + +public class EnsureCapacity { + public static void main(String[] args) { + testStringBuilder(); + testStringBuffer(); + } + + private static void checkCapacity(int before, int after) { + if (before != after) { + throw new RuntimeException("capacity is expected to be unchanged: " + + "before=" + before + " after=" + after); + } + } + + private static void testStringBuilder() { + StringBuilder sb = new StringBuilder("abc"); + int cap = sb.capacity(); + + // test if negative minimumCapacity + sb.ensureCapacity(Integer.MIN_VALUE); + checkCapacity(cap, sb.capacity()); + + try { + char[] str = {'a', 'b', 'c', 'd'}; + // test if negative length + sb.append(str, 0, Integer.MIN_VALUE + 10); + throw new RuntimeException("IndexOutOfBoundsException not thrown"); + } catch (IndexOutOfBoundsException ex) { + } + } + + private static void testStringBuffer() { + StringBuffer sb = new StringBuffer("abc"); + int cap = sb.capacity(); + + // test if negative minimumCapacity + sb.ensureCapacity(Integer.MIN_VALUE); + checkCapacity(cap, sb.capacity()); + + try { + char[] str = {'a', 'b', 'c', 'd'}; + // test if negative length + sb.append(str, 0, Integer.MIN_VALUE + 10); + throw new RuntimeException("IndexOutOfBoundsException not thrown"); + } catch (IndexOutOfBoundsException ex) { + } + } +} diff --git a/jdk/test/java/util/ArrayList/EnsureCapacity.java b/jdk/test/java/util/ArrayList/EnsureCapacity.java new file mode 100644 index 00000000000..a8e5f42ac6b --- /dev/null +++ b/jdk/test/java/util/ArrayList/EnsureCapacity.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 6992121 + * @summary Test the ArrayList.ensureCapacity() and Vector.ensureCapacity + * method with negative minimumCapacity input argument. + */ + +import java.util.ArrayList; +import java.util.Vector; + +public class EnsureCapacity { + public static void main(String[] args) { + testArrayList(); + testVector(); + } + + private static void checkCapacity(int before, int after) { + if (before != after) { + throw new RuntimeException("capacity is expected to be unchanged: " + + "before=" + before + " after=" + after); + } + } + + private static void testArrayList() { + ArrayList al = new ArrayList(); + al.add("abc"); + al.ensureCapacity(Integer.MIN_VALUE); + + // there is no method to query the capacity of ArrayList + // so before and after capacity are not checked + } + + private static void testVector() { + Vector vector = new Vector(); + vector.add("abc"); + + int cap = vector.capacity(); + vector.ensureCapacity(Integer.MIN_VALUE); + checkCapacity(cap, vector.capacity()); + } +} From 6a17d9c416de42f6bdd98b848b780ec5ea66b197 Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Tue, 19 Oct 2010 11:14:52 -0700 Subject: [PATCH 123/722] 6989669: Coops: -Xshare:dump causes crash Temporarily fix to disable compressed oops with CDS Reviewed-by: dholmes, twisti, kvn, never --- hotspot/src/share/vm/runtime/arguments.cpp | 7 +++++++ hotspot/src/share/vm/runtime/globals.hpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 2e1ac1e1655..e996510bb1e 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -2979,6 +2979,13 @@ jint Arguments::parse(const JavaVMInitArgs* args) { UseCompressedOops = false; #endif +#if defined(_LP64) + if ((DumpSharedSpaces || RequireSharedSpaces) && UseCompressedOops) { + // Disable compressed oops with shared spaces + UseCompressedOops = false; + } +#endif + // Set object alignment values. set_object_alignment(); diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 8395bf9a373..12e10218510 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -3545,7 +3545,7 @@ class CommandLineFlags { product(uintx, SharedDummyBlockSize, 512*M, \ "Size of dummy block used to shift heap addresses (in bytes)") \ \ - product(uintx, SharedReadWriteSize, 12*M, \ + product(uintx, SharedReadWriteSize, NOT_LP64(12*M) LP64_ONLY(13*M), \ "Size of read-write space in permanent generation (in bytes)") \ \ product(uintx, SharedReadOnlySize, 10*M, \ From bf00a77f2d540434970d23379f92dd152f49a0ee Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 19 Oct 2010 15:02:48 -0700 Subject: [PATCH 124/722] 6987760: remove 308 support from JDK7 Reviewed-by: darcy, mcimadamore --- .../sun/source/tree/AnnotatedTypeTree.java | 47 -- .../com/sun/source/tree/MethodTree.java | 2 +- .../classes/com/sun/source/tree/Tree.java | 2 +- .../com/sun/source/tree/TreeVisitor.java | 2 +- .../sun/source/tree/TypeParameterTree.java | 2 +- .../source/util/AbstractTypeProcessor.java | 245 ---------- .../sun/source/util/SimpleTreeVisitor.java | 6 +- .../com/sun/source/util/TreeScanner.java | 16 +- .../sun/tools/javac/code/TypeAnnotations.java | 14 +- .../sun/tools/javac/parser/JavacParser.java | 422 +++--------------- .../JavacProcessingEnvironment.java | 6 +- .../tools/javac/resources/compiler.properties | 6 +- .../com/sun/tools/javac/tree/JCTree.java | 17 +- .../com/sun/tools/javac/tree/TreeCopier.java | 12 +- langtools/test/tools/javac/T6985181.java | 86 ---- .../javac/annotations/6881115/T6881115.java | 4 +- .../javac/annotations/6881115/T6881115.out | 7 +- .../examples/TypeAnnotationsNotSupported.java | 33 -- .../model/element/TestAnonClassNames.java | 9 +- .../test/tools/javac/tree/TreePosTest.java | 4 +- .../javac/treeannotests/AnnoTreeTests.java | 44 -- .../typeAnnotations/6967002/T6967002.java | 35 -- .../typeAnnotations/6967002/T6967002.out | 8 - .../javac/typeAnnotations/InnerClass.java | 59 --- .../typeAnnotations/MultipleTargets.java | 41 -- .../typeAnnotations/TypeParameterTarget.java | 46 -- .../javac/typeAnnotations/TypeUseTarget.java | 55 --- .../typeAnnotations/attribution/Scopes.java | 38 -- .../typeAnnotations/classfile/DeadCode.java | 181 -------- .../failures/AnnotationVersion.java | 12 - .../failures/AnnotationVersion.out | 2 - .../failures/IncompleteArray.java | 12 - .../failures/IncompleteArray.out | 2 - .../failures/IncompleteVararg.java | 13 - .../failures/IncompleteVararg.out | 2 - .../typeAnnotations/failures/IndexArray.java | 13 - .../typeAnnotations/failures/IndexArray.out | 2 - .../typeAnnotations/failures/LintCast.java | 42 -- .../typeAnnotations/failures/LintCast.out | 6 - .../typeAnnotations/failures/OldArray.java | 35 -- .../typeAnnotations/failures/Scopes.java | 10 - .../javac/typeAnnotations/failures/Scopes.out | 2 - .../failures/StaticFields.java | 13 - .../typeAnnotations/failures/StaticFields.out | 2 - .../failures/StaticMethods.java | 12 - .../failures/StaticMethods.out | 2 - .../failures/VoidGenericMethod.java | 35 -- .../arrayclass/DuplicateAnnotationValue.java | 14 - .../arrayclass/DuplicateAnnotationValue.out | 2 - .../arrayclass/DuplicateTypeAnnotation.java | 15 - .../arrayclass/DuplicateTypeAnnotation.out | 2 - .../common/arrayclass/InvalidLocation.java | 16 - .../common/arrayclass/InvalidLocation.out | 2 - .../arrayclass/MissingAnnotationValue.java | 14 - .../arrayclass/MissingAnnotationValue.out | 2 - .../arrays/DuplicateAnnotationValue.java | 14 - .../arrays/DuplicateAnnotationValue.out | 2 - .../arrays/DuplicateTypeAnnotation.java | 15 - .../common/arrays/DuplicateTypeAnnotation.out | 2 - .../common/arrays/InvalidLocation.java | 16 - .../common/arrays/InvalidLocation.out | 2 - .../common/arrays/MissingAnnotationValue.java | 14 - .../common/arrays/MissingAnnotationValue.out | 2 - .../DuplicateAnnotationValue.java | 14 - .../DuplicateAnnotationValue.out | 2 - .../DuplicateTypeAnnotation.java | 14 - .../DuplicateTypeAnnotation.out | 2 - .../innertypeparams/InvalidLocation.java | 15 - .../innertypeparams/InvalidLocation.out | 2 - .../MissingAnnotationValue.java | 14 - .../MissingAnnotationValue.out | 2 - .../newarray/DuplicateAnnotationValue.java | 14 - .../newarray/DuplicateAnnotationValue.out | 2 - .../newarray/DuplicateTypeAnnotation.java | 15 - .../newarray/DuplicateTypeAnnotation.out | 2 - .../common/newarray/InvalidLocation.java | 16 - .../common/newarray/InvalidLocation.out | 2 - .../newarray/MissingAnnotationValue.java | 14 - .../newarray/MissingAnnotationValue.out | 2 - .../parambounds/DuplicateAnnotationValue.java | 11 - .../parambounds/DuplicateAnnotationValue.out | 2 - .../parambounds/DuplicateTypeAnnotation.java | 12 - .../parambounds/DuplicateTypeAnnotation.out | 2 - .../common/parambounds/InvalidLocation.java | 13 - .../common/parambounds/InvalidLocation.out | 2 - .../parambounds/MissingAnnotationValue.java | 11 - .../parambounds/MissingAnnotationValue.out | 2 - .../receiver/DuplicateAnnotationValue.java | 12 - .../receiver/DuplicateAnnotationValue.out | 2 - .../receiver/DuplicateTypeAnnotation.java | 13 - .../receiver/DuplicateTypeAnnotation.out | 2 - .../common/receiver/InvalidLocation.java | 15 - .../common/receiver/InvalidLocation.out | 2 - .../receiver/MissingAnnotationValue.java | 12 - .../receiver/MissingAnnotationValue.out | 2 - .../common/rest/DuplicateAnnotationValue.java | 14 - .../common/rest/DuplicateAnnotationValue.out | 2 - .../common/rest/DuplicateTypeAnnotation.java | 15 - .../common/rest/DuplicateTypeAnnotation.out | 2 - .../failures/common/rest/InvalidLocation.java | 16 - .../failures/common/rest/InvalidLocation.out | 2 - .../common/rest/MissingAnnotationValue.java | 14 - .../common/rest/MissingAnnotationValue.out | 2 - .../typeArgs/DuplicateAnnotationValue.java | 12 - .../typeArgs/DuplicateAnnotationValue.out | 2 - .../typeArgs/DuplicateTypeAnnotation.java | 13 - .../typeArgs/DuplicateTypeAnnotation.out | 2 - .../common/typeArgs/InvalidLocation.java | 14 - .../common/typeArgs/InvalidLocation.out | 2 - .../typeArgs/MissingAnnotationValue.java | 12 - .../typeArgs/MissingAnnotationValue.out | 2 - .../typeparams/DuplicateAnnotationValue.java | 11 - .../typeparams/DuplicateAnnotationValue.out | 2 - .../typeparams/DuplicateTypeAnnotation.java | 12 - .../typeparams/DuplicateTypeAnnotation.out | 2 - .../common/typeparams/InvalidLocation.java | 13 - .../common/typeparams/InvalidLocation.out | 2 - .../typeparams/MissingAnnotationValue.java | 11 - .../typeparams/MissingAnnotationValue.out | 2 - .../wildcards/DuplicateAnnotationValue.java | 12 - .../wildcards/DuplicateAnnotationValue.out | 2 - .../wildcards/DuplicateTypeAnnotation.java | 13 - .../wildcards/DuplicateTypeAnnotation.out | 2 - .../common/wildcards/InvalidLocation.java | 14 - .../common/wildcards/InvalidLocation.out | 2 - .../wildcards/MissingAnnotationValue.java | 12 - .../wildcards/MissingAnnotationValue.out | 2 - .../failures/target/Constructor.java | 17 - .../failures/target/Constructor.out | 2 - .../failures/target/IncompleteArray.java | 12 - .../failures/target/IncompleteArray.out | 2 - .../failures/target/NotTypeParameter.java | 17 - .../failures/target/NotTypeParameter.out | 3 - .../failures/target/NotTypeUse.java | 17 - .../failures/target/NotTypeUse.out | 2 - .../failures/target/VoidMethod.java | 17 - .../failures/target/VoidMethod.out | 2 - .../newlocations/BasicTest.java | 4 +- .../newlocations/BasicTest.out | 66 +++ .../newlocations/ClassExtends.java | 40 -- .../newlocations/ClassLiterals.java | 48 -- .../newlocations/ClassParameters.java | 56 --- .../newlocations/ConstructorTypeArgs.java | 55 --- .../newlocations/Expressions.java | 75 ---- .../typeAnnotations/newlocations/Fields.java | 69 --- .../newlocations/LocalVariables.java | 77 ---- .../newlocations/MethodReturnType.java | 71 --- .../newlocations/MethodTypeArgs.java | 62 --- .../newlocations/MethodTypeParameters.java | 48 -- .../newlocations/Parameters.java | 51 --- .../newlocations/Receivers.java | 56 --- .../typeAnnotations/newlocations/Throws.java | 47 -- .../newlocations/TypeCasts.java | 44 -- .../newlocations/TypeParameters.java | 50 --- .../newlocations/Wildcards.java | 70 --- .../typeAnnotations/ArrayClassLiterals.java | 183 -------- .../typeAnnotations/ArrayClassLiterals2.java | 82 ---- .../javap/typeAnnotations/ClassLiterals.java | 174 -------- .../typeAnnotations/JSR175Annotations.java | 152 ------- .../tools/javap/typeAnnotations/NewArray.java | 175 -------- .../tools/javap/typeAnnotations/Presence.java | 189 -------- .../javap/typeAnnotations/PresenceInner.java | 185 -------- .../tools/javap/typeAnnotations/T6855990.java | 51 --- .../javap/typeAnnotations/Visibility.java | 139 ------ 164 files changed, 179 insertions(+), 4518 deletions(-) delete mode 100644 langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java delete mode 100644 langtools/src/share/classes/com/sun/source/util/AbstractTypeProcessor.java delete mode 100644 langtools/test/tools/javac/T6985181.java delete mode 100644 langtools/test/tools/javac/diags/examples/TypeAnnotationsNotSupported.java delete mode 100644 langtools/test/tools/javac/treeannotests/AnnoTreeTests.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/6967002/T6967002.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/6967002/T6967002.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/InnerClass.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/MultipleTargets.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/TypeParameterTarget.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/TypeUseTarget.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/attribution/Scopes.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/classfile/DeadCode.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/IndexArray.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/IndexArray.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/LintCast.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/LintCast.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/OldArray.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/Scopes.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/Scopes.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/StaticFields.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/StaticFields.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/VoidGenericMethod.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.out create mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/ClassExtends.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/ClassLiterals.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/ClassParameters.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/ConstructorTypeArgs.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/Expressions.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/Fields.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/LocalVariables.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/MethodReturnType.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeArgs.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeParameters.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/Parameters.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/Receivers.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/Throws.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/TypeCasts.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/TypeParameters.java delete mode 100644 langtools/test/tools/javac/typeAnnotations/newlocations/Wildcards.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals2.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/ClassLiterals.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/JSR175Annotations.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/NewArray.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/Presence.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/PresenceInner.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/T6855990.java delete mode 100644 langtools/test/tools/javap/typeAnnotations/Visibility.java diff --git a/langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java deleted file mode 100644 index 08683fb4dd5..00000000000 --- a/langtools/src/share/classes/com/sun/source/tree/AnnotatedTypeTree.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.source.tree; - -import java.util.List; - -/** - * A tree node for an annotated type - * - * For example: - *

    - *    {@code @}annotationType String
    - *    {@code @}annotationType ( arguments ) Date
    - * 
    - * - * @see "JSR 308: Annotations on Java Types" - * - * @author Mahmood Ali - * @since 1.7 - */ -public interface AnnotatedTypeTree extends ExpressionTree { - List getAnnotations(); - ExpressionTree getUnderlyingType(); -} diff --git a/langtools/src/share/classes/com/sun/source/tree/MethodTree.java b/langtools/src/share/classes/com/sun/source/tree/MethodTree.java index 2e7cf4addb3..7f597606b66 100644 --- a/langtools/src/share/classes/com/sun/source/tree/MethodTree.java +++ b/langtools/src/share/classes/com/sun/source/tree/MethodTree.java @@ -53,7 +53,7 @@ public interface MethodTree extends Tree { Tree getReturnType(); List getTypeParameters(); List getParameters(); - List getReceiverAnnotations(); +//308 List getReceiverAnnotations(); List getThrows(); BlockTree getBody(); Tree getDefaultValue(); // for annotation types diff --git a/langtools/src/share/classes/com/sun/source/tree/Tree.java b/langtools/src/share/classes/com/sun/source/tree/Tree.java index 7e5ede9bf0a..95b2d85c9e6 100644 --- a/langtools/src/share/classes/com/sun/source/tree/Tree.java +++ b/langtools/src/share/classes/com/sun/source/tree/Tree.java @@ -46,7 +46,7 @@ public interface Tree { */ public enum Kind { - ANNOTATED_TYPE(AnnotatedTypeTree.class), +//308 ANNOTATED_TYPE(AnnotatedTypeTree.class), /** * Used for instances of {@link AnnotationTree}. diff --git a/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java b/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java index d36b3690232..6aba5d310e4 100644 --- a/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java +++ b/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java @@ -57,7 +57,7 @@ package com.sun.source.tree; * @since 1.6 */ public interface TreeVisitor { - R visitAnnotatedType(AnnotatedTypeTree node, P p); +//308 R visitAnnotatedType(AnnotatedTypeTree node, P p); R visitAnnotation(AnnotationTree node, P p); R visitMethodInvocation(MethodInvocationTree node, P p); R visitAssert(AssertTree node, P p); diff --git a/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java b/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java index 24f6e36884f..1ead8fa3e0c 100644 --- a/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java +++ b/langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java @@ -47,5 +47,5 @@ import javax.lang.model.element.Name; public interface TypeParameterTree extends Tree { Name getName(); List getBounds(); - List getAnnotations(); +//308 List getAnnotations(); } diff --git a/langtools/src/share/classes/com/sun/source/util/AbstractTypeProcessor.java b/langtools/src/share/classes/com/sun/source/util/AbstractTypeProcessor.java deleted file mode 100644 index 2e1053f3232..00000000000 --- a/langtools/src/share/classes/com/sun/source/util/AbstractTypeProcessor.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.source.util; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.annotation.processing.*; -import javax.lang.model.element.Name; -import javax.lang.model.element.TypeElement; -import javax.lang.model.util.ElementFilter; - -import com.sun.tools.javac.processing.JavacProcessingEnvironment; -import com.sun.tools.javac.util.Context; -import com.sun.tools.javac.util.Log; - -import com.sun.source.tree.ClassTree; - -/** - * This class is an abstract annotation processor designed to be a - * convenient superclass for concrete "type processors", processors that - * require the type information in the processed source. - * - *

    Type processing occurs in one round after the tool (e.g. java compiler) - * analyzes the source (all sources taken as input to the tool and sources - * generated by other annotation processors). - * - *

    The tool infrastructure will interact with classes extending this abstract - * class as follows: - * - *

      - * [1-3: Identical to {@link Processor} life cycle] - * - *
    1. If an existing {@code Processor} object is not being used, to - * create an instance of a processor the tool calls the no-arg - * constructor of the processor class. - * - *
    2. Next, the tool calls the {@link #init init} method with - * an appropriate {@code ProcessingEnvironment}. - * - *
    3. Afterwards, the tool calls {@link #getSupportedAnnotationTypes - * getSupportedAnnotationTypes}, {@link #getSupportedOptions - * getSupportedOptions}, and {@link #getSupportedSourceVersion - * getSupportedSourceVersion}. These methods are only called once per - * run, not on each round. - * - * [4-5Unique to {@code AbstractTypeProcessor} subclasses] - * - *
    4. For each class containing a supported annotation, the tool calls - * {@link #typeProcess(TypeElement, TreePath) typeProcess} method on the - * {@code Processor}. The class is guaranteed to be type-checked Java code - * and all the tree type and symbol information is resolved. - * - *
    5. Finally, the tools calls the - * {@link #typeProcessingOver() typeProcessingOver} method - * on the {@code Processor}. - * - *
    - * - *

    The tool is permitted to ask type processors to process a class once - * it is analyzed before the rest of classes are analyzed. The tool is also - * permitted to stop type processing immediately if any errors are raised, - * without invoking {@code typeProcessingOver} - * - *

    A subclass may override any of the methods in this class, as long as the - * general {@link javax.annotation.processing.Processor Processor} - * contract is obeyed, with one notable exception. - * {@link #process(Set, RoundEnvironment)} may not be overridden, as it - * is called during the regular annotation phase before classes are analyzed. - * - * @author Mahmood Ali - * @since 1.7 - */ -public abstract class AbstractTypeProcessor extends AbstractProcessor { - private final Set elements = new HashSet(); - private boolean hasInvokedTypeProcessingOver = false; - private JavacProcessingEnvironment env; - private final AttributionTaskListener listener = new AttributionTaskListener(); - - /** - * Constructor for subclasses to call. - */ - protected AbstractTypeProcessor() { } - - /** - * {@inheritDoc} - */ - @Override - public void init(ProcessingEnvironment env) { - super.init(env); - this.env = (JavacProcessingEnvironment)env; - prepareContext(this.env.getContext()); - } - - /** - * The use of this method is obsolete in type processors. The method is - * called during regular annotation processing phase only. - */ - @Override - public final boolean process(Set annotations, - RoundEnvironment roundEnv) { - for (TypeElement elem : ElementFilter.typesIn(roundEnv.getRootElements())) { - elements.add(elem.getQualifiedName()); - } - return false; - } - - /** - * Processes a fully analyzed class that contains a supported annotation - * (look {@link #getSupportedAnnotationTypes()}). - * - *

    The passed class is always a valid type-checked Java code. - * - * @param element element of the analyzed class - * @param tree the tree path to the element, with the leaf being a - * {@link ClassTree} - */ - public abstract void typeProcess(TypeElement element, TreePath tree); - - /** - * A method to be called once all the classes are processed and no error - * is reported. - * - *

    Subclasses may override this method to do any aggregate analysis - * (e.g. generate report, persistence) or resource deallocation. - * - *

    If an error (a Java error or a processor error) is reported, this - * method is not guaranteed to be invoked. - */ - public void typeProcessingOver() { } - - /** - * adds a listener for attribution. - */ - private void prepareContext(Context context) { - TaskListener otherListener = context.get(TaskListener.class); - if (otherListener == null) { - context.put(TaskListener.class, listener); - } else { - // handle cases of multiple listeners - context.put(TaskListener.class, (TaskListener)null); - TaskListeners listeners = new TaskListeners(); - listeners.add(otherListener); - listeners.add(listener); - context.put(TaskListener.class, listeners); - } - } - - /** - * A task listener that invokes the processor whenever a class is fully - * analyzed. - */ - private final class AttributionTaskListener implements TaskListener { - - @Override - public void finished(TaskEvent e) { - Log log = Log.instance(env.getContext()); - - if (!hasInvokedTypeProcessingOver && elements.isEmpty() && log.nerrors == 0) { - typeProcessingOver(); - hasInvokedTypeProcessingOver = true; - } - - if (e.getKind() != TaskEvent.Kind.ANALYZE) - return; - - if (e.getTypeElement() == null) - throw new AssertionError("event task without a type element"); - if (e.getCompilationUnit() == null) - throw new AssertionError("even task without compilation unit"); - - if (!elements.remove(e.getTypeElement().getQualifiedName())) - return; - - if (log.nerrors != 0) - return; - - TypeElement elem = e.getTypeElement(); - TreePath p = Trees.instance(env).getPath(elem); - - typeProcess(elem, p); - - if (!hasInvokedTypeProcessingOver && elements.isEmpty() && log.nerrors == 0) { - typeProcessingOver(); - hasInvokedTypeProcessingOver = true; - } - } - - @Override - public void started(TaskEvent e) { } - - } - - /** - * A task listener multiplexer. - */ - private static class TaskListeners implements TaskListener { - private final List listeners = new ArrayList(); - - public void add(TaskListener listener) { - listeners.add(listener); - } - - public void remove(TaskListener listener) { - listeners.remove(listener); - } - - @Override - public void finished(TaskEvent e) { - for (TaskListener listener : listeners) - listener.finished(e); - } - - @Override - public void started(TaskEvent e) { - for (TaskListener listener : listeners) - listener.started(e); - } - } -} diff --git a/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java b/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java index fb60b890542..70b3435f9c8 100644 --- a/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java +++ b/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java @@ -248,9 +248,9 @@ public class SimpleTreeVisitor implements TreeVisitor { return defaultAction(node, p); } - public R visitAnnotatedType(AnnotatedTypeTree node, P p) { - return defaultAction(node, p); - } +//308 public R visitAnnotatedType(AnnotatedTypeTree node, P p) { +//308 return defaultAction(node, p); +//308 } public R visitErroneous(ErroneousTree node, P p) { return defaultAction(node, p); diff --git a/langtools/src/share/classes/com/sun/source/util/TreeScanner.java b/langtools/src/share/classes/com/sun/source/util/TreeScanner.java index 3a8f07aca99..4b537ed4614 100644 --- a/langtools/src/share/classes/com/sun/source/util/TreeScanner.java +++ b/langtools/src/share/classes/com/sun/source/util/TreeScanner.java @@ -138,7 +138,7 @@ public class TreeScanner implements TreeVisitor { r = scanAndReduce(node.getReturnType(), p, r); r = scanAndReduce(node.getTypeParameters(), p, r); r = scanAndReduce(node.getParameters(), p, r); - r = scanAndReduce(node.getReceiverAnnotations(), p, r); +//308 r = scanAndReduce(node.getReceiverAnnotations(), p, r); r = scanAndReduce(node.getThrows(), p, r); r = scanAndReduce(node.getBody(), p, r); r = scanAndReduce(node.getDefaultValue(), p, r); @@ -361,8 +361,8 @@ public class TreeScanner implements TreeVisitor { } public R visitTypeParameter(TypeParameterTree node, P p) { - R r = scan(node.getAnnotations(), p); - r = scanAndReduce(node.getBounds(), p, r); + R r = scan(node.getBounds(), p); +//308 R r = scanAndReduce(node.getAnnotations(), p, r); return r; } @@ -380,11 +380,11 @@ public class TreeScanner implements TreeVisitor { return r; } - public R visitAnnotatedType(AnnotatedTypeTree node, P p) { - R r = scan(node.getAnnotations(), p); - r = scanAndReduce(node.getUnderlyingType(), p, r); - return r; - } +//308 public R visitAnnotatedType(AnnotatedTypeTree node, P p) { +//308 R r = scan(node.getAnnotations(), p); +//308 r = scanAndReduce(node.getUnderlyingType(), p, r); +//308 return r; +//308 } public R visitOther(Tree node, P p) { return null; diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java index d43828ae274..23aaed349c4 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java @@ -55,8 +55,8 @@ public class TypeAnnotations { } public void taFillAndLift(JCClassDecl tree, boolean visitBodies) { - new TypeAnnotationPositions().scan(tree); - new TypeAnnotationLift().scan(tree); +//308 new TypeAnnotationPositions().scan(tree); +//308 new TypeAnnotationLift().scan(tree); } private static class TypeAnnotationPositions extends TreeScanner { @@ -208,11 +208,11 @@ public class TypeAnnotations { } return p; - case ANNOTATED_TYPE: { - List newPath = path.tail; - return resolveFrame(newPath.head, newPath.tail.head, - newPath, p); - } +//308 case ANNOTATED_TYPE: { +//308 List newPath = path.tail; +//308 return resolveFrame(newPath.head, newPath.tail.head, +//308 newPath, p); +//308 } case METHOD_INVOCATION: { JCMethodInvocation invocation = (JCMethodInvocation)frame; diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java index d4ec62a19a9..ab123e1fae5 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -75,42 +75,6 @@ public class JavacParser implements Parser { /** The name table. */ private Names names; - // Because of javac's limited lookahead, some contexts are ambiguous in - // the presence of type annotations even though they are not ambiguous - // in the absence of type annotations. Consider this code: - // void m(String [] m) { } - // void m(String ... m) { } - // After parsing "String", javac calls bracketsOpt which immediately - // returns if the next character is not '['. Similarly, javac can see - // if the next token is ... and in that case parse an ellipsis. But in - // the presence of type annotations: - // void m(String @A [] m) { } - // void m(String @A ... m) { } - // no finite lookahead is enough to determine whether to read array - // levels or an ellipsis. Furthermore, if you call bracketsOpt, then - // bracketsOpt first reads all the leading annotations and only then - // discovers that it needs to fail. bracketsOpt needs a way to push - // back the extra annotations that it read. (But, bracketsOpt should - // not *always* be allowed to push back extra annotations that it finds - // -- in most contexts, any such extra annotation is an error. - // Another similar case occurs with arrays and receiver annotations: - // String b() @Array [] @Receiver { } - // String b() @Receiver { } - // - // The following two variables permit type annotations that have - // already been read to be stored for later use. Alternate - // implementations are possible but would cause much larger changes to - // the parser. - /** Type annotations that have already been read but have not yet been used. **/ - private List typeAnnotationsPushedBack = null; - /** - * If the parser notices extra annotations, then it either immediately - * issues an error (if this variable is false) or places the extra - * annotations in variable typeAnnotationsPushedBack (if this variable - * is true). - */ - private boolean permitTypeAnnotationsPushBack = false; - /** Construct a parser from a given scanner, tree factory and log. */ protected JavacParser(ParserFactory fac, @@ -134,19 +98,13 @@ public class JavacParser implements Parser { this.allowTWR = source.allowTryWithResources(); this.allowDiamond = source.allowDiamond(); this.allowMulticatch = source.allowMulticatch(); - this.allowTypeAnnotations = source.allowTypeAnnotations(); this.keepDocComments = keepDocComments; if (keepDocComments) docComments = new HashMap(); this.keepLineMap = keepLineMap; this.errorTree = F.Erroneous(); - this.debugJSR308 = fac.options.get("TA:parser") != null; } - /** Switch: debug output for type-annotations operations - */ - boolean debugJSR308; - /** Switch: Should generics be recognized? */ boolean allowGenerics; @@ -183,10 +141,6 @@ public class JavacParser implements Parser { */ boolean allowAnnotations; - /** Switch: should we recognize type annotations? - */ - boolean allowTypeAnnotations; - /** Switch: should we recognize automatic resource management? */ boolean allowTWR; @@ -620,33 +574,7 @@ public class JavacParser implements Parser { return term(EXPR); } - /** - * parses (optional) type annotations followed by a type. If the - * annotations are present before the type and are not consumed during array - * parsing, this method returns a {@link JCAnnotatedType} consisting of - * these annotations and the underlying type. Otherwise, it returns the - * underlying type. - * - *

    - * - * Note that this method sets {@code mode} to {@code TYPE} first, before - * parsing annotations. - */ public JCExpression parseType() { - List annotations = typeAnnotationsOpt(); - return parseType(annotations); - } - - public JCExpression parseType(List annotations) { - JCExpression result = unannotatedType(); - - if (!annotations.isEmpty()) - result = F.AnnotatedType(annotations, result); - - return result; - } - - public JCExpression unannotatedType() { return term(TYPE); } @@ -895,8 +823,8 @@ public class JavacParser implements Parser { * | [TypeArguments] THIS [Arguments] * | [TypeArguments] SUPER SuperSuffix * | NEW [TypeArguments] Creator - * | [Annotations] Ident { "." Ident } - * [ [Annotations] "[" ( "]" BracketsOpt "." CLASS | Expression "]" ) + * | Ident { "." Ident } + * [ "[" ( "]" BracketsOpt "." CLASS | Expression "]" ) * | Arguments * | "." ( CLASS | THIS | [TypeArguments] SUPER Arguments | NEW [TypeArguments] InnerCreator ) * ] @@ -1047,62 +975,23 @@ public class JavacParser implements Parser { typeArgs = null; } else return illegal(); break; - case MONKEYS_AT: - - // only annotated targetting class literals or cast types are valid - List typeAnnos = typeAnnotationsOpt(); - if (typeAnnos.isEmpty()) { - // else there would be no '@' - throw new AssertionError("type annos is empty"); - } - - JCExpression expr = term3(); - - // Type annotations: If term3 just parsed a non-type, expect a - // class literal (and issue a syntax error if there is no class - // literal). Otherwise, create a JCAnnotatedType. - if ((mode & TYPE) == 0) { - if (expr.getTag() != JCTree.SELECT) - return illegal(typeAnnos.head.pos); - JCFieldAccess sel = (JCFieldAccess)expr; - if (sel.name != names._class) - return illegal(); - else { - sel.selected = F.AnnotatedType(typeAnnos, sel.selected); - t = expr; - } - } else { - // type annotation targeting a cast - t = toP(F.at(S.pos()).AnnotatedType(typeAnnos, expr)); - } - break; case IDENTIFIER: case ASSERT: case ENUM: if (typeArgs != null) return illegal(); t = toP(F.at(S.pos()).Ident(ident())); loop: while (true) { pos = S.pos(); - final List annos = typeAnnotationsOpt(); - - // need to report an error later if LBRACKET is for array - // index access rather than array creation level - if (!annos.isEmpty() && S.token() != LBRACKET && S.token() != ELLIPSIS) - return illegal(annos.head.pos); switch (S.token()) { case LBRACKET: S.nextToken(); - if (S.token() == RBRACKET) { - S.nextToken(); - - t = bracketsOpt(t, annos); + t = bracketsOpt(t); t = toP(F.at(pos).TypeArray(t)); t = bracketsSuffix(t); } else { if ((mode & EXPR) != 0) { mode = EXPR; JCExpression t1 = term(); - if (!annos.isEmpty()) t = illegal(annos.head.pos); t = to(F.at(pos).Indexed(t, t1)); } accept(RBRACKET); @@ -1155,14 +1044,6 @@ public class JavacParser implements Parser { // typeArgs saved for next loop iteration. t = toP(F.at(pos).Select(t, ident())); break; - case ELLIPSIS: - if (this.permitTypeAnnotationsPushBack) { - this.typeAnnotationsPushedBack = annos; - } else if (annos.nonEmpty()) { - // Don't return here -- error recovery attempt - illegal(annos.head.pos); - } - break loop; default: break loop; } @@ -1201,18 +1082,14 @@ public class JavacParser implements Parser { if (typeArgs != null) illegal(); while (true) { int pos1 = S.pos(); - - final List annos = typeAnnotationsOpt(); - if (S.token() == LBRACKET) { S.nextToken(); - if ((mode & TYPE) != 0) { int oldmode = mode; mode = TYPE; if (S.token() == RBRACKET) { S.nextToken(); - t = bracketsOpt(t, annos); + t = bracketsOpt(t); t = toP(F.at(pos1).TypeArray(t)); return t; } @@ -1247,12 +1124,6 @@ public class JavacParser implements Parser { typeArgs = null; } } else { - if (!annos.isEmpty()) { - if (permitTypeAnnotationsPushBack) - typeAnnotationsPushedBack = annos; - else - return illegal(annos.head.pos); - } break; } } @@ -1262,7 +1133,6 @@ public class JavacParser implements Parser { S.token() == PLUSPLUS ? JCTree.POSTINC : JCTree.POSTDEC, t)); S.nextToken(); } - return toP(t); } @@ -1400,26 +1270,24 @@ public class JavacParser implements Parser { } /** TypeArgument = Type - * | [Annotations] "?" - * | [Annotations] "?" EXTENDS Type {"&" Type} - * | [Annotations] "?" SUPER Type + * | "?" + * | "?" EXTENDS Type {"&" Type} + * | "?" SUPER Type */ JCExpression typeArgument() { - List annotations = typeAnnotationsOpt(); - if (S.token() != QUES) return parseType(annotations); + if (S.token() != QUES) return parseType(); int pos = S.pos(); S.nextToken(); - JCExpression result; if (S.token() == EXTENDS) { TypeBoundKind t = to(F.at(pos).TypeBoundKind(BoundKind.EXTENDS)); S.nextToken(); JCExpression bound = parseType(); - result = F.at(pos).Wildcard(t, bound); + return F.at(pos).Wildcard(t, bound); } else if (S.token() == SUPER) { TypeBoundKind t = to(F.at(pos).TypeBoundKind(BoundKind.SUPER)); S.nextToken(); JCExpression bound = parseType(); - result = F.at(pos).Wildcard(t, bound); + return F.at(pos).Wildcard(t, bound); } else if (S.token() == IDENTIFIER) { //error recovery reportSyntaxError(S.prevEndPos(), "expected3", @@ -1427,14 +1295,11 @@ public class JavacParser implements Parser { TypeBoundKind t = F.at(Position.NOPOS).TypeBoundKind(BoundKind.UNBOUND); JCExpression wc = toP(F.at(pos).Wildcard(t, null)); JCIdent id = toP(F.at(S.pos()).Ident(ident())); - result = F.at(pos).Erroneous(List.of(wc, id)); + return F.at(pos).Erroneous(List.of(wc, id)); } else { TypeBoundKind t = toP(F.at(pos).TypeBoundKind(BoundKind.UNBOUND)); - result = toP(F.at(pos).Wildcard(t, null)); + return toP(F.at(pos).Wildcard(t, null)); } - if (!annotations.isEmpty()) - result = toP(F.at(annotations.head.pos).AnnotatedType(annotations,result)); - return result; } JCTypeApply typeArguments(JCExpression t) { @@ -1443,47 +1308,21 @@ public class JavacParser implements Parser { return toP(F.at(pos).TypeApply(t, args)); } - /** - * BracketsOpt = { [Annotations] "[" "]" } - * - *

    - * - * annotations is the list of annotations targeting - * the expression t. + /** BracketsOpt = {"[" "]"} */ - private JCExpression bracketsOpt(JCExpression t, - List annotations) { - List nextLevelAnnotations = typeAnnotationsOpt(); - + private JCExpression bracketsOpt(JCExpression t) { if (S.token() == LBRACKET) { int pos = S.pos(); S.nextToken(); - - JCExpression orig = t; - t = bracketsOptCont(t, pos, nextLevelAnnotations); - } else if (!nextLevelAnnotations.isEmpty()) { - if (permitTypeAnnotationsPushBack) { - this.typeAnnotationsPushedBack = nextLevelAnnotations; - } else - return illegal(nextLevelAnnotations.head.pos); + t = bracketsOptCont(t, pos); + F.at(pos); } - - int apos = S.pos(); - if (!annotations.isEmpty()) - t = F.at(apos).AnnotatedType(annotations, t); return t; } - /** BracketsOpt = {"[" TypeAnnotations "]"} - */ - private JCExpression bracketsOpt(JCExpression t) { - return bracketsOpt(t, List.nil()); - } - - private JCArrayTypeTree bracketsOptCont(JCExpression t, int pos, - List annotations) { + private JCArrayTypeTree bracketsOptCont(JCExpression t, int pos) { accept(RBRACKET); - t = bracketsOpt(t, annotations); + t = bracketsOpt(t); return toP(F.at(pos).TypeArray(t)); } @@ -1517,29 +1356,18 @@ public class JavacParser implements Parser { return t; } - /** Creator = [Annotations] Qualident [TypeArguments] ( ArrayCreatorRest | ClassCreatorRest ) + /** Creator = Qualident [TypeArguments] ( ArrayCreatorRest | ClassCreatorRest ) */ JCExpression creator(int newpos, List typeArgs) { - - List newAnnotations = typeAnnotationsOpt(); - switch (S.token()) { case BYTE: case SHORT: case CHAR: case INT: case LONG: case FLOAT: case DOUBLE: case BOOLEAN: - if (typeArgs == null) { - if (newAnnotations.isEmpty()) - return arrayCreatorRest(newpos, basicType()); - else - return arrayCreatorRest(newpos, F.AnnotatedType(newAnnotations, basicType())); - } + if (typeArgs == null) + return arrayCreatorRest(newpos, basicType()); break; default: } JCExpression t = qualident(); - // handle type annotations for non primitive arrays - if (!newAnnotations.isEmpty()) - t = F.AnnotatedType(newAnnotations, t); - int oldmode = mode; mode = TYPE | DIAMOND; if (S.token() == LT) { @@ -1556,7 +1384,7 @@ public class JavacParser implements Parser { } } mode = oldmode; - if (S.token() == LBRACKET || S.token() == MONKEYS_AT) { + if (S.token() == LBRACKET) { JCExpression e = arrayCreatorRest(newpos, t); if (typeArgs != null) { int pos = newpos; @@ -1572,15 +1400,7 @@ public class JavacParser implements Parser { } return e; } else if (S.token() == LPAREN) { - JCNewClass newClass = classCreatorRest(newpos, null, typeArgs, t); - if (newClass.def != null) { - assert newClass.def.mods.annotations.isEmpty(); - if (newAnnotations.nonEmpty()) { - newClass.def.mods.pos = earlier(newClass.def.mods.pos, newAnnotations.head.pos); - newClass.def.mods.annotations = List.convert(JCAnnotation.class, newAnnotations); - } - } - return newClass; + return classCreatorRest(newpos, null, typeArgs, t); } else { reportSyntaxError(S.pos(), "expected2", LPAREN, LBRACKET); @@ -1603,67 +1423,34 @@ public class JavacParser implements Parser { return classCreatorRest(newpos, encl, typeArgs, t); } - /** ArrayCreatorRest = [Annotations] "[" ( "]" BracketsOpt ArrayInitializer - * | Expression "]" {[Annotations] "[" Expression "]"} BracketsOpt ) + /** ArrayCreatorRest = "[" ( "]" BracketsOpt ArrayInitializer + * | Expression "]" {"[" Expression "]"} BracketsOpt ) */ JCExpression arrayCreatorRest(int newpos, JCExpression elemtype) { - - List topAnnos = List.nil(); - if (elemtype.getTag() == JCTree.ANNOTATED_TYPE) { - JCAnnotatedType atype = (JCAnnotatedType) elemtype; - topAnnos = atype.annotations; - elemtype = atype.underlyingType; - } - - List annos = typeAnnotationsOpt(); - accept(LBRACKET); - if (S.token() == RBRACKET) { accept(RBRACKET); - - elemtype = bracketsOpt(elemtype, annos); - + elemtype = bracketsOpt(elemtype); if (S.token() == LBRACE) { - JCNewArray na = (JCNewArray)arrayInitializer(newpos, elemtype); - - na.annotations = topAnnos; - - return na; + return arrayInitializer(newpos, elemtype); } else { return syntaxError(S.pos(), "array.dimension.missing"); } } else { ListBuffer dims = new ListBuffer(); - - // maintain array dimension type annotations - ListBuffer> dimAnnotations = ListBuffer.lb(); - dimAnnotations.append(annos); - dims.append(parseExpression()); accept(RBRACKET); - while (S.token() == LBRACKET - || (S.token() == MONKEYS_AT)) { - List maybeDimAnnos = typeAnnotationsOpt(); + while (S.token() == LBRACKET) { int pos = S.pos(); S.nextToken(); if (S.token() == RBRACKET) { - elemtype = bracketsOptCont(elemtype, pos, maybeDimAnnos); + elemtype = bracketsOptCont(elemtype, pos); } else { - if (S.token() == RBRACKET) { // no dimension - elemtype = bracketsOptCont(elemtype, pos, maybeDimAnnos); - } else { - dimAnnotations.append(maybeDimAnnos); - dims.append(parseExpression()); - accept(RBRACKET); - } + dims.append(parseExpression()); + accept(RBRACKET); } } - - JCNewArray na = toP(F.at(newpos).NewArray(elemtype, dims.toList(), null)); - na.annotations = topAnnos; - na.dimAnnotations = dimAnnotations.toList(); - return na; + return toP(F.at(newpos).NewArray(elemtype, dims.toList(), null)); } } @@ -2142,32 +1929,17 @@ public class JavacParser implements Parser { new ListBuffer()).toList(); } - enum AnnotationKind { DEFAULT_ANNO, TYPE_ANNO }; - /** AnnotationsOpt = { '@' Annotation } */ - List annotationsOpt(AnnotationKind kind) { + List annotationsOpt() { if (S.token() != MONKEYS_AT) return List.nil(); // optimization ListBuffer buf = new ListBuffer(); - int prevmode = mode; while (S.token() == MONKEYS_AT) { int pos = S.pos(); S.nextToken(); - buf.append(annotation(pos, kind)); + buf.append(annotation(pos)); } - lastmode = mode; - mode = prevmode; - List annotations = buf.toList(); - - if (debugJSR308 && kind == AnnotationKind.TYPE_ANNO) - System.out.println("TA: parsing " + annotations - + " in " + log.currentSourceFile()); - return annotations; - } - - List typeAnnotationsOpt() { - List annotations = annotationsOpt(AnnotationKind.TYPE_ANNO); - return List.convert(JCTypeAnnotation.class, annotations); + return buf.toList(); } /** ModifiersOpt = { Modifier } @@ -2219,7 +1991,7 @@ public class JavacParser implements Parser { if (flag == Flags.ANNOTATION) { checkAnnotations(); if (S.token() != INTERFACE) { - JCAnnotation ann = annotation(lastPos, AnnotationKind.DEFAULT_ANNO); + JCAnnotation ann = annotation(lastPos); // if first modifier is an annotation, set pos to annotation's. if (flags == 0 && annotations.isEmpty()) pos = ann.pos; @@ -2250,18 +2022,12 @@ public class JavacParser implements Parser { /** Annotation = "@" Qualident [ "(" AnnotationFieldValues ")" ] * @param pos position of "@" token */ - JCAnnotation annotation(int pos, AnnotationKind kind) { + JCAnnotation annotation(int pos) { // accept(AT); // AT consumed by caller checkAnnotations(); - if (kind == AnnotationKind.TYPE_ANNO) - checkTypeAnnotations(); JCTree ident = qualident(); List fieldValues = annotationFieldValuesOpt(); - JCAnnotation ann; - if (kind == AnnotationKind.DEFAULT_ANNO) - ann = F.at(pos).Annotation(ident, fieldValues); - else - ann = F.at(pos).TypeAnnotation(ident, fieldValues); + JCAnnotation ann = F.at(pos).Annotation(ident, fieldValues); storeEnd(ann, S.prevEndPos()); return ann; } @@ -2314,7 +2080,7 @@ public class JavacParser implements Parser { case MONKEYS_AT: pos = S.pos(); S.nextToken(); - return annotation(pos, AnnotationKind.DEFAULT_ANNO); + return annotation(pos); case LBRACE: pos = S.pos(); accept(LBRACE); @@ -2705,7 +2471,7 @@ public class JavacParser implements Parser { S.resetDeprecatedFlag(); } int pos = S.pos(); - List annotations = annotationsOpt(AnnotationKind.DEFAULT_ANNO); + List annotations = annotationsOpt(); JCModifiers mods = F.at(annotations.isEmpty() ? Position.NOPOS : pos).Modifiers(flags, annotations); List typeArgs = typeArgumentsOpt(); int identPos = S.pos(); @@ -2802,25 +2568,15 @@ public class JavacParser implements Parser { } else { pos = S.pos(); List typarams = typeParametersOpt(); - List annosAfterParams = annotationsOpt(AnnotationKind.DEFAULT_ANNO); - Name name = S.name(); pos = S.pos(); JCExpression type; boolean isVoid = S.token() == VOID; if (isVoid) { - if (annosAfterParams.nonEmpty()) - illegal(annosAfterParams.head.pos); type = to(F.at(pos).TypeIdent(TypeTags.VOID)); S.nextToken(); } else { - if (annosAfterParams.nonEmpty()) { - mods.annotations = mods.annotations.appendList(annosAfterParams); - if (mods.pos == Position.NOPOS) - mods.pos = mods.annotations.head.pos; - } - // method returns types are un-annotated types - type = unannotatedType(); + type = parseType(); } if (S.token() == LPAREN && !isInterface && type.getTag() == JCTree.IDENT) { if (isInterface || name != className) @@ -2856,15 +2612,15 @@ public class JavacParser implements Parser { } /** MethodDeclaratorRest = - * FormalParameters BracketsOpt [Annotations] [Throws TypeList] ( MethodBody | [DEFAULT AnnotationValue] ";") + * FormalParameters BracketsOpt [Throws TypeList] ( MethodBody | [DEFAULT AnnotationValue] ";") * VoidMethodDeclaratorRest = - * FormalParameters [Annotations] [Throws TypeList] ( MethodBody | ";") + * FormalParameters [Throws TypeList] ( MethodBody | ";") * InterfaceMethodDeclaratorRest = - * FormalParameters BracketsOpt [Annotations] [THROWS TypeList] ";" + * FormalParameters BracketsOpt [THROWS TypeList] ";" * VoidInterfaceMethodDeclaratorRest = - * FormalParameters [Annotations] [THROWS TypeList] ";" + * FormalParameters [THROWS TypeList] ";" * ConstructorDeclaratorRest = - * "(" FormalParameterListOpt ")" [Annotations] [THROWS TypeList] MethodBody + * "(" FormalParameterListOpt ")" [THROWS TypeList] MethodBody */ JCTree methodDeclaratorRest(int pos, JCModifiers mods, @@ -2874,22 +2630,7 @@ public class JavacParser implements Parser { boolean isInterface, boolean isVoid, String dc) { List params = formalParameters(); - - List receiverAnnotations; - if (!isVoid) { - // need to distinguish between receiver anno and array anno - // look at typeAnnotationsPushedBack comment - this.permitTypeAnnotationsPushBack = true; - type = methodReturnArrayRest(type); - this.permitTypeAnnotationsPushBack = false; - if (typeAnnotationsPushedBack == null) - receiverAnnotations = List.nil(); - else - receiverAnnotations = typeAnnotationsPushedBack; - typeAnnotationsPushedBack = null; - } else - receiverAnnotations = typeAnnotationsOpt(); - + if (!isVoid) type = bracketsOpt(type); List thrown = List.nil(); if (S.token() == THROWS) { S.nextToken(); @@ -2919,51 +2660,20 @@ public class JavacParser implements Parser { JCMethodDecl result = toP(F.at(pos).MethodDef(mods, name, type, typarams, - params, receiverAnnotations, thrown, + params, thrown, body, defaultValue)); attach(result, dc); return result; } - /** Parses the array levels after the format parameters list, and append - * them to the return type, while preseving the order of type annotations - */ - private JCExpression methodReturnArrayRest(JCExpression type) { - if (type.getTag() != JCTree.TYPEARRAY) - return bracketsOpt(type); - - JCArrayTypeTree baseArray = (JCArrayTypeTree)type; - while (TreeInfo.typeIn(baseArray.elemtype) instanceof JCArrayTypeTree) - baseArray = (JCArrayTypeTree)TreeInfo.typeIn(baseArray.elemtype); - - if (baseArray.elemtype.getTag() == JCTree.ANNOTATED_TYPE) { - JCAnnotatedType at = (JCAnnotatedType)baseArray.elemtype; - at.underlyingType = bracketsOpt(at.underlyingType); - } else { - baseArray.elemtype = bracketsOpt(baseArray.elemtype); - } - - return type; - } - - /** QualidentList = [Annotations] Qualident {"," [Annotations] Qualident} + /** QualidentList = Qualident {"," Qualident} */ List qualidentList() { ListBuffer ts = new ListBuffer(); - - List typeAnnos = typeAnnotationsOpt(); - if (!typeAnnos.isEmpty()) - ts.append(F.AnnotatedType(typeAnnos, qualident())); - else - ts.append(qualident()); + ts.append(qualident()); while (S.token() == COMMA) { S.nextToken(); - - typeAnnos = typeAnnotationsOpt(); - if (!typeAnnos.isEmpty()) - ts.append(F.AnnotatedType(typeAnnos, qualident())); - else - ts.append(qualident()); + ts.append(qualident()); } return ts.toList(); } @@ -2987,13 +2697,12 @@ public class JavacParser implements Parser { } } - /** TypeParameter = [Annotations] TypeVariable [TypeParameterBound] + /** TypeParameter = TypeVariable [TypeParameterBound] * TypeParameterBound = EXTENDS Type {"&" Type} * TypeVariable = Ident */ JCTypeParameter typeParameter() { int pos = S.pos(); - List annos = typeAnnotationsOpt(); Name name = ident(); ListBuffer bounds = new ListBuffer(); if (S.token() == EXTENDS) { @@ -3004,7 +2713,7 @@ public class JavacParser implements Parser { bounds.append(parseType()); } } - return toP(F.at(pos).TypeParameter(name, bounds.toList(), annos)); + return toP(F.at(pos).TypeParameter(name, bounds.toList())); } /** FormalParameters = "(" [ FormalParameterList ] ")" @@ -3038,31 +2747,12 @@ public class JavacParser implements Parser { */ JCVariableDecl formalParameter() { JCModifiers mods = optFinal(Flags.PARAMETER); - // need to distinguish between vararg annos and array annos - // look at typeAnnotaitonsPushedBack comment - this.permitTypeAnnotationsPushBack = true; JCExpression type = parseType(); - this.permitTypeAnnotationsPushBack = false; - if (S.token() == ELLIPSIS) { - List varargsAnnos = typeAnnotationsPushedBack; - typeAnnotationsPushedBack = null; checkVarargs(); mods.flags |= Flags.VARARGS; - // insert var arg type annotations - if (varargsAnnos != null && varargsAnnos.nonEmpty()) - type = F.at(S.pos()).AnnotatedType(varargsAnnos, type); type = to(F.at(S.pos()).TypeArray(type)); - S.nextToken(); - } else { - // if not a var arg, then typeAnnotationsPushedBack should be null - if (typeAnnotationsPushedBack != null - && !typeAnnotationsPushedBack.isEmpty()) { - reportSyntaxError(typeAnnotationsPushedBack.head.pos, - "illegal.start.of.type"); - } - typeAnnotationsPushedBack = null; } return variableDeclaratorId(mods, type); } @@ -3259,12 +2949,6 @@ public class JavacParser implements Parser { allowAnnotations = true; } } - void checkTypeAnnotations() { - if (!allowTypeAnnotations) { - log.error(S.pos(), "type.annotations.not.supported.in.source", source.name); - allowTypeAnnotations = true; - } - } void checkDiamond() { if (!allowDiamond) { log.error(S.pos(), "diamond.not.supported.in.source", source.name); diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java index 7b7f362413b..20d6fad6718 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java +++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java @@ -49,11 +49,11 @@ import javax.tools.StandardJavaFileManager; import javax.tools.JavaFileObject; import javax.tools.DiagnosticListener; -import com.sun.tools.javac.api.JavacTrees; -import com.sun.source.util.AbstractTypeProcessor; +//308 import com.sun.source.util.AbstractTypeProcessor; import com.sun.source.util.TaskEvent; import com.sun.source.util.TaskListener; import com.sun.tools.javac.api.JavacTaskImpl; +import com.sun.tools.javac.api.JavacTrees; import com.sun.tools.javac.code.*; import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.file.JavacFileManager; @@ -712,7 +712,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea } if (matchedNames.size() > 0 || ps.contributed) { - foundTypeProcessors = foundTypeProcessors || (ps.processor instanceof AbstractTypeProcessor); +//308 foundTypeProcessors = foundTypeProcessors || (ps.processor instanceof AbstractTypeProcessor); boolean processingResult = callProcessor(ps.processor, typeElements, renv); ps.contributed = true; ps.removeSupportedOptions(unmatchedProcessorOptions); diff --git a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties index 36309876dbc..7bfcc95cc86 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1299,9 +1299,9 @@ compiler.err.annotations.not.supported.in.source=\ annotations are not supported in -source {0}\n\ (use -source 5 or higher to enable annotations) -compiler.err.type.annotations.not.supported.in.source=\ - type annotations are not supported in -source {0}\n\ -(use -source 7 or higher to enable type annotations) +#308 compiler.err.type.annotations.not.supported.in.source=\ +#308 type annotations are not supported in -source {0}\n\ +#308 (use -source 7 or higher to enable type annotations) compiler.err.foreach.not.supported.in.source=\ for-each loops are not supported in -source {0}\n\ diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java index 209544d3cf1..96ef9ebfd1e 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java @@ -2067,17 +2067,23 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition { } } - public static class JCAnnotatedType extends JCExpression implements com.sun.source.tree.AnnotatedTypeTree { + public static class JCAnnotatedType extends JCExpression +//308 implements com.sun.source.tree.AnnotatedTypeTree + { public List annotations; public JCExpression underlyingType; protected JCAnnotatedType(List annotations, JCExpression underlyingType) { - this.annotations = annotations; - this.underlyingType = underlyingType; + throw new UnsupportedOperationException(); +//308 this.annotations = annotations; +//308 this.underlyingType = underlyingType; } @Override public void accept(Visitor v) { v.visitAnnotatedType(this); } - public Kind getKind() { return Kind.ANNOTATED_TYPE; } + public Kind getKind() { + throw new UnsupportedOperationException(); +//308 return Kind.ANNOTATED_TYPE; + } public List getAnnotations() { return annotations; } @@ -2086,7 +2092,8 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition { } @Override public R accept(TreeVisitor v, D d) { - return v.visitAnnotatedType(this, d); + throw new UnsupportedOperationException(); +//308 return v.visitAnnotatedType(this, d); } @Override public int getTag() { diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java index 6abbfdbec9c..63b9ae06130 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java @@ -71,12 +71,12 @@ public class TreeCopier

    implements TreeVisitor { return lb.toList(); } - public JCTree visitAnnotatedType(AnnotatedTypeTree node, P p) { - JCAnnotatedType t = (JCAnnotatedType) node; - List annotations = copy(t.annotations, p); - JCExpression underlyingType = copy(t.underlyingType, p); - return M.at(t.pos).AnnotatedType(annotations, underlyingType); - } +//308 public JCTree visitAnnotatedType(AnnotatedTypeTree node, P p) { +//308 JCAnnotatedType t = (JCAnnotatedType) node; +//308 List annotations = copy(t.annotations, p); +//308 JCExpression underlyingType = copy(t.underlyingType, p); +//308 return M.at(t.pos).AnnotatedType(annotations, underlyingType); +//308 } public JCTree visitAnnotation(AnnotationTree node, P p) { JCAnnotation t = (JCAnnotation) node; diff --git a/langtools/test/tools/javac/T6985181.java b/langtools/test/tools/javac/T6985181.java deleted file mode 100644 index fd588d1d71f..00000000000 --- a/langtools/test/tools/javac/T6985181.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6985181 - * @summary Annotations lost from classfile - */ - -import java.io.*; -import java.util.*; - -public class T6985181 { - public static void main(String... args) throws Exception{ - new T6985181().run(); - } - - public void run() throws Exception { - String code = "@interface Simple { }\ninterface Test<@Simple T> { }"; - - File srcFile = writeFile("Test.java", code); - File classesDir = new File("classes"); - classesDir.mkdirs(); - compile("-d", classesDir.getPath(), srcFile.getPath()); - String out = javap(new File(classesDir, srcFile.getName().replace(".java", ".class"))); - if (!out.contains("RuntimeInvisibleTypeAnnotations")) - throw new Exception("RuntimeInvisibleTypeAnnotations not found"); - } - - void compile(String... args) throws Exception { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - int rc = com.sun.tools.javac.Main.compile(args, pw); - pw.close(); - String out = sw.toString(); - if (out.length() > 0) - System.err.println(out); - if (rc != 0) - throw new Exception("Compilation failed: rc=" + rc); - } - - String javap(File classFile) throws Exception { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - String[] args = { "-v", classFile.getPath() }; - int rc = com.sun.tools.javap.Main.run(args, pw); - pw.close(); - String out = sw.toString(); - if (out.length() > 0) - System.err.println(out); - if (rc != 0) - throw new Exception("javap failed: rc=" + rc); - return out; - } - - File writeFile(String path, String body) throws IOException { - File f = new File(path); - FileWriter out = new FileWriter(f); - try { - out.write(body); - } finally { - out.close(); - } - return f; - } -} diff --git a/langtools/test/tools/javac/annotations/6881115/T6881115.java b/langtools/test/tools/javac/annotations/6881115/T6881115.java index a0b9960c2fe..2f779c4ac46 100644 --- a/langtools/test/tools/javac/annotations/6881115/T6881115.java +++ b/langtools/test/tools/javac/annotations/6881115/T6881115.java @@ -16,5 +16,5 @@ } @A(b = @B(b2 = 1, b2 = 2), b_arr = {@B(), @B(b2 = 1, b2 = 2)}) -class T6881115<@A(b = @B(b2 = 1, b2 = 2), - b_arr = {@B(), @B(b2 = 1, b2 = 2)}) X> {} +class T6881115 {} diff --git a/langtools/test/tools/javac/annotations/6881115/T6881115.out b/langtools/test/tools/javac/annotations/6881115/T6881115.out index 4cece230577..93b90cff473 100644 --- a/langtools/test/tools/javac/annotations/6881115/T6881115.out +++ b/langtools/test/tools/javac/annotations/6881115/T6881115.out @@ -8,9 +8,4 @@ T6881115.java:17:8: compiler.err.annotation.missing.default.value: B, b1 T6881115.java:18:13: compiler.err.annotation.missing.default.value.1: B, b1,b2 T6881115.java:18:30: compiler.err.duplicate.annotation.member.value: b2, B T6881115.java:18:19: compiler.err.annotation.missing.default.value: B, b1 -T6881115.java:19:34: compiler.err.duplicate.annotation.member.value: b2, B -T6881115.java:19:23: compiler.err.annotation.missing.default.value: B, b1 -T6881115.java:20:28: compiler.err.annotation.missing.default.value.1: B, b1,b2 -T6881115.java:20:45: compiler.err.duplicate.annotation.member.value: b2, B -T6881115.java:20:34: compiler.err.annotation.missing.default.value: B, b1 -15 errors +10 errors diff --git a/langtools/test/tools/javac/diags/examples/TypeAnnotationsNotSupported.java b/langtools/test/tools/javac/diags/examples/TypeAnnotationsNotSupported.java deleted file mode 100644 index 8f028cbd1de..00000000000 --- a/langtools/test/tools/javac/diags/examples/TypeAnnotationsNotSupported.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -// key: compiler.err.type.annotations.not.supported.in.source -// options: -source 6 - -@interface Anno { } - -class TypeAnnotationsNotSupported { - void m() { - int i = (@Anno int) 3.14; - } -} diff --git a/langtools/test/tools/javac/processing/model/element/TestAnonClassNames.java b/langtools/test/tools/javac/processing/model/element/TestAnonClassNames.java index f5bddff0a45..d602bc08ead 100644 --- a/langtools/test/tools/javac/processing/model/element/TestAnonClassNames.java +++ b/langtools/test/tools/javac/processing/model/element/TestAnonClassNames.java @@ -78,7 +78,7 @@ public class TestAnonClassNames { @Nesting(LOCAL) class LocalClass{}; - Object o = new @Nesting(ANONYMOUS) Object() { // An anonymous annotated class + Object o = new /*@Nesting(ANONYMOUS)*/ Object() { // An anonymous annotated class public String toString() { return "I have no name!"; } @@ -95,9 +95,10 @@ public class TestAnonClassNames { for(Class clazz : classes) { String name = clazz.getName(); + Nesting anno = clazz.getAnnotation(Nesting.class); System.out.format("%s is %s%n", clazz.getName(), - clazz.getAnnotation(Nesting.class).value()); + anno == null ? "(unset/ANONYMOUS)" : anno.value()); testClassName(name); } } @@ -161,8 +162,8 @@ class ClassNameProber extends JavacTestingAbstractProcessor { typeElt.getQualifiedName().toString(), typeElt.getKind().toString(), nestingKind.toString()); - - if (typeElt.getAnnotation(Nesting.class).value() != nestingKind) { + Nesting anno = typeElt.getAnnotation(Nesting.class); + if ((anno == null ? NestingKind.ANONYMOUS : anno.value()) != nestingKind) { throw new RuntimeException("Mismatch of expected and reported nesting kind."); } } diff --git a/langtools/test/tools/javac/tree/TreePosTest.java b/langtools/test/tools/javac/tree/TreePosTest.java index b83c4c68250..9f586185334 100644 --- a/langtools/test/tools/javac/tree/TreePosTest.java +++ b/langtools/test/tools/javac/tree/TreePosTest.java @@ -357,7 +357,9 @@ public class TreePosTest { check("encl.start <= start", encl, self, encl.start <= self.start); check("start <= pos", encl, self, self.start <= self.pos); if (!(self.tag == JCTree.TYPEARRAY - && (encl.tag == JCTree.VARDEF || encl.tag == JCTree.TYPEARRAY))) { + && (encl.tag == JCTree.VARDEF || + encl.tag == JCTree.METHODDEF || + encl.tag == JCTree.TYPEARRAY))) { check("encl.pos <= start || end <= encl.pos", encl, self, encl.pos <= self.start || self.end <= encl.pos); } diff --git a/langtools/test/tools/javac/treeannotests/AnnoTreeTests.java b/langtools/test/tools/javac/treeannotests/AnnoTreeTests.java deleted file mode 100644 index fcfb4e55d56..00000000000 --- a/langtools/test/tools/javac/treeannotests/AnnoTreeTests.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @build DA TA Test TestProcessor - * @compile -proc:only -processor TestProcessor AnnoTreeTests.java - */ - -@Test(6) -class AnnoTreeTests { - // primitive types - @DA("int") int i1; - int i2 = (@TA("int") int) 0; - - // simple array types - @DA("int[]") int[] a1; - int @TA("int") [] a2; - int[] a3 = (@TA("int[]") int[]) a1; - int[] a4 = (int @TA("int") []) a1; - - // multi-dimensional array types - // (still to come) -} diff --git a/langtools/test/tools/javac/typeAnnotations/6967002/T6967002.java b/langtools/test/tools/javac/typeAnnotations/6967002/T6967002.java deleted file mode 100644 index 317cf34199e..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/6967002/T6967002.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6967002 - * @summary JDK7 b99 javac compilation error (java.lang.AssertionError) - * @author Maurizio Cimadamore - * @compile/fail/ref=T6967002.out -XDrawDiagnostics T6967002.java - */ -class Test { - private static void m(byte[] octets) { - return m(octets..., ?); - } -} diff --git a/langtools/test/tools/javac/typeAnnotations/6967002/T6967002.out b/langtools/test/tools/javac/typeAnnotations/6967002/T6967002.out deleted file mode 100644 index 18b75307f04..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/6967002/T6967002.out +++ /dev/null @@ -1,8 +0,0 @@ -T6967002.java:33:22: compiler.err.expected: ')' -T6967002.java:33:25: compiler.err.illegal.start.of.expr -T6967002.java:33:28: compiler.err.illegal.start.of.expr -T6967002.java:33:29: compiler.err.illegal.start.of.expr -T6967002.java:33:27: compiler.err.not.stmt -T6967002.java:33:30: compiler.err.expected: ';' -T6967002.java:35:2: compiler.err.premature.eof -7 errors diff --git a/langtools/test/tools/javac/typeAnnotations/InnerClass.java b/langtools/test/tools/javac/typeAnnotations/InnerClass.java deleted file mode 100644 index e373eae58f4..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/InnerClass.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary compiler crashes when visiting inner classes - * @author Mahmood Ali - * @compile -source 1.7 InnerClass.java - */ - -class InnerClass { - - InnerClass() {} - InnerClass(Object o) {} - - private void a() { - new Object() { - public void method() { } - }; - } - - Object f1 = new InnerClass() { - void method() { } - }; - - Object f2 = new InnerClass() { - <@A R> void method() { } - }; - - Object f3 = new InnerClass(null) { - void method() { } - }; - - Object f4 = new InnerClass(null) { - <@A R> void method() { } - }; - @interface A { } -} diff --git a/langtools/test/tools/javac/typeAnnotations/MultipleTargets.java b/langtools/test/tools/javac/typeAnnotations/MultipleTargets.java deleted file mode 100644 index c0982c10bd6..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/MultipleTargets.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary check that type annotations may appear on void method if it is a - * method annotation too. - * @author Mahmood Ali - * @compile -source 1.7 MultipleTargets.java - */ - -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -class TypeUseTarget { - @A void voidMethod() { } -} - -@Target({ElementType.TYPE_USE, ElementType.METHOD}) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/TypeParameterTarget.java b/langtools/test/tools/javac/typeAnnotations/TypeParameterTarget.java deleted file mode 100644 index e1de7a1f006..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/TypeParameterTarget.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary check that type annotations may appear on all type parameter - * @author Mahmood Ali - * @compile -source 1.7 TypeParameterTarget.java - */ - -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -class TypeUseTarget<@A K extends Object> { - String[] field; - - <@A K, @A V> String genericMethod(K k) { return null; } -} - -interface MyInterface { } - -@interface MyAnnotation { } - -@Target(ElementType.TYPE_PARAMETER) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/TypeUseTarget.java b/langtools/test/tools/javac/typeAnnotations/TypeUseTarget.java deleted file mode 100644 index 2b87d99fb75..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/TypeUseTarget.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary check that type annotations may appear on all type declarations - * @author Mahmood Ali - * @compile -source 1.7 TypeUseTarget.java - */ - -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -@A -class TypeUseTarget { - @A String @A [] field; - - @A String test(@A String param, @A String @A ... vararg) @A { - @A Object o = new @A String @A [3]; - TypeUseTarget<@A String> target; - return (@A String) null; - } - - @A String genericMethod(K k) { return null; } -} - -@A -interface MyInterface { } - -@A -@interface MyAnnotation { } - -@Target(ElementType.TYPE_USE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/attribution/Scopes.java b/langtools/test/tools/javac/typeAnnotations/attribution/Scopes.java deleted file mode 100644 index 5b3e56bd1f7..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/attribution/Scopes.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary test scopes of attribution - * @author Mahmood Ali - * @compile -source 1.7 Scopes.java - */ -class Scopes { - - void test() @A(VALUE) { } - void test1() @A(value=VALUE) { } - - private static final int VALUE = 1; - @interface A { int value(); } -} diff --git a/langtools/test/tools/javac/typeAnnotations/classfile/DeadCode.java b/langtools/test/tools/javac/typeAnnotations/classfile/DeadCode.java deleted file mode 100644 index d7451f425b2..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/classfile/DeadCode.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import java.net.URL; -import java.util.List; - -import com.sun.tools.classfile.*; - -/* - * @test - * @bug 6917130 - * @summary test that optimized away annotations are not emited to classfile - */ - -public class DeadCode { - public static void main(String[] args) throws Exception { - new DeadCode().run(); - } - - public void run() throws Exception { - ClassFile cf = getClassFile("DeadCode$Test.class"); - test(cf); - for (Field f : cf.fields) { - test(cf, f); - } - for (Method m: cf.methods) { - test(cf, m); - } - - countAnnotations(); - - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - ClassFile getClassFile(String name) throws IOException, ConstantPoolException { - URL url = getClass().getResource(name); - InputStream in = url.openStream(); - try { - return ClassFile.read(in); - } finally { - in.close(); - } - } - - /************ Helper annotations counting methods ******************/ - void test(ClassFile cf) { - test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Field m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, String name, boolean visible) { - int index = cf.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = cf.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Field m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - void countAnnotations() { - int expected_all = expected_visibles + expected_invisibles; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; - - /*********************** Test class *************************/ - static int expected_invisibles = 1; - static int expected_visibles = 0; - static class Test { - @interface A {} - - void test() { - List o = null; - o.toString(); - - @A String m; - if (false) { - @A String a; - @A String b = "m"; - b.toString(); - List c = null; - c.toString(); - } - } - } - -} diff --git a/langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.java b/langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.java deleted file mode 100644 index d9d74acca60..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test that only java 7 allows type annotations - * @author Mahmood Ali - * @compile/fail/ref=AnnotationVersion.out -XDrawDiagnostics -source 1.6 AnnotationVersion.java - */ -class AnnotationVersion { - public void method() @A { } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.out b/langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.out deleted file mode 100644 index 521a5eb8005..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/AnnotationVersion.out +++ /dev/null @@ -1,2 +0,0 @@ -AnnotationVersion.java:9:25: compiler.err.type.annotations.not.supported.in.source: 1.6 -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.java b/langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.java deleted file mode 100644 index 8edb60807d4..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test incomplete array declaration - * @author Mahmood Ali - * @compile/fail/ref=IncompleteArray.out -XDrawDiagnostics -source 1.7 IncompleteArray.java - */ -class IncompleteArray { - int @A [] @A var; -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.out b/langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.out deleted file mode 100644 index a03a09283ee..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteArray.out +++ /dev/null @@ -1,2 +0,0 @@ -IncompleteArray.java:9:13: compiler.err.illegal.start.of.type -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.java b/langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.java deleted file mode 100644 index b54df921ec4..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test incomplete vararg declaration - * @author Mahmood Ali - * @compile/fail/ref=IncompleteVararg.out -XDrawDiagnostics -source 1.7 IncompleteVararg.java - */ -class IncompleteArray { - // the last variable may be vararg - void method(int @A test) { } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.out b/langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.out deleted file mode 100644 index 7cec6c9ee78..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/IncompleteVararg.out +++ /dev/null @@ -1,2 +0,0 @@ -IncompleteVararg.java:10:19: compiler.err.illegal.start.of.type -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/IndexArray.java b/langtools/test/tools/javac/typeAnnotations/failures/IndexArray.java deleted file mode 100644 index 5cb324d0cdb..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/IndexArray.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test indexing of an array - * @author Mahmood Ali - * @compile/fail/ref=IndexArray.out -XDrawDiagnostics -source 1.7 IndexArray.java - */ -class IndexArray { - int[] var; - int a = var @A [1]; -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/IndexArray.out b/langtools/test/tools/javac/typeAnnotations/failures/IndexArray.out deleted file mode 100644 index 762f38b15a8..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/IndexArray.out +++ /dev/null @@ -1,2 +0,0 @@ -IndexArray.java:10:15: compiler.err.illegal.start.of.expr -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/LintCast.java b/langtools/test/tools/javac/typeAnnotations/failures/LintCast.java deleted file mode 100644 index 4830de3ebf2..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/LintCast.java +++ /dev/null @@ -1,42 +0,0 @@ -import java.util.List; - -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test that compiler doesn't warn about annotated redundant casts - * @author Mahmood Ali - * @compile/ref=LintCast.out -Xlint:cast -XDrawDiagnostics -source 1.7 LintCast.java - */ -class LintCast { - void unparameterized() { - String s = "m"; - String s1 = (String)s; - String s2 = (@A String)s; - } - - void parameterized() { - List l = null; - List l1 = (List)l; - List l2 = (List<@A String>)l; - } - - void array() { - int @A [] a = null; - int[] a1 = (int[])a; - int[] a2 = (int @A [])a; - } - - void sameAnnotations() { - @A String annotated = null; - String unannotated = null; - - // compiler ignore annotated casts even if redundant - @A String anno1 = (@A String)annotated; - - // warn if redundant without an annotation - String anno2 = (String)annotated; - String unanno2 = (String)unannotated; - } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/LintCast.out b/langtools/test/tools/javac/typeAnnotations/failures/LintCast.out deleted file mode 100644 index 67388ab2f4d..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/LintCast.out +++ /dev/null @@ -1,6 +0,0 @@ -LintCast.java:13:21: compiler.warn.redundant.cast: java.lang.String -LintCast.java:19:27: compiler.warn.redundant.cast: java.util.List -LintCast.java:25:20: compiler.warn.redundant.cast: int[] -LintCast.java:37:24: compiler.warn.redundant.cast: java.lang.String -LintCast.java:38:26: compiler.warn.redundant.cast: java.lang.String -5 warnings diff --git a/langtools/test/tools/javac/typeAnnotations/failures/OldArray.java b/langtools/test/tools/javac/typeAnnotations/failures/OldArray.java deleted file mode 100644 index 746a6d47496..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/OldArray.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary test old array syntax - * @author Mahmood Ali - * @compile/fail -XDrawDiagnostics -source 1.7 OldArray.java - */ -class OldArray { - String [@A] s() { return null; } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/Scopes.java b/langtools/test/tools/javac/typeAnnotations/failures/Scopes.java deleted file mode 100644 index 71eda33a775..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/Scopes.java +++ /dev/null @@ -1,10 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check that A is accessible in the class type parameters - * @author Mahmood Ali - * @compile/fail/ref=Scopes.out -XDrawDiagnostics -source 1.7 Scopes.java - */ -class Scopes { - @interface UniqueInner { }; -} diff --git a/langtools/test/tools/javac/typeAnnotations/failures/Scopes.out b/langtools/test/tools/javac/typeAnnotations/failures/Scopes.out deleted file mode 100644 index 3335f6ecff1..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/Scopes.out +++ /dev/null @@ -1,2 +0,0 @@ -Scopes.java:8:25: compiler.err.cant.resolve: kindname.class, UniqueInner, , -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/StaticFields.java b/langtools/test/tools/javac/typeAnnotations/failures/StaticFields.java deleted file mode 100644 index 8b96bf6c2f1..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/StaticFields.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary static field access isn't a valid location - * @author Mahmood Ali - * @compile/fail/ref=StaticFields.out -XDrawDiagnostics -source 1.7 StaticFields.java - */ -class C { - int f; - int a = @A C.f; -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/StaticFields.out b/langtools/test/tools/javac/typeAnnotations/failures/StaticFields.out deleted file mode 100644 index 3364c661fdb..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/StaticFields.out +++ /dev/null @@ -1,2 +0,0 @@ -StaticFields.java:10:17: compiler.err.illegal.start.of.expr -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.java b/langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.java deleted file mode 100644 index 045601c97a7..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary static methods don't have receivers - * @author Mahmood Ali - * @compile/fail/ref=StaticMethods.out -XDrawDiagnostics -source 1.7 StaticMethods.java - */ -class StaticMethods { - static void main() @A { } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.out b/langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.out deleted file mode 100644 index d3ec9a5538f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/StaticMethods.out +++ /dev/null @@ -1,2 +0,0 @@ -StaticMethods.java:9:22: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/VoidGenericMethod.java b/langtools/test/tools/javac/typeAnnotations/failures/VoidGenericMethod.java deleted file mode 100644 index b48c33e2e1a..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/VoidGenericMethod.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary test type annotation on void generic methods - * @author Mahmood Ali - * @compile/fail -source 1.7 VoidGenericMethod.java - */ -class VoidGenericMethod { - public @A void method() { } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.java deleted file mode 100644 index 129bf3f8f0e..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - void test() { - Object a = String @A(value = 2, value = 1) [].class; - } -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.out deleted file mode 100644 index 16493d988cc..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:10:37: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.java deleted file mode 100644 index 1b79248293e..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnnotation { - void test() { - Object a = String @A @A [].class; - } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.out deleted file mode 100644 index f9ae0eda9de..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:11:26: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.java deleted file mode 100644 index 1f7477d3945..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { - void test() { - Object a = String @A [].class; - } -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.out deleted file mode 100644 index 20d6f4835dd..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:11:23: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.java deleted file mode 100644 index 798df949c41..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - void test() { - Object a = String @A [].class; - } -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.out deleted file mode 100644 index 6b00f8c7904..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:10:23: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.java deleted file mode 100644 index 9f67df1c3fe..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - void test() { - String @A(value = 2, value = 1) [] s; - } -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.out deleted file mode 100644 index 240239e566b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:10:26: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.java deleted file mode 100644 index 79cf843d62a..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnnotation { - void test() { - String @A @A [] s; - } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.out deleted file mode 100644 index 5647c04430e..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:11:15: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.java deleted file mode 100644 index 08a88db5e3e..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { - void test() { - String @A [] s; - } -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.out deleted file mode 100644 index 868ab979837..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:11:12: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.java deleted file mode 100644 index dc73272adba..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - void test() { - String @A [] s; - } -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.out deleted file mode 100644 index 74a7ef7340b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:10:12: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.java deleted file mode 100644 index 62ef4189d4b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values for type parameter - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - void method() { - class Inner<@A(value = 2, value = 1) K> {} - } -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.out deleted file mode 100644 index d717c98c486..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:10:31: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.java deleted file mode 100644 index 66cb0bd7fd9..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ -class DuplicateTypeAnno { - void innermethod() { - class Inner<@A @A K> { } - } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.out deleted file mode 100644 index accba46be32..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:10:20: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.java deleted file mode 100644 index d93fb8dff15..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ -class InvalidLocation { - void innermethod() { - class Inner<@A K> {} - } -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.out deleted file mode 100644 index b74ad54ba94..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:10:17: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.java deleted file mode 100644 index da47aeaa705..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - void innermethod() { - class Inner<@A K> { } - } -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.out deleted file mode 100644 index 637ff4acc0a..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:10:17: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.java deleted file mode 100644 index 3574e79d8a1..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - void test() { - String[] a = new String @A(value = 2, value = 1) [5] ; - } -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.out deleted file mode 100644 index 1852f279ef1..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:10:43: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.java deleted file mode 100644 index d8ad961afaa..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnnotation { - void test() { - String[] a = new String @A @A [5] ; - } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.out deleted file mode 100644 index 7b13962b5d0..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:11:32: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.java deleted file mode 100644 index 7071e9a0c24..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { - void test() { - String[] s = new String @A [5] ; - } -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.out deleted file mode 100644 index 1d98d174319..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:11:29: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.java deleted file mode 100644 index 3817df58223..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - void test() { - String[] a = new String @A [5]; - } -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.out deleted file mode 100644 index 6865348250b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:10:29: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.java deleted file mode 100644 index 83a064c416a..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values for type parameter - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.out deleted file mode 100644 index 01a2f1603e7..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:8:56: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.java deleted file mode 100644 index 7fdb5c992da..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnno { -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.out deleted file mode 100644 index 3b97ec81f46..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:9:38: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.java deleted file mode 100644 index 30a43321dc2..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.out deleted file mode 100644 index d474f174346..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:9:33: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.java deleted file mode 100644 index ac73a70035f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.out deleted file mode 100644 index b6d727e835f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:8:40: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.java deleted file mode 100644 index 27844e6eed0..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values in receiver - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - void test() @A(value = 2, value = 1) { } -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.out deleted file mode 100644 index c1df363dd2e..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:9:29: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.java deleted file mode 100644 index 791497cd445..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations in receiver - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnnotation { - void test() @A @A { } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.out deleted file mode 100644 index 565aae06318..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:10:18: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.java deleted file mode 100644 index 8ffd9e244aa..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { - void test() @A { - } -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.out deleted file mode 100644 index c82f335cfa3..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:10:15: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.java deleted file mode 100644 index e4b8536ef65..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - void test() @A { } -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.out deleted file mode 100644 index f3f66d2e428..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:9:15: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.java deleted file mode 100644 index 70621e74940..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for Duplicate annotation value - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - void test() { - new @A String(); - } -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.out deleted file mode 100644 index 0b3be7cc3fd..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:10:9: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.java deleted file mode 100644 index ae541996fd4..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnnotation { - void test() { - new @A @A String(); - } -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.out deleted file mode 100644 index 13b6046e94c..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:11:12: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.java deleted file mode 100644 index 92f38ae479c..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { - void test() { - new @A String(); - } -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.out deleted file mode 100644 index ad9861c2f6f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:11:9: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.java deleted file mode 100644 index 6b64f2d54c8..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - void test() { - new @A String(); - } -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.out deleted file mode 100644 index f83f6dfa58a..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/rest/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:10:9: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.java deleted file mode 100644 index e09ee4e2f00..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values for type parameter - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - DuplicateAnnotationValue<@A(value = 2, value = 1) String> l; -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.out deleted file mode 100644 index e2ecdfb4829..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:9:42: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.java deleted file mode 100644 index 3877a001b47..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnno { - DuplicateTypeAnno<@A @A String> l; -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.out deleted file mode 100644 index 738591669fe..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:10:24: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.java deleted file mode 100644 index 7affd108e72..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { - InvalidLocation<@A String> l; -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.out deleted file mode 100644 index 30841b78f0f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:10:19: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.java deleted file mode 100644 index fe078ab98fe..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - MissingAnnotationValue<@A String> l; -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.out deleted file mode 100644 index 749442f45b6..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:9:26: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.java deleted file mode 100644 index 2f40f713a7c..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values for type parameter - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue<@A(value = 2, value = 1) K> { -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.out deleted file mode 100644 index a9846317257..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:8:46: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.java deleted file mode 100644 index 1fb65c74f33..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnno<@A @A K> { -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.out deleted file mode 100644 index 6e7a1af2bd3..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:9:28: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.java deleted file mode 100644 index c9d00c4f55c..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation<@A K> { -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.out deleted file mode 100644 index 87d42a278c4..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:9:23: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.java deleted file mode 100644 index 9d4cbef2e9a..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue<@A K> { -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.out deleted file mode 100644 index acac021869b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:8:30: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.java deleted file mode 100644 index 44321123cb5..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 6919944 - * @summary check for duplicate annotation values for type parameter - * @author Mahmood Ali - * @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java - */ -class DuplicateAnnotationValue { - DuplicateAnnotationValue<@A(value = 2, value = 1) ?> l; -} - -@interface A { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.out deleted file mode 100644 index e2ecdfb4829..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateAnnotationValue.java:9:42: compiler.err.duplicate.annotation.member.value: value, A -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.java deleted file mode 100644 index b6a2e47d87a..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for duplicate annotations - * @author Mahmood Ali - * @compile/fail/ref=DuplicateTypeAnnotation.out -XDrawDiagnostics -source 1.7 DuplicateTypeAnnotation.java - */ - -class DuplicateTypeAnno { - DuplicateTypeAnno<@A @A ?> l; -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.out deleted file mode 100644 index 738591669fe..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.out +++ /dev/null @@ -1,2 +0,0 @@ -DuplicateTypeAnnotation.java:10:24: compiler.err.duplicate.annotation -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.java b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.java deleted file mode 100644 index addb1e8dcff..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for invalid annotatins given the target - * @author Mahmood Ali - * @compile/fail/ref=InvalidLocation.out -XDrawDiagnostics -source 1.7 InvalidLocation.java - */ - -class InvalidLocation { - InvalidLocation<@A ?> l; -} - -@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.out b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.out deleted file mode 100644 index 30841b78f0f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/InvalidLocation.out +++ /dev/null @@ -1,2 +0,0 @@ -InvalidLocation.java:10:19: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.java b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.java deleted file mode 100644 index 1178294799f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary check for missing annotation value - * @author Mahmood Ali - * @compile/fail/ref=MissingAnnotationValue.out -XDrawDiagnostics -source 1.7 MissingAnnotationValue.java - */ -class MissingAnnotationValue { - MissingAnnotationValue<@A ?> l; -} - -@interface A { int field(); } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.out b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.out deleted file mode 100644 index 749442f45b6..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/MissingAnnotationValue.out +++ /dev/null @@ -1,2 +0,0 @@ -MissingAnnotationValue.java:9:26: compiler.err.annotation.missing.default.value: A, field -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.java b/langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.java deleted file mode 100644 index 284a9649a1b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test invalid location of TypeUse - * @author Mahmood Ali - * @compile/fail/ref=Constructor.out -XDrawDiagnostics -source 1.7 Constructor.java - */ - -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -class Constructor { - @A Constructor() { } -} - -@Target(ElementType.TYPE_USE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.out b/langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.out deleted file mode 100644 index 5114f23816f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/Constructor.out +++ /dev/null @@ -1,2 +0,0 @@ -Constructor.java:13:3: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.java b/langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.java deleted file mode 100644 index 8edb60807d4..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test incomplete array declaration - * @author Mahmood Ali - * @compile/fail/ref=IncompleteArray.out -XDrawDiagnostics -source 1.7 IncompleteArray.java - */ -class IncompleteArray { - int @A [] @A var; -} - -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.out b/langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.out deleted file mode 100644 index a03a09283ee..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/IncompleteArray.out +++ /dev/null @@ -1,2 +0,0 @@ -IncompleteArray.java:9:13: compiler.err.illegal.start.of.type -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.java b/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.java deleted file mode 100644 index 457a7ef6730..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test invalid location of TypeUse - * @author Mahmood Ali - * @compile/fail/ref=NotTypeParameter.out -XDrawDiagnostics -source 1.7 NotTypeParameter.java - */ - -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -class VoidMethod<@A K> { - @A void test() { } -} - -@Target(ElementType.TYPE_USE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.out b/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.out deleted file mode 100644 index 8c6dcaf8b39..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeParameter.out +++ /dev/null @@ -1,3 +0,0 @@ -NotTypeParameter.java:13:3: compiler.err.annotation.type.not.applicable -NotTypeParameter.java:12:18: compiler.err.annotation.type.not.applicable -2 errors diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.java b/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.java deleted file mode 100644 index 407c0b218dd..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test invalid location of TypeUse - * @author Mahmood Ali - * @compile/fail/ref=NotTypeUse.out -XDrawDiagnostics -source 1.7 NotTypeUse.java - */ - -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -class VoidMethod { - @A void test() { } -} - -@Target(ElementType.TYPE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.out b/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.out deleted file mode 100644 index 9728d3589ec..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/NotTypeUse.out +++ /dev/null @@ -1,2 +0,0 @@ -NotTypeUse.java:13:3: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.java b/langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.java deleted file mode 100644 index a16bf1917fe..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test invalid location of TypeUse - * @author Mahmood Ali - * @compile/fail/ref=VoidMethod.out -XDrawDiagnostics -source 1.7 VoidMethod.java - */ - -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -class VoidMethod { - @A void test() { } -} - -@Target(ElementType.TYPE_USE) -@interface A { } diff --git a/langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.out b/langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.out deleted file mode 100644 index b7569540158..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/failures/target/VoidMethod.out +++ /dev/null @@ -1,2 +0,0 @@ -VoidMethod.java:13:3: compiler.err.annotation.type.not.applicable -1 error diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.java b/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.java index 24175fa1f0c..deaa4015c44 100644 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.java +++ b/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.java @@ -27,7 +27,7 @@ * @bug 6843077 * @summary random tests for new locations * @author Matt Papi - * @compile -source 1.7 BasicTest.java + * @compile/fail/ref=BasicTest.out -XDrawDiagnostics BasicTest.java */ import java.util.*; @@ -38,6 +38,8 @@ import java.io.*; @interface C {} @interface D {} +//308: Test inverted to verify that type annotations can not be parsed yet. + /** * Tests basic JSR 308 parser functionality. We don't really care about what * the parse tree looks like, just that these annotations can be parsed. diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out b/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out new file mode 100644 index 00000000000..9973f328fbd --- /dev/null +++ b/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out @@ -0,0 +1,66 @@ +BasicTest.java:47:27: compiler.err.illegal.start.of.type +BasicTest.java:47:28: compiler.err.expected: '{' +BasicTest.java:47:36: compiler.err.expected: token.identifier +BasicTest.java:47:38: compiler.err.illegal.start.of.type +BasicTest.java:47:45: compiler.err.expected: token.identifier +BasicTest.java:47:47: compiler.err.expected: ';' +BasicTest.java:47:62: compiler.err.expected: token.identifier +BasicTest.java:47:84: compiler.err.expected: token.identifier +BasicTest.java:52:22: compiler.err.illegal.start.of.expr +BasicTest.java:52:31: compiler.err.expected: ';' +BasicTest.java:52:37: compiler.err.expected: token.identifier +BasicTest.java:53:21: compiler.err.illegal.start.of.expr +BasicTest.java:53:23: compiler.err.expected: ';' +BasicTest.java:53:30: compiler.err.expected: token.identifier +BasicTest.java:53:32: compiler.err.illegal.start.of.type +BasicTest.java:53:37: compiler.err.expected: token.identifier +BasicTest.java:53:38: compiler.err.expected: ';' +BasicTest.java:56:17: compiler.err.expected: token.identifier +BasicTest.java:56:23: compiler.err.expected: token.identifier +BasicTest.java:56:24: compiler.err.expected2: '(', '[' +BasicTest.java:56:25: compiler.err.expected: ';' +BasicTest.java:56:27: compiler.err.invalid.meth.decl.ret.type.req +BasicTest.java:56:34: compiler.err.illegal.start.of.type +BasicTest.java:58:34: compiler.err.illegal.start.of.type +BasicTest.java:61:16: compiler.err.illegal.start.of.type +BasicTest.java:61:18: compiler.err.expected: ';' +BasicTest.java:61:24: compiler.err.illegal.start.of.type +BasicTest.java:61:26: compiler.err.expected: ';' +BasicTest.java:61:33: compiler.err.expected: token.identifier +BasicTest.java:61:34: compiler.err.illegal.start.of.type +BasicTest.java:61:35: compiler.err.expected: token.identifier +BasicTest.java:61:37: compiler.err.expected: ';' +BasicTest.java:61:45: compiler.err.expected: token.identifier +BasicTest.java:61:50: compiler.err.expected: token.identifier +BasicTest.java:62:16: compiler.err.expected: token.identifier +BasicTest.java:62:17: compiler.err.expected2: '(', '[' +BasicTest.java:62:18: compiler.err.expected: ';' +BasicTest.java:62:28: compiler.err.illegal.start.of.type +BasicTest.java:62:30: compiler.err.expected: ';' +BasicTest.java:62:36: compiler.err.illegal.start.of.type +BasicTest.java:62:38: compiler.err.expected: ';' +BasicTest.java:62:45: compiler.err.expected: token.identifier +BasicTest.java:62:46: compiler.err.illegal.start.of.type +BasicTest.java:62:47: compiler.err.expected: token.identifier +BasicTest.java:62:49: compiler.err.expected: ';' +BasicTest.java:62:57: compiler.err.expected: token.identifier +BasicTest.java:62:58: compiler.err.illegal.start.of.type +BasicTest.java:62:59: compiler.err.expected: token.identifier +BasicTest.java:64:25: compiler.err.illegal.start.of.type +BasicTest.java:64:27: compiler.err.expected: ';' +BasicTest.java:64:34: compiler.err.expected: token.identifier +BasicTest.java:64:38: compiler.err.expected: token.identifier +BasicTest.java:64:41: compiler.err.illegal.start.of.expr +BasicTest.java:64:50: compiler.err.expected: ';' +BasicTest.java:64:56: compiler.err.expected: token.identifier +BasicTest.java:69:17: compiler.err.expected: ';' +BasicTest.java:69:24: compiler.err.illegal.start.of.type +BasicTest.java:69:30: compiler.err.expected: ';' +BasicTest.java:69:59: compiler.err.expected: token.identifier +BasicTest.java:69:74: compiler.err.expected: ';' +BasicTest.java:74:22: compiler.err.expected: token.identifier +BasicTest.java:74:24: compiler.err.expected: ';' +BasicTest.java:74:25: compiler.err.illegal.start.of.type +BasicTest.java:74:33: compiler.err.expected: ';' +BasicTest.java:77:2: compiler.err.premature.eof +65 errors diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/ClassExtends.java b/langtools/test/tools/javac/typeAnnotations/newlocations/ClassExtends.java deleted file mode 100644 index 3f029ee9602..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/ClassExtends.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: class extends/implements - * @author Mahmood Ali - * @compile -source 1.7 ClassExtends.java - */ -abstract class MyClass extends @A ParameterizedClass<@B String> - implements @B CharSequence, @A ParameterizedInterface<@B String> { } - -interface MyInterface extends @A ParameterizedInterface<@A String>, - @B CharSequence { } - -class ParameterizedClass {} -interface ParameterizedInterface {} -@interface A {} -@interface B {} diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/ClassLiterals.java b/langtools/test/tools/javac/typeAnnotations/newlocations/ClassLiterals.java deleted file mode 100644 index 3558a0166ca..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/ClassLiterals.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: class literals - * @author Mahmood Ali - * @compile -source 1.7 ClassLiterals.java - */ - -class ClassLiterals { - - public static void main(String[] args) { - if (String.class != @A String.class) throw new Error(); - if (@A int.class != int.class) throw new Error(); - if (@A int.class != Integer.TYPE) throw new Error(); - if (@A int @B(0) [].class != int[].class) throw new Error(); - - if (String[].class != @A String[].class) throw new Error(); - if (String[].class != String @A [].class) throw new Error(); - if (@A int[].class != int[].class) throw new Error(); - if (@A int @B(0) [].class != int[].class) throw new Error(); - } -} - -@interface A {} -@interface B { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/ClassParameters.java b/langtools/test/tools/javac/typeAnnotations/newlocations/ClassParameters.java deleted file mode 100644 index 729a1533555..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/ClassParameters.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: class type parameter bounds - * @author Mahmood Ali - * @compile -source 1.7 ClassParameters.java - */ -class Unannotated { } - -class ExtendsBound { } -class ExtendsGeneric> { } -class TwoBounds { } - -class Complex1 { } -class Complex2 { } -class ComplexBoth { } - -class Outer { - void inner() { - class Unannotated { } - - class ExtendsBound { } - class ExtendsGeneric> { } - class TwoBounds { } - - class Complex1 { } - class Complex2 { } - class ComplexBoth { } - } -} - -@interface A { } -@interface B { } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/ConstructorTypeArgs.java b/langtools/test/tools/javac/typeAnnotations/newlocations/ConstructorTypeArgs.java deleted file mode 100644 index 9191b00be8b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/ConstructorTypeArgs.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: constructor type args - * @author Mahmood Ali - * @compile -source 1.7 ConstructorTypeArgs.java - */ - -class ConstructorTypeArgs { - void oneArg() { - new @A MyList<@A String>(); - new MyList<@A MyList<@B(0) String>>(); - } - - void twoArg() { - new MyMap(); - new MyMap<@A String, @B(0) MyList<@A String>>(); - } - - void withArraysIn() { - new MyList(); - new MyList<@A String @B(0) [] @A []>(); - - new MyMap<@A String[], @B(0) MyList<@A String> @A []>(); - } -} - -class MyList { } -class MyMap { } - -@interface A { } -@interface B { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/Expressions.java b/langtools/test/tools/javac/typeAnnotations/newlocations/Expressions.java deleted file mode 100644 index 012e65c2110..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/Expressions.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: expressions - * @author Mahmood Ali - * @compile -source 1.7 Expressions.java - */ -class Expressions { - void instanceOf() { - Object o = null; - boolean a = o instanceof @A String; - boolean b = o instanceof @B(0) String; - } - - void instanceOfArray() { - Object o = null; - boolean a1 = o instanceof @A String []; - boolean a2 = o instanceof @B(0) String []; - - boolean b1 = o instanceof String @A []; - boolean b2 = o instanceof String @B(0) []; - } - - void objectCreation() { - new @A String(); - new @B(0) String(); - } - - void objectCreationArray() { - Object a1 = new @A String [] [] { }; - Object a2 = new @A String [1] []; - Object a3 = new @A String [1] [2]; - - Object b1 = new @A String @B(0) [] [] { }; - Object b2 = new @A String @B(0) [1] []; - Object b3 = new @A String @B(0) [1] [2]; - - Object c1 = new @A String [] @B(0) [] { }; - Object c2 = new @A String [1] @B(0) []; - Object c3 = new @A String [1] @B(0) [2]; - - Object d1 = new @A String @B(0) [] @B(0) [] { }; - Object d2 = new @A String @B(0) [1] @B(0) []; - Object d3 = new @A String @B(0) [1] @B(0) [2]; - - Object rand = new @A String @B(value = 0) [1] @B(value = 0) [2]; - - } -} - -@interface A { } -@interface B { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/Fields.java b/langtools/test/tools/javac/typeAnnotations/newlocations/Fields.java deleted file mode 100644 index d5d39c71b0f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/Fields.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: field type array/generics - * @author Mahmood Ali - * @compile -source 1.7 Fields.java - */ - -class DefaultScope { - Parameterized unannotated; - Parameterized<@A String, String> firstTypeArg; - Parameterized secondTypeArg; - Parameterized<@A String, @B String> bothTypeArgs; - - Parameterized<@A Parameterized<@A String, @B String>, @B String> - nestedParameterized; - - @A String [] array1; - @A String @B [] array1Deep; - @A String [] [] array2; - @A String @A [] @B [] array2Deep; - String @A [] [] array2First; - String [] @B [] array2Second; -} - -class ModifiedScoped { - public final Parameterized unannotated = null; - public final Parameterized<@A String, String> firstTypeArg = null; - public final Parameterized secondTypeArg = null; - public final Parameterized<@A String, @B String> bothTypeArgs = null; - - public final Parameterized<@A Parameterized<@A String, @B String>, @B String> - nestedParameterized = null; - - public final @A String [] array1 = null; - public final @A String @B [] array1Deep = null; - public final @A String [] [] array2 = null; - public final @A String @A [] @B [] array2Deep = null; - public final String @A [] [] array2First = null; - public final String [] @B [] array2Second = null; -} - -class Parameterized { } - -@interface A { } -@interface B { } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/LocalVariables.java b/langtools/test/tools/javac/typeAnnotations/newlocations/LocalVariables.java deleted file mode 100644 index 2676bd0ec08..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/LocalVariables.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: local variables array/generics - * @author Mahmood Ali - * @compile -source 1.7 LocalVariables.java - */ - -class DefaultScope { - void parameterized() { - Parameterized unannotated; - Parameterized<@A String, String> firstTypeArg; - Parameterized secondTypeArg; - Parameterized<@A String, @B String> bothTypeArgs; - - Parameterized<@A Parameterized<@A String, @B String>, @B String> - nestedParameterized; - } - - void arrays() { - @A String [] array1; - @A String @B [] array1Deep; - @A String [] [] array2; - @A String @A [] @B [] array2Deep; - String @A [] [] array2First; - String [] @B [] array2Second; - } -} - -class ModifiedVars { - void parameterized() { - final Parameterized unannotated = null; - final Parameterized<@A String, String> firstTypeArg = null; - final Parameterized secondTypeArg = null; - final Parameterized<@A String, @B String> bothTypeArgs = null; - - final Parameterized<@A Parameterized<@A String, @B String>, @B String> - nestedParameterized = null; - } - - void arrays() { - final @A String [] array1 = null; - final @A String @B [] array1Deep = null; - final @A String [] [] array2 = null; - final @A String @A [] @B [] array2Deep = null; - final String @A [] [] array2First = null; - final String [] @B [] array2Second = null; - } -} - -class Parameterized { } - -@interface A { } -@interface B { } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/MethodReturnType.java b/langtools/test/tools/javac/typeAnnotations/newlocations/MethodReturnType.java deleted file mode 100644 index ee35f875792..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/MethodReturnType.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: method return type array/generics - * @author Mahmood Ali - * @compile -source 1.7 MethodReturnType.java - */ - -class DefaultScope { - Parameterized unannotated() { return null; } - Parameterized<@A String, String> firstTypeArg() { return null; } - Parameterized secondTypeArg() { return null; } - Parameterized<@A String, @B String> bothTypeArgs() { return null; } - - Parameterized<@A Parameterized<@A String, @B String>, @B String> - nestedParameterized() { return null; } - - public @A String method() { return null; } - - @A String [] array1() { return null; } - @A String @B [] array1Deep() { return null; } - @A String [] [] array2() { return null; } - @A String @A [] @B [] array2Deep() { return null; } - String @A [] [] array2First() { return null; } - String [] @B [] array2Second() { return null; } -} - -class ModifiedScoped { - public final Parameterized unannotated() { return null; } - public final Parameterized<@A String, String> firstTypeArg() { return null; } - public final Parameterized secondTypeArg() { return null; } - public final Parameterized<@A String, @B String> bothTypeArgs() { return null; } - - public final Parameterized<@A Parameterized<@A String, @B String>, @B String> - nestedParameterized() { return null; } - - public final @A String [] array1() { return null; } - public final @A String @B [] array1Deep() { return null; } - public final @A String [] [] array2() { return null; } - public final @A String @A [] @B [] array2Deep() { return null; } - public final String @A [] [] array2First() { return null; } - public final String [] @B [] array2Second() { return null; } -} - -class Parameterized { } - -@interface A { } -@interface B { } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeArgs.java b/langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeArgs.java deleted file mode 100644 index f901dc13466..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeArgs.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: method type args - * @author Mahmood Ali - * @compile -source 1.7 MethodTypeArgs.java - */ - -class MethodTypeArgs { - void oneArg() { - this.<@A String>newList(); - this.<@A MyList<@B(0) String>>newList(); - - MethodTypeArgs.<@A String>newList(); - MethodTypeArgs.<@A MyList<@B(0) String>>newList(); - } - - void twoArg() { - this.newMap(); - this.<@A String, @B(0) MyList<@A String>>newMap(); - - MethodTypeArgs.newMap(); - MethodTypeArgs.<@A String, @B(0) MyList<@A String>>newMap(); - } - - void withArraysIn() { - this.newList(); - this.<@A String @B(0) [] @A []>newList(); - - this.<@A String[], @B(0) MyList<@A String> @A []>newMap(); - } - - static void newList() { } - static void newMap() { } -} - -class MyList { } -@interface A { } -@interface B { int value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeParameters.java b/langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeParameters.java deleted file mode 100644 index 48f52496213..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/MethodTypeParameters.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: method type parameter bounds - * @author Mahmood Ali - * @compile -source 1.7 MethodTypeParameters.java - */ - -class UnscopedUnmodified { - void methodExtends() {} - > void nestedExtends() {} - > void dual() {} - > void dualOneAnno() {} -} - -class PublicModifiedMethods { - public final void methodExtends() {} - public final > void nestedExtends() {} - public final > void dual() {} - public final > void dualOneAnno() {} -} - -class Parameterized { } -@interface A { } -@interface B { } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/Parameters.java b/langtools/test/tools/javac/typeAnnotations/newlocations/Parameters.java deleted file mode 100644 index feda414b75d..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/Parameters.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: parameter type array/generics - * @author Mahmood Ali - * @compile -source 1.7 Parameters.java - */ - -class Parameters { - void unannotated(Parameterized a) {} - void firstTypeArg(Parameterized<@A String, String> a) {} - void secondTypeArg(Parameterized a) {} - void bothTypeArgs(Parameterized<@A String, @B String> both) {} - - void nestedParameterized(Parameterized<@A Parameterized<@A String, @B String>, @B String> a) {} - - void array1(@A String [] a) {} - void array1Deep(@A String @B [] a) {} - void array2(@A String [] [] a) {} - void array2Deep(@A String @A [] @B [] a) {} - void array2First(String @A [] [] a) {} - void array2Second(String [] @B [] a) {} -} - -class Parameterized { } - -@interface A { } -@interface B { } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/Receivers.java b/langtools/test/tools/javac/typeAnnotations/newlocations/Receivers.java deleted file mode 100644 index 700f946d5b1..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/Receivers.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: receivers - * @author Mahmood Ali - * @compile -source 1.7 Receivers.java - */ -class DefaultUnmodified { - void plain() @A { } - void generic() @A { } - void withException() @A throws Exception { } - String nonVoid() @A { return null; } - void accept(T r) @A throws Exception { } -} - -class PublicModified { - public final void plain() @A { } - public final void generic() @A { } - public final void withException() @A throws Exception { } - public final String nonVoid() @A { return null; } - public final void accept(T r) @A throws Exception { } -} - -class WithValue { - void plain() @B("m") { } - void generic() @B("m") { } - void withException() @B("m") throws Exception { } - String nonVoid() @B("m") { return null; } - void accept(T r) @B("m") throws Exception { } -} - -@interface A {} -@interface B { String value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/Throws.java b/langtools/test/tools/javac/typeAnnotations/newlocations/Throws.java deleted file mode 100644 index 2477d913c2f..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/Throws.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: throw clauses - * @author Mahmood Ali - * @compile -source 1.7 Throws.java - */ -class DefaultUnmodified { - void oneException() throws @A Exception {} - void twoExceptions() throws @A RuntimeException, @A Exception {} -} - -class PublicModified { - public final void oneException(String a) throws @A Exception {} - public final void twoExceptions(String a) throws @A RuntimeException, @A Exception {} -} - -class WithValue { - void oneException() throws @B("m") Exception {} - void twoExceptions() throws @B(value="m") RuntimeException, @A Exception {} -} - -@interface A {} -@interface B { String value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/TypeCasts.java b/langtools/test/tools/javac/typeAnnotations/newlocations/TypeCasts.java deleted file mode 100644 index aef203e01e8..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/TypeCasts.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: type casts - * @author Mahmood Ali - * @compile -source 1.7 TypeCasts.java - */ -class TypeCasts { - void methodA() { - String s = (@A String) null; - Object o = (@A Class<@A String>) null; - } - - void methodB() { - String s = (@B("m") String) null; - Object o = (@B("m") Class<@B("m") String>) null; - } -} - -@interface A { } -@interface B { String value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/TypeParameters.java b/langtools/test/tools/javac/typeAnnotations/newlocations/TypeParameters.java deleted file mode 100644 index 8faf3fb0e5b..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/TypeParameters.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: class and method type parameters - * @author Mahmood Ali - * @compile -source 1.7 TypeParameters.java - */ - -class Unannotated { } -class OneAnnotated<@A K> { } -class TwoAnnotated<@A K, @A V> { } -class SecondAnnotated { } - -class TestMethods { - void unannotated() { } - <@A K> void oneAnnotated() { } - <@A K, @B("m") V> void twoAnnotated() { } - void secondAnnotated() { } -} - -class UnannotatedB { } -class OneAnnotatedB<@B("m") K> { } -class TwoAnnotatedB<@B("m") K, @B("m") V> { } -class SecondAnnotatedB { } - -@interface A { } -@interface B { String value(); } diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/Wildcards.java b/langtools/test/tools/javac/typeAnnotations/newlocations/Wildcards.java deleted file mode 100644 index 1efad06ac0e..00000000000 --- a/langtools/test/tools/javac/typeAnnotations/newlocations/Wildcards.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6843077 - * @summary new type annotation location: wildcard bound - * @author Mahmood Ali - * @compile -source 1.7 Wildcards.java - */ -class BoundTest { - void wcExtends(MyList l) { } - void wcSuper(MyList l) { } - - MyList returnWcExtends() { return null; } - MyList returnWcSuper() { return null; } - MyList> complex() { return null; } -} - -class BoundWithValue { - void wcExtends(MyList l) { } - void wcSuper(MyList l) { } - - MyList returnWcExtends() { return null; } - MyList returnWcSuper() { return null; } - MyList> complex() { return null; } -} - -class SelfTest { - void wcExtends(MyList<@A ?> l) { } - void wcSuper(MyList<@A ?> l) { } - - MyList<@A ?> returnWcExtends() { return null; } - MyList<@A ?> returnWcSuper() { return null; } - MyList<@A ? extends @A MyList<@B("m") ?>> complex() { return null; } -} - -class SelfWithValue { - void wcExtends(MyList<@B("m") ?> l) { } - void wcSuper(MyList<@B(value="m") ?> l) { } - - MyList<@B("m") ?> returnWcExtends() { return null; } - MyList<@B(value="m") ?> returnWcSuper() { return null; } - MyList<@B("m") ? extends MyList<@B("m") ? super String>> complex() { return null; } -} - -class MyList { } - -@interface A { } -@interface B { String value(); } diff --git a/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java b/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java deleted file mode 100644 index 24d414aa55b..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import com.sun.tools.classfile.*; - -/* - * @test ArrayClassLiterals - * @bug 6863814 - * @summary test that class literals array doesn't crash javap - */ - -public class ArrayClassLiterals { - public static void main(String[] args) throws Exception { - new ArrayClassLiterals().run(); - } - - public void run() throws Exception { - File javaFile = writeTestFile(); - File classFile = compileTestFile(javaFile); - - ClassFile cf = ClassFile.read(classFile); - test(cf); - for (Field f : cf.fields) { - test(cf, f); - } - for (Method m: cf.methods) { - test(cf, m); - } - - countAnnotations(); - - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - void test(ClassFile cf) { - test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Field m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, String name, boolean visible) { - int index = cf.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = cf.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - - for (ExtendedAnnotation anno : tAttr.annotations) - anno.position.toString(); - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - - for (ExtendedAnnotation anno : tAttr.annotations) - anno.position.toString(); - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Field m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - - for (ExtendedAnnotation anno : tAttr.annotations) - anno.position.toString(); - } - } - - File writeTestFile() throws IOException { - File f = new File("Testa.java"); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); - out.println("import java.util.*;"); - out.println("class Testa { "); - out.println(" @interface A { }"); - - out.println(" void test() {"); - out.println(" Object a = @A String.class;"); - out.println(" Object b = @A String @A [] @A [].class;"); - out.println(" }"); - out.println("}"); - - out.close(); - return f; - } - - File compileTestFile(File f) { - int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); - if (rc != 0) - throw new Error("compilation failed. rc=" + rc); - String path = f.getPath(); - return new File(path.substring(0, path.length() - 5) + ".class"); - } - - void countAnnotations() { - int expected_visibles = 0, expected_invisibles = 4; - int expected_all = expected_visibles + expected_invisibles; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; -} diff --git a/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals2.java b/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals2.java deleted file mode 100644 index 1e3c277fa0d..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/ArrayClassLiterals2.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 6918625 - * @summary javap dumps type information of array class literals - */ - -import java.io.*; - -public class ArrayClassLiterals2 { - public static void main(String[] args) throws Exception { - new ArrayClassLiterals2().run(); - } - - public void run() throws IOException { - File classFile = new File(System.getProperty("test.classes"), "ArrayClassLiterals2$Test.class"); - - verify(classFile, - "RuntimeInvisibleTypeAnnotations:", - "CLASS_LITERAL_GENERIC_OR_ARRAY" - ); - - if (errors > 0) - throw new Error(errors + " found."); - } - - String javap(File f) { - StringWriter sw = new StringWriter(); - PrintWriter out = new PrintWriter(sw); - int rc = com.sun.tools.javap.Main.run(new String[] { "-v", f.getPath() }, out); - if (rc != 0) - throw new Error("javap failed. rc=" + rc); - out.close(); - return sw.toString(); - } - - void verify(File classFile, String... expects) { - String output = javap(classFile); - for (String expect: expects) { - if (output.indexOf(expect)< 0) - error(expect + " not found"); - } - } - - void error(String msg) { - System.err.println(msg); - errors++; - } - - int errors; - - - /*********************** Test class *************************/ - static class Test { - @interface A { } - void test() { - Object a = @A String @A [] @A [].class; - } - } -} diff --git a/langtools/test/tools/javap/typeAnnotations/ClassLiterals.java b/langtools/test/tools/javap/typeAnnotations/ClassLiterals.java deleted file mode 100644 index 5c3fd7c8a49..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/ClassLiterals.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import com.sun.tools.classfile.*; - -/* - * @test ClassLiterals - * @bug 6843077 - * @summary test that all type annotations are present in the classfile - */ - -public class ClassLiterals { - public static void main(String[] args) throws Exception { - new ClassLiterals().run(); - } - - public void run() throws Exception { - File javaFile = writeTestFile(); - File classFile = compileTestFile(javaFile); - - ClassFile cf = ClassFile.read(classFile); - test(cf); - for (Field f : cf.fields) { - test(cf, f); - } - for (Method m: cf.methods) { - test(cf, m); - } - - countAnnotations(); - - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - void test(ClassFile cf) { - test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Field m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, String name, boolean visible) { - int index = cf.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = cf.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Field m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - File writeTestFile() throws IOException { - File f = new File("Testa.java"); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); - out.println("import java.util.*;"); - out.println("class Testa { "); - out.println(" @interface A { }"); - - out.println(" void test() {"); - out.println(" Object a = @A String.class;"); - out.println(" Object b = @A String @A [] @A [].class;"); - out.println(" }"); - out.println("}"); - - out.close(); - return f; - } - - File compileTestFile(File f) { - int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); - if (rc != 0) - throw new Error("compilation failed. rc=" + rc); - String path = f.getPath(); - return new File(path.substring(0, path.length() - 5) + ".class"); - } - - void countAnnotations() { - int expected_visibles = 0, expected_invisibles = 4; - int expected_all = expected_visibles + expected_invisibles; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; -} diff --git a/langtools/test/tools/javap/typeAnnotations/JSR175Annotations.java b/langtools/test/tools/javap/typeAnnotations/JSR175Annotations.java deleted file mode 100644 index fe3c65f1965..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/JSR175Annotations.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import com.sun.tools.classfile.*; - -/* - * @test JSR175Annotations - * @bug 6843077 - * @summary test that only type annotations are recorded as such in classfile - */ - -public class JSR175Annotations { - public static void main(String[] args) throws Exception { - new JSR175Annotations().run(); - } - - public void run() throws Exception { - File javaFile = writeTestFile(); - File classFile = compileTestFile(javaFile); - - ClassFile cf = ClassFile.read(classFile); - for (Field f : cf.fields) { - test(cf, f); - } - for (Method m: cf.methods) { - test(cf, m); - } - - countAnnotations(); - - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Field m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Field m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - File writeTestFile() throws IOException { - File f = new File("Test.java"); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); - out.println("import java.lang.annotation.Retention;"); - out.println("import java.lang.annotation.RetentionPolicy;"); - out.println("abstract class Test { "); - out.println(" @Retention(RetentionPolicy.RUNTIME)"); - out.println(" @interface A { }"); - out.println(" @A String m;"); - out.println(" @A String method(@A String a) {"); - out.println(" return a;"); - out.println(" }"); - out.println("}"); - out.close(); - return f; - } - - File compileTestFile(File f) { - int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); - if (rc != 0) - throw new Error("compilation failed. rc=" + rc); - String path = f.getPath(); - return new File(path.substring(0, path.length() - 5) + ".class"); - } - - void countAnnotations() { - int expected_visibles = 0, expected_invisibles = 0; - int expected_all = expected_visibles + expected_invisibles; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; -} diff --git a/langtools/test/tools/javap/typeAnnotations/NewArray.java b/langtools/test/tools/javap/typeAnnotations/NewArray.java deleted file mode 100644 index aa15b89f550..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/NewArray.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import com.sun.tools.classfile.*; - -/* - * @test NewArray - * @bug 6843077 - * @summary test that all type annotations are present in the classfile - */ - -public class NewArray { - public static void main(String[] args) throws Exception { - new NewArray().run(); - } - - public void run() throws Exception { - File javaFile = writeTestFile(); - File classFile = compileTestFile(javaFile); - - ClassFile cf = ClassFile.read(classFile); - test(cf); - for (Field f : cf.fields) { - test(cf, f); - } - for (Method m: cf.methods) { - test(cf, m); - } - - countAnnotations(); - - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - void test(ClassFile cf) { - test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Field m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, String name, boolean visible) { - int index = cf.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = cf.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Field m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - File writeTestFile() throws IOException { - File f = new File("Test.java"); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); - out.println("import java.util.*;"); - out.println("class Test { "); - out.println(" @interface A { }"); - - out.println(" void test() {"); - out.println(" Object a = new @A String @A [5] @A [];"); - out.println(" Object b = new @A String @A [5] @A [3];"); - out.println(" Object c = new @A String @A [] @A [] {};"); - out.println(" }"); - out.println("}"); - - out.close(); - return f; - } - - File compileTestFile(File f) { - int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); - if (rc != 0) - throw new Error("compilation failed. rc=" + rc); - String path = f.getPath(); - return new File(path.substring(0, path.length() - 5) + ".class"); - } - - void countAnnotations() { - int expected_visibles = 0, expected_invisibles = 9; - int expected_all = expected_visibles + expected_invisibles; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; -} diff --git a/langtools/test/tools/javap/typeAnnotations/Presence.java b/langtools/test/tools/javap/typeAnnotations/Presence.java deleted file mode 100644 index 6fdf5c0cc4d..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/Presence.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import com.sun.tools.classfile.*; - -/* - * @test Presence - * @bug 6843077 - * @summary test that all type annotations are present in the classfile - */ - -public class Presence { - public static void main(String[] args) throws Exception { - new Presence().run(); - } - - public void run() throws Exception { - File javaFile = writeTestFile(); - File classFile = compileTestFile(javaFile); - - ClassFile cf = ClassFile.read(classFile); - test(cf); - for (Field f : cf.fields) { - test(cf, f); - } - for (Method m: cf.methods) { - test(cf, m); - } - - countAnnotations(); - - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - void test(ClassFile cf) { - test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Field m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, String name, boolean visible) { - int index = cf.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = cf.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Field m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - File writeTestFile() throws IOException { - File f = new File("Test.java"); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); - out.println("import java.util.*;"); - out.println("class Test<@Test.A T extends @Test.A List<@Test.A String>> { "); - out.println(" @interface A { }"); - - out.println(" Map<@A String, Map<@A String, @A String>> f1;"); - - out.println(" <@A T extends @A List<@A String>>"); - out.println(" Map<@A String, @A List<@A String>>"); - out.println(" method(List<@A String> @A [] param1, String @A [] @A ... param2) @A"); - out.println(" throws @A Exception {"); - out.println(" @A String lc1 = null;"); - out.println(" @A List<@A String> lc2 = null;"); - out.println(" @A String @A [] [] @A[] lc3 = null;"); - out.println(" List> lc4 = null;"); - out.println(" Object lc5 = (@A List<@A String>) null;"); - out.println(" boolean lc6 = lc1 instanceof @A String;"); - out.println(" boolean lc7 = lc5 instanceof @A String @A [] @A [];"); - out.println(" new @A ArrayList<@A String>();"); - out.println(" Object lc8 = new @A String @A [4];"); - out.println(" Object lc9 = @A String.class;"); - out.println(" Object lc10 = @A int.class;"); - out.println(" return null;"); - out.println(" }"); - out.println(" void vararg1(String @A ... t) { } "); - out.println("}"); - out.close(); - return f; - } - - File compileTestFile(File f) { - int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); - if (rc != 0) - throw new Error("compilation failed. rc=" + rc); - String path = f.getPath(); - return new File(path.substring(0, path.length() - 5) + ".class"); - } - - void countAnnotations() { - int expected_visibles = 0, expected_invisibles = 39; - int expected_all = expected_visibles + expected_invisibles; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; -} diff --git a/langtools/test/tools/javap/typeAnnotations/PresenceInner.java b/langtools/test/tools/javap/typeAnnotations/PresenceInner.java deleted file mode 100644 index 50ae3a9ad8c..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/PresenceInner.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import com.sun.tools.classfile.*; - -/* - * @test PresenceInner - * @bug 6843077 - * @summary test that annotations in inner types count only once - */ - -public class PresenceInner { - public static void main(String[] args) throws Exception { - new PresenceInner().run(); - } - - public void run() throws Exception { - File javaFile = writeTestFile(); - File classFile = compileTestFile(javaFile); - - ClassFile cf = ClassFile.read(classFile); - test(cf); - for (Field f : cf.fields) { - test(cf, f); - } - for (Method m: cf.methods) { - test(cf, m); - } - - // counts are zero when vising outer class - countAnnotations(0); - - // visit inner class - File innerFile = new File("Test$1Inner.class"); - ClassFile icf = ClassFile.read(innerFile); - test(icf); - for (Field f : icf.fields) { - test(cf, f); - } - for (Method m: icf.methods) { - test(cf, m); - } - - countAnnotations(1); - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - void test(ClassFile cf) { - test(cf, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - void test(ClassFile cf, Field m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, String name, boolean visible) { - int index = cf.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = cf.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Field m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - File writeTestFile() throws IOException { - File f = new File("Test.java"); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); - - out.println("class Test {"); - out.println(" void method() {"); - out.println(" class Inner { }"); - out.println(" }"); - out.println("}"); - out.println("@interface A { }"); - out.close(); - System.out.println(f.getAbsolutePath()); - return f; - } - - File compileTestFile(File f) { - int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); - if (rc != 0) - throw new Error("compilation failed. rc=" + rc); - String path = f.getPath(); - return new File(path.substring(0, path.length() - 5) + ".class"); - } - - void countAnnotations(int expected_invisibles) { - int expected_visibles = 0; - int expected_all = expected_visibles + expected_invisibles; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; -} diff --git a/langtools/test/tools/javap/typeAnnotations/T6855990.java b/langtools/test/tools/javap/typeAnnotations/T6855990.java deleted file mode 100644 index 66ffb67110e..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/T6855990.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; - -/* - * @test - * @bug 6855990 - * @summary InstructionDetailWriter should support new 308 annotations attribute - */ - -public class T6855990 { - public static void main(String[] args) throws Exception { - new T6855990().run(); - } - - public void run() throws Exception { - @Simple String[] args = { "-c", "-XDdetails:typeAnnotations", "T6855990" }; - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - int rc = com.sun.tools.javap.Main.run(args, pw); - pw.close(); - String out = sw.toString(); - System.out.println(out); - if (out.indexOf("@Simple: LOCAL_VARIABLE") == -1) - throw new Exception("expected output not found"); - } -} - -@interface Simple { } - diff --git a/langtools/test/tools/javap/typeAnnotations/Visibility.java b/langtools/test/tools/javap/typeAnnotations/Visibility.java deleted file mode 100644 index 49b619c386e..00000000000 --- a/langtools/test/tools/javap/typeAnnotations/Visibility.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.io.*; -import com.sun.tools.classfile.*; - -/* - * @test Visibility - * @bug 6843077 - * @summary test that type annotations are recorded in the classfile - */ - -public class Visibility { - public static void main(String[] args) throws Exception { - new Visibility().run(); - } - - public void run() throws Exception { - File javaFile = writeTestFile(); - File classFile = compileTestFile(javaFile); - - ClassFile cf = ClassFile.read(classFile); - for (Method m: cf.methods) { - test(cf, m); - } - - countAnnotations(); - - if (errors > 0) - throw new Exception(errors + " errors found"); - System.out.println("PASSED"); - } - - void test(ClassFile cf, Method m) { - test(cf, m, Attribute.RuntimeVisibleTypeAnnotations, true); - test(cf, m, Attribute.RuntimeInvisibleTypeAnnotations, false); - } - - // test the result of Attributes.getIndex according to expectations - // encoded in the method's name - void test(ClassFile cf, Method m, String name, boolean visible) { - int index = m.attributes.getIndex(cf.constant_pool, name); - if (index != -1) { - Attribute attr = m.attributes.get(index); - assert attr instanceof RuntimeTypeAnnotations_attribute; - RuntimeTypeAnnotations_attribute tAttr = (RuntimeTypeAnnotations_attribute)attr; - all += tAttr.annotations.length; - if (visible) - visibles += tAttr.annotations.length; - else - invisibles += tAttr.annotations.length; - } - } - - File writeTestFile() throws IOException { - File f = new File("Test.java"); - PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f))); - out.println("import java.lang.annotation.Retention;"); - out.println("import java.lang.annotation.RetentionPolicy;"); - out.println("abstract class Test { "); - // visible annotations: RUNTIME - out.println(" @Retention(RetentionPolicy.RUNTIME)"); - out.println(" @interface A { }"); - out.println(" void visible() @A { }"); - - // invisible annotations: CLASS - out.println(" @Retention(RetentionPolicy.CLASS)"); - out.println(" @interface B { }"); - out.println(" void invisible() @B { }"); - - // source annotations - out.println(" @Retention(RetentionPolicy.SOURCE)"); - out.println(" @interface C { }"); - out.println(" void source() @C { }"); - - // default visibility: CLASS - out.println(" @interface D { }"); - out.println(" void def() @D { }"); - out.println("}"); - out.close(); - return f; - } - - File compileTestFile(File f) { - int rc = com.sun.tools.javac.Main.compile(new String[] { "-source", "1.7", "-g", f.getPath() }); - if (rc != 0) - throw new Error("compilation failed. rc=" + rc); - String path = f.getPath(); - return new File(path.substring(0, path.length() - 5) + ".class"); - } - - void countAnnotations() { - int expected_all = 3, expected_visibles = 1, expected_invisibles = 2; - - if (expected_all != all) { - errors++; - System.err.println("expected " + expected_all - + " annotations but found " + all); - } - - if (expected_visibles != visibles) { - errors++; - System.err.println("expected " + expected_visibles - + " visibles annotations but found " + visibles); - } - - if (expected_invisibles != invisibles) { - errors++; - System.err.println("expected " + expected_invisibles - + " invisibles annotations but found " + invisibles); - } - - } - - int errors; - int all; - int visibles; - int invisibles; -} From 1d8c677377bd6da16829de97ae2112279b70d93a Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Tue, 19 Oct 2010 16:14:34 -0700 Subject: [PATCH 125/722] 6968367: can_post_on_exceptions is still using VM_DeoptimizeFrame in some places Reviewed-by: kvn, twisti --- hotspot/src/share/vm/c1/c1_Runtime1.cpp | 11 ++++------- hotspot/src/share/vm/includeDB_features | 1 + hotspot/src/share/vm/includeDB_jvmti | 1 + hotspot/src/share/vm/prims/jvmtiEnv.cpp | 3 +-- hotspot/src/share/vm/prims/jvmtiEnvBase.cpp | 3 +-- hotspot/src/share/vm/prims/jvmtiImpl.cpp | 3 +-- hotspot/src/share/vm/runtime/deoptimization.cpp | 14 +++++++++++++- hotspot/src/share/vm/runtime/deoptimization.hpp | 4 ++++ hotspot/src/share/vm/runtime/safepoint.cpp | 3 +-- hotspot/src/share/vm/runtime/vm_operations.cpp | 2 +- hotspot/src/share/vm/runtime/vm_operations.hpp | 8 +++++++- 11 files changed, 35 insertions(+), 18 deletions(-) diff --git a/hotspot/src/share/vm/c1/c1_Runtime1.cpp b/hotspot/src/share/vm/c1/c1_Runtime1.cpp index df05521d050..c8b3a7d83a6 100644 --- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp +++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp @@ -107,7 +107,6 @@ static void deopt_caller() { RegisterMap reg_map(thread, false); frame runtime_frame = thread->last_frame(); frame caller_frame = runtime_frame.sender(®_map); - // bypass VM_DeoptimizeFrame and deoptimize the frame directly Deoptimization::deoptimize_frame(thread, caller_frame.id()); assert(caller_is_deopted(), "Must be deoptimized"); } @@ -368,8 +367,7 @@ JRT_BLOCK_ENTRY(address, Runtime1::counter_overflow(JavaThread* thread, int bci, if (osr_nm != NULL) { RegisterMap map(thread, false); frame fr = thread->last_frame().sender(&map); - VM_DeoptimizeFrame deopt(thread, fr.id()); - VMThread::execute(&deopt); + Deoptimization::deoptimize_frame(thread, fr.id()); } JRT_BLOCK_END return NULL; @@ -441,8 +439,8 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t // We don't really want to deoptimize the nmethod itself since we // can actually continue in the exception handler ourselves but I // don't see an easy way to have the desired effect. - VM_DeoptimizeFrame deopt(thread, caller_frame.id()); - VMThread::execute(&deopt); + Deoptimization::deoptimize_frame(thread, caller_frame.id()); + assert(caller_is_deopted(), "Must be deoptimized"); return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); } @@ -835,8 +833,7 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_i nm->make_not_entrant(); } - VM_DeoptimizeFrame deopt(thread, caller_frame.id()); - VMThread::execute(&deopt); + Deoptimization::deoptimize_frame(thread, caller_frame.id()); // Return to the now deoptimized frame. } diff --git a/hotspot/src/share/vm/includeDB_features b/hotspot/src/share/vm/includeDB_features index 39e1149b06f..401a67a941a 100644 --- a/hotspot/src/share/vm/includeDB_features +++ b/hotspot/src/share/vm/includeDB_features @@ -154,6 +154,7 @@ jvmtiExtensions.hpp allocation.hpp jvmtiExtensions.hpp jvmti.h jvmtiExtensions.hpp jvmtiEnv.hpp +jvmtiImpl.cpp deoptimization.hpp jvmtiImpl.cpp exceptions.hpp jvmtiImpl.cpp handles.hpp jvmtiImpl.cpp handles.inline.hpp diff --git a/hotspot/src/share/vm/includeDB_jvmti b/hotspot/src/share/vm/includeDB_jvmti index 704cf78afef..76a1128c5f4 100644 --- a/hotspot/src/share/vm/includeDB_jvmti +++ b/hotspot/src/share/vm/includeDB_jvmti @@ -87,6 +87,7 @@ jvmtiEnv.cpp vmThread.hpp jvmtiEnv.hpp jvmtiEnvBase.hpp jvmtiEnvBase.cpp biasedLocking.hpp +jvmtiEnvBase.cpp deoptimization.hpp jvmtiEnvBase.cpp interfaceSupport.hpp jvmtiEnvBase.cpp jfieldIDWorkaround.hpp jvmtiEnvBase.cpp jvmtiEnv.hpp diff --git a/hotspot/src/share/vm/prims/jvmtiEnv.cpp b/hotspot/src/share/vm/prims/jvmtiEnv.cpp index bc2c20e409b..3c34771335c 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp @@ -1407,8 +1407,7 @@ JvmtiEnv::PopFrame(JavaThread* java_thread) { // If any of the top 2 frames is a compiled one, need to deoptimize it for (int i = 0; i < 2; i++) { if (!is_interpreted[i]) { - VM_DeoptimizeFrame op(java_thread, frame_sp[i]); - VMThread::execute(&op); + Deoptimization::deoptimize_frame(java_thread, frame_sp[i]); } } diff --git a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp index 044b79fa258..53af49971b8 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp @@ -1322,8 +1322,7 @@ JvmtiEnvBase::check_top_frame(JavaThread* current_thread, JavaThread* java_threa if (!vf->fr().can_be_deoptimized()) { return JVMTI_ERROR_OPAQUE_FRAME; } - VM_DeoptimizeFrame deopt(java_thread, jvf->fr().id()); - VMThread::execute(&deopt); + Deoptimization::deoptimize_frame(java_thread, jvf->fr().id()); } // Get information about method return type diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.cpp b/hotspot/src/share/vm/prims/jvmtiImpl.cpp index 0fb385d1e7f..7f08baae18d 100644 --- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp +++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp @@ -799,8 +799,7 @@ void VM_GetOrSetLocal::doit() { // Schedule deoptimization so that eventually the local // update will be written to an interpreter frame. - VM_DeoptimizeFrame deopt(_jvf->thread(), _jvf->fr().id()); - VMThread::execute(&deopt); + Deoptimization::deoptimize_frame(_jvf->thread(), _jvf->fr().id()); // Now store a new value for the local which will be applied // once deoptimization occurs. Note however that while this diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp index 4dd9e97059c..e6a14d71005 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -1065,7 +1065,9 @@ void Deoptimization::deoptimize(JavaThread* thread, frame fr, RegisterMap *map) } -void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) { +void Deoptimization::deoptimize_frame_internal(JavaThread* thread, intptr_t* id) { + assert(thread == Thread::current() || SafepointSynchronize::is_at_safepoint(), + "can only deoptimize other thread at a safepoint"); // Compute frame and register map based on thread and sp. RegisterMap reg_map(thread, UseBiasedLocking); frame fr = thread->last_frame(); @@ -1076,6 +1078,16 @@ void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) { } +void Deoptimization::deoptimize_frame(JavaThread* thread, intptr_t* id) { + if (thread == Thread::current()) { + Deoptimization::deoptimize_frame_internal(thread, id); + } else { + VM_DeoptimizeFrame deopt(thread, id); + VMThread::execute(&deopt); + } +} + + // JVMTI PopFrame support JRT_LEAF(void, Deoptimization::popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address)) { diff --git a/hotspot/src/share/vm/runtime/deoptimization.hpp b/hotspot/src/share/vm/runtime/deoptimization.hpp index 83bccfd3fc5..c0b8c6f396f 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.hpp +++ b/hotspot/src/share/vm/runtime/deoptimization.hpp @@ -216,6 +216,10 @@ class Deoptimization : AllStatic { // Only called from VMDeoptimizeFrame // @argument thread. Thread where stub_frame resides. // @argument id. id of frame that should be deoptimized. + static void deoptimize_frame_internal(JavaThread* thread, intptr_t* id); + + // If thread is not the current thread then execute + // VM_DeoptimizeFrame otherwise deoptimize directly. static void deoptimize_frame(JavaThread* thread, intptr_t* id); // Statistics diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp index e1a1d432ec2..b7671271cd1 100644 --- a/hotspot/src/share/vm/runtime/safepoint.cpp +++ b/hotspot/src/share/vm/runtime/safepoint.cpp @@ -940,8 +940,7 @@ void ThreadSafepointState::handle_polling_page_exception() { // as otherwise we may never deliver it. if (thread()->has_async_condition()) { ThreadInVMfromJavaNoAsyncException __tiv(thread()); - VM_DeoptimizeFrame deopt(thread(), caller_fr.id()); - VMThread::execute(&deopt); + Deoptimization::deoptimize_frame(thread(), caller_fr.id()); } // If an exception has been installed we must check for a pending deoptimization diff --git a/hotspot/src/share/vm/runtime/vm_operations.cpp b/hotspot/src/share/vm/runtime/vm_operations.cpp index d6cf352f6d7..f58509c66d3 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.cpp +++ b/hotspot/src/share/vm/runtime/vm_operations.cpp @@ -100,7 +100,7 @@ VM_DeoptimizeFrame::VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id) { void VM_DeoptimizeFrame::doit() { - Deoptimization::deoptimize_frame(_thread, _id); + Deoptimization::deoptimize_frame_internal(_thread, _id); } diff --git a/hotspot/src/share/vm/runtime/vm_operations.hpp b/hotspot/src/share/vm/runtime/vm_operations.hpp index bd0bebbc777..f6d9d052476 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.hpp +++ b/hotspot/src/share/vm/runtime/vm_operations.hpp @@ -231,12 +231,18 @@ class VM_Deoptimize: public VM_Operation { bool allow_nested_vm_operations() const { return true; } }; + +// Deopt helper that can deoptimize frames in threads other than the +// current thread. Only used through Deoptimization::deoptimize_frame. class VM_DeoptimizeFrame: public VM_Operation { + friend class Deoptimization; + private: JavaThread* _thread; intptr_t* _id; - public: VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id); + + public: VMOp_Type type() const { return VMOp_DeoptimizeFrame; } void doit(); bool allow_nested_vm_operations() const { return true; } From fbe778aead3ddc28767e08b6703ecf28a2ff65d9 Mon Sep 17 00:00:00 2001 From: Masayoshi Okutsu Date: Wed, 20 Oct 2010 14:41:39 +0900 Subject: [PATCH 126/722] 6991380: (cal) Calendar.cachedLocaleData should be transitioned from Hashtable to ConcurrentHashMap 6560965: [Fmt-Da] defaultCenturyStart In SimpleDateFormat should be protected 6560980: [Fmt-Da] DateFormatSymbols.cacheLookup doesn't update cache correctly Reviewed-by: naoto, peytoia --- .../classes/java/text/DateFormatSymbols.java | 129 +++++++++++------- .../classes/java/text/DecimalFormat.java | 12 +- .../classes/java/text/SimpleDateFormat.java | 25 ++-- jdk/src/share/classes/java/util/Calendar.java | 9 +- jdk/src/share/classes/java/util/TimeZone.java | 5 - 5 files changed, 107 insertions(+), 73 deletions(-) diff --git a/jdk/src/share/classes/java/text/DateFormatSymbols.java b/jdk/src/share/classes/java/text/DateFormatSymbols.java index 4d6f08f4cac..2eeb07e3447 100644 --- a/jdk/src/share/classes/java/text/DateFormatSymbols.java +++ b/jdk/src/share/classes/java/text/DateFormatSymbols.java @@ -44,11 +44,12 @@ import java.io.Serializable; import java.lang.ref.SoftReference; import java.text.spi.DateFormatSymbolsProvider; import java.util.Arrays; -import java.util.Hashtable; import java.util.List; import java.util.Locale; import java.util.ResourceBundle; import java.util.TimeZone; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; import java.util.spi.LocaleServiceProvider; import sun.util.LocaleServiceProviderPool; import sun.util.TimeZoneNameUtility; @@ -321,20 +322,64 @@ public class DateFormatSymbols implements Serializable, Cloneable { * @since 1.6 */ public static final DateFormatSymbols getInstance(Locale locale) { + DateFormatSymbols dfs = getProviderInstance(locale); + if (dfs != null) { + return dfs; + } + return (DateFormatSymbols) getCachedInstance(locale).clone(); + } + + /** + * Returns a DateFormatSymbols provided by a provider or found in + * the cache. Note that this method returns a cached instance, + * not its clone. Therefore, the instance should never be given to + * an application. + */ + static final DateFormatSymbols getInstanceRef(Locale locale) { + DateFormatSymbols dfs = getProviderInstance(locale); + if (dfs != null) { + return dfs; + } + return getCachedInstance(locale); + } + + private static DateFormatSymbols getProviderInstance(Locale locale) { + DateFormatSymbols providersInstance = null; // Check whether a provider can provide an implementation that's closer // to the requested locale than what the Java runtime itself can provide. LocaleServiceProviderPool pool = LocaleServiceProviderPool.getPool(DateFormatSymbolsProvider.class); if (pool.hasProviders()) { - DateFormatSymbols providersInstance = pool.getLocalizedObject( - DateFormatSymbolsGetter.INSTANCE, locale); - if (providersInstance != null) { - return providersInstance; + providersInstance = pool.getLocalizedObject( + DateFormatSymbolsGetter.INSTANCE, locale); + } + return providersInstance; + } + + /** + * Returns a cached DateFormatSymbols if it's found in the + * cache. Otherwise, this method returns a newly cached instance + * for the given locale. + */ + private static DateFormatSymbols getCachedInstance(Locale locale) { + SoftReference ref = cachedInstances.get(locale); + DateFormatSymbols dfs = null; + if (ref == null || (dfs = ref.get()) == null) { + dfs = new DateFormatSymbols(locale); + ref = new SoftReference(dfs); + SoftReference x = cachedInstances.putIfAbsent(locale, ref); + if (x != null) { + DateFormatSymbols y = x.get(); + if (y != null) { + dfs = y; + } else { + // Replace the empty SoftReference with ref. + cachedInstances.put(locale, ref); + } } } - - return new DateFormatSymbols(locale); + return dfs; } /** @@ -597,56 +642,44 @@ public class DateFormatSymbols implements Serializable, Cloneable { static final int millisPerHour = 60*60*1000; /** - * Cache to hold the FormatData and TimeZoneNames ResourceBundles - * of a Locale. + * Cache to hold DateFormatSymbols instances per Locale. */ - private static Hashtable cachedLocaleData = new Hashtable(3); - - /** - * Look up resource data for the desiredLocale in the cache; update the - * cache if necessary. - */ - private static ResourceBundle cacheLookup(Locale desiredLocale) { - ResourceBundle rb; - SoftReference data - = (SoftReference)cachedLocaleData.get(desiredLocale); - if (data == null) { - rb = LocaleData.getDateFormatData(desiredLocale); - data = new SoftReference(rb); - cachedLocaleData.put(desiredLocale, data); - } else { - if ((rb = (ResourceBundle)data.get()) == null) { - rb = LocaleData.getDateFormatData(desiredLocale); - data = new SoftReference(rb); - } - } - return rb; - } + private static final ConcurrentMap> cachedInstances + = new ConcurrentHashMap>(3); private void initializeData(Locale desiredLocale) { - int i; - ResourceBundle resource = cacheLookup(desiredLocale); + locale = desiredLocale; - // FIXME: cache only ResourceBundle. Hence every time, will do - // getObject(). This won't be necessary if the Resource itself - // is cached. - eras = (String[])resource.getObject("Eras"); + // Copy values of a cached instance if any. + SoftReference ref = cachedInstances.get(locale); + DateFormatSymbols dfs; + if (ref != null && (dfs = ref.get()) != null) { + copyMembers(dfs, this); + return; + } + + // Initialize the fields from the ResourceBundle for locale. + ResourceBundle resource = LocaleData.getDateFormatData(locale); + + eras = resource.getStringArray("Eras"); months = resource.getStringArray("MonthNames"); shortMonths = resource.getStringArray("MonthAbbreviations"); - String[] lWeekdays = resource.getStringArray("DayNames"); - weekdays = new String[8]; - weekdays[0] = ""; // 1-based - for (i=0; i cachedLocaleData + = new ConcurrentHashMap(3); } diff --git a/jdk/src/share/classes/java/text/SimpleDateFormat.java b/jdk/src/share/classes/java/text/SimpleDateFormat.java index defd076ed21..5f1c6601099 100644 --- a/jdk/src/share/classes/java/text/SimpleDateFormat.java +++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java @@ -44,13 +44,14 @@ import java.io.ObjectInputStream; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; -import java.util.Hashtable; import java.util.Locale; import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; import java.util.SimpleTimeZone; import java.util.TimeZone; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; import sun.util.calendar.CalendarUtils; import sun.util.calendar.ZoneInfoFile; import sun.util.resources.LocaleData; @@ -503,14 +504,14 @@ public class SimpleDateFormat extends DateFormat { /** * Cache to hold the DateTimePatterns of a Locale. */ - private static Hashtable cachedLocaleData - = new Hashtable(3); + private static final ConcurrentMap cachedLocaleData + = new ConcurrentHashMap(3); /** * Cache NumberFormat instances with Locale key. */ - private static Hashtable cachedNumberFormatData - = new Hashtable(3); + private static final ConcurrentMap cachedNumberFormatData + = new ConcurrentHashMap(3); /** * The Locale used to instantiate this @@ -579,7 +580,7 @@ public class SimpleDateFormat extends DateFormat { initializeCalendar(locale); this.pattern = pattern; - this.formatData = DateFormatSymbols.getInstance(locale); + this.formatData = DateFormatSymbols.getInstanceRef(locale); this.locale = locale; initialize(locale); } @@ -632,9 +633,9 @@ public class SimpleDateFormat extends DateFormat { dateTimePatterns = r.getStringArray("DateTimePatterns"); } /* update cache */ - cachedLocaleData.put(key, dateTimePatterns); + cachedLocaleData.putIfAbsent(key, dateTimePatterns); } - formatData = DateFormatSymbols.getInstance(loc); + formatData = DateFormatSymbols.getInstanceRef(loc); if ((timeStyle >= 0) && (dateStyle >= 0)) { Object[] dateTimeArgs = {dateTimePatterns[timeStyle], dateTimePatterns[dateStyle + 4]}; @@ -665,7 +666,7 @@ public class SimpleDateFormat extends DateFormat { numberFormat.setGroupingUsed(false); /* update cache */ - cachedNumberFormatData.put(loc, numberFormat); + cachedNumberFormatData.putIfAbsent(loc, numberFormat); } numberFormat = (NumberFormat) numberFormat.clone(); @@ -897,7 +898,7 @@ public class SimpleDateFormat extends DateFormat { * so we can call it from readObject(). */ private void initializeDefaultCentury() { - calendar.setTime( new Date() ); + calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add( Calendar.YEAR, -80 ); parseAmbiguousDatesAsAfter(calendar.getTime()); } @@ -921,7 +922,7 @@ public class SimpleDateFormat extends DateFormat { * @since 1.2 */ public void set2DigitYearStart(Date startDate) { - parseAmbiguousDatesAsAfter(startDate); + parseAmbiguousDatesAsAfter(new Date(startDate.getTime())); } /** @@ -934,7 +935,7 @@ public class SimpleDateFormat extends DateFormat { * @since 1.2 */ public Date get2DigitYearStart() { - return defaultCenturyStart; + return (Date) defaultCenturyStart.clone(); } /** diff --git a/jdk/src/share/classes/java/util/Calendar.java b/jdk/src/share/classes/java/util/Calendar.java index 7ec5e87ec39..70460eaec07 100644 --- a/jdk/src/share/classes/java/util/Calendar.java +++ b/jdk/src/share/classes/java/util/Calendar.java @@ -51,6 +51,8 @@ import java.security.PrivilegedExceptionAction; import java.security.ProtectionDomain; import java.text.DateFormat; import java.text.DateFormatSymbols; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; import sun.util.BuddhistCalendar; import sun.util.calendar.ZoneInfo; import sun.util.resources.LocaleData; @@ -837,7 +839,8 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable cachedLocaleData = new Hashtable(3); + private static final ConcurrentMap cachedLocaleData + = new ConcurrentHashMap(3); // Special values of stamp[] /** @@ -1022,7 +1025,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable Date: Wed, 20 Oct 2010 15:08:39 +0400 Subject: [PATCH 127/722] 6867515: Reduce impact of D3D initializion on startup time 6891435: Improve D3D preloading 6946559: AWTToolKit thread crashes in JNU_GetEnv 6987967: D3D preloading thread should initialize COM Reviewed-by: igor, art, uta --- jdk/src/windows/bin/java_md.c | 246 ++++++++++++ .../classes/sun/awt/windows/WToolkit.java | 12 +- .../sun/java2d/d3d/D3DGraphicsDevice.cpp | 20 +- .../sun/java2d/d3d/D3DPipelineManager.cpp | 91 +++++ .../sun/java2d/d3d/D3DPipelineManager.h | 44 ++- .../sun/java2d/windows/WindowsFlags.cpp | 3 +- .../native/sun/windows/awt_Toolkit.cpp | 363 +++++++++++++++++- .../windows/native/sun/windows/awt_Toolkit.h | 145 +++++++ 8 files changed, 898 insertions(+), 26 deletions(-) diff --git a/jdk/src/windows/bin/java_md.c b/jdk/src/windows/bin/java_md.c index 06824ce319c..651af6e1d2e 100644 --- a/jdk/src/windows/bin/java_md.c +++ b/jdk/src/windows/bin/java_md.c @@ -51,6 +51,92 @@ static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, static jboolean GetJREPath(char *path, jint pathsize); static void EnsureJreInstallation(const char *jrepath); +/* We supports warmup for UI stack that is performed in parallel + * to VM initialization. + * This helps to improve startup of UI application as warmup phase + * might be long due to initialization of OS or hardware resources. + * It is not CPU bound and therefore it does not interfere with VM init. + * Obviously such warmup only has sense for UI apps and therefore it needs + * to be explicitly requested by passing -Dsun.awt.warmup=true property + * (this is always the case for plugin/javaws). + * + * Implementation launches new thread after VM starts and use it to perform + * warmup code (platform dependent). + * This thread is later reused as AWT toolkit thread as graphics toolkit + * often assume that they are used from the same thread they were launched on. + * + * At the moment we only support warmup for D3D. It only possible on windows + * and only if other flags do not prohibit this (e.g. OpenGL support requested). + */ +#undef ENABLE_AWT_PRELOAD +#ifndef JAVA_ARGS /* turn off AWT preloading for javac, jar, etc */ + #define ENABLE_AWT_PRELOAD +#endif + +#ifdef ENABLE_AWT_PRELOAD +/* "AWT was preloaded" flag; + * turned on by AWTPreload(). + */ +int awtPreloaded = 0; + +/* Calls a function with the name specified + * the function must be int(*fn)(void). + */ +int AWTPreload(const char *funcName); +/* stops AWT preloading */ +void AWTPreloadStop(); + +/* D3D preloading */ +/* -1: not initialized; 0: OFF, 1: ON */ +int awtPreloadD3D = -1; +/* command line parameter to swith D3D preloading on */ +#define PARAM_PRELOAD_D3D "-Dsun.awt.warmup" +/* D3D/OpenGL management parameters */ +#define PARAM_NODDRAW "-Dsun.java2d.noddraw" +#define PARAM_D3D "-Dsun.java2d.d3d" +#define PARAM_OPENGL "-Dsun.java2d.opengl" +/* funtion in awt.dll (src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp) */ +#define D3D_PRELOAD_FUNC "preloadD3D" + + +/* Extracts value of a parameter with the specified name + * from command line argument (returns pointer in the argument). + * Returns NULL if the argument does not contains the parameter. + * e.g.: + * GetParamValue("theParam", "theParam=value") returns pointer to "value". + */ +const char * GetParamValue(const char *paramName, const char *arg) { + int nameLen = JLI_StrLen(paramName); + if (JLI_StrNCmp(paramName, arg, nameLen) == 0) { + /* arg[nameLen] is valid (may contain final NULL) */ + if (arg[nameLen] == '=') { + return arg + nameLen + 1; + } + } + return NULL; +} + +/* Checks if commandline argument contains property specified + * and analyze it as boolean property (true/false). + * Returns -1 if the argument does not contain the parameter; + * Returns 1 if the argument contains the parameter and its value is "true"; + * Returns 0 if the argument contains the parameter and its value is "false". + */ +int GetBoolParamValue(const char *paramName, const char *arg) { + const char * paramValue = GetParamValue(paramName, arg); + if (paramValue != NULL) { + if (JLI_StrCaseCmp(paramValue, "true") == 0) { + return 1; + } + if (JLI_StrCaseCmp(paramValue, "false") == 0) { + return 0; + } + } + return -1; +} +#endif /* ENABLE_AWT_PRELOAD */ + + static jboolean _isjavaw = JNI_FALSE; @@ -132,6 +218,30 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, exit(4); } /* If we got here, jvmpath has been correctly initialized. */ + + /* Check if we need preload AWT */ +#ifdef ENABLE_AWT_PRELOAD + argv = *pargv; + for (i = 0; i < *pargc ; i++) { + /* Tests the "turn on" parameter only if not set yet. */ + if (awtPreloadD3D < 0) { + if (GetBoolParamValue(PARAM_PRELOAD_D3D, argv[i]) == 1) { + awtPreloadD3D = 1; + } + } + /* Test parameters which can disable preloading if not already disabled. */ + if (awtPreloadD3D != 0) { + if (GetBoolParamValue(PARAM_NODDRAW, argv[i]) == 1 + || GetBoolParamValue(PARAM_D3D, argv[i]) == 0 + || GetBoolParamValue(PARAM_OPENGL, argv[i]) == 1) + { + awtPreloadD3D = 0; + /* no need to test the rest of the parameters */ + break; + } + } + } +#endif /* ENABLE_AWT_PRELOAD */ } @@ -1087,6 +1197,40 @@ ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void 0, &thread_id); } + + /* AWT preloading (AFTER main thread start) */ +#ifdef ENABLE_AWT_PRELOAD + /* D3D preloading */ + if (awtPreloadD3D != 0) { + char *envValue; + /* D3D routines checks env.var J2D_D3D if no appropriate + * command line params was specified + */ + envValue = getenv("J2D_D3D"); + if (envValue != NULL && JLI_StrCaseCmp(envValue, "false") == 0) { + awtPreloadD3D = 0; + } + /* Test that AWT preloading isn't disabled by J2D_D3D_PRELOAD env.var */ + envValue = getenv("J2D_D3D_PRELOAD"); + if (envValue != NULL && JLI_StrCaseCmp(envValue, "false") == 0) { + awtPreloadD3D = 0; + } + if (awtPreloadD3D < 0) { + /* If awtPreloadD3D is still undefined (-1), test + * if it is turned on by J2D_D3D_PRELOAD env.var. + * By default it's turned OFF. + */ + awtPreloadD3D = 0; + if (envValue != NULL && JLI_StrCaseCmp(envValue, "true") == 0) { + awtPreloadD3D = 1; + } + } + } + if (awtPreloadD3D) { + AWTPreload(D3D_PRELOAD_FUNC); + } +#endif /* ENABLE_AWT_PRELOAD */ + if (thread_handle) { WaitForSingleObject(thread_handle, INFINITE); GetExitCodeThread(thread_handle, &rslt); @@ -1094,6 +1238,13 @@ ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void } else { rslt = continuation(args); } + +#ifdef ENABLE_AWT_PRELOAD + if (awtPreloaded) { + AWTPreloadStop(); + } +#endif /* ENABLE_AWT_PRELOAD */ + return rslt; } @@ -1140,3 +1291,98 @@ InitLauncher(boolean javaw) _isjavaw = javaw; JLI_SetTraceLauncher(); } + + +/* ============================== */ +/* AWT preloading */ +#ifdef ENABLE_AWT_PRELOAD + +typedef int FnPreloadStart(void); +typedef void FnPreloadStop(void); +static FnPreloadStop *fnPreloadStop = NULL; +static HMODULE hPreloadAwt = NULL; + +/* + * Starts AWT preloading + */ +int AWTPreload(const char *funcName) +{ + int result = -1; + /* load AWT library once (if several preload function should be called) */ + if (hPreloadAwt == NULL) { + /* awt.dll is not loaded yet */ + char libraryPath[MAXPATHLEN]; + int jrePathLen = 0; + HMODULE hJava = NULL; + HMODULE hVerify = NULL; + + while (1) { + /* awt.dll depends on jvm.dll & java.dll; + * jvm.dll is already loaded, so we need only java.dll; + * java.dll depends on MSVCRT lib & verify.dll. + */ + if (!GetJREPath(libraryPath, MAXPATHLEN)) { + break; + } + + /* save path length */ + jrePathLen = JLI_StrLen(libraryPath); + + /* load msvcrt 1st */ + LoadMSVCRT(); + + /* load verify.dll */ + JLI_StrCat(libraryPath, "\\bin\\verify.dll"); + hVerify = LoadLibrary(libraryPath); + if (hVerify == NULL) { + break; + } + + /* restore jrePath */ + libraryPath[jrePathLen] = 0; + /* load java.dll */ + JLI_StrCat(libraryPath, "\\bin\\" JAVA_DLL); + hJava = LoadLibrary(libraryPath); + if (hJava == NULL) { + break; + } + + /* restore jrePath */ + libraryPath[jrePathLen] = 0; + /* load awt.dll */ + JLI_StrCat(libraryPath, "\\bin\\awt.dll"); + hPreloadAwt = LoadLibrary(libraryPath); + if (hPreloadAwt == NULL) { + break; + } + + /* get "preloadStop" func ptr */ + fnPreloadStop = (FnPreloadStop *)GetProcAddress(hPreloadAwt, "preloadStop"); + + break; + } + } + + if (hPreloadAwt != NULL) { + FnPreloadStart *fnInit = (FnPreloadStart *)GetProcAddress(hPreloadAwt, funcName); + if (fnInit != NULL) { + /* don't forget to stop preloading */ + awtPreloaded = 1; + + result = fnInit(); + } + } + + return result; +} + +/* + * Terminates AWT preloading + */ +void AWTPreloadStop() { + if (fnPreloadStop != NULL) { + fnPreloadStop(); + } +} + +#endif /* ENABLE_AWT_PRELOAD */ diff --git a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java index 8c74e450a9a..863b768d635 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java +++ b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java @@ -218,6 +218,8 @@ public class WToolkit extends SunToolkit implements Runnable { private static native void postDispose(); + private static native boolean startToolkitThread(Runnable thread); + public WToolkit() { // Startup toolkit threads if (PerformanceLogger.loggingEnabled()) { @@ -231,9 +233,6 @@ public class WToolkit extends SunToolkit implements Runnable { // where notifyAll can be called before // the "AWT-Windows" thread's parent thread is // waiting, resulting in a deadlock on startup. - Thread toolkitThread = new Thread(this, "AWT-Windows"); - toolkitThread.setDaemon(true); - toolkitThread.setPriority(Thread.NORM_PRIORITY+1); /* * Fix for 4701990. @@ -242,7 +241,11 @@ public class WToolkit extends SunToolkit implements Runnable { */ AWTAutoShutdown.notifyToolkitThreadBusy(); - toolkitThread.start(); + if (!startToolkitThread(this)) { + Thread toolkitThread = new Thread(this, "AWT-Windows"); + toolkitThread.setDaemon(true); + toolkitThread.start(); + } try { wait(); @@ -263,6 +266,7 @@ public class WToolkit extends SunToolkit implements Runnable { } public void run() { + Thread.currentThread().setPriority(Thread.NORM_PRIORITY+1); boolean startPump = init(); if (startPump) { diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp index b7a6bf24a9e..805d99bc068 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp @@ -36,22 +36,6 @@ extern jobject CreateDisplayMode(JNIEnv* env, jint width, jint height, extern void addDisplayMode(JNIEnv* env, jobject arrayList, jint width, jint height, jint bitDepth, jint refreshRate); -void InitD3D(void *pReturn) -{ - J2dTraceLn(J2D_TRACE_INFO, "InitD3D"); - - jboolean *pRet = (jboolean *)pReturn; - - D3DPipelineManager *pMgr = D3DPipelineManager::CreateInstance(); - if (pMgr == NULL) { - J2dTraceLn(J2D_TRACE_ERROR, "InitD3D: could not create or init d3d"); - *pRet = JNI_FALSE; - } else { - J2dTraceLn(J2D_TRACE_INFO, "InitD3D: successfully initialized d3d"); - *pRet = JNI_TRUE; - } -} - extern "C" { /* * Class: sun_java2d_d3d_D3DGraphicsDevice @@ -63,8 +47,8 @@ JNIEXPORT jboolean JNICALL Java_sun_java2d_d3d_D3DGraphicsDevice_initD3D { J2dTraceLn(J2D_TRACE_INFO, "D3DGD_initD3D"); - jboolean result = JNI_FALSE; - AwtToolkit::GetInstance().InvokeFunction(InitD3D, &result); + jboolean result = D3DInitializer::GetInstance().EnsureInited() + ? JNI_TRUE : JNI_FALSE; J2dTraceLn1(J2D_TRACE_INFO, "D3DGD_initD3D: result=%x", result); return result; } diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp index 0f9daca7141..f16db728f29 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp @@ -40,6 +40,7 @@ static BOOL bNoHwCheck = (getenv("J2D_D3D_NO_HWCHECK") != NULL); D3DPipelineManager *D3DPipelineManager::pMgr = NULL; + D3DPipelineManager * D3DPipelineManager::CreateInstance(void) { if (!IsD3DEnabled() || @@ -179,6 +180,12 @@ void D3DPipelineManager::NotifyAdapterEventListeners(UINT adapter, HMONITOR hMon; int gdiScreen; D3DPipelineManager *pMgr; + + // fix for 6946559: if d3d preloading fails jmv may be NULL + if (jvm == NULL) { + return; + } + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); pMgr = D3DPipelineManager::GetInstance(); @@ -934,3 +941,87 @@ HRESULT D3DPipelineManager::GetD3DContext(UINT adapterOrdinal, *ppd3dContext = pAdapters[adapterOrdinal].pd3dContext; return res; } + + +//============================================================== +// D3DInitializer +//============================================================== + +D3DInitializer D3DInitializer::theInstance; + +D3DInitializer::D3DInitializer() + : bComInitialized(false), pAdapterIniters(NULL) +{ +} + +D3DInitializer::~D3DInitializer() +{ + if (pAdapterIniters) { + delete[] pAdapterIniters; + } +} + +void D3DInitializer::InitImpl() +{ + J2dRlsTraceLn(J2D_TRACE_INFO, "D3DInitializer::InitImpl"); + if (SUCCEEDED(::CoInitialize(NULL))) { + bComInitialized = true; + } + D3DPipelineManager *pMgr = D3DPipelineManager::CreateInstance(); + if (pMgr != NULL) { + UINT adapterCount = pMgr->adapterCount; + + pAdapterIniters = new D3DAdapterInitializer[adapterCount]; + for (UINT i=0; iGetD3DContext(adapter, &pd3dContext); + + J2dRlsTraceLn1(J2D_TRACE_INFO, "D3DAdapterInitializer::InitImpl(%d) finished", adapter); +} + +void D3DInitializer::D3DAdapterInitializer::CleanImpl(bool reInit) +{ + // nothing to do - D3DPipelineManager cleans adapters +} + + +extern "C" { +/* + * Export function to start D3D preloading + * (called from java/javaw - see src/windows/bin/java-md.c) + */ +__declspec(dllexport) int preloadD3D() +{ + J2dRlsTraceLn(J2D_TRACE_INFO, "AWT warmup: preloadD3D"); + AwtToolkit::GetInstance().GetPreloadThread().AddAction(&D3DInitializer::GetInstance()); + return 1; +} + +} + diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.h b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.h index 50011499303..c67af102b1b 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.h +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.h @@ -26,6 +26,7 @@ #include "D3DPipeline.h" #include "D3DContext.h" +#include "awt_Toolkit.h" typedef class D3DPipelineManager *LPD3DPIPELINEMANAGER; @@ -38,11 +39,15 @@ typedef struct D3DAdapter class D3DPIPELINE_API D3DPipelineManager { -public: + friend class D3DInitializer; +private: // creates and initializes instance of D3DPipelineManager, may return NULL static D3DPipelineManager* CreateInstance(void); + // deletes the single instance of the manager static void DeleteInstance(); + +public: // returns the single instance of the manager, may return NULL static D3DPipelineManager* GetInstance(void); @@ -143,3 +148,40 @@ private: #define OS_ALL (OS_VISTA|OS_WINSERV_2008|OS_WINXP|OS_WINXP_64|OS_WINSERV_2003) #define OS_UNKNOWN (~OS_ALL) BOOL D3DPPLM_OsVersionMatches(USHORT osInfo); + + +class D3DInitializer : public AwtToolkit::PreloadAction { +private: + D3DInitializer(); + ~D3DInitializer(); + +protected: + // PreloadAction overrides + virtual void InitImpl(); + virtual void CleanImpl(bool reInit); + +public: + static D3DInitializer& GetInstance() { return theInstance; } + +private: + // single instance + static D3DInitializer theInstance; + + // adapter initializer class + class D3DAdapterInitializer : public AwtToolkit::PreloadAction { + public: + void setAdapter(UINT adapter) { this->adapter = adapter; } + protected: + // PreloadAction overrides + virtual void InitImpl(); + virtual void CleanImpl(bool reInit); + private: + UINT adapter; + }; + + // the flag indicates success of COM initialization + bool bComInitialized; + D3DAdapterInitializer *pAdapterIniters; + +}; + diff --git a/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp b/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp index 1dd3df10f10..7006a3621d0 100644 --- a/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp +++ b/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp @@ -28,7 +28,8 @@ #include "WindowsFlags.h" BOOL accelReset; // reset registry 2d acceleration settings -BOOL useD3D; // d3d enabled flag +BOOL useD3D = TRUE; // d3d enabled flag + // initially is TRUE to allow D3D preloading BOOL forceD3DUsage; // force d3d on or off jboolean g_offscreenSharing; // JAWT accelerated surface sharing BOOL checkRegistry; // Diagnostic tool: outputs 2d registry settings diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp index 2beb5191bd2..82aee79f670 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -26,6 +26,7 @@ #include "awt.h" #include #include +#include //#if defined(_DEBUG) && defined(_MSC_VER) && _MSC_VER >= 1000 //#include @@ -92,7 +93,7 @@ extern void DWMResetCompositionEnabled(); /* Initialize the Java VM instance variable when the library is first loaded */ -JavaVM *jvm; +JavaVM *jvm = NULL; JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) @@ -362,6 +363,95 @@ HWND AwtToolkit::CreateToolkitWnd(LPCTSTR name) return hwnd; } + +struct ToolkitThreadProc_Data { + bool result; + HANDLE hCompleted; + + jobject thread; +}; + +void ToolkitThreadProc(void *param) +{ + ToolkitThreadProc_Data *data = (ToolkitThreadProc_Data *)param; + + bool bNotified = false; + + JNIEnv *env; + JavaVMAttachArgs attachArgs; + attachArgs.version = JNI_VERSION_1_2; + attachArgs.name = "AWT-Windows"; + attachArgs.group = NULL; + + jint res = jvm->AttachCurrentThreadAsDaemon((void **)&env, &attachArgs); + if (res < 0) { + return; + } + + jobject thread = env->NewGlobalRef(data->thread); + if (thread != NULL) { + jclass cls = env->GetObjectClass(thread); + if (cls != NULL) { + jmethodID runId = env->GetMethodID(cls, "run", "()V"); + if (runId != NULL) { + data->result = true; + ::SetEvent(data->hCompleted); + bNotified = true; + + env->CallVoidMethod(thread, runId); + + if (env->ExceptionCheck()) { + env->ExceptionDescribe(); + env->ExceptionClear(); + // TODO: handle + } + } + env->DeleteLocalRef(cls); + } + env->DeleteGlobalRef(thread); + } + if (!bNotified) { + ::SetEvent(data->hCompleted); + } + + jvm->DetachCurrentThread(); +} + +/* + * Class: sun_awt_windows_WToolkit + * Method: startToolkitThread + * Signature: (Ljava/lang/Runnable;)Z + */ +JNIEXPORT jboolean JNICALL +Java_sun_awt_windows_WToolkit_startToolkitThread(JNIEnv *env, jclass cls, jobject thread) +{ + AwtToolkit& tk = AwtToolkit::GetInstance(); + + ToolkitThreadProc_Data data; + data.result = false; + data.thread = env->NewGlobalRef(thread); + if (data.thread == NULL) { + return JNI_FALSE; + } + data.hCompleted = ::CreateEvent(NULL, FALSE, FALSE, NULL); + + bool result = tk.GetPreloadThread() + .InvokeAndTerminate(ToolkitThreadProc, &data); + + if (result) { + ::WaitForSingleObject(data.hCompleted, INFINITE); + result = data.result; + } else { + // no awt preloading + // return back to the usual toolkit way + } + ::CloseHandle(data.hCompleted); + + env->DeleteGlobalRef(data.thread); + + return result ? JNI_TRUE : JNI_FALSE; +} + BOOL AwtToolkit::Initialize(BOOL localPump) { AwtToolkit& tk = AwtToolkit::GetInstance(); @@ -375,6 +465,11 @@ BOOL AwtToolkit::Initialize(BOOL localPump) { // ComCtl32Util was constructed but not disposed ComCtl32Util::GetInstance().InitLibraries(); + if (!localPump) { + // if preload thread was run, terminate it + preloadThread.Terminate(true); + } + /* Register this toolkit's helper window */ VERIFY(tk.RegisterClass() != NULL); @@ -443,7 +538,7 @@ BOOL AwtToolkit::Dispose() { // dispose Direct3D-related resources. This should be done // before AwtObjectList::Cleanup() as the d3d will attempt to // shutdown when the last of its windows is disposed of - D3DPipelineManager::DeleteInstance(); + D3DInitializer::GetInstance().Clean(); AwtObjectList::Cleanup(); AwtFont::Cleanup(); @@ -1639,6 +1734,270 @@ void AwtToolkit::GetWindowRect(HWND hWnd, LPRECT lpRect) ::GetWindowRect(hWnd, lpRect); } + +/************************************************************************ + * AWT preloading support + */ +bool AwtToolkit::PreloadAction::EnsureInited() +{ + DWORD _initThreadId = GetInitThreadID(); + if (_initThreadId != 0) { + // already inited + // ensure the action is inited on correct thread + PreloadThread &preloadThread + = AwtToolkit::GetInstance().GetPreloadThread(); + if (_initThreadId == preloadThread.GetThreadId()) { + if (!preloadThread.IsWrongThread()) { + return true; + } + // inited on preloadThread (wrongThread), not cleaned yet + // have to wait cleanup completion + preloadThread.Wait4Finish(); + } else { + // inited on other thread (Toolkit thread?) + // consider as correctly inited + return true; + } + } + + // init on Toolkit thread + AwtToolkit::GetInstance().InvokeFunction(InitWrapper, this); + + return true; +} + +DWORD AwtToolkit::PreloadAction::GetInitThreadID() +{ + CriticalSection::Lock lock(initLock); + return initThreadId; +} + +bool AwtToolkit::PreloadAction::Clean() +{ + DWORD _initThreadId = GetInitThreadID(); + if (_initThreadId == ::GetCurrentThreadId()) { + // inited on this thread + Clean(false); + return true; + } + return false; +} + +/*static*/ +void AwtToolkit::PreloadAction::InitWrapper(void *param) +{ + PreloadAction *pThis = (PreloadAction *)param; + pThis->Init(); +} + +void AwtToolkit::PreloadAction::Init() +{ + CriticalSection::Lock lock(initLock); + if (initThreadId == 0) { + initThreadId = ::GetCurrentThreadId(); + InitImpl(); + } +} + +void AwtToolkit::PreloadAction::Clean(bool reInit) { + CriticalSection::Lock lock(initLock); + if (initThreadId != 0) { + //ASSERT(initThreadId == ::GetCurrentThreadId()); + CleanImpl(reInit); + initThreadId = 0; + } +} + +// PreloadThread implementation +AwtToolkit::PreloadThread::PreloadThread() + : status(None), wrongThread(false), threadId(0), + pActionChain(NULL), pLastProcessedAction(NULL), + execFunc(NULL), execParam(NULL) +{ + hFinished = ::CreateEvent(NULL, TRUE, FALSE, NULL); + hAwake = ::CreateEvent(NULL, FALSE, FALSE, NULL); +} + +AwtToolkit::PreloadThread::~PreloadThread() +{ + //Terminate(false); + ::CloseHandle(hFinished); + ::CloseHandle(hAwake); +} + +bool AwtToolkit::PreloadThread::AddAction(AwtToolkit::PreloadAction *pAction) +{ + CriticalSection::Lock lock(threadLock); + + if (status > Preloading) { + // too late - the thread already terminated or run as toolkit thread + return false; + } + + if (pActionChain == NULL) { + // 1st action + pActionChain = pAction; + } else { + // add the action to the chain + PreloadAction *pChain = pActionChain; + while (true) { + PreloadAction *pNext = pChain->GetNext(); + if (pNext == NULL) { + break; + } + pChain = pNext; + } + pChain->SetNext(pAction); + } + + if (status > None) { + // the thread is already running (status == Preloading) + AwakeThread(); + return true; + } + + // need to start thread + ::ResetEvent(hAwake); + ::ResetEvent(hFinished); + + HANDLE hThread = (HANDLE)_beginthreadex(NULL, 0x100000, StaticThreadProc, + this, 0, &threadId); + + if (hThread == 0) { + threadId = 0; + return false; + } + + status = Preloading; + + ::CloseHandle(hThread); + + return true; +} + +bool AwtToolkit::PreloadThread::Terminate(bool wrongThread) +{ + CriticalSection::Lock lock(threadLock); + + if (status != Preloading) { + return false; + } + + execFunc = NULL; + execParam = NULL; + this->wrongThread = wrongThread; + status = Cleaning; + AwakeThread(); + + return true; +} + +bool AwtToolkit::PreloadThread::InvokeAndTerminate(void(_cdecl *fn)(void *), void *param) +{ + CriticalSection::Lock lock(threadLock); + + if (status != Preloading) { + return false; + } + + execFunc = fn; + execParam = param; + status = fn == NULL ? Cleaning : RunningToolkit; + AwakeThread(); + + return true; +} + +/*static*/ +unsigned WINAPI AwtToolkit::PreloadThread::StaticThreadProc(void *param) +{ + AwtToolkit::PreloadThread *pThis = (AwtToolkit::PreloadThread *)param; + return pThis->ThreadProc(); +} + +unsigned AwtToolkit::PreloadThread::ThreadProc() +{ + void(_cdecl *_execFunc)(void *) = NULL; + void *_execParam = NULL; + bool _wrongThread = false; + + // initialization + while (true) { + PreloadAction *pAction; + { + CriticalSection::Lock lock(threadLock); + if (status != Preloading) { + // get invoke parameters + _execFunc = execFunc; + _execParam = execParam; + _wrongThread = wrongThread; + break; + } + pAction = GetNextAction(); + } + if (pAction != NULL) { + pAction->Init(); + } else { + ::WaitForSingleObject(hAwake, INFINITE); + } + } + + // call a function from InvokeAndTerminate + if (_execFunc != NULL) { + _execFunc(_execParam); + } else { + // time to terminate.. + } + + // cleanup + { + CriticalSection::Lock lock(threadLock); + pLastProcessedAction = NULL; // goto 1st action in the chain + status = Cleaning; + } + for (PreloadAction *pAction = GetNextAction(); pAction != NULL; + pAction = GetNextAction()) { + pAction->Clean(_wrongThread); + } + + // don't clear threadId! it is used by PreloadAction::EnsureInited + + { + CriticalSection::Lock lock(threadLock); + status = Finished; + } + ::SetEvent(hFinished); + return 0; +} + +AwtToolkit::PreloadAction* AwtToolkit::PreloadThread::GetNextAction() +{ + CriticalSection::Lock lock(threadLock); + PreloadAction *pAction = (pLastProcessedAction == NULL) + ? pActionChain + : pLastProcessedAction->GetNext(); + if (pAction != NULL) { + pLastProcessedAction = pAction; + } + + return pAction; +} + + +extern "C" { + +/* Terminates preload thread (if it's still alive + * - it may occur if the application doesn't use AWT). + * The function is called from launcher after completion main java thread. + */ +__declspec(dllexport) void preloadStop() +{ + AwtToolkit::GetInstance().GetPreloadThread().Terminate(false); +} + +} + + /************************************************************************ * Toolkit native methods */ diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.h b/jdk/src/windows/native/sun/windows/awt_Toolkit.h index 2a957719337..4dfe22313b5 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.h +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.h @@ -465,6 +465,151 @@ public: void InstallMouseLowLevelHook(); void UninstallMouseLowLevelHook(); + + +/* AWT preloading (early Toolkit thread start) + */ +public: + /* Toolkit preload action class. + * Preload actions should be registered with + * AwtToolkit::getInstance().GetPreloadThread().AddAction(). + * AwtToolkit thread calls InitImpl method at the beghining + * and CleanImpl(false) before exiting for all registered actions. + * If an application provides own Toolkit thread + * (sun.awt.windows.WToolkit.embeddedInit), the thread calls Clean(true) + * for each action. + */ + class PreloadThread; // forward declaration + class PreloadAction { + friend class PreloadThread; + public: + PreloadAction() : initThreadId(0), pNext(NULL) {} + virtual ~PreloadAction() {} + + protected: + // called by PreloadThread or as result + // of EnsureInited() call (on Toolkit thread!). + virtual void InitImpl() = 0; + + // called by PreloadThread (before exiting). + // reInit == false: normal shutdown; + // reInit == true: PreloadThread is shutting down due external + // Toolkit thread was provided. + virtual void CleanImpl(bool reInit) = 0; + + public: + // Initialized the action on the Toolkit thread if not yet initialized. + bool EnsureInited(); + + // returns thread ID which the action was inited on (0 if not inited) + DWORD GetInitThreadID(); + + // Allows to deinitialize action earlier. + // The method must be called on the Toolkit thread only. + // returns true on success, + // false if the action was inited on other thread. + bool Clean(); + + private: + unsigned initThreadId; + // lock for Init/Clean + CriticalSection initLock; + + // Chain support (for PreloadThread) + PreloadAction *pNext; // for action chain used by PreloadThread + void SetNext(PreloadAction *pNext) { this->pNext = pNext; } + PreloadAction *GetNext() { return pNext; } + + // wrapper for AwtToolkit::InvokeFunction + static void InitWrapper(void *param); + + void Init(); + void Clean(bool reInit); + + }; + + /** Toolkit preload thread class. + */ + class PreloadThread { + public: + PreloadThread(); + ~PreloadThread(); + + // adds action & start the thread if not yet started + bool AddAction(PreloadAction *pAction); + + // sets termination flag; returns true if the thread is running. + // wrongThread specifies cause of the termination: + // false means termination on the application shutdown; + // wrongThread is used as reInit parameter for action cleanup. + bool Terminate(bool wrongThread); + bool InvokeAndTerminate(void(_cdecl *fn)(void *), void *param); + + // waits for the the thread completion; + // use the method after Terminate() only if Terminate() returned true + INLINE void Wait4Finish() { + ::WaitForSingleObject(hFinished, INFINITE); + } + + INLINE unsigned GetThreadId() { + CriticalSection::Lock lock(threadLock); + return threadId; + } + INLINE bool IsWrongThread() { + CriticalSection::Lock lock(threadLock); + return wrongThread; + } + + private: + // data access lock + CriticalSection threadLock; + + // the thread status + enum Status { + None = -1, // initial + Preloading = 0, // preloading in progress + RunningToolkit, // Running as Toolkit thread + Cleaning, // exited from Toolkit thread proc, cleaning + Finished // + } status; + + // "wrong thread" flag + bool wrongThread; + + // thread proc (calls (this)param->ThreadProc()) + static unsigned WINAPI StaticThreadProc(void *param); + unsigned ThreadProc(); + + INLINE void AwakeThread() { + ::SetEvent(hAwake); + } + + // if threadId != 0 -> we are running + unsigned threadId; + // ThreadProc sets the event on exit + HANDLE hFinished; + // ThreadProc waits on the event for NewAction/Terminate/InvokeAndTerminate + HANDLE hAwake; + + // function/param to invoke (InvokeAndTerminate) + // if execFunc == NULL => just terminate + void(_cdecl *execFunc)(void *); + void *execParam; + + // action chain + PreloadAction *pActionChain; + PreloadAction *pLastProcessedAction; + + // returns next action in the list (NULL if no more actions) + PreloadAction* GetNextAction(); + + }; + + INLINE PreloadThread& GetPreloadThread() { return preloadThread; } + +private: + PreloadThread preloadThread; + }; From eee0c8b95937438848f437602a3306bc2448586e Mon Sep 17 00:00:00 2001 From: Alexander Potochkin Date: Wed, 20 Oct 2010 19:37:48 +0400 Subject: [PATCH 128/722] 6989617: Enable JComponent to control repaintings of its children Reviewed-by: rupashka --- .../share/classes/javax/swing/JComponent.java | 27 ++--- jdk/src/share/classes/javax/swing/JLayer.java | 2 +- .../share/classes/javax/swing/JViewport.java | 10 +- .../classes/javax/swing/RepaintManager.java | 11 ++ .../swing/JComponent/6989617/bug6989617.java | 103 ++++++++++++++++++ 5 files changed, 132 insertions(+), 21 deletions(-) create mode 100644 jdk/test/javax/swing/JComponent/6989617/bug6989617.java diff --git a/jdk/src/share/classes/javax/swing/JComponent.java b/jdk/src/share/classes/javax/swing/JComponent.java index f94a797ae6c..6f017402ec7 100644 --- a/jdk/src/share/classes/javax/swing/JComponent.java +++ b/jdk/src/share/classes/javax/swing/JComponent.java @@ -4783,21 +4783,11 @@ public abstract class JComponent extends Container implements Serializable, * @param y the y value of the dirty region * @param width the width of the dirty region * @param height the height of the dirty region + * @see #isPaintingOrigin() * @see java.awt.Component#isShowing * @see RepaintManager#addDirtyRegion */ public void repaint(long tm, int x, int y, int width, int height) { - Container p = this; - while ((p = p.getParent()) instanceof JComponent) { - JComponent jp = (JComponent) p; - if (jp.isPaintingOrigin()) { - Rectangle rectangle = SwingUtilities.convertRectangle( - this, new Rectangle(x, y, width, height), jp); - jp.repaint(tm, - rectangle.x, rectangle.y, rectangle.width, rectangle.height); - return; - } - } RepaintManager.currentManager(this).addDirtyRegion(this, x, y, width, height); } @@ -4808,6 +4798,7 @@ public abstract class JComponent extends Container implements Serializable, * currently pending events have been dispatched. * * @param r a Rectangle containing the dirty region + * @see #isPaintingOrigin() * @see java.awt.Component#isShowing * @see RepaintManager#addDirtyRegion */ @@ -4912,13 +4903,19 @@ public abstract class JComponent extends Container implements Serializable, } /** - * Returns true if a paint triggered on a child component should cause + * Returns {@code true} if a paint triggered on a child component should cause * painting to originate from this Component, or one of its ancestors. + *

    + * Calling {@link JComponent#repaint} on a Swing component will be delegated to + * the first ancestor which {@code isPaintingOrigin()} returns {@true}, + * if there are any. + *

    + * {@code JComponent} subclasses that need to be repainted when any of their + * children are repainted should override this method to return {@code true}. * - * @return true if painting should originate from this Component or - * one of its ancestors. + * @return always returns {@code false} */ - boolean isPaintingOrigin() { + protected boolean isPaintingOrigin() { return false; } diff --git a/jdk/src/share/classes/javax/swing/JLayer.java b/jdk/src/share/classes/javax/swing/JLayer.java index c01c4450767..8da354103f9 100644 --- a/jdk/src/share/classes/javax/swing/JLayer.java +++ b/jdk/src/share/classes/javax/swing/JLayer.java @@ -384,7 +384,7 @@ public final class JLayer * @return true * @see JComponent#isPaintingOrigin() */ - boolean isPaintingOrigin() { + protected boolean isPaintingOrigin() { return true; } diff --git a/jdk/src/share/classes/javax/swing/JViewport.java b/jdk/src/share/classes/javax/swing/JViewport.java index 97dacb30b4b..f171cd6a8a8 100644 --- a/jdk/src/share/classes/javax/swing/JViewport.java +++ b/jdk/src/share/classes/javax/swing/JViewport.java @@ -637,14 +637,14 @@ public class JViewport extends JComponent implements Accessible } /** - * Returns true if scroll mode is a BACKINGSTORE_SCROLL_MODE to cause - * painting to originate from JViewport, or one of its - * ancestors. Otherwise returns false. + * Returns true if scroll mode is a {@code BACKINGSTORE_SCROLL_MODE} to cause + * painting to originate from {@code JViewport}, or one of its + * ancestors. Otherwise returns {@code false}. * - * @return true if if scroll mode is a BACKINGSTORE_SCROLL_MODE. + * @return true if if scroll mode is a {@code BACKINGSTORE_SCROLL_MODE}. * @see JComponent#isPaintingOrigin() */ - boolean isPaintingOrigin() { + protected boolean isPaintingOrigin() { return scrollMode == BACKINGSTORE_SCROLL_MODE; } diff --git a/jdk/src/share/classes/javax/swing/RepaintManager.java b/jdk/src/share/classes/javax/swing/RepaintManager.java index d1166f90633..63444b422be 100644 --- a/jdk/src/share/classes/javax/swing/RepaintManager.java +++ b/jdk/src/share/classes/javax/swing/RepaintManager.java @@ -438,6 +438,7 @@ public class RepaintManager * @param y Y coordinate of the region to repaint * @param w Width of the region to repaint * @param h Height of the region to repaint + * @see JComponent#isPaintingOrigin() * @see JComponent#repaint */ public void addDirtyRegion(JComponent c, int x, int y, int w, int h) @@ -447,6 +448,16 @@ public class RepaintManager delegate.addDirtyRegion(c, x, y, w, h); return; } + Container p = c; + while ((p = p.getParent()) instanceof JComponent) { + JComponent jp = (JComponent) p; + if (jp.isPaintingOrigin()) { + Rectangle rectangle = SwingUtilities.convertRectangle( + c, new Rectangle(x, y, w, h), jp); + jp.repaint(0, rectangle.x, rectangle.y, rectangle.width, rectangle.height); + return; + } + } addDirtyRegion0(c, x, y, w, h); } diff --git a/jdk/test/javax/swing/JComponent/6989617/bug6989617.java b/jdk/test/javax/swing/JComponent/6989617/bug6989617.java new file mode 100644 index 00000000000..7f7aa958bf6 --- /dev/null +++ b/jdk/test/javax/swing/JComponent/6989617/bug6989617.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 6989617 + @summary Enable JComponent to control repaintings of its children + @author Alexander Potochkin + @run main bug6989617 +*/ + +import javax.swing.*; +import java.awt.*; + +public class bug6989617 { + + private boolean isPaintingOrigin; + private boolean innerPanelRepainted, outerPanelRepainted; + + public bug6989617() { + + final JButton button = new JButton("button"); + + JPanel innerPanel = new JPanel() { + protected boolean isPaintingOrigin() { + return isPaintingOrigin; + } + + public void repaint(long tm, int x, int y, int width, int height) { + if (button.getParent() != null) { + innerPanelRepainted = true; + if (!button.getSize().equals(new Dimension(width, height))) { + throw new RuntimeException("Wrong size of the dirty area"); + } + if (!button.getLocation().equals(new Point(x, y))) { + throw new RuntimeException("Wrong location of the dirty area"); + } + } + super.repaint(tm, x, y, width, height); + } + }; + + JPanel outerPanel = new JPanel() { + protected boolean isPaintingOrigin() { + return isPaintingOrigin; + } + + public void repaint(long tm, int x, int y, int width, int height) { + if (button.getParent() != null) { + outerPanelRepainted = true; + if (!button.getSize().equals(new Dimension(width, height))) { + throw new RuntimeException("Wrong size of the dirty area"); + } + } + super.repaint(tm, x, y, width, height); + } + }; + + + outerPanel.add(innerPanel); + innerPanel.add(button); + + outerPanel.setSize(100, 100); + innerPanel.setBounds(10, 10, 50, 50); + button.setBounds(10, 10, 20, 20); + + if (innerPanelRepainted || outerPanelRepainted) { + throw new RuntimeException("Repainted flag is unexpectedly on"); + } + button.repaint(); + if (innerPanelRepainted || outerPanelRepainted) { + throw new RuntimeException("Repainted flag is unexpectedly on"); + } + isPaintingOrigin = true; + button.repaint(); + if (!innerPanelRepainted || !outerPanelRepainted) { + throw new RuntimeException("Repainted flag is unexpectedly off"); + } + } + + public static void main(String... args) throws Exception { + new bug6989617(); + } +} From c6d66451cf7edb5a405cfb66771a8aba9759702b Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Thu, 21 Oct 2010 14:39:58 +0100 Subject: [PATCH 129/722] 6993267: TEST_BUG: java/nio/file/Path/InterruptCopy.java fails intermittently (win) Reviewed-by: forax --- jdk/test/java/nio/file/Path/InterruptCopy.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/jdk/test/java/nio/file/Path/InterruptCopy.java b/jdk/test/java/nio/file/Path/InterruptCopy.java index c03ebb312d8..7be5578985c 100644 --- a/jdk/test/java/nio/file/Path/InterruptCopy.java +++ b/jdk/test/java/nio/file/Path/InterruptCopy.java @@ -22,7 +22,7 @@ */ /* @test - * @bug 4313887 + * @bug 4313887 6993267 * @summary Unit test for Sun-specific ExtendedCopyOption.INTERRUPTIBLE option * @library .. * @run main/othervm -XX:-UseVMInterruptibleIO InterruptCopy @@ -36,8 +36,9 @@ import com.sun.nio.file.ExtendedCopyOption; public class InterruptCopy { - private static final long FILE_SIZE_TO_COPY = 512 * 1024 * 1024; + private static final long FILE_SIZE_TO_COPY = 512L * 1024L * 1024L; private static final int DELAY_IN_MS = 500; + private static final int DURATION_MAX_IN_MS = 5000; public static void main(String[] args) throws Exception { Path dir = TestUtil.createTemporaryDirectory(); @@ -81,20 +82,27 @@ public class InterruptCopy { try { // copy source to target in main thread, interrupting it after a delay final Thread me = Thread.currentThread(); - pool.schedule(new Runnable() { + Future wakeup = pool.schedule(new Runnable() { public void run() { me.interrupt(); }}, DELAY_IN_MS, TimeUnit.MILLISECONDS); System.out.println("Copying file..."); try { + long start = System.currentTimeMillis(); source.copyTo(target, ExtendedCopyOption.INTERRUPTIBLE); - throw new RuntimeException("Copy completed (this is not expected)"); + long duration = System.currentTimeMillis() - start; + if (duration > DURATION_MAX_IN_MS) + throw new RuntimeException("Copy was not interrupted"); } catch (IOException e) { boolean interrupted = Thread.interrupted(); if (!interrupted) throw new RuntimeException("Interrupt status was not set"); System.out.println("Copy failed (this is expected)"); } + try { + wakeup.get(); + } catch (InterruptedException ignore) { } + Thread.interrupted(); // copy source to target via task in thread pool, interrupting it after // a delay using cancel(true) @@ -113,7 +121,6 @@ public class InterruptCopy { System.out.println("Copy cancelled."); } finally { pool.shutdown(); - pool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); } } } From c3401153c816e70bcb33c35028e00dbbd884126e Mon Sep 17 00:00:00 2001 From: Keith McGuigan Date: Thu, 21 Oct 2010 10:10:23 -0400 Subject: [PATCH 130/722] 6991315: RedefineClasses fails with java.lang.VerifyError Repair stackmap table attribute when relocating bytecode Reviewed-by: acorn, never --- .../vm/classfile/stackMapTableFormat.hpp | 916 ++++++++++++++++++ hotspot/src/share/vm/includeDB_core | 4 + hotspot/src/share/vm/oops/methodOop.hpp | 4 + hotspot/src/share/vm/runtime/relocator.cpp | 118 +++ hotspot/src/share/vm/runtime/relocator.hpp | 1 + 5 files changed, 1043 insertions(+) create mode 100644 hotspot/src/share/vm/classfile/stackMapTableFormat.hpp diff --git a/hotspot/src/share/vm/classfile/stackMapTableFormat.hpp b/hotspot/src/share/vm/classfile/stackMapTableFormat.hpp new file mode 100644 index 00000000000..d20520abea0 --- /dev/null +++ b/hotspot/src/share/vm/classfile/stackMapTableFormat.hpp @@ -0,0 +1,916 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +// These classes represent the stack-map substructures described in the JVMS +// (hence the non-conforming naming scheme). + +// These classes work with the types in their compressed form in-place (as they +// would appear in the classfile). No virtual methods or fields allowed. + +class verification_type_info { + private: + // u1 tag + // u2 cpool_index || u2 bci (for ITEM_Object & ITEM_Uninitailized only) + + address tag_addr() const { return (address)this; } + address cpool_index_addr() const { return tag_addr() + sizeof(u1); } + address bci_addr() const { return cpool_index_addr(); } + + protected: + // No constructors - should be 'private', but GCC issues a warning if it is + verification_type_info() {} + verification_type_info(const verification_type_info&) {} + + public: + + static verification_type_info* at(address addr) { + return (verification_type_info*)addr; + } + + static verification_type_info* create_at(address addr, u1 tag) { + verification_type_info* vti = (verification_type_info*)addr; + vti->set_tag(tag); + return vti; + } + + static verification_type_info* create_object_at(address addr, u2 cp_idx) { + verification_type_info* vti = (verification_type_info*)addr; + vti->set_tag(ITEM_Object); + vti->set_cpool_index(cp_idx); + return vti; + } + + static verification_type_info* create_uninit_at(address addr, u2 bci) { + verification_type_info* vti = (verification_type_info*)addr; + vti->set_tag(ITEM_Uninitialized); + vti->set_bci(bci); + return vti; + } + + static size_t calculate_size(u1 tag) { + if (tag == ITEM_Object || tag == ITEM_Uninitialized) { + return sizeof(u1) + sizeof(u2); + } else { + return sizeof(u1); + } + } + + static size_t max_size() { return sizeof(u1) + sizeof(u2); } + + u1 tag() const { return *(u1*)tag_addr(); } + void set_tag(u1 tag) { *((u1*)tag_addr()) = tag; } + + bool is_object() const { return tag() == ITEM_Object; } + bool is_uninitialized() const { return tag() == ITEM_Uninitialized; } + + u2 cpool_index() const { + assert(is_object(), "This type has no cp_index"); + return Bytes::get_Java_u2(cpool_index_addr()); + } + void set_cpool_index(u2 idx) { + assert(is_object(), "This type has no cp_index"); + Bytes::put_Java_u2(cpool_index_addr(), idx); + } + + u2 bci() const { + assert(is_uninitialized(), "This type has no bci"); + return Bytes::get_Java_u2(bci_addr()); + } + + void set_bci(u2 bci) { + assert(is_uninitialized(), "This type has no bci"); + Bytes::put_Java_u2(bci_addr(), bci); + } + + void copy_from(verification_type_info* from) { + set_tag(from->tag()); + if (from->is_object()) { + set_cpool_index(from->cpool_index()); + } else if (from->is_uninitialized()) { + set_bci(from->bci()); + } + } + + size_t size() const { + return calculate_size(tag()); + } + + verification_type_info* next() { + return (verification_type_info*)((address)this + size()); + } + + // This method is used when reading unverified data in order to ensure + // that we don't read past a particular memory limit. It returns false + // if any part of the data structure is outside the specified memory bounds. + bool verify(address start, address end) { + return ((address)this >= start && + (address)this < end && + (bci_addr() + sizeof(u2) <= end || + !is_object() && !is_uninitialized())); + } + +#ifdef ASSERT + void print_on(outputStream* st) { + switch (tag()) { + case ITEM_Top: st->print("Top"); break; + case ITEM_Integer: st->print("Integer"); break; + case ITEM_Float: st->print("Float"); break; + case ITEM_Double: st->print("Double"); break; + case ITEM_Long: st->print("Long"); break; + case ITEM_Null: st->print("Null"); break; + case ITEM_UninitializedThis: + st->print("UninitializedThis"); break; + case ITEM_Uninitialized: + st->print("Uninitialized[#%d]", bci()); break; + case ITEM_Object: + st->print("Object[#%d]", cpool_index()); break; + default: + assert(false, "Bad verification_type_info"); + } + } +#endif +}; + +#define FOR_EACH_STACKMAP_FRAME_TYPE(macro, arg1, arg2) \ + macro(same_frame, arg1, arg2) \ + macro(same_frame_extended, arg1, arg2) \ + macro(same_frame_1_stack_item_frame, arg1, arg2) \ + macro(same_frame_1_stack_item_extended, arg1, arg2) \ + macro(chop_frame, arg1, arg2) \ + macro(append_frame, arg1, arg2) \ + macro(full_frame, arg1, arg2) + +#define SM_FORWARD_DECL(type, arg1, arg2) class type; +FOR_EACH_STACKMAP_FRAME_TYPE(SM_FORWARD_DECL, x, x) +#undef SM_FORWARD_DECL + +class stack_map_frame { + protected: + address frame_type_addr() const { return (address)this; } + + // No constructors - should be 'private', but GCC issues a warning if it is + stack_map_frame() {} + stack_map_frame(const stack_map_frame&) {} + + public: + + static stack_map_frame* at(address addr) { + return (stack_map_frame*)addr; + } + + stack_map_frame* next() const { + return at((address)this + size()); + } + + u1 frame_type() const { return *(u1*)frame_type_addr(); } + void set_frame_type(u1 type) { *((u1*)frame_type_addr()) = type; } + + // pseudo-virtual methods + inline size_t size() const; + inline int offset_delta() const; + inline void set_offset_delta(int offset_delta); + inline int number_of_types() const; // number of types contained in the frame + inline verification_type_info* types() const; // pointer to first type + inline bool is_valid_offset(int offset_delta) const; + + // This method must be used when reading unverified data in order to ensure + // that we don't read past a particular memory limit. It returns false + // if any part of the data structure is outside the specified memory bounds. + inline bool verify(address start, address end) const; +#ifdef ASSERT + inline void print_on(outputStream* st) const; +#endif + + // Create as_xxx and is_xxx methods for the subtypes +#define FRAME_TYPE_DECL(stackmap_frame_type, arg1, arg2) \ + inline stackmap_frame_type* as_##stackmap_frame_type() const; \ + bool is_##stackmap_frame_type() { \ + return as_##stackmap_frame_type() != NULL; \ + } + + FOR_EACH_STACKMAP_FRAME_TYPE(FRAME_TYPE_DECL, x, x) +#undef FRAME_TYPE_DECL +}; + +class same_frame : public stack_map_frame { + private: + static int frame_type_to_offset_delta(u1 frame_type) { + return frame_type + 1; } + static u1 offset_delta_to_frame_type(int offset_delta) { + return (u1)(offset_delta - 1); } + + public: + + static bool is_frame_type(u1 tag) { + return tag < 64; + } + + static same_frame* at(address addr) { + assert(is_frame_type(*addr), "Wrong frame id"); + return (same_frame*)addr; + } + + static same_frame* create_at(address addr, int offset_delta) { + same_frame* sm = (same_frame*)addr; + sm->set_offset_delta(offset_delta); + return sm; + } + + static size_t calculate_size() { return sizeof(u1); } + + size_t size() const { return calculate_size(); } + int offset_delta() const { return frame_type_to_offset_delta(frame_type()); } + + void set_offset_delta(int offset_delta) { + assert(offset_delta <= 64, "Offset too large for same_frame"); + set_frame_type(offset_delta_to_frame_type(offset_delta)); + } + + int number_of_types() const { return 0; } + verification_type_info* types() const { return NULL; } + + bool is_valid_offset(int offset_delta) const { + return is_frame_type(offset_delta_to_frame_type(offset_delta)); + } + + bool verify_subtype(address start, address end) const { + return true; + } + +#ifdef ASSERT + void print_on(outputStream* st) const { + st->print("same_frame(%d)", offset_delta()); + } +#endif +}; + +class same_frame_extended : public stack_map_frame { + private: + enum { _frame_id = 251 }; + address offset_delta_addr() const { return frame_type_addr() + sizeof(u1); } + + public: + static bool is_frame_type(u1 tag) { + return tag == _frame_id; + } + + static same_frame_extended* at(address addr) { + assert(is_frame_type(*addr), "Wrong frame type"); + return (same_frame_extended*)addr; + } + + static same_frame_extended* create_at(address addr, u2 offset_delta) { + same_frame_extended* sm = (same_frame_extended*)addr; + sm->set_frame_type(_frame_id); + sm->set_offset_delta(offset_delta); + return sm; + } + + static size_t calculate_size() { return sizeof(u1) + sizeof(u2); } + + size_t size() const { return calculate_size(); } + int offset_delta() const { + return Bytes::get_Java_u2(offset_delta_addr()) + 1; + } + + void set_offset_delta(int offset_delta) { + Bytes::put_Java_u2(offset_delta_addr(), offset_delta - 1); + } + + int number_of_types() const { return 0; } + verification_type_info* types() const { return NULL; } + bool is_valid_offset(int offset) const { return true; } + + bool verify_subtype(address start, address end) const { + return frame_type_addr() + size() <= end; + } + +#ifdef ASSERT + void print_on(outputStream* st) const { + st->print("same_frame_extended(%d)", offset_delta()); + } +#endif +}; + +class same_frame_1_stack_item_frame : public stack_map_frame { + private: + address type_addr() const { return frame_type_addr() + sizeof(u1); } + + static int frame_type_to_offset_delta(u1 frame_type) { + return frame_type - 63; } + static u1 offset_delta_to_frame_type(int offset_delta) { + return (u1)(offset_delta + 63); } + + public: + static bool is_frame_type(u1 tag) { + return tag >= 64 && tag < 128; + } + + static same_frame_1_stack_item_frame* at(address addr) { + assert(is_frame_type(*addr), "Wrong frame id"); + return (same_frame_1_stack_item_frame*)addr; + } + + static same_frame_1_stack_item_frame* create_at( + address addr, int offset_delta, verification_type_info* vti) { + same_frame_1_stack_item_frame* sm = (same_frame_1_stack_item_frame*)addr; + sm->set_offset_delta(offset_delta); + if (vti != NULL) { + sm->set_type(vti); + } + return sm; + } + + static size_t calculate_size(verification_type_info* vti) { + return sizeof(u1) + vti->size(); + } + + static size_t max_size() { + return sizeof(u1) + verification_type_info::max_size(); + } + + size_t size() const { return calculate_size(types()); } + int offset_delta() const { return frame_type_to_offset_delta(frame_type()); } + + void set_offset_delta(int offset_delta) { + assert(offset_delta > 0 && offset_delta <= 64, + "Offset too large for this frame type"); + set_frame_type(offset_delta_to_frame_type(offset_delta)); + } + + void set_type(verification_type_info* vti) { + verification_type_info* cur = types(); + cur->copy_from(vti); + } + + int number_of_types() const { return 1; } + verification_type_info* types() const { + return verification_type_info::at(type_addr()); + } + + bool is_valid_offset(int offset_delta) const { + return is_frame_type(offset_delta_to_frame_type(offset_delta)); + } + + bool verify_subtype(address start, address end) const { + return types()->verify(start, end); + } + +#ifdef ASSERT + void print_on(outputStream* st) const { + st->print("same_frame_1_stack_item_frame(%d,", offset_delta()); + types()->print_on(st); + st->print(")"); + } +#endif +}; + +class same_frame_1_stack_item_extended : public stack_map_frame { + private: + address offset_delta_addr() const { return frame_type_addr() + sizeof(u1); } + address type_addr() const { return offset_delta_addr() + sizeof(u2); } + + enum { _frame_id = 247 }; + + public: + static bool is_frame_type(u1 tag) { + return tag == _frame_id; + } + + static same_frame_1_stack_item_extended* at(address addr) { + assert(is_frame_type(*addr), "Wrong frame id"); + return (same_frame_1_stack_item_extended*)addr; + } + + static same_frame_1_stack_item_extended* create_at( + address addr, int offset_delta, verification_type_info* vti) { + same_frame_1_stack_item_extended* sm = + (same_frame_1_stack_item_extended*)addr; + sm->set_frame_type(_frame_id); + sm->set_offset_delta(offset_delta); + if (vti != NULL) { + sm->set_type(vti); + } + return sm; + } + + static size_t calculate_size(verification_type_info* vti) { + return sizeof(u1) + sizeof(u2) + vti->size(); + } + + size_t size() const { return calculate_size(types()); } + int offset_delta() const { + return Bytes::get_Java_u2(offset_delta_addr()) + 1; + } + + void set_offset_delta(int offset_delta) { + Bytes::put_Java_u2(offset_delta_addr(), offset_delta - 1); + } + + void set_type(verification_type_info* vti) { + verification_type_info* cur = types(); + cur->copy_from(vti); + } + + int number_of_types() const { return 1; } + verification_type_info* types() const { + return verification_type_info::at(type_addr()); + } + bool is_valid_offset(int offset) { return true; } + + bool verify_subtype(address start, address end) const { + return type_addr() < end && types()->verify(start, end); + } + +#ifdef ASSERT + void print_on(outputStream* st) const { + st->print("same_frame_1_stack_item_extended(%d,", offset_delta()); + types()->print_on(st); + st->print(")"); + } +#endif +}; + +class chop_frame : public stack_map_frame { + private: + address offset_delta_addr() const { return frame_type_addr() + sizeof(u1); } + + static int frame_type_to_chops(u1 frame_type) { + int chop = 251 - frame_type; + return chop; + } + + static u1 chops_to_frame_type(int chop) { + return 251 - chop; + } + + public: + static bool is_frame_type(u1 tag) { + return frame_type_to_chops(tag) > 0 && frame_type_to_chops(tag) < 4; + } + + static chop_frame* at(address addr) { + assert(is_frame_type(*addr), "Wrong frame id"); + return (chop_frame*)addr; + } + + static chop_frame* create_at(address addr, int offset_delta, int chops) { + chop_frame* sm = (chop_frame*)addr; + sm->set_chops(chops); + sm->set_offset_delta(offset_delta); + return sm; + } + + static size_t calculate_size() { + return sizeof(u1) + sizeof(u2); + } + + size_t size() const { return calculate_size(); } + int offset_delta() const { + return Bytes::get_Java_u2(offset_delta_addr()) + 1; + } + void set_offset_delta(int offset_delta) { + Bytes::put_Java_u2(offset_delta_addr(), offset_delta - 1); + } + + int chops() const { + int chops = frame_type_to_chops(frame_type()); + assert(chops > 0 && chops < 4, "Invalid number of chops in frame"); + return chops; + } + void set_chops(int chops) { + assert(chops > 0 && chops <= 3, "Bad number of chops"); + set_frame_type(chops_to_frame_type(chops)); + } + + int number_of_types() const { return 0; } + verification_type_info* types() const { return NULL; } + bool is_valid_offset(int offset) { return true; } + + bool verify_subtype(address start, address end) const { + return frame_type_addr() + size() <= end; + } + +#ifdef ASSERT + void print_on(outputStream* st) const { + st->print("chop_frame(%d,%d)", offset_delta(), chops()); + } +#endif +}; + +class append_frame : public stack_map_frame { + private: + address offset_delta_addr() const { return frame_type_addr() + sizeof(u1); } + address types_addr() const { return offset_delta_addr() + sizeof(u2); } + + static int frame_type_to_appends(u1 frame_type) { + int append = frame_type - 251; + return append; + } + + static u1 appends_to_frame_type(int appends) { + assert(appends > 0 && appends < 4, "Invalid append amount"); + return 251 + appends; + } + + public: + static bool is_frame_type(u1 tag) { + return frame_type_to_appends(tag) > 0 && frame_type_to_appends(tag) < 4; + } + + static append_frame* at(address addr) { + assert(is_frame_type(*addr), "Wrong frame id"); + return (append_frame*)addr; + } + + static append_frame* create_at( + address addr, int offset_delta, int appends, + verification_type_info* types) { + append_frame* sm = (append_frame*)addr; + sm->set_appends(appends); + sm->set_offset_delta(offset_delta); + if (types != NULL) { + verification_type_info* cur = sm->types(); + for (int i = 0; i < appends; ++i) { + cur->copy_from(types); + cur = cur->next(); + types = types->next(); + } + } + return sm; + } + + static size_t calculate_size(int appends, verification_type_info* types) { + size_t sz = sizeof(u1) + sizeof(u2); + for (int i = 0; i < appends; ++i) { + sz += types->size(); + types = types->next(); + } + return sz; + } + + static size_t max_size() { + return sizeof(u1) + sizeof(u2) + 3 * verification_type_info::max_size(); + } + + size_t size() const { return calculate_size(number_of_types(), types()); } + int offset_delta() const { + return Bytes::get_Java_u2(offset_delta_addr()) + 1; + } + + void set_offset_delta(int offset_delta) { + Bytes::put_Java_u2(offset_delta_addr(), offset_delta - 1); + } + + void set_appends(int appends) { + assert(appends > 0 && appends < 4, "Bad number of appends"); + set_frame_type(appends_to_frame_type(appends)); + } + + int number_of_types() const { + int appends = frame_type_to_appends(frame_type()); + assert(appends > 0 && appends < 4, "Invalid number of appends in frame"); + return appends; + } + verification_type_info* types() const { + return verification_type_info::at(types_addr()); + } + bool is_valid_offset(int offset) const { return true; } + + bool verify_subtype(address start, address end) const { + verification_type_info* vti = types(); + if ((address)vti < end && vti->verify(start, end)) { + int nof = number_of_types(); + vti = vti->next(); + if (nof < 2 || vti->verify(start, end)) { + vti = vti->next(); + if (nof < 3 || vti->verify(start, end)) { + return true; + } + } + } + return false; + } + +#ifdef ASSERT + void print_on(outputStream* st) const { + st->print("append_frame(%d,", offset_delta()); + verification_type_info* vti = types(); + for (int i = 0; i < number_of_types(); ++i) { + vti->print_on(st); + if (i != number_of_types() - 1) { + st->print(","); + } + vti = vti->next(); + } + st->print(")"); + } +#endif +}; + +class full_frame : public stack_map_frame { + private: + address offset_delta_addr() const { return frame_type_addr() + sizeof(u1); } + address num_locals_addr() const { return offset_delta_addr() + sizeof(u2); } + address locals_addr() const { return num_locals_addr() + sizeof(u2); } + address stack_slots_addr(address end_of_locals) const { + return end_of_locals; } + address stack_addr(address end_of_locals) const { + return stack_slots_addr(end_of_locals) + sizeof(u2); } + + enum { _frame_id = 255 }; + + public: + static bool is_frame_type(u1 tag) { + return tag == _frame_id; + } + + static full_frame* at(address addr) { + assert(is_frame_type(*addr), "Wrong frame id"); + return (full_frame*)addr; + } + + static full_frame* create_at( + address addr, int offset_delta, int num_locals, + verification_type_info* locals, + int stack_slots, verification_type_info* stack) { + full_frame* sm = (full_frame*)addr; + sm->set_frame_type(_frame_id); + sm->set_offset_delta(offset_delta); + sm->set_num_locals(num_locals); + if (locals != NULL) { + verification_type_info* cur = sm->locals(); + for (int i = 0; i < num_locals; ++i) { + cur->copy_from(locals); + cur = cur->next(); + locals = locals->next(); + } + address end_of_locals = (address)cur; + sm->set_stack_slots(end_of_locals, stack_slots); + cur = sm->stack(end_of_locals); + for (int i = 0; i < stack_slots; ++i) { + cur->copy_from(stack); + cur = cur->next(); + stack = stack->next(); + } + } + return sm; + } + + static size_t calculate_size( + int num_locals, verification_type_info* locals, + int stack_slots, verification_type_info* stack) { + size_t sz = sizeof(u1) + sizeof(u2) + sizeof(u2) + sizeof(u2); + verification_type_info* vti = locals; + for (int i = 0; i < num_locals; ++i) { + sz += vti->size(); + vti = vti->next(); + } + vti = stack; + for (int i = 0; i < stack_slots; ++i) { + sz += vti->size(); + vti = vti->next(); + } + return sz; + } + + static size_t max_size(int locals, int stack) { + return sizeof(u1) + 3 * sizeof(u2) + + (locals + stack) * verification_type_info::max_size(); + } + + size_t size() const { + address eol = end_of_locals(); + return calculate_size(num_locals(), locals(), stack_slots(eol), stack(eol)); + } + + int offset_delta() const { + return Bytes::get_Java_u2(offset_delta_addr()) + 1; + } + int num_locals() const { return Bytes::get_Java_u2(num_locals_addr()); } + verification_type_info* locals() const { + return verification_type_info::at(locals_addr()); + } + address end_of_locals() const { + verification_type_info* vti = locals(); + for (int i = 0; i < num_locals(); ++i) { + vti = vti->next(); + } + return (address)vti; + } + int stack_slots(address end_of_locals) const { + return Bytes::get_Java_u2(stack_slots_addr(end_of_locals)); + } + verification_type_info* stack(address end_of_locals) const { + return verification_type_info::at(stack_addr(end_of_locals)); + } + + void set_offset_delta(int offset_delta) { + Bytes::put_Java_u2(offset_delta_addr(), offset_delta - 1); + } + void set_num_locals(int num_locals) { + Bytes::put_Java_u2(num_locals_addr(), num_locals); + } + void set_stack_slots(address end_of_locals, int stack_slots) { + Bytes::put_Java_u2(stack_slots_addr(end_of_locals), stack_slots); + } + + // These return only the locals. Extra processing is required for stack + // types of full frames. + int number_of_types() const { return num_locals(); } + verification_type_info* types() const { return locals(); } + bool is_valid_offset(int offset) { return true; } + + bool verify_subtype(address start, address end) const { + verification_type_info* vti = types(); + if ((address)vti >= end) { + return false; + } + int count = number_of_types(); + for (int i = 0; i < count; ++i) { + if (!vti->verify(start, end)) { + return false; + } + vti = vti->next(); + } + address eol = (address)vti; + if (eol + sizeof(u2) > end) { + return false; + } + count = stack_slots(eol); + vti = stack(eol); + for (int i = 0; i < stack_slots(eol); ++i) { + if (!vti->verify(start, end)) { + return false; + } + vti = vti->next(); + } + return true; + } + +#ifdef ASSERT + void print_on(outputStream* st) const { + st->print("full_frame(%d,{", offset_delta()); + verification_type_info* vti = locals(); + for (int i = 0; i < num_locals(); ++i) { + vti->print_on(st); + if (i != num_locals() - 1) { + st->print(","); + } + vti = vti->next(); + } + st->print("},{"); + address end_of_locals = (address)vti; + vti = stack(end_of_locals); + int ss = stack_slots(end_of_locals); + for (int i = 0; i < ss; ++i) { + vti->print_on(st); + if (i != ss - 1) { + st->print(","); + } + vti = vti->next(); + } + st->print("})"); + } +#endif +}; + +#define VIRTUAL_DISPATCH(stack_frame_type, func_name, args) \ + stack_frame_type* item_##stack_frame_type = as_##stack_frame_type(); \ + if (item_##stack_frame_type != NULL) { \ + return item_##stack_frame_type->func_name args; \ + } + +#define VOID_VIRTUAL_DISPATCH(stack_frame_type, func_name, args) \ + stack_frame_type* item_##stack_frame_type = as_##stack_frame_type(); \ + if (item_##stack_frame_type != NULL) { \ + item_##stack_frame_type->func_name args; \ + return; \ + } + +size_t stack_map_frame::size() const { + FOR_EACH_STACKMAP_FRAME_TYPE(VIRTUAL_DISPATCH, size, ()); + return 0; +} + +int stack_map_frame::offset_delta() const { + FOR_EACH_STACKMAP_FRAME_TYPE(VIRTUAL_DISPATCH, offset_delta, ()); + return 0; +} + +void stack_map_frame::set_offset_delta(int offset_delta) { + FOR_EACH_STACKMAP_FRAME_TYPE( + VOID_VIRTUAL_DISPATCH, set_offset_delta, (offset_delta)); +} + +int stack_map_frame::number_of_types() const { + FOR_EACH_STACKMAP_FRAME_TYPE(VIRTUAL_DISPATCH, number_of_types, ()); + return 0; +} + +verification_type_info* stack_map_frame::types() const { + FOR_EACH_STACKMAP_FRAME_TYPE(VIRTUAL_DISPATCH, types, ()); + return NULL; +} + +bool stack_map_frame::is_valid_offset(int offset) const { + FOR_EACH_STACKMAP_FRAME_TYPE(VIRTUAL_DISPATCH, is_valid_offset, (offset)); + return true; +} + +bool stack_map_frame::verify(address start, address end) const { + if (frame_type_addr() >= start && frame_type_addr() < end) { + FOR_EACH_STACKMAP_FRAME_TYPE( + VIRTUAL_DISPATCH, verify_subtype, (start, end)); + } + return false; +} + +#ifdef ASSERT +void stack_map_frame::print_on(outputStream* st) const { + FOR_EACH_STACKMAP_FRAME_TYPE(VOID_VIRTUAL_DISPATCH, print_on, (st)); +} +#endif + +#undef VIRTUAL_DISPATCH +#undef VOID_VIRTUAL_DISPATCH + +#define AS_SUBTYPE_DEF(stack_frame_type, arg1, arg2) \ +stack_frame_type* stack_map_frame::as_##stack_frame_type() const { \ + if (stack_frame_type::is_frame_type(frame_type())) { \ + return (stack_frame_type*)this; \ + } else { \ + return NULL; \ + } \ +} + +FOR_EACH_STACKMAP_FRAME_TYPE(AS_SUBTYPE_DEF, x, x) +#undef AS_SUBTYPE_DEF + +class stack_map_table_attribute { + private: + address name_index_addr() const { + return (address)this; } + address attribute_length_addr() const { + return name_index_addr() + sizeof(u2); } + address number_of_entries_addr() const { + return attribute_length_addr() + sizeof(u4); } + address entries_addr() const { + return number_of_entries_addr() + sizeof(u2); } + + protected: + // No constructors - should be 'private', but GCC issues a warning if it is + stack_map_table_attribute() {} + stack_map_table_attribute(const stack_map_table_attribute&) {} + + public: + + static stack_map_table_attribute* at(address addr) { + return (stack_map_table_attribute*)addr; + } + + u2 name_index() const { + return Bytes::get_Java_u2(name_index_addr()); } + u4 attribute_length() const { + return Bytes::get_Java_u4(attribute_length_addr()); } + u2 number_of_entries() const { + return Bytes::get_Java_u2(number_of_entries_addr()); } + stack_map_frame* entries() const { + return stack_map_frame::at(entries_addr()); + } + + static size_t header_size() { + return sizeof(u2) + sizeof(u4); + } + + void set_name_index(u2 idx) { + Bytes::put_Java_u2(name_index_addr(), idx); + } + void set_attribute_length(u4 len) { + Bytes::put_Java_u4(attribute_length_addr(), len); + } + void set_number_of_entries(u2 num) { + Bytes::put_Java_u2(number_of_entries_addr(), num); + } +}; diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index 14d78e91d41..a16805a0a9f 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -3601,7 +3601,9 @@ relocInfo_.hpp generate_platform_dependent_include relocator.cpp bytecodes.hpp relocator.cpp handles.inline.hpp relocator.cpp oop.inline.hpp +relocator.cpp oopFactory.hpp relocator.cpp relocator.hpp +relocator.cpp stackMapTableFormat.hpp relocator.cpp universe.inline.hpp relocator.hpp bytecodes.hpp @@ -3908,6 +3910,8 @@ stackMapTable.hpp globalDefinitions.hpp stackMapTable.hpp methodOop.hpp stackMapTable.hpp stackMapFrame.hpp +stackMapTableFormat.hpp verificationType.hpp + stackValue.cpp debugInfo.hpp stackValue.cpp frame.inline.hpp stackValue.cpp handles.inline.hpp diff --git a/hotspot/src/share/vm/oops/methodOop.hpp b/hotspot/src/share/vm/oops/methodOop.hpp index 827e58f1ab7..9ae2ca9076f 100644 --- a/hotspot/src/share/vm/oops/methodOop.hpp +++ b/hotspot/src/share/vm/oops/methodOop.hpp @@ -247,6 +247,10 @@ class methodOopDesc : public oopDesc { return constMethod()->stackmap_data(); } + void set_stackmap_data(typeArrayOop sd) { + constMethod()->set_stackmap_data(sd); + } + // exception handler table typeArrayOop exception_table() const { return constMethod()->exception_table(); } diff --git a/hotspot/src/share/vm/runtime/relocator.cpp b/hotspot/src/share/vm/runtime/relocator.cpp index bf796680f5d..483d21bd393 100644 --- a/hotspot/src/share/vm/runtime/relocator.cpp +++ b/hotspot/src/share/vm/runtime/relocator.cpp @@ -435,6 +435,120 @@ void Relocator::adjust_local_var_table(int bci, int delta) { } } +// Create a new array, copying the src array but adding a hole at +// the specified location +static typeArrayOop insert_hole_at( + size_t where, int hole_sz, typeArrayOop src) { + Thread* THREAD = Thread::current(); + Handle src_hnd(THREAD, src); + typeArrayOop dst = + oopFactory::new_permanent_byteArray(src->length() + hole_sz, CHECK_NULL); + src = (typeArrayOop)src_hnd(); + + address src_addr = (address)src->byte_at_addr(0); + address dst_addr = (address)dst->byte_at_addr(0); + + memcpy(dst_addr, src_addr, where); + memcpy(dst_addr + where + hole_sz, + src_addr + where, src->length() - where); + return dst; +} + +// The width of instruction at "bci" is changing by "delta". Adjust the stack +// map frames. +void Relocator::adjust_stack_map_table(int bci, int delta) { + if (method()->has_stackmap_table()) { + typeArrayOop data = method()->stackmap_data(); + // The data in the array is a classfile representation of the stackmap + // table attribute, less the initial u2 tag and u4 attribute_length fields. + stack_map_table_attribute* attr = stack_map_table_attribute::at( + (address)data->byte_at_addr(0) - (sizeof(u2) + sizeof(u4))); + + int count = attr->number_of_entries(); + stack_map_frame* frame = attr->entries(); + int bci_iter = -1; + bool offset_adjusted = false; // only need to adjust one offset + + for (int i = 0; i < count; ++i) { + int offset_delta = frame->offset_delta(); + bci_iter += offset_delta; + + if (!offset_adjusted && bci_iter > bci) { + int new_offset_delta = offset_delta + delta; + + if (frame->is_valid_offset(new_offset_delta)) { + frame->set_offset_delta(new_offset_delta); + } else { + assert(frame->is_same_frame() || + frame->is_same_frame_1_stack_item_frame(), + "Frame must be one of the compressed forms"); + // The new delta exceeds the capacity of the 'same_frame' or + // 'same_frame_1_stack_item_frame' frame types. We need to + // convert these frames to the extended versions, but the extended + // version is bigger and requires more room. So we allocate a + // new array and copy the data, being sure to leave u2-sized hole + // right after the 'frame_type' for the new offset field. + // + // We can safely ignore the reverse situation as a small delta + // can still be used in an extended version of the frame. + + size_t frame_offset = (address)frame - (address)data->byte_at_addr(0); + + data = insert_hole_at(frame_offset + 1, 2, data); + if (data == NULL) { + return; // out-of-memory? + } + + address frame_addr = (address)(data->byte_at_addr(0) + frame_offset); + frame = stack_map_frame::at(frame_addr); + + + // Now convert the frames in place + if (frame->is_same_frame()) { + same_frame_extended::create_at(frame_addr, new_offset_delta); + } else { + same_frame_1_stack_item_extended::create_at( + frame_addr, new_offset_delta, NULL); + // the verification_info_type should already be at the right spot + } + } + offset_adjusted = true; // needs to be done only once, since subsequent + // values are offsets from the current + } + + // The stack map frame may contain verification types, if so we need to + // check and update any Uninitialized type's bci (no matter where it is). + int number_of_types = frame->number_of_types(); + verification_type_info* types = frame->types(); + + for (int i = 0; i < number_of_types; ++i) { + if (types->is_uninitialized() && types->bci() > bci) { + types->set_bci(types->bci() + delta); + } + types = types->next(); + } + + // Full frame has stack values too + full_frame* ff = frame->as_full_frame(); + if (ff != NULL) { + address eol = (address)types; + number_of_types = ff->stack_slots(eol); + types = ff->stack(eol); + for (int i = 0; i < number_of_types; ++i) { + if (types->is_uninitialized() && types->bci() > bci) { + types->set_bci(types->bci() + delta); + } + types = types->next(); + } + } + + frame = frame->next(); + } + + method()->set_stackmap_data(data); // in case it has changed + } +} + bool Relocator::expand_code_array(int delta) { int length = MAX2(code_length() + delta, code_length() * (100+code_slop_pct()) / 100); @@ -499,6 +613,9 @@ bool Relocator::relocate_code(int bci, int ilen, int delta) { // And local variable table... adjust_local_var_table(bci, delta); + // Adjust stack maps + adjust_stack_map_table(bci, delta); + // Relocate the pending change stack... for (int j = 0; j < _changes->length(); j++) { ChangeItem* ci = _changes->at(j); @@ -641,6 +758,7 @@ bool Relocator::handle_switch_pad(int bci, int old_pad, bool is_lookup_switch) { memmove(addr_at(bci +1 + new_pad), addr_at(bci +1 + old_pad), len * 4); + memset(addr_at(bci + 1), 0, new_pad); // pad must be 0 } } return true; diff --git a/hotspot/src/share/vm/runtime/relocator.hpp b/hotspot/src/share/vm/runtime/relocator.hpp index be925e6a89a..3f163723d03 100644 --- a/hotspot/src/share/vm/runtime/relocator.hpp +++ b/hotspot/src/share/vm/runtime/relocator.hpp @@ -105,6 +105,7 @@ class Relocator : public ResourceObj { void adjust_exception_table(int bci, int delta); void adjust_line_no_table (int bci, int delta); void adjust_local_var_table(int bci, int delta); + void adjust_stack_map_table(int bci, int delta); int get_orig_switch_pad (int bci, bool is_lookup_switch); int rc_instr_len (int bci); bool expand_code_array (int delta); From 0d92e368eebfee9ba4c568fa8bf6a4f05cbc5077 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 21 Oct 2010 16:49:36 +0100 Subject: [PATCH 131/722] 6993490: SocketTimeoutException on HTTP keep-alive connections Reviewed-by: michaelm --- .../share/classes/sun/net/NetworkClient.java | 38 +++++++++++----- .../www/protocol/ftp/FtpURLConnection.java | 7 +-- .../www/protocol/http/HttpURLConnection.java | 12 ++--- .../sun/net/www/http/HttpClient/B6726695.java | 12 ++++- .../net/www/http/KeepAliveCache/B5045306.java | 11 ++++- .../www/protocol/http/ChunkedErrorStream.java | 45 ++++++++++++++----- 6 files changed, 92 insertions(+), 33 deletions(-) diff --git a/jdk/src/share/classes/sun/net/NetworkClient.java b/jdk/src/share/classes/sun/net/NetworkClient.java index 01322c91acc..1e88dc884c4 100644 --- a/jdk/src/share/classes/sun/net/NetworkClient.java +++ b/jdk/src/share/classes/sun/net/NetworkClient.java @@ -40,6 +40,12 @@ import java.security.PrivilegedAction; * @author Jonathan Payne */ public class NetworkClient { + /* Default value of read timeout, if not specified (infinity) */ + public static final int DEFAULT_READ_TIMEOUT = -1; + + /* Default value of connect timeout, if not specified (infinity) */ + public static final int DEFAULT_CONNECT_TIMEOUT = -1; + protected Proxy proxy = Proxy.NO_PROXY; /** Socket for communicating with server. */ protected Socket serverSocket = null; @@ -53,8 +59,8 @@ public class NetworkClient { protected static int defaultSoTimeout; protected static int defaultConnectTimeout; - protected int readTimeout = -1; - protected int connectTimeout = -1; + protected int readTimeout = DEFAULT_READ_TIMEOUT; + protected int connectTimeout = DEFAULT_CONNECT_TIMEOUT; /* Name of encoding to use for output */ protected static String encoding; @@ -71,16 +77,12 @@ public class NetworkClient { return null; } }); - if (vals[0] == 0) - defaultSoTimeout = -1; - else + if (vals[0] != 0) { defaultSoTimeout = vals[0]; - - if (vals[1] == 0) - defaultConnectTimeout = -1; - else + } + if (vals[1] != 0) { defaultConnectTimeout = vals[1]; - + } encoding = encs[0]; try { @@ -232,7 +234,23 @@ public class NetworkClient { return connectTimeout; } + /** + * Sets the read timeout. + * + * Note: Public URLConnection (and protocol specific implementations) + * protect against negative timeout values being set. This implemenation, + * and protocol specific implementations, use -1 to represent the default + * read timeout. + * + * This method may be invoked with the default timeout value when the + * protocol handler is trying to reset the timeout after doing a + * potentially blocking internal operation, e.g. cleaning up unread + * response data, buffering error stream response data, etc + */ public void setReadTimeout(int timeout) { + if (timeout == DEFAULT_READ_TIMEOUT) + timeout = defaultSoTimeout; + if (serverSocket != null && timeout >= 0) { try { serverSocket.setSoTimeout(timeout); diff --git a/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java b/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java index 49af37825a2..826f1afc5ee 100644 --- a/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java +++ b/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java @@ -46,6 +46,7 @@ import java.net.ProxySelector; import java.util.StringTokenizer; import java.util.Iterator; import java.security.Permission; +import sun.net.NetworkClient; import sun.net.www.MessageHeader; import sun.net.www.MeteredStream; import sun.net.www.URLConnection; @@ -102,11 +103,11 @@ public class FtpURLConnection extends URLConnection { static final int BIN = 2; static final int DIR = 3; int type = NONE; - /* Redefine timeouts from java.net.URLConnection as we nee -1 to mean + /* Redefine timeouts from java.net.URLConnection as we need -1 to mean * not set. This is to ensure backward compatibility. */ - private int connectTimeout = -1; - private int readTimeout = -1; + private int connectTimeout = NetworkClient.DEFAULT_CONNECT_TIMEOUT;; + private int readTimeout = NetworkClient.DEFAULT_READ_TIMEOUT;; /** * For FTP URLs we need to have a special InputStream because we diff --git a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java index 56ed6a40fa3..69f12a5c601 100644 --- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java +++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java @@ -359,11 +359,11 @@ public class HttpURLConnection extends java.net.HttpURLConnection { private TunnelState tunnelState = TunnelState.NONE; - /* Redefine timeouts from java.net.URLConnection as we nee -1 to mean + /* Redefine timeouts from java.net.URLConnection as we need -1 to mean * not set. This is to ensure backward compatibility. */ - private int connectTimeout = -1; - private int readTimeout = -1; + private int connectTimeout = NetworkClient.DEFAULT_CONNECT_TIMEOUT; + private int readTimeout = NetworkClient.DEFAULT_READ_TIMEOUT; /* Logging support */ private static final PlatformLogger logger = @@ -1041,9 +1041,9 @@ public class HttpURLConnection extends java.net.HttpURLConnection { throw new ProtocolException("Server rejected operation"); } } - if (oldTimeout > 0) { - http.setReadTimeout(oldTimeout); - } + + http.setReadTimeout(oldTimeout); + responseCode = -1; responses.reset(); // Proceed diff --git a/jdk/test/sun/net/www/http/HttpClient/B6726695.java b/jdk/test/sun/net/www/http/HttpClient/B6726695.java index 9e69e8e3d46..01840850cb0 100644 --- a/jdk/test/sun/net/www/http/HttpClient/B6726695.java +++ b/jdk/test/sun/net/www/http/HttpClient/B6726695.java @@ -23,7 +23,7 @@ /* * @test - * @bug 6726695 + * @bug 6726695 6993490 * @summary HttpURLConnection shoul support 'Expect: 100-contimue' headers for PUT */ @@ -184,7 +184,15 @@ public class B6726695 extends Thread { out.flush(); // Then read the body char[] cbuf = new char[512]; - int l = in.read(cbuf); + in.read(cbuf); + + /* Force the server to not respond for more that the expect 100-Continue + * timeout set by the HTTP handler (5000 millis). This ensures the + * timeout is correctly resets the default read timeout, infinity. + * See 6993490. */ + System.out.println("server sleeping..."); + try {Thread.sleep(6000); } catch (InterruptedException e) {} + // finally send the 200 OK out.print("HTTP/1.1 200 OK"); out.print("Server: Sun-Java-System-Web-Server/7.0\r\n"); diff --git a/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java b/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java index ac9d4e568f3..08b3079b5cf 100644 --- a/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java +++ b/jdk/test/sun/net/www/http/KeepAliveCache/B5045306.java @@ -23,7 +23,7 @@ /* * @test - * @bug 5045306 6356004 + * @bug 5045306 6356004 6993490 * @library ../../httptest/ * @build HttpCallback HttpServer HttpTransaction * @run main/othervm B5045306 @@ -32,7 +32,6 @@ import java.net.*; import java.io.*; -import java.nio.channels.*; import java.lang.management.*; /* Part 1: @@ -164,6 +163,14 @@ class SimpleHttpTransaction implements HttpCallback failed = true; trans.setResponseHeader ("Content-length", Integer.toString(0)); + + /* Force the server to not respond for more that the timeout + * set by the keepalive cleaner (5000 millis). This ensures the + * timeout is correctly resets the default read timeout, + * infinity. See 6993490. */ + System.out.println("server sleeping..."); + try {Thread.sleep(6000); } catch (InterruptedException e) {} + trans.sendResponse(200, "OK"); } else if(path.equals("/part2")) { System.out.println("Call to /part2"); diff --git a/jdk/test/sun/net/www/protocol/http/ChunkedErrorStream.java b/jdk/test/sun/net/www/protocol/http/ChunkedErrorStream.java index ee5368a59cc..d5e72f44889 100644 --- a/jdk/test/sun/net/www/protocol/http/ChunkedErrorStream.java +++ b/jdk/test/sun/net/www/protocol/http/ChunkedErrorStream.java @@ -23,7 +23,7 @@ /* * @test - * @bug 6488669 6595324 + * @bug 6488669 6595324 6993490 * @run main/othervm ChunkedErrorStream * @summary Chunked ErrorStream tests */ @@ -48,6 +48,18 @@ import com.sun.net.httpserver.*; * 2) Client sends request to server and tries to * getErrorStream(). 4K + 10 bytes must be read from * the errorStream. + * + * Part 3: 6993490 + * Reuse persistent connection from part 2, the error stream + * buffering will have set a reduced timeout on the socket and + * tried to reset it to the default, infinity. Client must not + * throw a timeout exception. If it does, it indicates that the + * default timeout was not reset correctly. + * If no timeout exception is thrown, it does not guarantee that + * the timeout was reset correctly, as there is a potential race + * between the sleeping server and the client thread. Typically, + * 1000 millis has been enought to reliable reproduce this problem + * since the error stream buffering sets the timeout to 60 millis. */ public class ChunkedErrorStream @@ -75,19 +87,18 @@ public class ChunkedErrorStream } finally { httpServer.stop(1); } - } void doClient() { - for (int times=0; times<2; times++) { + for (int times=0; times<3; times++) { HttpURLConnection uc = null; try { InetSocketAddress address = httpServer.getAddress(); String URLStr = "http://localhost:" + address.getPort() + "/test/"; if (times == 0) { - URLStr += 6488669; + URLStr += "first"; } else { - URLStr += 6595324; + URLStr += "second"; } System.out.println("Trying " + URLStr); @@ -97,6 +108,11 @@ public class ChunkedErrorStream throw new RuntimeException("Failed: getInputStream should throw and IOException"); } catch (IOException e) { + if (e instanceof SocketTimeoutException) { + e.printStackTrace(); + throw new RuntimeException("Failed: SocketTimeoutException should not happen"); + } + // This is what we expect to happen. InputStream es = uc.getErrorStream(); byte[] ba = new byte[1024]; @@ -112,7 +128,7 @@ public class ChunkedErrorStream if (count == 0) throw new RuntimeException("Failed: ErrorStream returning 0 bytes"); - if (times == 1 && count != (4096+10)) + if (times >= 1 && count != (4096+10)) throw new RuntimeException("Failed: ErrorStream returning " + count + " bytes. Expecting " + (4096+10)); @@ -128,13 +144,13 @@ public class ChunkedErrorStream httpServer = com.sun.net.httpserver.HttpServer.create(new InetSocketAddress(0), 0); // create HttpServer context - HttpContext ctx1 = httpServer.createContext("/test/6488669", new Handler6488669()); - HttpContext ctx2 = httpServer.createContext("/test/6595324", new Handler6595324()); + httpServer.createContext("/test/first", new FirstHandler()); + httpServer.createContext("/test/second", new SecondHandler()); httpServer.start(); } - class Handler6488669 implements HttpHandler { + class FirstHandler implements HttpHandler { public void handle(HttpExchange t) throws IOException { InputStream is = t.getRequestBody(); byte[] ba = new byte[1024]; @@ -156,13 +172,22 @@ public class ChunkedErrorStream } } - class Handler6595324 implements HttpHandler { + static class SecondHandler implements HttpHandler { + /* count greater than 0, slow response */ + static int count = 0; + public void handle(HttpExchange t) throws IOException { InputStream is = t.getRequestBody(); byte[] ba = new byte[1024]; while (is.read(ba) != -1); is.close(); + if (count > 0) { + System.out.println("server sleeping..."); + try { Thread.sleep(1000); } catch(InterruptedException e) {} + } + count++; + t.sendResponseHeaders(404, 0); OutputStream os = t.getResponseBody(); From 7d22a39cae8b63fef867d5c9c41972a40a35edc5 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 21 Oct 2010 16:51:09 +0100 Subject: [PATCH 132/722] 6992859: InetAddressCachePolicy.setIfNotSet() fails Reviewed-by: michaelm --- .../sun/net/InetAddressCachePolicy.java | 50 +++++++------------ 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/jdk/src/share/classes/sun/net/InetAddressCachePolicy.java b/jdk/src/share/classes/sun/net/InetAddressCachePolicy.java index 7b48f5765ad..a506a944e28 100644 --- a/jdk/src/share/classes/sun/net/InetAddressCachePolicy.java +++ b/jdk/src/share/classes/sun/net/InetAddressCachePolicy.java @@ -25,7 +25,6 @@ package sun.net; -import java.net.InetAddress; import java.security.PrivilegedAction; import java.security.Security; @@ -57,7 +56,7 @@ public final class InetAddressCachePolicy { * caching. For security reasons, this caching is made forever when * a security manager is set. */ - private static int cachePolicy; + private static int cachePolicy = FOREVER; /* The Java-level namelookup cache policy for negative lookups: * @@ -67,31 +66,24 @@ public final class InetAddressCachePolicy { * default value is 0. It can be set to some other value for * performance reasons. */ - private static int negativeCachePolicy; + private static int negativeCachePolicy = NEVER; /* * Whether or not the cache policy for successful lookups was set * using a property (cmd line). */ - private static boolean set = false; + private static boolean propertySet; /* * Whether or not the cache policy for negative lookups was set * using a property (cmd line). */ - private static boolean negativeSet = false; + private static boolean propertyNegativeSet; /* * Initialize */ static { - - set = false; - negativeSet = false; - - cachePolicy = FOREVER; - negativeCachePolicy = 0; - Integer tmp = null; try { @@ -110,7 +102,7 @@ public final class InetAddressCachePolicy { if (cachePolicy < 0) { cachePolicy = FOREVER; } - set = true; + propertySet = true; } else { tmp = java.security.AccessController.doPrivileged (new sun.security.action.GetIntegerAction(cachePolicyPropFallback)); @@ -119,7 +111,14 @@ public final class InetAddressCachePolicy { if (cachePolicy < 0) { cachePolicy = FOREVER; } - set = true; + propertySet = true; + } else { + /* No properties defined for positive caching. If there is no + * security manager then use the default positive cache value. + */ + if (System.getSecurityManager() == null) { + cachePolicy = DEFAULT_POSITIVE; + } } } @@ -140,7 +139,7 @@ public final class InetAddressCachePolicy { if (negativeCachePolicy < 0) { negativeCachePolicy = FOREVER; } - negativeSet = true; + propertyNegativeSet = true; } else { tmp = java.security.AccessController.doPrivileged (new sun.security.action.GetIntegerAction(negativeCachePolicyPropFallback)); @@ -149,17 +148,13 @@ public final class InetAddressCachePolicy { if (negativeCachePolicy < 0) { negativeCachePolicy = FOREVER; } - negativeSet = true; + propertyNegativeSet = true; } } } public static synchronized int get() { - if (!set && System.getSecurityManager() == null) { - return DEFAULT_POSITIVE; - } else { - return cachePolicy; - } + return cachePolicy; } public static synchronized int getNegative() { @@ -174,21 +169,17 @@ public final class InetAddressCachePolicy { * should be cached */ public static synchronized void setIfNotSet(int newPolicy) { - /* * When setting the new value we may want to signal that the * cache should be flushed, though this doesn't seem strictly * necessary. */ - - if (!set) { + if (!propertySet) { checkValue(newPolicy, cachePolicy); cachePolicy = newPolicy; } - } - /** * Sets the cache policy for negative lookups if the user has not * already specified a cache policy for it using a @@ -197,14 +188,12 @@ public final class InetAddressCachePolicy { * should be cached */ public static synchronized void setNegativeIfNotSet(int newPolicy) { - /* * When setting the new value we may want to signal that the * cache should be flushed, though this doesn't seem strictly * necessary. */ - - if (!negativeSet) { + if (!propertyNegativeSet) { // Negative caching does not seem to have any security // implications. // checkValue(newPolicy, negativeCachePolicy); @@ -213,13 +202,11 @@ public final class InetAddressCachePolicy { } private static void checkValue(int newPolicy, int oldPolicy) { - /* * If malicious code gets a hold of this method, prevent * setting the cache policy to something laxer or some * invalid negative value. */ - if (newPolicy == FOREVER) return; @@ -229,7 +216,6 @@ public final class InetAddressCachePolicy { throw new SecurityException("can't make InetAddress cache more lax"); - } } } From 704780d250e095c95018ba3b6931d5b56783cd34 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Thu, 21 Oct 2010 20:41:20 +0400 Subject: [PATCH 133/722] 4358979: javax.swing.border should have a DashedBorder Reviewed-by: flar, alexp --- .../share/classes/java/awt/BasicStroke.java | 5 +- .../share/classes/java/awt/GradientPaint.java | 4 +- .../classes/java/awt/LinearGradientPaint.java | 5 +- .../classes/java/awt/RadialGradientPaint.java | 4 +- .../java/awt/geom/AffineTransform.java | 4 +- .../classes/javax/swing/BorderFactory.java | 123 ++++++++++++++ .../javax/swing/border/StrokeBorder.java | 156 ++++++++++++++++++ .../XMLEncoder/java_awt_BasicStroke.java | 46 ++++++ .../XMLEncoder/java_awt_GradientPaint.java | 47 ++++++ .../java_awt_LinearGradientPaint.java | 60 +++++++ .../java_awt_RadialGradientPaint.java | 60 +++++++ .../java_awt_geom_AffineTransform.java | 45 +++++ .../javax_swing_border_StrokeBorder.java | 48 ++++++ 13 files changed, 601 insertions(+), 6 deletions(-) create mode 100644 jdk/src/share/classes/javax/swing/border/StrokeBorder.java create mode 100644 jdk/test/java/beans/XMLEncoder/java_awt_BasicStroke.java create mode 100644 jdk/test/java/beans/XMLEncoder/java_awt_GradientPaint.java create mode 100644 jdk/test/java/beans/XMLEncoder/java_awt_LinearGradientPaint.java create mode 100644 jdk/test/java/beans/XMLEncoder/java_awt_RadialGradientPaint.java create mode 100644 jdk/test/java/beans/XMLEncoder/java_awt_geom_AffineTransform.java create mode 100644 jdk/test/java/beans/XMLEncoder/javax_swing_border_StrokeBorder.java diff --git a/jdk/src/share/classes/java/awt/BasicStroke.java b/jdk/src/share/classes/java/awt/BasicStroke.java index 46a7e2299c4..bcf84331149 100644 --- a/jdk/src/share/classes/java/awt/BasicStroke.java +++ b/jdk/src/share/classes/java/awt/BasicStroke.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ package java.awt; +import java.beans.ConstructorProperties; + /** * The BasicStroke class defines a basic set of rendering * attributes for the outlines of graphics primitives, which are rendered @@ -183,6 +185,7 @@ public class BasicStroke implements Stroke { * dash is zero * @throws IllegalArgumentException if dash lengths are all zero. */ + @ConstructorProperties({ "lineWidth", "endCap", "lineJoin", "miterLimit", "dashArray", "dashPhase" }) public BasicStroke(float width, int cap, int join, float miterlimit, float dash[], float dash_phase) { if (width < 0.0f) { diff --git a/jdk/src/share/classes/java/awt/GradientPaint.java b/jdk/src/share/classes/java/awt/GradientPaint.java index 684501a8cc6..badca3170d1 100644 --- a/jdk/src/share/classes/java/awt/GradientPaint.java +++ b/jdk/src/share/classes/java/awt/GradientPaint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.geom.AffineTransform; import java.awt.image.ColorModel; +import java.beans.ConstructorProperties; /** * The GradientPaint class provides a way to fill @@ -166,6 +167,7 @@ public class GradientPaint implements Paint { * @throws NullPointerException if either one of colors or points * is null */ + @ConstructorProperties({ "point1", "color1", "point2", "color2", "cyclic" }) public GradientPaint(Point2D pt1, Color color1, Point2D pt2, diff --git a/jdk/src/share/classes/java/awt/LinearGradientPaint.java b/jdk/src/share/classes/java/awt/LinearGradientPaint.java index c7d9a74da12..8d5d727540b 100644 --- a/jdk/src/share/classes/java/awt/LinearGradientPaint.java +++ b/jdk/src/share/classes/java/awt/LinearGradientPaint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,10 +26,10 @@ package java.awt; import java.awt.geom.AffineTransform; -import java.awt.geom.NoninvertibleTransformException; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.image.ColorModel; +import java.beans.ConstructorProperties; /** * The {@code LinearGradientPaint} class provides a way to fill @@ -271,6 +271,7 @@ public final class LinearGradientPaint extends MultipleGradientPaint { * or a {@code fractions} value is less than 0.0 or greater than 1.0, * or the {@code fractions} are not provided in strictly increasing order */ + @ConstructorProperties({ "startPoint", "endPoint", "fractions", "colors", "cycleMethod", "colorSpace", "transform" }) public LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, CycleMethod cycleMethod, diff --git a/jdk/src/share/classes/java/awt/RadialGradientPaint.java b/jdk/src/share/classes/java/awt/RadialGradientPaint.java index 12d76aadeb0..d87a3253d46 100644 --- a/jdk/src/share/classes/java/awt/RadialGradientPaint.java +++ b/jdk/src/share/classes/java/awt/RadialGradientPaint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.image.ColorModel; +import java.beans.ConstructorProperties; /** * The {@code RadialGradientPaint} class provides a way to fill a shape with @@ -428,6 +429,7 @@ public final class RadialGradientPaint extends MultipleGradientPaint { * or a {@code fractions} value is less than 0.0 or greater than 1.0, * or the {@code fractions} are not provided in strictly increasing order */ + @ConstructorProperties({ "centerPoint", "radius", "focusPoint", "fractions", "colors", "cycleMethod", "colorSpace", "transform" }) public RadialGradientPaint(Point2D center, float radius, Point2D focus, diff --git a/jdk/src/share/classes/java/awt/geom/AffineTransform.java b/jdk/src/share/classes/java/awt/geom/AffineTransform.java index 5e4dafc9dd7..a3b8134fe1f 100644 --- a/jdk/src/share/classes/java/awt/geom/AffineTransform.java +++ b/jdk/src/share/classes/java/awt/geom/AffineTransform.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package java.awt.geom; import java.awt.Shape; +import java.beans.ConstructorProperties; /** * The AffineTransform class represents a 2D affine transform @@ -508,6 +509,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable { * @param m12 the Y coordinate translation element of the 3x3 matrix * @since 1.2 */ + @ConstructorProperties({ "scaleX", "shearY", "shearX", "scaleY", "translateX", "translateY" }) public AffineTransform(float m00, float m10, float m01, float m11, float m02, float m12) { diff --git a/jdk/src/share/classes/javax/swing/BorderFactory.java b/jdk/src/share/classes/javax/swing/BorderFactory.java index 0f53bed4560..e288d0bd4d8 100644 --- a/jdk/src/share/classes/javax/swing/BorderFactory.java +++ b/jdk/src/share/classes/javax/swing/BorderFactory.java @@ -24,8 +24,10 @@ */ package javax.swing; +import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; +import java.awt.Paint; import javax.swing.border.*; /** @@ -636,4 +638,125 @@ public class BorderFactory Icon tileIcon) { return new MatteBorder(top, left, bottom, right, tileIcon); } + +//// StrokeBorder ////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + + /** + * Creates a border of the specified {@code stroke}. + * The component's foreground color will be used to render the border. + * + * @param stroke the {@link BasicStroke} object used to stroke a shape + * @return the {@code Border} object + * + * @throws NullPointerException if the specified {@code stroke} is {@code null} + * + * @since 1.7 + */ + public static Border createStrokeBorder(BasicStroke stroke) { + return new StrokeBorder(stroke); + } + + /** + * Creates a border of the specified {@code stroke} and {@code paint}. + * If the specified {@code paint} is {@code null}, + * the component's foreground color will be used to render the border. + * + * @param stroke the {@link BasicStroke} object used to stroke a shape + * @param paint the {@link Paint} object used to generate a color + * @return the {@code Border} object + * + * @throws NullPointerException if the specified {@code stroke} is {@code null} + * + * @since 1.7 + */ + public static Border createStrokeBorder(BasicStroke stroke, Paint paint) { + return new StrokeBorder(stroke, paint); + } + +//// DashedBorder ////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + + private static Border sharedDashedBorder; + + /** + * Creates a dashed border of the specified {@code paint}. + * If the specified {@code paint} is {@code null}, + * the component's foreground color will be used to render the border. + * The width of a dash line is equal to {@code 1}. + * The relative length of a dash line and + * the relative spacing between dash lines are equal to {@code 1}. + * A dash line is not rounded. + * + * @param paint the {@link Paint} object used to generate a color + * @return the {@code Border} object + * + * @since 1.7 + */ + public static Border createDashedBorder(Paint paint) { + return createDashedBorder(paint, 1.0f, 1.0f, 1.0f, false); + } + + /** + * Creates a dashed border of the specified {@code paint}, + * relative {@code length}, and relative {@code spacing}. + * If the specified {@code paint} is {@code null}, + * the component's foreground color will be used to render the border. + * The width of a dash line is equal to {@code 1}. + * A dash line is not rounded. + * + * @param paint the {@link Paint} object used to generate a color + * @param length the relative length of a dash line + * @param spacing the relative spacing between dash lines + * @return the {@code Border} object + * + * @throws IllegalArgumentException if the specified {@code length} is less than {@code 1}, or + * if the specified {@code spacing} is less than {@code 0} + * @since 1.7 + */ + public static Border createDashedBorder(Paint paint, float length, float spacing) { + return createDashedBorder(paint, 1.0f, length, spacing, false); + } + + /** + * Creates a dashed border of the specified {@code paint}, {@code thickness}, + * line shape, relative {@code length}, and relative {@code spacing}. + * If the specified {@code paint} is {@code null}, + * the component's foreground color will be used to render the border. + * + * @param paint the {@link Paint} object used to generate a color + * @param thickness the width of a dash line + * @param length the relative length of a dash line + * @param spacing the relative spacing between dash lines + * @param rounded whether or not line ends should be round + * @return the {@code Border} object + * + * @throws IllegalArgumentException if the specified {@code thickness} is less than {@code 1}, or + * if the specified {@code length} is less than {@code 1}, or + * if the specified {@code spacing} is less than {@code 0} + * @since 1.7 + */ + public static Border createDashedBorder(Paint paint, float thickness, float length, float spacing, boolean rounded) { + boolean shared = !rounded && (paint == null) && (thickness == 1.0f) && (length == 1.0f) && (spacing == 1.0f); + if (shared && (sharedDashedBorder != null)) { + return sharedDashedBorder; + } + if (thickness < 1.0f) { + throw new IllegalArgumentException("thickness is less than 1"); + } + if (length < 1.0f) { + throw new IllegalArgumentException("length is less than 1"); + } + if (spacing < 0.0f) { + throw new IllegalArgumentException("spacing is less than 0"); + } + int cap = rounded ? BasicStroke.CAP_ROUND : BasicStroke.CAP_SQUARE; + int join = rounded ? BasicStroke.JOIN_ROUND : BasicStroke.JOIN_MITER; + float[] array = { thickness * (length - 1.0f), thickness * (spacing + 1.0f) }; + Border border = createStrokeBorder(new BasicStroke(thickness, cap, join, thickness * 2.0f, array, 0.0f), paint); + if (shared) { + sharedDashedBorder = border; + } + return border; + } } diff --git a/jdk/src/share/classes/javax/swing/border/StrokeBorder.java b/jdk/src/share/classes/javax/swing/border/StrokeBorder.java new file mode 100644 index 00000000000..b2538bae2dc --- /dev/null +++ b/jdk/src/share/classes/javax/swing/border/StrokeBorder.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package javax.swing.border; + +import java.awt.BasicStroke; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.Paint; +import java.awt.RenderingHints; +import java.awt.geom.Rectangle2D; +import java.beans.ConstructorProperties; + +/** + * A class which implements a border of an arbitrary stroke. + *

    + * Warning: + * Serialized objects of this class will not be compatible with + * future Swing releases. The current serialization support is + * appropriate for short term storage or RMI + * between applications running the same version of Swing. + * As of 1.4, support for long term storage of all JavaBeans™ + * has been added to the java.beans package. + * Please see {@link java.beans.XMLEncoder}. + * + * @author Sergey A. Malenkov + * + * @since 1.7 + */ +public class StrokeBorder extends AbstractBorder { + private final BasicStroke stroke; + private final Paint paint; + + /** + * Creates a border of the specified {@code stroke}. + * The component's foreground color will be used to render the border. + * + * @param stroke the {@link BasicStroke} object used to stroke a shape + * + * @throws NullPointerException if the specified {@code stroke} is {@code null} + */ + public StrokeBorder(BasicStroke stroke) { + this(stroke, null); + } + + /** + * Creates a border of the specified {@code stroke} and {@code paint}. + * If the specified {@code paint} is {@code null}, + * the component's foreground color will be used to render the border. + * + * @param stroke the {@link BasicStroke} object used to stroke a shape + * @param paint the {@link Paint} object used to generate a color + * + * @throws NullPointerException if the specified {@code stroke} is {@code null} + */ + @ConstructorProperties({ "stroke", "paint" }) + public StrokeBorder(BasicStroke stroke, Paint paint) { + if (stroke == null) { + throw new NullPointerException("border's stroke"); + } + this.stroke = stroke; + this.paint = paint; + } + + /** + * Paints the border for the specified component + * with the specified position and size. + * + * @param c the component for which this border is being painted + * @param g the paint graphics + * @param x the x position of the painted border + * @param y the y position of the painted border + * @param width the width of the painted border + * @param height the height of the painted border + * + * @throws NullPointerException if the specified {@code c} or {@code g} are {@code null} + */ + @Override + public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { + float size = this.stroke.getLineWidth(); + if (size > 0.0f) { + g = g.create(); + if (g instanceof Graphics2D) { + Graphics2D g2d = (Graphics2D) g; + g2d.setStroke(this.stroke); + g2d.setPaint(this.paint != null ? this.paint : c.getForeground()); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g2d.draw(new Rectangle2D.Float(x + size / 2, y + size / 2, width - size, height - size)); + } + g.dispose(); + } + } + + /** + * Reinitializes the {@code insets} parameter + * with this border's current insets. + * All insets are equal to the line width of the stroke. + * + * @param c the component for which this border insets value applies + * @param insets the {@code Insets} object to be reinitialized + * @return the reinitialized {@code insets} parameter + * + * @throws NullPointerException if the specified {@code insets} is {@code null} + */ + @Override + public Insets getBorderInsets(Component c, Insets insets) { + int size = (int) Math.ceil(this.stroke.getLineWidth()); + insets.set(size, size, size, size); + return insets; + } + + /** + * Returns the {@link BasicStroke} object used to stroke a shape + * during the border rendering. + * + * @return the {@link BasicStroke} object + */ + public BasicStroke getStroke() { + return this.stroke; + } + + /** + * Returns the {@link Paint} object used to generate a color + * during the border rendering. + * + * @return the {@link Paint} object or {@code null} + * if the {@code paint} parameter is not set + */ + public Paint getPaint() { + return this.paint; + } +} diff --git a/jdk/test/java/beans/XMLEncoder/java_awt_BasicStroke.java b/jdk/test/java/beans/XMLEncoder/java_awt_BasicStroke.java new file mode 100644 index 00000000000..6a6efdad199 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/java_awt_BasicStroke.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4358979 + * @summary Tests BasicStroke encoding + * @author Sergey Malenkov + */ + +import java.awt.BasicStroke; + +public final class java_awt_BasicStroke extends AbstractTest { + public static void main(String[] args) { + new java_awt_BasicStroke().test(true); + } + + protected BasicStroke getObject() { + return new BasicStroke(); + } + + protected BasicStroke getAnotherObject() { + float[] f = {1.0f, 2.0f, 3.0f, 4.0f}; + return new BasicStroke(f[1], BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, f[2], f, f[3]); + } +} diff --git a/jdk/test/java/beans/XMLEncoder/java_awt_GradientPaint.java b/jdk/test/java/beans/XMLEncoder/java_awt_GradientPaint.java new file mode 100644 index 00000000000..40d8bf59a9f --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/java_awt_GradientPaint.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4358979 + * @summary Tests GradientPaint encoding + * @author Sergey Malenkov + */ + +import java.awt.Color; +import java.awt.GradientPaint; + +public final class java_awt_GradientPaint extends AbstractTest { + public static void main(String[] args) { + new java_awt_GradientPaint().test(true); + } + + protected GradientPaint getObject() { + return new GradientPaint(0.1f, 0.2f, Color.BLACK, 0.3f, 0.4f, Color.WHITE, true); + } + + protected GradientPaint getAnotherObject() { + return null; /* TODO: could not update property + return new GradientPaint(0.4f, 0.3f, Color.WHITE, 0.2f, 0.1f, Color.BLACK, false);*/ + } +} diff --git a/jdk/test/java/beans/XMLEncoder/java_awt_LinearGradientPaint.java b/jdk/test/java/beans/XMLEncoder/java_awt_LinearGradientPaint.java new file mode 100644 index 00000000000..7a636b10c65 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/java_awt_LinearGradientPaint.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4358979 + * @summary Tests LinearGradientPaint encoding + * @author Sergey Malenkov + */ + +import java.awt.Color; +import java.awt.LinearGradientPaint; +import java.awt.geom.AffineTransform; +import java.awt.geom.Point2D; + +import static java.awt.MultipleGradientPaint.ColorSpaceType.LINEAR_RGB; +import static java.awt.MultipleGradientPaint.CycleMethod.REFLECT; + +public final class java_awt_LinearGradientPaint extends AbstractTest { + public static void main(String[] args) { + new java_awt_LinearGradientPaint().test(true); + } + + protected LinearGradientPaint getObject() { + float[] f = { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f }; + Color[] c = { Color.BLUE, Color.GREEN, Color.RED, Color.BLUE, Color.GREEN, Color.RED }; + return new LinearGradientPaint(f[0], f[1], f[2], f[3], f, c); + } + + protected LinearGradientPaint getAnotherObject() { + return null; /* TODO: could not update property + float[] f = { 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f }; + Color[] c = { Color.RED, Color.GREEN, Color.BLUE, Color.RED, Color.GREEN, Color.BLUE }; + return new LinearGradientPaint( + new Point2D.Float(f[0], f[1]), + new Point2D.Float(f[2], f[3]), + f, c, REFLECT, LINEAR_RGB, + new AffineTransform(f));*/ + } +} diff --git a/jdk/test/java/beans/XMLEncoder/java_awt_RadialGradientPaint.java b/jdk/test/java/beans/XMLEncoder/java_awt_RadialGradientPaint.java new file mode 100644 index 00000000000..fbb7be9864a --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/java_awt_RadialGradientPaint.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4358979 + * @summary Tests RadialGradientPaint encoding + * @author Sergey Malenkov + */ + +import java.awt.Color; +import java.awt.RadialGradientPaint; +import java.awt.geom.AffineTransform; +import java.awt.geom.Point2D; + +import static java.awt.MultipleGradientPaint.ColorSpaceType.LINEAR_RGB; +import static java.awt.MultipleGradientPaint.CycleMethod.REFLECT; + +public final class java_awt_RadialGradientPaint extends AbstractTest { + public static void main(String[] args) { + new java_awt_RadialGradientPaint().test(true); + } + + protected RadialGradientPaint getObject() { + float[] f = { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f }; + Color[] c = { Color.BLUE, Color.GREEN, Color.RED, Color.BLUE, Color.GREEN, Color.RED }; + return new RadialGradientPaint(f[0], f[1], f[2], f, c); + } + + protected RadialGradientPaint getAnotherObject() { + return null; /* TODO: could not update property + float[] f = { 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f }; + Color[] c = { Color.RED, Color.GREEN, Color.BLUE, Color.RED, Color.GREEN, Color.BLUE }; + return new RadialGradientPaint( + new Point2D.Float(f[0], f[1]), 100.0f, + new Point2D.Float(f[2], f[3]), + f, c, REFLECT, LINEAR_RGB, + new AffineTransform(f));*/ + } +} diff --git a/jdk/test/java/beans/XMLEncoder/java_awt_geom_AffineTransform.java b/jdk/test/java/beans/XMLEncoder/java_awt_geom_AffineTransform.java new file mode 100644 index 00000000000..9e5da1160c1 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/java_awt_geom_AffineTransform.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4358979 + * @summary Tests AffineTransform encoding + * @author Sergey Malenkov + */ + +import java.awt.geom.AffineTransform; + +public final class java_awt_geom_AffineTransform extends AbstractTest { + public static void main(String[] args) { + new java_awt_geom_AffineTransform().test(true); + } + + protected AffineTransform getObject() { + return new AffineTransform(0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f); + } + + protected AffineTransform getAnotherObject() { + return new AffineTransform(0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f); + } +} diff --git a/jdk/test/java/beans/XMLEncoder/javax_swing_border_StrokeBorder.java b/jdk/test/java/beans/XMLEncoder/javax_swing_border_StrokeBorder.java new file mode 100644 index 00000000000..0ee1fda4ca8 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/javax_swing_border_StrokeBorder.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4358979 + * @summary Tests StrokeBorder encoding + * @author Sergey Malenkov + */ + +import java.awt.BasicStroke; +import java.awt.Color; +import javax.swing.border.StrokeBorder; + +public final class javax_swing_border_StrokeBorder extends AbstractTest { + public static void main(String[] args) { + new javax_swing_border_StrokeBorder().test(true); + } + + protected StrokeBorder getObject() { + return new StrokeBorder(new BasicStroke(0), Color.WHITE); + } + + protected StrokeBorder getAnotherObject() { + return null; // TODO: could not update property + //return new StrokeBorder(new BasicStroke(1)); + } +} From 1571a4a56f695c720d9450afdc1c50bb3454e33e Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Thu, 21 Oct 2010 11:55:10 -0700 Subject: [PATCH 134/722] 6970683: improvements to hs_err output Reviewed-by: kvn, jrose, dholmes, coleenp --- .../os_cpu/linux_sparc/vm/os_linux_sparc.cpp | 106 +++++++++-- .../src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 148 ++++++---------- .../solaris_sparc/vm/os_solaris_sparc.cpp | 165 ++++++++++-------- .../os_cpu/solaris_x86/vm/os_solaris_x86.cpp | 146 +++++----------- .../os_cpu/windows_x86/vm/os_windows_x86.cpp | 136 +++++---------- hotspot/src/share/vm/code/codeCache.cpp | 11 ++ hotspot/src/share/vm/code/codeCache.hpp | 1 + .../includeDB_gc_parallelScavenge | 1 + .../parallelScavenge/parallelScavengeHeap.cpp | 3 +- hotspot/src/share/vm/memory/heap.hpp | 3 +- hotspot/src/share/vm/runtime/os.cpp | 31 ++-- hotspot/src/share/vm/runtime/os.hpp | 3 +- hotspot/src/share/vm/utilities/vmError.cpp | 18 +- 13 files changed, 383 insertions(+), 389 deletions(-) diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp index b01fac31c8d..ada91d9a293 100644 --- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp +++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -200,6 +200,18 @@ void os::print_context(outputStream *st, void *context) { sigcontext* sc = (sigcontext*)context; st->print_cr("Registers:"); + st->print_cr(" G1=" INTPTR_FORMAT " G2=" INTPTR_FORMAT + " G3=" INTPTR_FORMAT " G4=" INTPTR_FORMAT, + SIG_REGS(sc).u_regs[CON_G1], + SIG_REGS(sc).u_regs[CON_G2], + SIG_REGS(sc).u_regs[CON_G3], + SIG_REGS(sc).u_regs[CON_G4]); + st->print_cr(" G5=" INTPTR_FORMAT " G6=" INTPTR_FORMAT + " G7=" INTPTR_FORMAT " Y=" INTPTR_FORMAT, + SIG_REGS(sc).u_regs[CON_G5], + SIG_REGS(sc).u_regs[CON_G6], + SIG_REGS(sc).u_regs[CON_G7], + SIG_REGS(sc).y); st->print_cr(" O0=" INTPTR_FORMAT " O1=" INTPTR_FORMAT " O2=" INTPTR_FORMAT " O3=" INTPTR_FORMAT, SIG_REGS(sc).u_regs[CON_O0], @@ -213,18 +225,32 @@ void os::print_context(outputStream *st, void *context) { SIG_REGS(sc).u_regs[CON_O6], SIG_REGS(sc).u_regs[CON_O7]); - st->print_cr(" G1=" INTPTR_FORMAT " G2=" INTPTR_FORMAT - " G3=" INTPTR_FORMAT " G4=" INTPTR_FORMAT, - SIG_REGS(sc).u_regs[CON_G1], - SIG_REGS(sc).u_regs[CON_G2], - SIG_REGS(sc).u_regs[CON_G3], - SIG_REGS(sc).u_regs[CON_G4]); - st->print_cr(" G5=" INTPTR_FORMAT " G6=" INTPTR_FORMAT - " G7=" INTPTR_FORMAT " Y=" INTPTR_FORMAT, - SIG_REGS(sc).u_regs[CON_G5], - SIG_REGS(sc).u_regs[CON_G6], - SIG_REGS(sc).u_regs[CON_G7], - SIG_REGS(sc).y); + + intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc); + st->print_cr(" L0=" INTPTR_FORMAT " L1=" INTPTR_FORMAT + " L2=" INTPTR_FORMAT " L3=" INTPTR_FORMAT, + sp[L0->sp_offset_in_saved_window()], + sp[L1->sp_offset_in_saved_window()], + sp[L2->sp_offset_in_saved_window()], + sp[L3->sp_offset_in_saved_window()]); + st->print_cr(" L4=" INTPTR_FORMAT " L5=" INTPTR_FORMAT + " L6=" INTPTR_FORMAT " L7=" INTPTR_FORMAT, + sp[L4->sp_offset_in_saved_window()], + sp[L5->sp_offset_in_saved_window()], + sp[L6->sp_offset_in_saved_window()], + sp[L7->sp_offset_in_saved_window()]); + st->print_cr(" I0=" INTPTR_FORMAT " I1=" INTPTR_FORMAT + " I2=" INTPTR_FORMAT " I3=" INTPTR_FORMAT, + sp[I0->sp_offset_in_saved_window()], + sp[I1->sp_offset_in_saved_window()], + sp[I2->sp_offset_in_saved_window()], + sp[I3->sp_offset_in_saved_window()]); + st->print_cr(" I4=" INTPTR_FORMAT " I5=" INTPTR_FORMAT + " I6=" INTPTR_FORMAT " I7=" INTPTR_FORMAT, + sp[I4->sp_offset_in_saved_window()], + sp[I5->sp_offset_in_saved_window()], + sp[I6->sp_offset_in_saved_window()], + sp[I7->sp_offset_in_saved_window()]); st->print_cr(" PC=" INTPTR_FORMAT " nPC=" INTPTR_FORMAT, SIG_PC(sc), @@ -232,7 +258,6 @@ void os::print_context(outputStream *st, void *context) { st->cr(); st->cr(); - intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc); st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp); print_hex_dump(st, (address)sp, (address)(sp + 32), sizeof(intptr_t)); st->cr(); @@ -242,7 +267,58 @@ void os::print_context(outputStream *st, void *context) { // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 16, pc + 16, sizeof(char)); + print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); +} + + +void os::print_register_info(outputStream *st, void *context) { + if (context == NULL) return; + + ucontext_t *uc = (ucontext_t*)context; + intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc); + + st->print_cr("Register to memory mapping:"); + st->cr(); + + // this is only for the "general purpose" registers + st->print("G1="); print_location(st, SIG_REGS(sc).u_regs[CON__G1]); + st->print("G2="); print_location(st, SIG_REGS(sc).u_regs[CON__G2]); + st->print("G3="); print_location(st, SIG_REGS(sc).u_regs[CON__G3]); + st->print("G4="); print_location(st, SIG_REGS(sc).u_regs[CON__G4]); + st->print("G5="); print_location(st, SIG_REGS(sc).u_regs[CON__G5]); + st->print("G6="); print_location(st, SIG_REGS(sc).u_regs[CON__G6]); + st->print("G7="); print_location(st, SIG_REGS(sc).u_regs[CON__G7]); + st->cr(); + + st->print("O0="); print_location(st, SIG_REGS(sc).u_regs[CON__O0]); + st->print("O1="); print_location(st, SIG_REGS(sc).u_regs[CON__O1]); + st->print("O2="); print_location(st, SIG_REGS(sc).u_regs[CON__O2]); + st->print("O3="); print_location(st, SIG_REGS(sc).u_regs[CON__O3]); + st->print("O4="); print_location(st, SIG_REGS(sc).u_regs[CON__O4]); + st->print("O5="); print_location(st, SIG_REGS(sc).u_regs[CON__O5]); + st->print("O6="); print_location(st, SIG_REGS(sc).u_regs[CON__O6]); + st->print("O7="); print_location(st, SIG_REGS(sc).u_regs[CON__O7]); + st->cr(); + + st->print("L0="); print_location(st, sp[L0->sp_offset_in_saved_window()]); + st->print("L1="); print_location(st, sp[L1->sp_offset_in_saved_window()]); + st->print("L2="); print_location(st, sp[L2->sp_offset_in_saved_window()]); + st->print("L3="); print_location(st, sp[L3->sp_offset_in_saved_window()]); + st->print("L4="); print_location(st, sp[L4->sp_offset_in_saved_window()]); + st->print("L5="); print_location(st, sp[L5->sp_offset_in_saved_window()]); + st->print("L6="); print_location(st, sp[L6->sp_offset_in_saved_window()]); + st->print("L7="); print_location(st, sp[L7->sp_offset_in_saved_window()]); + st->cr(); + + st->print("I0="); print_location(st, sp[I0->sp_offset_in_saved_window()]); + st->print("I1="); print_location(st, sp[I1->sp_offset_in_saved_window()]); + st->print("I2="); print_location(st, sp[I2->sp_offset_in_saved_window()]); + st->print("I3="); print_location(st, sp[I3->sp_offset_in_saved_window()]); + st->print("I4="); print_location(st, sp[I4->sp_offset_in_saved_window()]); + st->print("I5="); print_location(st, sp[I5->sp_offset_in_saved_window()]); + st->print("I6="); print_location(st, sp[I6->sp_offset_in_saved_window()]); + st->print("I7="); print_location(st, sp[I7->sp_offset_in_saved_window()]); + st->cr(); } diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp index 29b93ec6dd4..5cfa380c40a 100644 --- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -718,11 +718,6 @@ void os::print_context(outputStream *st, void *context) { ucontext_t *uc = (ucontext_t*)context; st->print_cr("Registers:"); - - // this is horrendously verbose but the layout of the registers in the - // context does not match how we defined our abstract Register set, so - // we can't just iterate through the gregs area - #ifdef AMD64 st->print( "RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]); st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]); @@ -745,68 +740,11 @@ void os::print_context(outputStream *st, void *context) { st->print(", R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]); st->cr(); st->print( "RIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RIP]); - st->print(", EFL=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); + st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_CSGSFS]); st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ERR]); st->cr(); st->print(" TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_TRAPNO]); - - st->cr(); - st->cr(); - - st->print_cr("Register to memory mapping:"); - st->cr(); - - // this is only for the "general purpose" registers - - st->print_cr("RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]); - print_location(st, uc->uc_mcontext.gregs[REG_RAX]); - st->cr(); - st->print_cr("RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]); - print_location(st, uc->uc_mcontext.gregs[REG_RBX]); - st->cr(); - st->print_cr("RCX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RCX]); - print_location(st, uc->uc_mcontext.gregs[REG_RCX]); - st->cr(); - st->print_cr("RDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDX]); - print_location(st, uc->uc_mcontext.gregs[REG_RDX]); - st->cr(); - st->print_cr("RSP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSP]); - print_location(st, uc->uc_mcontext.gregs[REG_RSP]); - st->cr(); - st->print_cr("RBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBP]); - print_location(st, uc->uc_mcontext.gregs[REG_RBP]); - st->cr(); - st->print_cr("RSI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSI]); - print_location(st, uc->uc_mcontext.gregs[REG_RSI]); - st->cr(); - st->print_cr("RDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDI]); - print_location(st, uc->uc_mcontext.gregs[REG_RDI]); - st->cr(); - st->print_cr("R8 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]); - print_location(st, uc->uc_mcontext.gregs[REG_R8]); - st->cr(); - st->print_cr("R9 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]); - print_location(st, uc->uc_mcontext.gregs[REG_R9]); - st->cr(); - st->print_cr("R10=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R10]); - print_location(st, uc->uc_mcontext.gregs[REG_R10]); - st->cr(); - st->print_cr("R11=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R11]); - print_location(st, uc->uc_mcontext.gregs[REG_R11]); - st->cr(); - st->print_cr("R12=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R12]); - print_location(st, uc->uc_mcontext.gregs[REG_R12]); - st->cr(); - st->print_cr("R13=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R13]); - print_location(st, uc->uc_mcontext.gregs[REG_R13]); - st->cr(); - st->print_cr("R14=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R14]); - print_location(st, uc->uc_mcontext.gregs[REG_R14]); - st->cr(); - st->print_cr("R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]); - print_location(st, uc->uc_mcontext.gregs[REG_R15]); - #else st->print( "EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]); st->print(", EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]); @@ -819,41 +757,8 @@ void os::print_context(outputStream *st, void *context) { st->print(", EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]); st->cr(); st->print( "EIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EIP]); - st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2); st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); - - st->cr(); - st->cr(); - - st->print_cr("Register to memory mapping:"); - st->cr(); - - // this is only for the "general purpose" registers - - st->print_cr("EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]); - print_location(st, uc->uc_mcontext.gregs[REG_EAX]); - st->cr(); - st->print_cr("EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]); - print_location(st, uc->uc_mcontext.gregs[REG_EBX]); - st->cr(); - st->print_cr("ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ECX]); - print_location(st, uc->uc_mcontext.gregs[REG_ECX]); - st->cr(); - st->print_cr("EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDX]); - print_location(st, uc->uc_mcontext.gregs[REG_EDX]); - st->cr(); - st->print_cr("ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESP]); - print_location(st, uc->uc_mcontext.gregs[REG_ESP]); - st->cr(); - st->print_cr("EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBP]); - print_location(st, uc->uc_mcontext.gregs[REG_EBP]); - st->cr(); - st->print_cr("ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESI]); - print_location(st, uc->uc_mcontext.gregs[REG_ESI]); - st->cr(); - st->print_cr("EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]); - print_location(st, uc->uc_mcontext.gregs[REG_EDI]); - + st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2); #endif // AMD64 st->cr(); st->cr(); @@ -868,7 +773,52 @@ void os::print_context(outputStream *st, void *context) { // this at the end, and hope for the best. address pc = os::Linux::ucontext_get_pc(uc); st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 16, pc + 16, sizeof(char)); + print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); +} + +void os::print_register_info(outputStream *st, void *context) { + if (context == NULL) return; + + ucontext_t *uc = (ucontext_t*)context; + + st->print_cr("Register to memory mapping:"); + st->cr(); + + // this is horrendously verbose but the layout of the registers in the + // context does not match how we defined our abstract Register set, so + // we can't just iterate through the gregs area + + // this is only for the "general purpose" registers + +#ifdef AMD64 + st->print("RAX="); print_location(st, uc->uc_mcontext.gregs[REG_RAX]); + st->print("RBX="); print_location(st, uc->uc_mcontext.gregs[REG_RBX]); + st->print("RCX="); print_location(st, uc->uc_mcontext.gregs[REG_RCX]); + st->print("RDX="); print_location(st, uc->uc_mcontext.gregs[REG_RDX]); + st->print("RSP="); print_location(st, uc->uc_mcontext.gregs[REG_RSP]); + st->print("RBP="); print_location(st, uc->uc_mcontext.gregs[REG_RBP]); + st->print("RSI="); print_location(st, uc->uc_mcontext.gregs[REG_RSI]); + st->print("RDI="); print_location(st, uc->uc_mcontext.gregs[REG_RDI]); + st->print("R8 ="); print_location(st, uc->uc_mcontext.gregs[REG_R8]); + st->print("R9 ="); print_location(st, uc->uc_mcontext.gregs[REG_R9]); + st->print("R10="); print_location(st, uc->uc_mcontext.gregs[REG_R10]); + st->print("R11="); print_location(st, uc->uc_mcontext.gregs[REG_R11]); + st->print("R12="); print_location(st, uc->uc_mcontext.gregs[REG_R12]); + st->print("R13="); print_location(st, uc->uc_mcontext.gregs[REG_R13]); + st->print("R14="); print_location(st, uc->uc_mcontext.gregs[REG_R14]); + st->print("R15="); print_location(st, uc->uc_mcontext.gregs[REG_R15]); +#else + st->print("EAX="); print_location(st, uc->uc_mcontext.gregs[REG_EAX]); + st->print("EBX="); print_location(st, uc->uc_mcontext.gregs[REG_EBX]); + st->print("ECX="); print_location(st, uc->uc_mcontext.gregs[REG_ECX]); + st->print("EDX="); print_location(st, uc->uc_mcontext.gregs[REG_EDX]); + st->print("ESP="); print_location(st, uc->uc_mcontext.gregs[REG_ESP]); + st->print("EBP="); print_location(st, uc->uc_mcontext.gregs[REG_EBP]); + st->print("ESI="); print_location(st, uc->uc_mcontext.gregs[REG_ESI]); + st->print("EDI="); print_location(st, uc->uc_mcontext.gregs[REG_EDI]); +#endif // AMD64 + + st->cr(); } void os::setup_fpu() { diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp index 91ae05ace11..556defca3d1 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -540,6 +540,11 @@ int JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, int abort_ pc = (address) uc->uc_mcontext.gregs[REG_PC]; } + // Sometimes the register windows are not properly flushed. + if(uc->uc_mcontext.gwins != NULL) { + ::handle_unflushed_register_windows(uc->uc_mcontext.gwins); + } + // unmask current signal sigset_t newset; sigemptyset(&newset); @@ -558,6 +563,18 @@ void os::print_context(outputStream *st, void *context) { ucontext_t *uc = (ucontext_t*)context; st->print_cr("Registers:"); + st->print_cr(" G1=" INTPTR_FORMAT " G2=" INTPTR_FORMAT + " G3=" INTPTR_FORMAT " G4=" INTPTR_FORMAT, + uc->uc_mcontext.gregs[REG_G1], + uc->uc_mcontext.gregs[REG_G2], + uc->uc_mcontext.gregs[REG_G3], + uc->uc_mcontext.gregs[REG_G4]); + st->print_cr(" G5=" INTPTR_FORMAT " G6=" INTPTR_FORMAT + " G7=" INTPTR_FORMAT " Y=" INTPTR_FORMAT, + uc->uc_mcontext.gregs[REG_G5], + uc->uc_mcontext.gregs[REG_G6], + uc->uc_mcontext.gregs[REG_G7], + uc->uc_mcontext.gregs[REG_Y]); st->print_cr(" O0=" INTPTR_FORMAT " O1=" INTPTR_FORMAT " O2=" INTPTR_FORMAT " O3=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O0], @@ -571,81 +588,39 @@ void os::print_context(outputStream *st, void *context) { uc->uc_mcontext.gregs[REG_O6], uc->uc_mcontext.gregs[REG_O7]); - st->print_cr(" G1=" INTPTR_FORMAT " G2=" INTPTR_FORMAT - " G3=" INTPTR_FORMAT " G4=" INTPTR_FORMAT, - uc->uc_mcontext.gregs[REG_G1], - uc->uc_mcontext.gregs[REG_G2], - uc->uc_mcontext.gregs[REG_G3], - uc->uc_mcontext.gregs[REG_G4]); - st->print_cr(" G5=" INTPTR_FORMAT " G6=" INTPTR_FORMAT - " G7=" INTPTR_FORMAT " Y=" INTPTR_FORMAT, - uc->uc_mcontext.gregs[REG_G5], - uc->uc_mcontext.gregs[REG_G6], - uc->uc_mcontext.gregs[REG_G7], - uc->uc_mcontext.gregs[REG_Y]); + + intptr_t *sp = (intptr_t *)os::Solaris::ucontext_get_sp(uc); + st->print_cr(" L0=" INTPTR_FORMAT " L1=" INTPTR_FORMAT + " L2=" INTPTR_FORMAT " L3=" INTPTR_FORMAT, + sp[L0->sp_offset_in_saved_window()], + sp[L1->sp_offset_in_saved_window()], + sp[L2->sp_offset_in_saved_window()], + sp[L3->sp_offset_in_saved_window()]); + st->print_cr(" L4=" INTPTR_FORMAT " L5=" INTPTR_FORMAT + " L6=" INTPTR_FORMAT " L7=" INTPTR_FORMAT, + sp[L4->sp_offset_in_saved_window()], + sp[L5->sp_offset_in_saved_window()], + sp[L6->sp_offset_in_saved_window()], + sp[L7->sp_offset_in_saved_window()]); + st->print_cr(" I0=" INTPTR_FORMAT " I1=" INTPTR_FORMAT + " I2=" INTPTR_FORMAT " I3=" INTPTR_FORMAT, + sp[I0->sp_offset_in_saved_window()], + sp[I1->sp_offset_in_saved_window()], + sp[I2->sp_offset_in_saved_window()], + sp[I3->sp_offset_in_saved_window()]); + st->print_cr(" I4=" INTPTR_FORMAT " I5=" INTPTR_FORMAT + " I6=" INTPTR_FORMAT " I7=" INTPTR_FORMAT, + sp[I4->sp_offset_in_saved_window()], + sp[I5->sp_offset_in_saved_window()], + sp[I6->sp_offset_in_saved_window()], + sp[I7->sp_offset_in_saved_window()]); st->print_cr(" PC=" INTPTR_FORMAT " nPC=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_PC], uc->uc_mcontext.gregs[REG_nPC]); - st->cr(); st->cr(); - st->print_cr("Register to memory mapping:"); - st->cr(); - - // this is only for the "general purpose" registers - - st->print_cr("O0=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O0]); - print_location(st, uc->uc_mcontext.gregs[REG_O0]); - st->cr(); - st->print_cr("O1=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O1]); - print_location(st, uc->uc_mcontext.gregs[REG_O1]); - st->cr(); - st->print_cr("O2=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O2]); - print_location(st, uc->uc_mcontext.gregs[REG_O2]); - st->cr(); - st->print_cr("O3=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O3]); - print_location(st, uc->uc_mcontext.gregs[REG_O3]); - st->cr(); - st->print_cr("O4=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O4]); - print_location(st, uc->uc_mcontext.gregs[REG_O4]); - st->cr(); - st->print_cr("O5=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O5]); - print_location(st, uc->uc_mcontext.gregs[REG_O5]); - st->cr(); - st->print_cr("O6=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O6]); - print_location(st, uc->uc_mcontext.gregs[REG_O6]); - st->cr(); - st->print_cr("O7=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_O7]); - print_location(st, uc->uc_mcontext.gregs[REG_O7]); - st->cr(); - - st->print_cr("G1=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_G1]); - print_location(st, uc->uc_mcontext.gregs[REG_G1]); - st->cr(); - st->print_cr("G2=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_G2]); - print_location(st, uc->uc_mcontext.gregs[REG_G2]); - st->cr(); - st->print_cr("G3=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_G3]); - print_location(st, uc->uc_mcontext.gregs[REG_G3]); - st->cr(); - st->print_cr("G4=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_G4]); - print_location(st, uc->uc_mcontext.gregs[REG_G4]); - st->cr(); - st->print_cr("G5=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_G5]); - print_location(st, uc->uc_mcontext.gregs[REG_G5]); - st->cr(); - st->print_cr("G6=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_G6]); - print_location(st, uc->uc_mcontext.gregs[REG_G6]); - st->cr(); - st->print_cr("G7=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_G7]); - print_location(st, uc->uc_mcontext.gregs[REG_G7]); - - st->cr(); - st->cr(); - - intptr_t *sp = (intptr_t *)os::Solaris::ucontext_get_sp(uc); st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp); print_hex_dump(st, (address)sp, (address)(sp + 32), sizeof(intptr_t)); st->cr(); @@ -656,7 +631,57 @@ void os::print_context(outputStream *st, void *context) { ExtendedPC epc = os::Solaris::ucontext_get_ExtendedPC(uc); address pc = epc.pc(); st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 16, pc + 16, sizeof(char)); + print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); +} + +void os::print_register_info(outputStream *st, void *context) { + if (context == NULL) return; + + ucontext_t *uc = (ucontext_t*)context; + intptr_t *sp = (intptr_t *)os::Solaris::ucontext_get_sp(uc); + + st->print_cr("Register to memory mapping:"); + st->cr(); + + // this is only for the "general purpose" registers + st->print("G1="); print_location(st, uc->uc_mcontext.gregs[REG_G1]); + st->print("G2="); print_location(st, uc->uc_mcontext.gregs[REG_G2]); + st->print("G3="); print_location(st, uc->uc_mcontext.gregs[REG_G3]); + st->print("G4="); print_location(st, uc->uc_mcontext.gregs[REG_G4]); + st->print("G5="); print_location(st, uc->uc_mcontext.gregs[REG_G5]); + st->print("G6="); print_location(st, uc->uc_mcontext.gregs[REG_G6]); + st->print("G7="); print_location(st, uc->uc_mcontext.gregs[REG_G7]); + st->cr(); + + st->print("O0="); print_location(st, uc->uc_mcontext.gregs[REG_O0]); + st->print("O1="); print_location(st, uc->uc_mcontext.gregs[REG_O1]); + st->print("O2="); print_location(st, uc->uc_mcontext.gregs[REG_O2]); + st->print("O3="); print_location(st, uc->uc_mcontext.gregs[REG_O3]); + st->print("O4="); print_location(st, uc->uc_mcontext.gregs[REG_O4]); + st->print("O5="); print_location(st, uc->uc_mcontext.gregs[REG_O5]); + st->print("O6="); print_location(st, uc->uc_mcontext.gregs[REG_O6]); + st->print("O7="); print_location(st, uc->uc_mcontext.gregs[REG_O7]); + st->cr(); + + st->print("L0="); print_location(st, sp[L0->sp_offset_in_saved_window()]); + st->print("L1="); print_location(st, sp[L1->sp_offset_in_saved_window()]); + st->print("L2="); print_location(st, sp[L2->sp_offset_in_saved_window()]); + st->print("L3="); print_location(st, sp[L3->sp_offset_in_saved_window()]); + st->print("L4="); print_location(st, sp[L4->sp_offset_in_saved_window()]); + st->print("L5="); print_location(st, sp[L5->sp_offset_in_saved_window()]); + st->print("L6="); print_location(st, sp[L6->sp_offset_in_saved_window()]); + st->print("L7="); print_location(st, sp[L7->sp_offset_in_saved_window()]); + st->cr(); + + st->print("I0="); print_location(st, sp[I0->sp_offset_in_saved_window()]); + st->print("I1="); print_location(st, sp[I1->sp_offset_in_saved_window()]); + st->print("I2="); print_location(st, sp[I2->sp_offset_in_saved_window()]); + st->print("I3="); print_location(st, sp[I3->sp_offset_in_saved_window()]); + st->print("I4="); print_location(st, sp[I4->sp_offset_in_saved_window()]); + st->print("I5="); print_location(st, sp[I5->sp_offset_in_saved_window()]); + st->print("I6="); print_location(st, sp[I6->sp_offset_in_saved_window()]); + st->print("I7="); print_location(st, sp[I7->sp_offset_in_saved_window()]); + st->cr(); } void os::Solaris::init_thread_fpu_state(void) { diff --git a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp index a80374a0095..01e0380aeca 100644 --- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp +++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp @@ -719,11 +719,6 @@ void os::print_context(outputStream *st, void *context) { ucontext_t *uc = (ucontext_t*)context; st->print_cr("Registers:"); - - // this is horrendously verbose but the layout of the registers in the - // context does not match how we defined our abstract Register set, so - // we can't just iterate through the gregs area - #ifdef AMD64 st->print( "RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]); st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]); @@ -735,8 +730,8 @@ void os::print_context(outputStream *st, void *context) { st->print(", RSI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSI]); st->print(", RDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDI]); st->cr(); - st->print( "R8=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]); - st->print(", R9=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]); + st->print( "R8 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]); + st->print(", R9 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]); st->print(", R10=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R10]); st->print(", R11=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R11]); st->cr(); @@ -747,63 +742,6 @@ void os::print_context(outputStream *st, void *context) { st->cr(); st->print( "RIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RIP]); st->print(", RFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RFL]); - - st->cr(); - st->cr(); - - st->print_cr("Register to memory mapping:"); - st->cr(); - - // this is only for the "general purpose" registers - - st->print_cr("RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]); - print_location(st, uc->uc_mcontext.gregs[REG_RAX]); - st->cr(); - st->print_cr("RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]); - print_location(st, uc->uc_mcontext.gregs[REG_RBX]); - st->cr(); - st->print_cr("RCX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RCX]); - print_location(st, uc->uc_mcontext.gregs[REG_RCX]); - st->cr(); - st->print_cr("RDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDX]); - print_location(st, uc->uc_mcontext.gregs[REG_RDX]); - st->cr(); - st->print_cr("RSP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSP]); - print_location(st, uc->uc_mcontext.gregs[REG_RSP]); - st->cr(); - st->print_cr("RBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBP]); - print_location(st, uc->uc_mcontext.gregs[REG_RSP]); - st->cr(); - st->print_cr("RSI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSI]); - print_location(st, uc->uc_mcontext.gregs[REG_RSI]); - st->cr(); - st->print_cr("RDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDI]); - print_location(st, uc->uc_mcontext.gregs[REG_RDI]); - st->cr(); - st->print_cr("R8 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]); - print_location(st, uc->uc_mcontext.gregs[REG_R8]); - st->cr(); - st->print_cr("R9 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]); - print_location(st, uc->uc_mcontext.gregs[REG_R9]); - st->cr(); - st->print_cr("R10=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R10]); - print_location(st, uc->uc_mcontext.gregs[REG_R10]); - st->cr(); - st->print_cr("R11=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R11]); - print_location(st, uc->uc_mcontext.gregs[REG_R11]); - st->cr(); - st->print_cr("R12=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R12]); - print_location(st, uc->uc_mcontext.gregs[REG_R12]); - st->cr(); - st->print_cr("R13=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R13]); - print_location(st, uc->uc_mcontext.gregs[REG_R13]); - st->cr(); - st->print_cr("R14=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R14]); - print_location(st, uc->uc_mcontext.gregs[REG_R14]); - st->cr(); - st->print_cr("R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]); - print_location(st, uc->uc_mcontext.gregs[REG_R15]); - #else st->print( "EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EAX]); st->print(", EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EBX]); @@ -817,39 +755,6 @@ void os::print_context(outputStream *st, void *context) { st->cr(); st->print( "EIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EIP]); st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EFL]); - - st->cr(); - st->cr(); - - st->print_cr("Register to memory mapping:"); - st->cr(); - - // this is only for the "general purpose" registers - - st->print_cr("EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EAX]); - print_location(st, uc->uc_mcontext.gregs[EAX]); - st->cr(); - st->print_cr("EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EBX]); - print_location(st, uc->uc_mcontext.gregs[EBX]); - st->cr(); - st->print_cr("ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[ECX]); - print_location(st, uc->uc_mcontext.gregs[ECX]); - st->cr(); - st->print_cr("EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EDX]); - print_location(st, uc->uc_mcontext.gregs[EDX]); - st->cr(); - st->print_cr("ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[UESP]); - print_location(st, uc->uc_mcontext.gregs[UESP]); - st->cr(); - st->print_cr("EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EBP]); - print_location(st, uc->uc_mcontext.gregs[EBP]); - st->cr(); - st->print_cr("ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[ESI]); - print_location(st, uc->uc_mcontext.gregs[ESI]); - st->cr(); - st->print_cr("EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[EDI]); - print_location(st, uc->uc_mcontext.gregs[EDI]); - #endif // AMD64 st->cr(); st->cr(); @@ -865,7 +770,52 @@ void os::print_context(outputStream *st, void *context) { ExtendedPC epc = os::Solaris::ucontext_get_ExtendedPC(uc); address pc = epc.pc(); st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 16, pc + 16, sizeof(char)); + print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); +} + +void os::print_register_info(outputStream *st, void *context) { + if (context == NULL) return; + + ucontext_t *uc = (ucontext_t*)context; + + st->print_cr("Register to memory mapping:"); + st->cr(); + + // this is horrendously verbose but the layout of the registers in the + // context does not match how we defined our abstract Register set, so + // we can't just iterate through the gregs area + + // this is only for the "general purpose" registers + +#ifdef AMD64 + st->print("RAX="); print_location(st, uc->uc_mcontext.gregs[REG_RAX]); + st->print("RBX="); print_location(st, uc->uc_mcontext.gregs[REG_RBX]); + st->print("RCX="); print_location(st, uc->uc_mcontext.gregs[REG_RCX]); + st->print("RDX="); print_location(st, uc->uc_mcontext.gregs[REG_RDX]); + st->print("RSP="); print_location(st, uc->uc_mcontext.gregs[REG_RSP]); + st->print("RBP="); print_location(st, uc->uc_mcontext.gregs[REG_RBP]); + st->print("RSI="); print_location(st, uc->uc_mcontext.gregs[REG_RSI]); + st->print("RDI="); print_location(st, uc->uc_mcontext.gregs[REG_RDI]); + st->print("R8 ="); print_location(st, uc->uc_mcontext.gregs[REG_R8]); + st->print("R9 ="); print_location(st, uc->uc_mcontext.gregs[REG_R9]); + st->print("R10="); print_location(st, uc->uc_mcontext.gregs[REG_R10]); + st->print("R11="); print_location(st, uc->uc_mcontext.gregs[REG_R11]); + st->print("R12="); print_location(st, uc->uc_mcontext.gregs[REG_R12]); + st->print("R13="); print_location(st, uc->uc_mcontext.gregs[REG_R13]); + st->print("R14="); print_location(st, uc->uc_mcontext.gregs[REG_R14]); + st->print("R15="); print_location(st, uc->uc_mcontext.gregs[REG_R15]); +#else + st->print("EAX="); print_location(st, uc->uc_mcontext.gregs[EAX]); + st->print("EBX="); print_location(st, uc->uc_mcontext.gregs[EBX]); + st->print("ECX="); print_location(st, uc->uc_mcontext.gregs[ECX]); + st->print("EDX="); print_location(st, uc->uc_mcontext.gregs[EDX]); + st->print("ESP="); print_location(st, uc->uc_mcontext.gregs[UESP]); + st->print("EBP="); print_location(st, uc->uc_mcontext.gregs[EBP]); + st->print("ESI="); print_location(st, uc->uc_mcontext.gregs[ESI]); + st->print("EDI="); print_location(st, uc->uc_mcontext.gregs[EDI]); +#endif + + st->cr(); } diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp index cc32675875f..549a3b47499 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp +++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp @@ -387,8 +387,8 @@ void os::print_context(outputStream *st, void *context) { st->print(", RSI=" INTPTR_FORMAT, uc->Rsi); st->print(", RDI=" INTPTR_FORMAT, uc->Rdi); st->cr(); - st->print( "R8=" INTPTR_FORMAT, uc->R8); - st->print(", R9=" INTPTR_FORMAT, uc->R9); + st->print( "R8 =" INTPTR_FORMAT, uc->R8); + st->print(", R9 =" INTPTR_FORMAT, uc->R9); st->print(", R10=" INTPTR_FORMAT, uc->R10); st->print(", R11=" INTPTR_FORMAT, uc->R11); st->cr(); @@ -399,62 +399,6 @@ void os::print_context(outputStream *st, void *context) { st->cr(); st->print( "RIP=" INTPTR_FORMAT, uc->Rip); st->print(", EFLAGS=" INTPTR_FORMAT, uc->EFlags); - - st->cr(); - st->cr(); - - st->print_cr("Register to memory mapping:"); - st->cr(); - - // this is only for the "general purpose" registers - - st->print_cr("RAX=" INTPTR_FORMAT, uc->Rax); - print_location(st, uc->Rax); - st->cr(); - st->print_cr("RBX=" INTPTR_FORMAT, uc->Rbx); - print_location(st, uc->Rbx); - st->cr(); - st->print_cr("RCX=" INTPTR_FORMAT, uc->Rcx); - print_location(st, uc->Rcx); - st->cr(); - st->print_cr("RDX=" INTPTR_FORMAT, uc->Rdx); - print_location(st, uc->Rdx); - st->cr(); - st->print_cr("RSP=" INTPTR_FORMAT, uc->Rsp); - print_location(st, uc->Rsp); - st->cr(); - st->print_cr("RBP=" INTPTR_FORMAT, uc->Rbp); - print_location(st, uc->Rbp); - st->cr(); - st->print_cr("RSI=" INTPTR_FORMAT, uc->Rsi); - print_location(st, uc->Rsi); - st->cr(); - st->print_cr("RDI=" INTPTR_FORMAT, uc->Rdi); - print_location(st, uc->Rdi); - st->cr(); - st->print_cr("R8 =" INTPTR_FORMAT, uc->R8); - print_location(st, uc->R8); - st->cr(); - st->print_cr("R9 =" INTPTR_FORMAT, uc->R9); - print_location(st, uc->R9); - st->cr(); - st->print_cr("R10=" INTPTR_FORMAT, uc->R10); - print_location(st, uc->R10); - st->cr(); - st->print_cr("R11=" INTPTR_FORMAT, uc->R11); - print_location(st, uc->R11); - st->cr(); - st->print_cr("R12=" INTPTR_FORMAT, uc->R12); - print_location(st, uc->R12); - st->cr(); - st->print_cr("R13=" INTPTR_FORMAT, uc->R13); - print_location(st, uc->R13); - st->cr(); - st->print_cr("R14=" INTPTR_FORMAT, uc->R14); - print_location(st, uc->R14); - st->cr(); - st->print_cr("R15=" INTPTR_FORMAT, uc->R15); - print_location(st, uc->R15); #else st->print( "EAX=" INTPTR_FORMAT, uc->Eax); st->print(", EBX=" INTPTR_FORMAT, uc->Ebx); @@ -468,38 +412,6 @@ void os::print_context(outputStream *st, void *context) { st->cr(); st->print( "EIP=" INTPTR_FORMAT, uc->Eip); st->print(", EFLAGS=" INTPTR_FORMAT, uc->EFlags); - - st->cr(); - st->cr(); - - st->print_cr("Register to memory mapping:"); - st->cr(); - - // this is only for the "general purpose" registers - - st->print_cr("EAX=" INTPTR_FORMAT, uc->Eax); - print_location(st, uc->Eax); - st->cr(); - st->print_cr("EBX=" INTPTR_FORMAT, uc->Ebx); - print_location(st, uc->Ebx); - st->cr(); - st->print_cr("ECX=" INTPTR_FORMAT, uc->Ecx); - print_location(st, uc->Ecx); - st->cr(); - st->print_cr("EDX=" INTPTR_FORMAT, uc->Edx); - print_location(st, uc->Edx); - st->cr(); - st->print_cr("ESP=" INTPTR_FORMAT, uc->Esp); - print_location(st, uc->Esp); - st->cr(); - st->print_cr("EBP=" INTPTR_FORMAT, uc->Ebp); - print_location(st, uc->Ebp); - st->cr(); - st->print_cr("ESI=" INTPTR_FORMAT, uc->Esi); - print_location(st, uc->Esi); - st->cr(); - st->print_cr("EDI=" INTPTR_FORMAT, uc->Edi); - print_location(st, uc->Edi); #endif // AMD64 st->cr(); st->cr(); @@ -514,7 +426,49 @@ void os::print_context(outputStream *st, void *context) { // this at the end, and hope for the best. address pc = (address)uc->REG_PC; st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); - print_hex_dump(st, pc - 16, pc + 16, sizeof(char)); + print_hex_dump(st, pc - 32, pc + 32, sizeof(char)); + st->cr(); +} + + +void os::print_register_info(outputStream *st, void *context) { + if (context == NULL) return; + + CONTEXT* uc = (CONTEXT*)context; + + st->print_cr("Register to memory mapping:"); + st->cr(); + + // this is only for the "general purpose" registers + +#ifdef AMD64 + st->print("RAX="); print_location(st, uc->Rax); + st->print("RBX="); print_location(st, uc->Rbx); + st->print("RCX="); print_location(st, uc->Rcx); + st->print("RDX="); print_location(st, uc->Rdx); + st->print("RSP="); print_location(st, uc->Rsp); + st->print("RBP="); print_location(st, uc->Rbp); + st->print("RSI="); print_location(st, uc->Rsi); + st->print("RDI="); print_location(st, uc->Rdi); + st->print("R8 ="); print_location(st, uc->R8); + st->print("R9 ="); print_location(st, uc->R9); + st->print("R10="); print_location(st, uc->R10); + st->print("R11="); print_location(st, uc->R11); + st->print("R12="); print_location(st, uc->R12); + st->print("R13="); print_location(st, uc->R13); + st->print("R14="); print_location(st, uc->R14); + st->print("R15="); print_location(st, uc->R15); +#else + st->print("EAX="); print_location(st, uc->Eax); + st->print("EBX="); print_location(st, uc->Ebx); + st->print("ECX="); print_location(st, uc->Ecx); + st->print("EDX="); print_location(st, uc->Edx); + st->print("ESP="); print_location(st, uc->Esp); + st->print("EBP="); print_location(st, uc->Ebp); + st->print("ESI="); print_location(st, uc->Esi); + st->print("EDI="); print_location(st, uc->Edi); +#endif + st->cr(); } diff --git a/hotspot/src/share/vm/code/codeCache.cpp b/hotspot/src/share/vm/code/codeCache.cpp index b02f142ccfc..5040ba1b47f 100644 --- a/hotspot/src/share/vm/code/codeCache.cpp +++ b/hotspot/src/share/vm/code/codeCache.cpp @@ -914,3 +914,14 @@ void CodeCache::print() { } #endif // PRODUCT + +void CodeCache::print_bounds(outputStream* st) { + st->print_cr("Code Cache [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")", + _heap->low_boundary(), + _heap->high(), + _heap->high_boundary()); + st->print_cr(" total_blobs=" UINT32_FORMAT " nmethods=" UINT32_FORMAT + " adapters=" UINT32_FORMAT " free_code_cache=" SIZE_FORMAT, + CodeCache::nof_blobs(), CodeCache::nof_nmethods(), + CodeCache::nof_adapters(), CodeCache::unallocated_capacity()); +} diff --git a/hotspot/src/share/vm/code/codeCache.hpp b/hotspot/src/share/vm/code/codeCache.hpp index 8c63cd6efb2..421cec02627 100644 --- a/hotspot/src/share/vm/code/codeCache.hpp +++ b/hotspot/src/share/vm/code/codeCache.hpp @@ -137,6 +137,7 @@ class CodeCache : AllStatic { static void print_internals(); static void verify(); // verifies the code cache static void print_trace(const char* event, CodeBlob* cb, int size = 0) PRODUCT_RETURN; + static void print_bounds(outputStream* st); // Prints a summary of the bounds of the code cache // The full limits of the codeCache static address low_bound() { return (address) _heap->low_boundary(); } diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge index 1d91dce282d..b4a1109d29c 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge @@ -133,6 +133,7 @@ parallelScavengeHeap.cpp psMarkSweep.hpp parallelScavengeHeap.cpp psParallelCompact.hpp parallelScavengeHeap.cpp psPromotionManager.hpp parallelScavengeHeap.cpp psScavenge.hpp +parallelScavengeHeap.cpp vmError.hpp parallelScavengeHeap.cpp vmThread.hpp parallelScavengeHeap.cpp vmPSOperations.hpp diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp index b3fe8fd36ae..f3506296d37 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp @@ -805,7 +805,8 @@ HeapWord* ParallelScavengeHeap::block_start(const void* addr) const { if (young_gen()->is_in_reserved(addr)) { assert(young_gen()->is_in(addr), "addr should be in allocated part of young gen"); - if (Debugging) return NULL; // called from find() in debug.cpp + // called from os::print_location by find or VMError + if (Debugging || VMError::fatal_error_in_progress()) return NULL; Unimplemented(); } else if (old_gen()->is_in_reserved(addr)) { assert(old_gen()->is_in(addr), diff --git a/hotspot/src/share/vm/memory/heap.hpp b/hotspot/src/share/vm/memory/heap.hpp index 4afe7edfaa9..1fee8e09ac3 100644 --- a/hotspot/src/share/vm/memory/heap.hpp +++ b/hotspot/src/share/vm/memory/heap.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -140,6 +140,7 @@ class CodeHeap : public CHeapObj { // Returns reserved area high and low addresses char *low_boundary() const { return _memory.low_boundary (); } + char *high() const { return _memory.high(); } char *high_boundary() const { return _memory.high_boundary(); } // Iteration diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp index b51a6c5f30c..41e854b1a6f 100644 --- a/hotspot/src/share/vm/runtime/os.cpp +++ b/hotspot/src/share/vm/runtime/os.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -736,8 +736,8 @@ void os::print_date_and_time(outputStream *st) { } // moved from debug.cpp (used to be find()) but still called from there -// The print_pc parameter is only set by the debug code in one case -void os::print_location(outputStream* st, intptr_t x, bool print_pc) { +// The verbose parameter is only set by the debug code in one case +void os::print_location(outputStream* st, intptr_t x, bool verbose) { address addr = (address)x; CodeBlob* b = CodeCache::find_blob_unsafe(addr); if (b != NULL) { @@ -745,6 +745,7 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { // the interpreter is generated into a buffer blob InterpreterCodelet* i = Interpreter::codelet_containing(addr); if (i != NULL) { + st->print_cr(INTPTR_FORMAT " is an Interpreter codelet", addr); i->print_on(st); return; } @@ -755,14 +756,14 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { } // if (AdapterHandlerLibrary::contains(b)) { - st->print_cr("Printing AdapterHandler"); + st->print_cr(INTPTR_FORMAT " is an AdapterHandler", addr); AdapterHandlerLibrary::print_handler_on(st, b); } // the stubroutines are generated into a buffer blob StubCodeDesc* d = StubCodeDesc::desc_for(addr); if (d != NULL) { d->print_on(st); - if (print_pc) st->cr(); + if (verbose) st->cr(); return; } if (StubRoutines::contains(addr)) { @@ -781,7 +782,7 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { return; } } - if (print_pc && b->is_nmethod()) { + if (verbose && b->is_nmethod()) { ResourceMark rm; st->print("%#p: Compiled ", addr); ((nmethod*)b)->method()->print_value_on(st); @@ -789,11 +790,12 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { st->cr(); return; } + st->print(INTPTR_FORMAT " ", b); if ( b->is_nmethod()) { if (b->is_zombie()) { - st->print_cr(INTPTR_FORMAT " is zombie nmethod", b); + st->print_cr("is zombie nmethod"); } else if (b->is_not_entrant()) { - st->print_cr(INTPTR_FORMAT " is non-entrant nmethod", b); + st->print_cr("is non-entrant nmethod"); } } b->print_on(st); @@ -812,6 +814,7 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { print = true; } if (print) { + st->print_cr(INTPTR_FORMAT " is an oop", addr); oop(p)->print_on(st); if (p != (HeapWord*)x && oop(p)->is_constMethod() && constMethodOop(p)->contains(addr)) { @@ -855,12 +858,16 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { thread->privileged_stack_top()->contains(addr)) { st->print_cr(INTPTR_FORMAT " is pointing into the privilege stack " "for thread: " INTPTR_FORMAT, addr, thread); - thread->print_on(st); + if (verbose) thread->print_on(st); return; } // If the addr is a java thread print information about that. if (addr == (address)thread) { - thread->print_on(st); + if (verbose) { + thread->print_on(st); + } else { + st->print_cr(INTPTR_FORMAT " is a thread", addr); + } return; } // If the addr is in the stack region for this thread then report that @@ -869,7 +876,7 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { addr > (thread->stack_base() - thread->stack_size())) { st->print_cr(INTPTR_FORMAT " is pointing into the stack for thread: " INTPTR_FORMAT, addr, thread); - thread->print_on(st); + if (verbose) thread->print_on(st); return; } @@ -879,7 +886,7 @@ void os::print_location(outputStream* st, intptr_t x, bool print_pc) { return; } - st->print_cr(INTPTR_FORMAT " is pointing to unknown location", addr); + st->print_cr(INTPTR_FORMAT " is an unknown value", addr); } // Looks like all platforms except IA64 can use the same function to check diff --git a/hotspot/src/share/vm/runtime/os.hpp b/hotspot/src/share/vm/runtime/os.hpp index b0286535d5d..3187498a24d 100644 --- a/hotspot/src/share/vm/runtime/os.hpp +++ b/hotspot/src/share/vm/runtime/os.hpp @@ -450,11 +450,12 @@ class os: AllStatic { static void print_dll_info(outputStream* st); static void print_environment_variables(outputStream* st, const char** env_list, char* buffer, int len); static void print_context(outputStream* st, void* context); + static void print_register_info(outputStream* st, void* context); static void print_siginfo(outputStream* st, void* siginfo); static void print_signal_handlers(outputStream* st, char* buf, size_t buflen); static void print_date_and_time(outputStream* st); - static void print_location(outputStream* st, intptr_t x, bool print_pc = false); + static void print_location(outputStream* st, intptr_t x, bool verbose = false); // The following two functions are used by fatal error handler to trace // native (C) frames. They are not part of frame.hpp/frame.cpp because diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp index 15d66ab9ceb..740213ce0fd 100644 --- a/hotspot/src/share/vm/utilities/vmError.cpp +++ b/hotspot/src/share/vm/utilities/vmError.cpp @@ -455,6 +455,14 @@ void VMError::report(outputStream* st) { st->cr(); } + STEP(105, "(printing register info)") + + // decode register contents if possible + if (_verbose && _context && Universe::is_fully_initialized()) { + os::print_register_info(st, _context); + st->cr(); + } + STEP(110, "(printing stack bounds)" ) if (_verbose) { @@ -522,7 +530,7 @@ void VMError::report(outputStream* st) { STEP(135, "(printing target Java thread stack)" ) // printing Java thread stack trace if it is involved in GC crash - if (_verbose && (_thread->is_Named_thread())) { + if (_verbose && _thread && (_thread->is_Named_thread())) { JavaThread* jt = ((NamedThread *)_thread)->processed_thread(); if (jt != NULL) { st->print_cr("JavaThread " PTR_FORMAT " (nid = " UINTX_FORMAT ") was being processed", jt, jt->osthread()->thread_id()); @@ -608,6 +616,14 @@ void VMError::report(outputStream* st) { st->cr(); } + STEP(195, "(printing code cache information)" ) + + if (_verbose && Universe::is_fully_initialized()) { + // print code cache information before vm abort + CodeCache::print_bounds(st); + st->cr(); + } + STEP(200, "(printing dynamic libraries)" ) if (_verbose) { From fdf87ef7b2468332c6a05cc3cfe8a67fe3de5d1a Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 21 Oct 2010 17:12:19 -0700 Subject: [PATCH 135/722] Added tag jdk7-b115 for changeset 78cff985750d --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 72a2a02cb70..d158f337422 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -89,3 +89,4 @@ f8be576feefce0c6695f188ef97ec16b73ad9cfd jdk7-b104 b852103caf73da70068473777ae867a457bb3ae1 jdk7-b112 c1df968c4527bfab5f97662a89245f15d12d378b jdk7-b113 27985a5c6e5268014d25d55886e0ecb96af4763d jdk7-b114 +e8ebdf41b9c01a26642848f4134f5504e8fb3233 jdk7-b115 From da6aa972d65d80162ac2e9ebc30066fc10a9d0e8 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 21 Oct 2010 17:12:20 -0700 Subject: [PATCH 136/722] Added tag jdk7-b115 for changeset 1c74ecb366a0 --- corba/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/corba/.hgtags b/corba/.hgtags index 02247612caf..d539b1b6a80 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -89,3 +89,4 @@ c3dd858e09b20206459d9e7b0ead99d27ab00eab jdk7-b109 cc67fdc4fee9a5b25caee4e71b51a8ff24ae7d1a jdk7-b112 a89a6c5be9d1a754868d3d359cbf7ad36aa95631 jdk7-b113 88fddb73c5c4a4b50c319cbae9380caf5172ab45 jdk7-b114 +da7561d479e0ddaa4650d8023ac0fc7294e014e3 jdk7-b115 From 1e57e21d5087cb6673adc3e5a15c66a0eaa70fe7 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 21 Oct 2010 17:12:26 -0700 Subject: [PATCH 137/722] Added tag jdk7-b115 for changeset 6c5fa35fa077 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 59b1359c651..b24ddb540f2 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -125,3 +125,4 @@ cc4bb3022b3144dc5db0805b9ef6c7eff2aa3b81 jdk7-b109 beef35b96b81129c375d572357fb9548d9020db1 jdk7-b113 68d6141ea19de3a9ba98ef753f0da41a61f736a0 jdk7-b114 5511edd5d719f3fc9fdd04879482026a3d2c8652 hs20-b01 +bdbc48857210a509b3c50a3291ecb9dd6a72e016 jdk7-b115 From d2d92cc407b186b410443dcebf3a10178e720700 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 21 Oct 2010 17:12:33 -0700 Subject: [PATCH 138/722] Added tag jdk7-b115 for changeset aced6801fb45 --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index c4257fd0000..ce2692b9b82 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -89,3 +89,4 @@ d422dbdd09766269344b796b3a46a5b3f74557e1 jdk7-b110 1b05254242881527b4d5d711295c0fe708c8823a jdk7-b112 bc0c84ce54c34d3e8b0604b94da0d7c75c26755e jdk7-b113 d57197d22c2bfc39d1a860040f655b466ab46f52 jdk7-b114 +dc1612e1d3ac08eb8fcad764daff21c9247d33c9 jdk7-b115 From 6bd69199fb91fa4a197de3304cd6a64b906bcdb6 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 21 Oct 2010 17:12:33 -0700 Subject: [PATCH 139/722] Added tag jdk7-b115 for changeset 2d6f4aa03058 --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 2441201e31f..041390f13d4 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -89,3 +89,4 @@ b1ca39340238a239ba6d8489ad5315215e1366ca jdk7-b108 8e0f0054817f0f73fb33e80fb1333fb45b1d513d jdk7-b112 d35c94fd22362f478f75b4bfcd2bef6a83cb9b3f jdk7-b113 400f494c81c5ec87714b705648afbb3cb680bf73 jdk7-b114 +824cc44bd6eba9abae07cc420f7fe3926c1adbd9 jdk7-b115 From 3dbab834fda599966c77c7f45fea2f71ba74e8e8 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 21 Oct 2010 17:12:41 -0700 Subject: [PATCH 140/722] Added tag jdk7-b115 for changeset d4a3f4d26885 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index a0bc7e5f6e8..a75c7b78785 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -89,3 +89,4 @@ fb63a2688db807a73e2a3de7d9bab298f1bff0e8 jdk7-b111 b53f226b1d91473ac54184afa827be07b87e0319 jdk7-b112 61d3b9fbb26bdef56cfa41b9af5bc312a22cbeb8 jdk7-b113 e250cef36ea05e627e7e6f7d75e5e19f529e2ba3 jdk7-b114 +449bad8d67b5808ecf0f927683acc0a5940f8c85 jdk7-b115 From 9c7bfd60b5ebb8b571009b770f455067c46f9177 Mon Sep 17 00:00:00 2001 From: Christine Lu Date: Thu, 21 Oct 2010 17:12:55 -0700 Subject: [PATCH 141/722] Added tag jdk7-b115 for changeset 17f7431708c8 --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index 26f2fa3183b..704e751ca2a 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -89,3 +89,4 @@ a408ebb8b3d427dbb3d8ce153dfaeb060564a0a4 jdk7-b108 fd2579b80b83bf5d4289426016c7d29174ba5dd9 jdk7-b112 6dbd2d869b0573fa5b799a23cccff47d20c12696 jdk7-b113 e4e7408cdc5b3d91d39161e1e94aad576ecc2dcd jdk7-b114 +01e8ac5fbefd35d2d9a0996213cf2390fd164e57 jdk7-b115 From 554e77efb458c07c20446cc944cc61c34ad390b9 Mon Sep 17 00:00:00 2001 From: "Y. Srinivas Ramakrishna" Date: Thu, 21 Oct 2010 17:29:24 -0700 Subject: [PATCH 142/722] 6992998: CMSWaitDuration=0 causes hangs with +ExplicitGCInvokesConcurrent Closed a timing hole during which concurrent full gc requests can be missed. The hole can increase the latency of the response to a full gc request by up to the value of CMSWaitDuration. If CMSWaitDuration=0 is, as currently, interpreted as an unbounded wait, suitable in certain tuning scenarios, the application can potentially hang. Made two obscure tunables, including CMSWaitDuration, manageable. Reviewed-by: jcoomes, tonyp --- .../concurrentMarkSweepThread.cpp | 15 ++++++++++----- .../concurrentMarkSweepThread.hpp | 6 ++++-- hotspot/src/share/vm/runtime/globals.hpp | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp index f0033815bcd..f9823af67d9 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -272,12 +272,16 @@ void ConcurrentMarkSweepThread::desynchronize(bool is_cms_thread) { } } -// Wait until the next synchronous GC or a timeout, whichever is earlier. -void ConcurrentMarkSweepThread::wait_on_cms_lock(long t) { +// Wait until the next synchronous GC, a concurrent full gc request, +// or a timeout, whichever is earlier. +void ConcurrentMarkSweepThread::wait_on_cms_lock(long t_millis) { MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag); + if (_should_terminate || _collector->_full_gc_requested) { + return; + } set_CMS_flag(CMS_cms_wants_token); // to provoke notifies - CGC_lock->wait(Mutex::_no_safepoint_check_flag, t); + CGC_lock->wait(Mutex::_no_safepoint_check_flag, t_millis); clear_CMS_flag(CMS_cms_wants_token); assert(!CMS_flag_is_set(CMS_cms_has_token | CMS_cms_wants_token), "Should not be set"); @@ -289,7 +293,8 @@ void ConcurrentMarkSweepThread::sleepBeforeNextCycle() { icms_wait(); return; } else { - // Wait until the next synchronous GC or a timeout, whichever is earlier + // Wait until the next synchronous GC, a concurrent full gc + // request or a timeout, whichever is earlier. wait_on_cms_lock(CMSWaitDuration); } // Check if we should start a CMS collection cycle diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp index 26eac7c37c0..1390b20a1da 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp @@ -120,8 +120,10 @@ class ConcurrentMarkSweepThread: public ConcurrentGCThread { } // Wait on CMS lock until the next synchronous GC - // or given timeout, whichever is earlier. - void wait_on_cms_lock(long t); // milliseconds + // or given timeout, whichever is earlier. A timeout value + // of 0 indicates that there is no upper bound on the wait time. + // A concurrent full gc request terminates the wait. + void wait_on_cms_lock(long t_millis); // The CMS thread will yield during the work portion of its cycle // only when requested to. Both synchronous and asychronous requests diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 6005865544b..1fa26ce7fd6 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -1585,7 +1585,7 @@ class CommandLineFlags { "(Temporary, subject to experimentation)" \ "Nominal minimum work per abortable preclean iteration") \ \ - product(intx, CMSAbortablePrecleanWaitMillis, 100, \ + manageable(intx, CMSAbortablePrecleanWaitMillis, 100, \ "(Temporary, subject to experimentation)" \ " Time that we sleep between iterations when not given" \ " enough work per iteration") \ @@ -1677,7 +1677,7 @@ class CommandLineFlags { product(uintx, CMSWorkQueueDrainThreshold, 10, \ "Don't drain below this size per parallel worker/thief") \ \ - product(intx, CMSWaitDuration, 2000, \ + manageable(intx, CMSWaitDuration, 2000, \ "Time in milliseconds that CMS thread waits for young GC") \ \ product(bool, CMSYield, true, \ From 74b3f2ef97f53073424e61b760fa547eafdadcee Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Thu, 21 Oct 2010 17:31:43 -0700 Subject: [PATCH 143/722] 6993984: PIT: b116 - Many of the swing test are failing on Solaris Reviewed-by: anthony, prr --- jdk/src/share/classes/java/awt/event/InputEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/awt/event/InputEvent.java b/jdk/src/share/classes/java/awt/event/InputEvent.java index b3b00dffed4..3c0bab3b9b5 100644 --- a/jdk/src/share/classes/java/awt/event/InputEvent.java +++ b/jdk/src/share/classes/java/awt/event/InputEvent.java @@ -294,7 +294,7 @@ public abstract class InputEvent extends ComponentEvent { AWTAccessor.setInputEventAccessor( new AWTAccessor.InputEventAccessor() { public int[] getButtonDownMasks() { - return getButtonDownMasks(); + return InputEvent.getButtonDownMasks(); } }); } From 2580a79f300348b6c1d151c3eb4dcde2fd2a50b6 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Fri, 22 Oct 2010 09:20:09 +0100 Subject: [PATCH 144/722] 6947677: InetAddress.isReachable() throws "java.net.SocketException:Invalid argument" on Linux if run as root Reviewed-by: alanb --- jdk/src/solaris/native/java/net/Inet4AddressImpl.c | 10 +++++++++- jdk/src/solaris/native/java/net/Inet6AddressImpl.c | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c index 0e9969eebe3..d9ddc1d6ef2 100644 --- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c +++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c @@ -381,7 +381,15 @@ ping4(JNIEnv *env, jint fd, struct sockaddr_in* him, jint timeout, n = sendto(fd, sendbuf, plen, 0, (struct sockaddr *)him, sizeof(struct sockaddr)); if (n < 0 && errno != EINPROGRESS ) { - NET_ThrowNew(env, errno, "Can't send ICMP packet"); +#ifdef __linux__ + if (errno != EINVAL) + /* + * On some Linuxes, when bound to the loopback interface, sendto + * will fail and errno will be set to EINVAL. When that happens, + * don't throw an exception, just return false. + */ +#endif /*__linux__ */ + NET_ThrowNew(env, errno, "Can't send ICMP packet"); close(fd); return JNI_FALSE; } diff --git a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c index 4c5e928c560..93572ae293b 100644 --- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c +++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c @@ -506,7 +506,16 @@ ping6(JNIEnv *env, jint fd, struct sockaddr_in6* him, jint timeout, plen = sizeof(struct icmp6_hdr) + sizeof(tv); n = sendto(fd, sendbuf, plen, 0, (struct sockaddr*) him, sizeof(struct sockaddr_in6)); if (n < 0 && errno != EINPROGRESS) { +#ifdef __linux__ + if (errno != EINVAL) + /* + * On some Linuxes, when bound to the loopback interface, sendto + * will fail and errno will be set to EINVAL. When that happens, + * don't throw an exception, just return false. + */ +#endif /*__linux__ */ NET_ThrowNew(env, errno, "Can't send ICMP packet"); + close(fd); return JNI_FALSE; } From 1e63f773b1669e3bd67e4cea08998a024f0567ad Mon Sep 17 00:00:00 2001 From: Andrei Dmitriev Date: Fri, 22 Oct 2010 12:46:48 +0400 Subject: [PATCH 145/722] 6659228: GridBagConstraints API typo - 'ComponentOrienation' (missing t) 6210739: Need spec clarification of Scrollbar set/getVisibleAmount() Reviewed-by: anthony --- .../classes/java/awt/GridBagConstraints.java | 18 +++++++++--------- jdk/src/share/classes/java/awt/Scrollbar.java | 7 ++++++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/jdk/src/share/classes/java/awt/GridBagConstraints.java b/jdk/src/share/classes/java/awt/GridBagConstraints.java index 445d937c185..9460c43500a 100644 --- a/jdk/src/share/classes/java/awt/GridBagConstraints.java +++ b/jdk/src/share/classes/java/awt/GridBagConstraints.java @@ -126,7 +126,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component centered along the edge of its display area * associated with the start of a page for the current - * ComponentOrienation. Equal to NORTH for horizontal + * {@code ComponentOrientation}. Equal to NORTH for horizontal * orientations. */ public static final int PAGE_START = 19; @@ -134,7 +134,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component centered along the edge of its display area * associated with the end of a page for the current - * ComponentOrienation. Equal to SOUTH for horizontal + * {@code ComponentOrientation}. Equal to SOUTH for horizontal * orientations. */ public static final int PAGE_END = 20; @@ -142,7 +142,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component centered along the edge of its display area where * lines of text would normally begin for the current - * ComponentOrienation. Equal to WEST for horizontal, + * {@code ComponentOrientation}. Equal to WEST for horizontal, * left-to-right orientations and EAST for horizontal, right-to-left * orientations. */ @@ -151,7 +151,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component centered along the edge of its display area where * lines of text would normally end for the current - * ComponentOrienation. Equal to EAST for horizontal, + * {@code ComponentOrientation}. Equal to EAST for horizontal, * left-to-right orientations and WEST for horizontal, right-to-left * orientations. */ @@ -160,7 +160,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component in the corner of its display area where * the first line of text on a page would normally begin for the current - * ComponentOrienation. Equal to NORTHWEST for horizontal, + * {@code ComponentOrientation}. Equal to NORTHWEST for horizontal, * left-to-right orientations and NORTHEAST for horizontal, right-to-left * orientations. */ @@ -169,7 +169,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component in the corner of its display area where * the first line of text on a page would normally end for the current - * ComponentOrienation. Equal to NORTHEAST for horizontal, + * {@code ComponentOrientation}. Equal to NORTHEAST for horizontal, * left-to-right orientations and NORTHWEST for horizontal, right-to-left * orientations. */ @@ -178,7 +178,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component in the corner of its display area where * the last line of text on a page would normally start for the current - * ComponentOrienation. Equal to SOUTHWEST for horizontal, + * {@code ComponentOrientation}. Equal to SOUTHWEST for horizontal, * left-to-right orientations and SOUTHEAST for horizontal, right-to-left * orientations. */ @@ -187,7 +187,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { /** * Place the component in the corner of its display area where * the last line of text on a page would normally end for the current - * ComponentOrienation. Equal to SOUTHEAST for horizontal, + * {@code ComponentOrientation}. Equal to SOUTHEAST for horizontal, * left-to-right orientations and SOUTHWEST for horizontal, right-to-left * orientations. */ @@ -437,7 +437,7 @@ public class GridBagConstraints implements Cloneable, java.io.Serializable { * LINE_START, LINE_END, * FIRST_LINE_START, FIRST_LINE_END, * LAST_LINE_START and LAST_LINE_END. The - * baseline relvative values are: + * baseline relative values are: * BASELINE, BASELINE_LEADING, * BASELINE_TRAILING, * ABOVE_BASELINE, ABOVE_BASELINE_LEADING, diff --git a/jdk/src/share/classes/java/awt/Scrollbar.java b/jdk/src/share/classes/java/awt/Scrollbar.java index 56835aa9dd4..d43414305b5 100644 --- a/jdk/src/share/classes/java/awt/Scrollbar.java +++ b/jdk/src/share/classes/java/awt/Scrollbar.java @@ -213,7 +213,8 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * The size of the Scrollbar's bubble. * When a scroll bar is used to select a range of values, * the visibleAmount represents the size of this range. - * This is visually indicated by the size of the bubble. + * Depending on platform, this may be visually indicated + * by the size of the bubble. * * @serial * @see #getVisibleAmount @@ -637,6 +638,8 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * bubble (also called a thumb or scroll box), usually gives a * visual representation of the relationship of the visible * amount to the range of the scroll bar. + * Note that depending on platform, the value of the visible amount property + * may not be visually indicated by the size of the bubble. *

    * The scroll bar's bubble may not be displayed when it is not * moveable (e.g. when it takes up the entire length of the @@ -670,6 +673,8 @@ public class Scrollbar extends Component implements Adjustable, Accessible { * bubble (also called a thumb or scroll box), usually gives a * visual representation of the relationship of the visible * amount to the range of the scroll bar. + * Note that depending on platform, the value of the visible amount property + * may not be visually indicated by the size of the bubble. *

    * The scroll bar's bubble may not be displayed when it is not * moveable (e.g. when it takes up the entire length of the From 4ebbe4ca450eb63655e8cfffc3a3bdb5eab497aa Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Fri, 22 Oct 2010 03:34:25 -0700 Subject: [PATCH 146/722] 6994130: Zero PowerPC fix 6953477 broke Zero. Reviewed-by: twisti --- hotspot/src/share/vm/runtime/frame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/runtime/frame.cpp b/hotspot/src/share/vm/runtime/frame.cpp index bf24d6eb843..b7eb8145b59 100644 --- a/hotspot/src/share/vm/runtime/frame.cpp +++ b/hotspot/src/share/vm/runtime/frame.cpp @@ -878,7 +878,7 @@ void frame::oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool quer #endif /* CC_INTERP */ -#ifndef PPC +#if !defined(PPC) || defined(ZERO) if (m->is_native()) { #ifdef CC_INTERP f->do_oop((oop*)&istate->_oop_temp); From 7a66e4288e8742e0076bba3ef56eb21fc331aa76 Mon Sep 17 00:00:00 2001 From: Peter Zhelezniakov Date: Fri, 22 Oct 2010 16:25:56 +0400 Subject: [PATCH 147/722] 6993140: protected constructor in javax.swing.plaf.synth.SynthTabbedPaneUI.SynthTabbedPaneUI is needed Reviewed-by: rupashka --- .../classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java index ea67ac03852..84a773ab300 100644 --- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java @@ -115,10 +115,7 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI return new SynthTabbedPaneUI(); } - private SynthTabbedPaneUI() { - } - - private boolean scrollableTabLayoutEnabled() { + private boolean scrollableTabLayoutEnabled() { return (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT); } From 454c892638352208d8f2197436f65ef42d0b7400 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Fri, 22 Oct 2010 16:57:41 +0400 Subject: [PATCH 148/722] 6663447: D3D: excessive surface data replacements Reviewed-by: prr, art --- .../classes/sun/awt/windows/WWindowPeer.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java index d3ccd4db4d9..2287081a9f8 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java @@ -605,6 +605,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, } private native void setOpacity(int iOpacity); + private float opacity = 1.0f; public void setOpacity(float opacity) { if (!((SunToolkit)((Window)target).getToolkit()). @@ -613,7 +614,21 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, return; } - replaceSurfaceDataRecursively((Component)getTarget()); + if (opacity < 0.0f || opacity > 1.0f) { + throw new IllegalArgumentException( + "The value of opacity should be in the range [0.0f .. 1.0f]."); + } + + if (((this.opacity == 1.0f && opacity < 1.0f) || + (this.opacity < 1.0f && opacity == 1.0f)) && + !Win32GraphicsEnvironment.isVistaOS()) + { + // non-Vista OS: only replace the surface data if opacity status + // changed (see WComponentPeer.isAccelCapable() for more) + replaceSurfaceDataRecursively((Component)getTarget()); + } + + this.opacity = opacity; final int maxOpacity = 0xff; int iOpacity = (int)(opacity * maxOpacity); @@ -655,7 +670,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, boolean isVistaOS = Win32GraphicsEnvironment.isVistaOS(); - if (!isVistaOS) { + if (this.isOpaque != isOpaque && !isVistaOS) { // non-Vista OS: only replace the surface data if the opacity // status changed (see WComponentPeer.isAccelCapable() for more) replaceSurfaceDataRecursively(target); From f8b4e1e1bd75e8bc3e446bae0922c846b1fcb311 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Fri, 22 Oct 2010 17:40:31 +0100 Subject: [PATCH 149/722] 6816049: (bf) MappedByteBuffer.force() method does not flush data correctly Reviewed-by: chegar --- .../java/nio/Direct-X-Buffer.java.template | 14 +++-- .../classes/java/nio/MappedByteBuffer.java | 20 +++---- .../classes/sun/nio/ch/FileChannelImpl.java | 54 +++++++++++++++---- .../classes/sun/nio/ch/FileDispatcher.java | 8 +++ jdk/src/share/classes/sun/nio/ch/Util.java | 7 +++ .../sun/nio/ch/FileDispatcherImpl.java | 6 +++ .../native/java/nio/MappedByteBuffer.c | 4 +- .../sun/nio/ch/FileDispatcherImpl.java | 14 ++++- .../native/java/nio/MappedByteBuffer.c | 30 +++++++++-- .../native/sun/nio/ch/FileDispatcherImpl.c | 13 +++++ jdk/test/java/nio/MappedByteBuffer/Basic.java | 6 ++- 11 files changed, 143 insertions(+), 33 deletions(-) diff --git a/jdk/src/share/classes/java/nio/Direct-X-Buffer.java.template b/jdk/src/share/classes/java/nio/Direct-X-Buffer.java.template index 6c96df87eef..0b785175a66 100644 --- a/jdk/src/share/classes/java/nio/Direct-X-Buffer.java.template +++ b/jdk/src/share/classes/java/nio/Direct-X-Buffer.java.template @@ -27,6 +27,7 @@ package java.nio; +import java.io.FileDescriptor; import sun.misc.Cleaner; import sun.misc.Unsafe; import sun.misc.VM; @@ -114,7 +115,7 @@ class Direct$Type$Buffer$RW$$BO$ // Direct$Type$Buffer$RW$(int cap) { // package-private #if[rw] - super(-1, 0, cap, cap, false); + super(-1, 0, cap, cap); boolean pa = VM.isDirectMemoryPageAligned(); int ps = Bits.pageSize(); long size = Math.max(1L, (long)cap + (pa ? ps : 0)); @@ -145,7 +146,7 @@ class Direct$Type$Buffer$RW$$BO$ // Invoked only by JNI: NewDirectByteBuffer(void*, long) // private Direct$Type$Buffer(long addr, int cap) { - super(-1, 0, cap, cap, false); + super(-1, 0, cap, cap); address = addr; cleaner = null; } @@ -154,14 +155,17 @@ class Direct$Type$Buffer$RW$$BO$ // For memory-mapped buffers -- invoked by FileChannelImpl via reflection // - protected Direct$Type$Buffer$RW$(int cap, long addr, Runnable unmapper) { + protected Direct$Type$Buffer$RW$(int cap, long addr, + FileDescriptor fd, + Runnable unmapper) + { #if[rw] - super(-1, 0, cap, cap, true); + super(-1, 0, cap, cap, fd); address = addr; viewedBuffer = null; cleaner = Cleaner.create(this, unmapper); #else[rw] - super(cap, addr, unmapper); + super(cap, addr, fd, unmapper); #end[rw] } diff --git a/jdk/src/share/classes/java/nio/MappedByteBuffer.java b/jdk/src/share/classes/java/nio/MappedByteBuffer.java index 4811f41d2e1..9c2a446716f 100644 --- a/jdk/src/share/classes/java/nio/MappedByteBuffer.java +++ b/jdk/src/share/classes/java/nio/MappedByteBuffer.java @@ -25,6 +25,7 @@ package java.nio; +import java.io.FileDescriptor; import sun.misc.Unsafe; @@ -71,26 +72,26 @@ public abstract class MappedByteBuffer // for optimization purposes, it's easier to do it the other way around. // This works because DirectByteBuffer is a package-private class. - // Volatile to make sure that the finalization thread sees the current - // value of this so that a region is not accidentally unmapped again later. - volatile boolean isAMappedBuffer; // package-private + // For mapped buffers, a FileDescriptor that may be used for mapping + // operations if valid; null if the buffer is not mapped. + private final FileDescriptor fd; // This should only be invoked by the DirectByteBuffer constructors // MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private - boolean mapped) + FileDescriptor fd) { super(mark, pos, lim, cap); - isAMappedBuffer = mapped; + this.fd = fd; } MappedByteBuffer(int mark, int pos, int lim, int cap) { // package-private super(mark, pos, lim, cap); - isAMappedBuffer = false; + this.fd = null; } private void checkMapped() { - if (!isAMappedBuffer) + if (fd == null) // Can only happen if a luser explicitly casts a direct byte buffer throw new UnsupportedOperationException(); } @@ -191,13 +192,12 @@ public abstract class MappedByteBuffer checkMapped(); if ((address != 0) && (capacity() != 0)) { long offset = mappingOffset(); - force0(mappingAddress(offset), mappingLength(offset)); + force0(fd, mappingAddress(offset), mappingLength(offset)); } return this; } private native boolean isLoaded0(long address, long length, int pageCount); private native void load0(long address, long length); - private native void force0(long address, long length); - + private native void force0(FileDescriptor fd, long address, long length); } diff --git a/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java index 208c36789b1..6d1bed731ee 100644 --- a/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java +++ b/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java @@ -699,15 +699,19 @@ public class FileChannelImpl static volatile long totalSize; static volatile long totalCapacity; - private long address; - private long size; - private int cap; + private volatile long address; + private final long size; + private final int cap; + private final FileDescriptor fd; - private Unmapper(long address, long size, int cap) { + private Unmapper(long address, long size, int cap, + FileDescriptor fd) + { assert (address != 0); this.address = address; this.size = size; this.cap = cap; + this.fd = fd; synchronized (Unmapper.class) { count++; @@ -722,6 +726,15 @@ public class FileChannelImpl unmap0(address, size); address = 0; + // if this mapping has a valid file descriptor then we close it + if (fd.valid()) { + try { + nd.close(fd); + } catch (IOException ignore) { + // nothing we can do + } + } + synchronized (Unmapper.class) { count--; totalSize -= size; @@ -784,10 +797,12 @@ public class FileChannelImpl } if (size == 0) { addr = 0; + // a valid file descriptor is not required + FileDescriptor dummy = new FileDescriptor(); if ((!writable) || (imode == MAP_RO)) - return Util.newMappedByteBufferR(0, 0, null); + return Util.newMappedByteBufferR(0, 0, dummy, null); else - return Util.newMappedByteBuffer(0, 0, null); + return Util.newMappedByteBuffer(0, 0, dummy, null); } int pagePosition = (int)(position % allocationGranularity); @@ -813,14 +828,31 @@ public class FileChannelImpl } } + // On Windows, and potentially other platforms, we need an open + // file descriptor for some mapping operations. + FileDescriptor mfd; + try { + mfd = nd.duplicateForMapping(fd); + } catch (IOException ioe) { + unmap0(addr, mapSize); + throw ioe; + } + assert (IOStatus.checkAll(addr)); assert (addr % allocationGranularity == 0); int isize = (int)size; - Unmapper um = new Unmapper(addr, size + pagePosition, isize); - if ((!writable) || (imode == MAP_RO)) - return Util.newMappedByteBufferR(isize, addr + pagePosition, um); - else - return Util.newMappedByteBuffer(isize, addr + pagePosition, um); + Unmapper um = new Unmapper(addr, mapSize, isize, mfd); + if ((!writable) || (imode == MAP_RO)) { + return Util.newMappedByteBufferR(isize, + addr + pagePosition, + mfd, + um); + } else { + return Util.newMappedByteBuffer(isize, + addr + pagePosition, + mfd, + um); + } } finally { threads.remove(ti); end(IOStatus.checkAll(addr)); diff --git a/jdk/src/share/classes/sun/nio/ch/FileDispatcher.java b/jdk/src/share/classes/sun/nio/ch/FileDispatcher.java index 4e90c9944f5..0e363514414 100644 --- a/jdk/src/share/classes/sun/nio/ch/FileDispatcher.java +++ b/jdk/src/share/classes/sun/nio/ch/FileDispatcher.java @@ -45,4 +45,12 @@ abstract class FileDispatcher extends NativeDispatcher { abstract void release(FileDescriptor fd, long pos, long size) throws IOException; + + /** + * Returns a dup of fd if a file descriptor is required for + * memory-mapping operations, otherwise returns an invalid + * FileDescriptor (meaning a newly allocated FileDescriptor) + */ + abstract FileDescriptor duplicateForMapping(FileDescriptor fd) + throws IOException; } diff --git a/jdk/src/share/classes/sun/nio/ch/Util.java b/jdk/src/share/classes/sun/nio/ch/Util.java index 50d280865cd..252a03dbb36 100644 --- a/jdk/src/share/classes/sun/nio/ch/Util.java +++ b/jdk/src/share/classes/sun/nio/ch/Util.java @@ -28,6 +28,7 @@ package sun.nio.ch; import java.lang.ref.SoftReference; import java.lang.reflect.*; import java.io.IOException; +import java.io.FileDescriptor; import java.nio.ByteBuffer; import java.nio.MappedByteBuffer; import java.nio.channels.*; @@ -364,6 +365,7 @@ class Util { Constructor ctor = cl.getDeclaredConstructor( new Class[] { int.class, long.class, + FileDescriptor.class, Runnable.class }); ctor.setAccessible(true); directByteBufferConstructor = ctor; @@ -381,6 +383,7 @@ class Util { } static MappedByteBuffer newMappedByteBuffer(int size, long addr, + FileDescriptor fd, Runnable unmapper) { MappedByteBuffer dbb; @@ -390,6 +393,7 @@ class Util { dbb = (MappedByteBuffer)directByteBufferConstructor.newInstance( new Object[] { new Integer(size), new Long(addr), + fd, unmapper }); } catch (InstantiationException e) { throw new InternalError(); @@ -411,6 +415,7 @@ class Util { Constructor ctor = cl.getDeclaredConstructor( new Class[] { int.class, long.class, + FileDescriptor.class, Runnable.class }); ctor.setAccessible(true); directByteBufferRConstructor = ctor; @@ -428,6 +433,7 @@ class Util { } static MappedByteBuffer newMappedByteBufferR(int size, long addr, + FileDescriptor fd, Runnable unmapper) { MappedByteBuffer dbb; @@ -437,6 +443,7 @@ class Util { dbb = (MappedByteBuffer)directByteBufferRConstructor.newInstance( new Object[] { new Integer(size), new Long(addr), + fd, unmapper }); } catch (InstantiationException e) { throw new InternalError(); diff --git a/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java b/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java index 41656baaafe..6f17340372e 100644 --- a/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java +++ b/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java @@ -94,6 +94,12 @@ class FileDispatcherImpl extends FileDispatcher preClose0(fd); } + FileDescriptor duplicateForMapping(FileDescriptor fd) { + // file descriptor not required for mapping operations; okay + // to return invalid file descriptor. + return new FileDescriptor(); + } + // -- Native methods -- static native int read0(FileDescriptor fd, long address, int len) diff --git a/jdk/src/solaris/native/java/nio/MappedByteBuffer.c b/jdk/src/solaris/native/java/nio/MappedByteBuffer.c index 15c4ec5f5de..49ab0e2e1c6 100644 --- a/jdk/src/solaris/native/java/nio/MappedByteBuffer.c +++ b/jdk/src/solaris/native/java/nio/MappedByteBuffer.c @@ -82,8 +82,8 @@ Java_java_nio_MappedByteBuffer_load0(JNIEnv *env, jobject obj, jlong address, JNIEXPORT void JNICALL -Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jlong address, - jlong len) +Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jobject fdo, + jlong address, jlong len) { void* a = (void *)jlong_to_ptr(address); int result = msync(a, (size_t)len, MS_SYNC); diff --git a/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java b/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java index e893a2afb07..2cdc8f8fe9f 100644 --- a/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java +++ b/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java @@ -26,10 +26,11 @@ package sun.nio.ch; import java.io.*; +import sun.misc.SharedSecrets; +import sun.misc.JavaIOFileDescriptorAccess; class FileDispatcherImpl extends FileDispatcher { - static { Util.load(); } @@ -94,6 +95,16 @@ class FileDispatcherImpl extends FileDispatcher close0(fd); } + FileDescriptor duplicateForMapping(FileDescriptor fd) throws IOException { + // on Windows we need to keep a handle to the file + JavaIOFileDescriptorAccess fdAccess = + SharedSecrets.getJavaIOFileDescriptorAccess(); + FileDescriptor result = new FileDescriptor(); + long handle = duplicateHandle(fdAccess.getHandle(fd)); + fdAccess.setHandle(result, handle); + return result; + } + //-- Native methods static native int read0(FileDescriptor fd, long address, int len) @@ -132,4 +143,5 @@ class FileDispatcherImpl extends FileDispatcher static native void closeByHandle(long fd) throws IOException; + static native long duplicateHandle(long fd) throws IOException; } diff --git a/jdk/src/windows/native/java/nio/MappedByteBuffer.c b/jdk/src/windows/native/java/nio/MappedByteBuffer.c index 5af3b99c73d..7ee6da52103 100644 --- a/jdk/src/windows/native/java/nio/MappedByteBuffer.c +++ b/jdk/src/windows/native/java/nio/MappedByteBuffer.c @@ -51,11 +51,11 @@ Java_java_nio_MappedByteBuffer_load0(JNIEnv *env, jobject obj, jlong address, } JNIEXPORT void JNICALL -Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jlong address, - jlong len) +Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jobject fdo, + jlong address, jlong len) { void *a = (void *) jlong_to_ptr(address); - int result; + BOOL result; int retry; /* @@ -71,6 +71,30 @@ Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jlong address, retry++; } while (retry < 3); + /** + * FlushViewOfFile only initiates the writing of dirty pages to disk + * so we have to call FlushFileBuffers to and ensure they are written. + */ + if (result != 0) { + // by right, the jfieldID initialization should be in a static + // initializer but we do it here instead to avoiding needing to + // load nio.dll during startup. + static jfieldID handle_fdID; + HANDLE h; + if (handle_fdID == NULL) { + jclass clazz = (*env)->FindClass(env, "java/io/FileDescriptor"); + if (clazz == NULL) + return; // exception thrown + handle_fdID = (*env)->GetFieldID(env, clazz, "handle", "J"); + } + h = jlong_to_ptr((*env)->GetLongField(env, fdo, handle_fdID)); + result = FlushFileBuffers(h); + if (result == 0 && GetLastError() == ERROR_ACCESS_DENIED) { + // read-only mapping + result = 1; + } + } + if (result == 0) { JNU_ThrowIOExceptionWithLastError(env, "Flush failed"); } diff --git a/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c b/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c index d31ef21ed83..f4d0b17d63b 100644 --- a/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c +++ b/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c @@ -32,6 +32,7 @@ #include #include "nio.h" #include "nio_util.h" +#include "jlong.h" /************************************************************** @@ -441,3 +442,15 @@ Java_sun_nio_ch_FileDispatcherImpl_closeByHandle(JNIEnv *env, jclass clazz, { closeFile(env, fd); } + +JNIEXPORT jlong JNICALL +Java_sun_nio_ch_FileDispatcherImpl_duplicateHandle(JNIEnv *env, jclass this, jlong hFile) +{ + HANDLE hProcess = GetCurrentProcess(); + HANDLE hResult; + BOOL res = DuplicateHandle(hProcess, hFile, hProcess, &hResult, 0, FALSE, + DUPLICATE_SAME_ACCESS); + if (res == 0) + JNU_ThrowIOExceptionWithLastError(env, "DuplicateHandle failed"); + return ptr_to_jlong(hResult); +} diff --git a/jdk/test/java/nio/MappedByteBuffer/Basic.java b/jdk/test/java/nio/MappedByteBuffer/Basic.java index 3b068b76983..07ecbf227ab 100644 --- a/jdk/test/java/nio/MappedByteBuffer/Basic.java +++ b/jdk/test/java/nio/MappedByteBuffer/Basic.java @@ -24,7 +24,6 @@ /* @test * @bug 4462336 6799037 * @summary Simple MappedByteBuffer tests - * @run main/othervm Basic */ import java.io.*; @@ -76,5 +75,10 @@ public class Basic { throw new RuntimeException("Incorrect isReadOnly"); fc.close(); raf.close(); + + // clean-up + mbb = null; + System.gc(); + Thread.sleep(500); } } From 5b64666e3033934d80255b17d843969a504547cd Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 22 Oct 2010 11:22:54 -0700 Subject: [PATCH 150/722] 6985460: PlatformLogger throws ArrayStoreException when j.u.logging is initialized Reviewed-by: dholmes --- .../classes/java/util/logging/LogRecord.java | 14 ++- .../sun/util/logging/PlatformLogger.java | 4 - .../sun/util/logging/PlatformLoggerTest.java | 38 +++++- .../sun/util/logging/SourceClassName.java | 108 ++++++++++++++++++ 4 files changed, 155 insertions(+), 9 deletions(-) create mode 100644 jdk/test/sun/util/logging/SourceClassName.java diff --git a/jdk/src/share/classes/java/util/logging/LogRecord.java b/jdk/src/share/classes/java/util/logging/LogRecord.java index 57da7634a09..84ccb89aed8 100644 --- a/jdk/src/share/classes/java/util/logging/LogRecord.java +++ b/jdk/src/share/classes/java/util/logging/LogRecord.java @@ -529,8 +529,6 @@ public class LogRecord implements java.io.Serializable { Throwable throwable = new Throwable(); int depth = access.getStackTraceDepth(throwable); - String logClassName = "java.util.logging.Logger"; - String plogClassName = "sun.util.logging.PlatformLogger"; boolean lookingForLogger = true; for (int ix = 0; ix < depth; ix++) { // Calling getStackTraceElement directly prevents the VM @@ -538,13 +536,14 @@ public class LogRecord implements java.io.Serializable { StackTraceElement frame = access.getStackTraceElement(throwable, ix); String cname = frame.getClassName(); + boolean isLoggerImpl = isLoggerImplFrame(cname); if (lookingForLogger) { // Skip all frames until we have found the first logger frame. - if (cname.equals(logClassName) || cname.startsWith(plogClassName)) { + if (isLoggerImpl) { lookingForLogger = false; } } else { - if (!cname.equals(logClassName) && !cname.startsWith(plogClassName)) { + if (!isLoggerImpl) { // skip reflection call if (!cname.startsWith("java.lang.reflect.") && !cname.startsWith("sun.reflect.")) { // We've found the relevant frame. @@ -558,4 +557,11 @@ public class LogRecord implements java.io.Serializable { // We haven't found a suitable frame, so just punt. This is // OK as we are only committed to making a "best effort" here. } + + private boolean isLoggerImplFrame(String cname) { + // the log record could be created for a platform logger + return (cname.equals("java.util.logging.Logger") || + cname.startsWith("java.util.logging.LoggingProxyImpl") || + cname.startsWith("sun.util.logging.")); + } } diff --git a/jdk/src/share/classes/sun/util/logging/PlatformLogger.java b/jdk/src/share/classes/sun/util/logging/PlatformLogger.java index 499a5483a8c..0fedfff9f12 100644 --- a/jdk/src/share/classes/sun/util/logging/PlatformLogger.java +++ b/jdk/src/share/classes/sun/util/logging/PlatformLogger.java @@ -535,10 +535,6 @@ public class PlatformLogger { } void doLog(int level, String msg, Object... params) { - int paramsNumber = (params != null) ? params.length : 0; - for (int i = 0; i < paramsNumber; i++) { - params[i] = String.valueOf(params[i]); - } LoggingSupport.log(javaLogger, levelObjects.get(level), msg, params); } diff --git a/jdk/test/sun/util/logging/PlatformLoggerTest.java b/jdk/test/sun/util/logging/PlatformLoggerTest.java index 5f7f923fee3..a2f6540d124 100644 --- a/jdk/test/sun/util/logging/PlatformLoggerTest.java +++ b/jdk/test/sun/util/logging/PlatformLoggerTest.java @@ -23,7 +23,7 @@ /* * @test - * @bug 6882376 + * @bug 6882376 6985460 * @summary Test if java.util.logging.Logger is created before and after * logging is enabled. Also validate some basic PlatformLogger * operations. @@ -43,6 +43,8 @@ public class PlatformLoggerTest { final String GOO_PLATFORM_LOGGER = "test.platformlogger.goo"; final String BAR_LOGGER = "test.logger.bar"; PlatformLogger goo = PlatformLogger.getLogger(GOO_PLATFORM_LOGGER); + // test the PlatformLogger methods + testLogMethods(goo); // Create a platform logger using the default PlatformLogger foo = PlatformLogger.getLogger(FOO_PLATFORM_LOGGER); @@ -56,6 +58,10 @@ public class PlatformLoggerTest { PlatformLogger bar = PlatformLogger.getLogger(BAR_PLATFORM_LOGGER); checkPlatformLogger(bar, BAR_PLATFORM_LOGGER); + // test the PlatformLogger methods + testLogMethods(goo); + testLogMethods(bar); + checkLogger(FOO_PLATFORM_LOGGER, Level.FINER); checkLogger(BAR_PLATFORM_LOGGER, Level.FINER); @@ -64,6 +70,7 @@ public class PlatformLoggerTest { foo.setLevel(PlatformLogger.SEVERE); checkLogger(FOO_PLATFORM_LOGGER, Level.SEVERE); + } private static void checkPlatformLogger(PlatformLogger logger, String name) { @@ -108,4 +115,33 @@ public class PlatformLoggerTest { logger.getName() + " " + logger.getLevel()); } } + + private static void testLogMethods(PlatformLogger logger) { + logger.severe("Test severe(String, Object...) {0} {1}", new Long(1), "string"); + // test Object[] + logger.severe("Test severe(String, Object...) {0}", (Object[]) getPoints()); + logger.warning("Test warning(String, Throwable)", new Throwable("Testing")); + logger.info("Test info(String)"); + } + + static Point[] getPoints() { + Point[] res = new Point[3]; + res[0] = new Point(0,0); + res[1] = new Point(1,1); + res[2] = new Point(2,2); + return res; + } + + static class Point { + final int x; + final int y; + public Point(int x, int y) { + this.x = x; + this.y = y; + } + public String toString() { + return "{x="+x + ", y=" + y + "}"; + } + } + } diff --git a/jdk/test/sun/util/logging/SourceClassName.java b/jdk/test/sun/util/logging/SourceClassName.java new file mode 100644 index 00000000000..e662166ab46 --- /dev/null +++ b/jdk/test/sun/util/logging/SourceClassName.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6985460 + * @summary Test the source class name and method output by the platform + * logger. + * + * @compile -XDignore.symbol.file SourceClassName.java + * @run main/othervm SourceClassName + */ + +import java.util.logging.*; +import java.io.*; +import sun.util.logging.PlatformLogger; + +public class SourceClassName { + public static void main(String[] args) throws Exception { + File dir = new File(System.getProperty("user.dir", ".")); + File log = new File(dir, "testlog.txt"); + PrintStream logps = new PrintStream(log); + writeLogRecords(logps); + checkLogRecords(log); + } + + private static void writeLogRecords(PrintStream logps) throws Exception { + PrintStream err = System.err; + try { + System.setErr(logps); + + Object[] params = new Object[] { new Long(1), "string"}; + PlatformLogger plog = PlatformLogger.getLogger("test.log.foo"); + plog.severe("Log message {0} {1}", (Object[]) params); + + // create a java.util.logging.Logger + // now java.util.logging.Logger should be created for each platform logger + Logger logger = Logger.getLogger("test.log.bar"); + logger.log(Level.SEVERE, "Log message {0} {1}", params); + + plog.severe("Log message {0} {1}", (Object[]) params); + } finally { + logps.flush(); + logps.close(); + System.setErr(err); + } + } + + private static void checkLogRecords(File log) throws Exception { + System.out.println("Checking log records in file: " + log); + FileInputStream in = new FileInputStream(log); + String EXPECTED_LOG = "SEVERE: Log message 1 string"; + try { + BufferedReader reader = new BufferedReader(new InputStreamReader(in)); + String line; + String[] record = new String[2]; + int count = 0; + int i = 0; + while ((line = reader.readLine()) != null) { + line = line.trim(); + System.out.println(line); + record[i++] = line; + if (i == 2) { + i = 0; + count++; + // check source class name and method + String[] ss = record[0].split("\\s+"); + int len = ss.length; + if (!ss[len-2].equals("SourceClassName") || + !ss[len-1].equals("writeLogRecords")) { + throw new RuntimeException("Unexpected source: " + + ss[len-2] + " " + ss[len-1]); + } + + // check log message + if (!record[1].equals(EXPECTED_LOG)) { + throw new RuntimeException("Unexpected log: " + record[1]); + } + } + } + if (count != 3) { + throw new RuntimeException("Unexpected number of records: " + count); + } + } finally { + in.close(); + } + } +} From d6aaa2692f66803279893d476277895bf061ec53 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Fri, 22 Oct 2010 11:32:26 -0700 Subject: [PATCH 151/722] 6993339: Bug4168625Test.java fails Reviewed-by: peytoia --- .../util/ResourceBundle/Bug4168625Test.java | 86 +------------------ 1 file changed, 4 insertions(+), 82 deletions(-) diff --git a/jdk/test/java/util/ResourceBundle/Bug4168625Test.java b/jdk/test/java/util/ResourceBundle/Bug4168625Test.java index 1b2d2b50924..09b733d4b04 100644 --- a/jdk/test/java/util/ResourceBundle/Bug4168625Test.java +++ b/jdk/test/java/util/ResourceBundle/Bug4168625Test.java @@ -25,7 +25,7 @@ @summary test Resource Bundle for bug 4168625 @build Bug4168625Class Bug4168625Getter Bug4168625Resource Bug4168625Resource3 Bug4168625Resource3_en Bug4168625Resource3_en_CA Bug4168625Resource3_en_IE Bug4168625Resource3_en_US Bug4168625Resource2_en_US Bug4168625Resource2 @run main/timeout=600 Bug4168625Test - @bug 4168625 + @bug 4168625 6993339 */ /* * @@ -50,9 +50,8 @@ import java.util.*; import java.io.*; /** - * This test tries to correct three efficiency problems with the caching - * mechanism of ResourceBundle. All tests assume that none of the bundles - * have been previously loaded and cached. It also allows concurrent loads + * This test tries to correct two efficiency problems with the caching + * mechanism of ResourceBundle. It also allows concurrent loads * of resource bundles to be performed if the bundles are unrelated (ex. a * load of a local system resource by one thread while another thread is * doing a slow load over a network). @@ -230,83 +229,6 @@ public class Bug4168625Test extends RBTestFmwk { } } - /** - * Previous versions of ResourceBundle exhibited the following caching behavior. - * Assume the class Bug4168625Resource_en exists. Bug4168625Resource_en_US does - * not. Two threads, ThreadA and ThreadB both try to get the same bundle. - *

    - *

    -     *  ThreadA.getBundle("Bug4168625Resource", new Locale("en", "US"));
    -     *      A-->try to load Bug4168625Resource_en_US
    -     *  ThreadB.getBundle("Bug4168625Resource", new Locale("en", "US"));
    -     *      B-->try to load Bug4168625Resource_en_US
    -     *      B-->load Bug4168625Resource_en (#1)
    -     *      A-->load Bug4168625Resource_en (#2)
    -     *      A-->cache Bug4168625Resource_en (#2) as Bug4168625Resource_en
    -     *      A-->cache Bug4168625Resource_en (#2) as Bug4168625Resource_en_US
    -     *      A-->return Bug4168625Resource_en (#2)
    -     *      B-->cache Bug4168625Resource_en (#1) as Bug4168625Resource_en
    -     *      B-->cache Bug4168625Resource_en (#1) as Bug4168625Resource_en_US
    -     *      B-->return Bug4168625Resource_en (#1)
    -     *  
    - *

    - * Both threads try and fail to load Bug4168625Resource_en_US. Both - * threads load Bug4168625Resource_en. Both threads get their own copy - * of the Bug4168625Resource_en resource. - * - * The desired behavior is as follows: - *

    - *

    -     *  ThreadA.getBundle("Bug4168625Resource", new Locale("en", "US"));
    -     *      A-->try to load Bug4168625Resource_en_US
    -     *  ThreadB.getBundle("Bug4168625Resource", new Locale("en", "US"));
    -     *      B-->try to load Bug4168625Resource_en_US
    -     *      B-->load Bug4168625Resource_en
    -     *      A-->load Bug4168625Resource_en (block in ResourceBundle.getBundle)
    -     *      B-->cache Bug4168625Resource_en as Bug4168625Resource_en
    -     *      B-->cache Bug4168625Resource_en as Bug4168625Resource_en_US
    -     *      A-->return Bug4168625Resource_en
    -     *      B-->return Bug4168625Resource_en
    -     *  
    - *

    - * Note that both threads return the same bundle object. - */ - public void testConcurrentLoading1() throws Exception { - final Loader loader = new Loader( new String[] { "Bug4168625Class" }, new String[] { "Bug4168625Resource3_en_US", "Bug4168625Resource3_en_CA" }); - final Class c = loader.loadClass("Bug4168625Class"); - final Bug4168625Getter test = (Bug4168625Getter)c.newInstance(); - - //both threads want the same resource - ConcurrentLoadingThread thread1 = new ConcurrentLoadingThread(loader, test, new Locale("en", "US")); - ConcurrentLoadingThread thread2 = new ConcurrentLoadingThread(loader, test, new Locale("en", "US")); - - thread1.start(); //start thread 1 - loader.waitForNotify(1); //wait for thread1 to do getBundle & block in loader - thread2.start(); //start second thread - loader.waitForNotify(2, 1000); //wait until thread2 blocks somewhere in getBundle - thread1.ping(); //continue both threads - thread2.ping(); - - thread1.join(); //wait unitl both threads complete - thread2.join(); - - //Now, examine the class loads that were done. - loader.logClasses("Classes loaded after completion of both threads:"); - - boolean dups = false; - for (int i = loader.loadedClasses.size() - 1; i >= 0 ; i--) { - final Object item = loader.loadedClasses.elementAt(i); - loader.loadedClasses.removeElementAt(i); - if (loader.loadedClasses.contains(item)) { - logln("Resource loaded more than once: "+item); - dups = true; - } - } - if (dups) { - errln("ResourceBundle loaded some classes multiple times"); - } - } - private class ConcurrentLoadingThread extends Thread { private Loader loader; public Object bundle; @@ -355,7 +277,7 @@ public class Bug4168625Test extends RBTestFmwk { * This test ensures that multiple resources can be loading at the same * time as long as they don't depend on each other in some way. */ - public void testConcurrentLoading2() throws Exception { + public void testConcurrentLoading() throws Exception { final Loader loader = new Loader( new String[] { "Bug4168625Class" }, new String[] { "Bug4168625Resource3_en_US", "Bug4168625Resource3_en_CA" }); final Class c = loader.loadClass("Bug4168625Class"); final Bug4168625Getter test = (Bug4168625Getter)c.newInstance(); From ffc7677859231d2b058146be9df70939fd10c60b Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Fri, 22 Oct 2010 20:27:44 +0100 Subject: [PATCH 152/722] 6994079: PlainSocketImpl should close the socket if it fails Reviewed-by: alanb --- .../java/net/AbstractPlainSocketImpl.java | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java b/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java index d8053d7b719..a902de61212 100644 --- a/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java +++ b/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java @@ -28,9 +28,7 @@ package java.net; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.io.InterruptedIOException; import java.io.FileDescriptor; -import java.io.ByteArrayOutputStream; import sun.net.ConnectionResetException; import sun.net.NetHooks; @@ -58,7 +56,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl protected int fdUseCount = 0; /* lock when increment/decrementing fdUseCount */ - protected Object fdLock = new Object(); + protected final Object fdLock = new Object(); /* indicates a close is pending on the file descriptor */ protected boolean closePending = false; @@ -68,7 +66,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl private int CONNECTION_RESET_PENDING = 1; private int CONNECTION_RESET = 2; private int resetState; - private Object resetLock = new Object(); + private final Object resetLock = new Object(); /** * Load net library into runtime. @@ -100,25 +98,24 @@ abstract class AbstractPlainSocketImpl extends SocketImpl protected void connect(String host, int port) throws UnknownHostException, IOException { - IOException pending = null; + boolean connected = false; try { InetAddress address = InetAddress.getByName(host); this.port = port; this.address = address; - try { - connectToAddress(address, port, timeout); - return; - } catch (IOException e) { - pending = e; + connectToAddress(address, port, timeout); + connected = true; + } finally { + if (!connected) { + try { + close(); + } catch (IOException ioe) { + /* Do nothing. If connect threw an exception then + it will be passed up the call stack */ + } } - } catch (UnknownHostException e) { - pending = e; } - - // everything failed - close(); - throw pending; } /** @@ -151,22 +148,29 @@ abstract class AbstractPlainSocketImpl extends SocketImpl * SocketAddress subclass not supported by this socket * @since 1.4 */ - protected void connect(SocketAddress address, int timeout) throws IOException { - if (address == null || !(address instanceof InetSocketAddress)) - throw new IllegalArgumentException("unsupported address type"); - InetSocketAddress addr = (InetSocketAddress) address; - if (addr.isUnresolved()) - throw new UnknownHostException(addr.getHostName()); - this.port = addr.getPort(); - this.address = addr.getAddress(); - + protected void connect(SocketAddress address, int timeout) + throws IOException { + boolean connected = false; try { + if (address == null || !(address instanceof InetSocketAddress)) + throw new IllegalArgumentException("unsupported address type"); + InetSocketAddress addr = (InetSocketAddress) address; + if (addr.isUnresolved()) + throw new UnknownHostException(addr.getHostName()); + this.port = addr.getPort(); + this.address = addr.getAddress(); + connectToAddress(this.address, port, timeout); - return; - } catch (IOException e) { - // everything failed - close(); - throw e; + connected = true; + } finally { + if (!connected) { + try { + close(); + } catch (IOException ioe) { + /* Do nothing. If connect threw an exception then + it will be passed up the call stack */ + } + } } } @@ -311,7 +315,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl } } try { - FileDescriptor fd = acquireFD(); + acquireFD(); try { socketConnect(address, port, timeout); /* socket may have been closed during poll/select */ @@ -370,7 +374,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl * @param s the connection */ protected void accept(SocketImpl s) throws IOException { - FileDescriptor fd = acquireFD(); + acquireFD(); try { socketAccept(s); } finally { @@ -562,7 +566,6 @@ abstract class AbstractPlainSocketImpl extends SocketImpl close(); } - /* * "Acquires" and returns the FileDescriptor for this impl * From 22929fb78f4606f726b652a25772980336398575 Mon Sep 17 00:00:00 2001 From: Karen Kinnear Date: Fri, 22 Oct 2010 15:59:34 -0400 Subject: [PATCH 153/722] 6988353: refactor contended sync subsystem Reduce complexity by factoring synchronizer.cpp Reviewed-by: dholmes, never, coleenp --- .../src/os/linux/vm/objectMonitor_linux.cpp | 24 - .../src/os/linux/vm/objectMonitor_linux.hpp | 25 - .../linux/vm/objectMonitor_linux.inline.hpp | 23 - .../os/solaris/vm/objectMonitor_solaris.cpp | 23 - .../os/solaris/vm/objectMonitor_solaris.hpp | 25 - .../vm/objectMonitor_solaris.inline.hpp | 23 - .../os/windows/vm/objectMonitor_windows.cpp | 25 - .../os/windows/vm/objectMonitor_windows.hpp | 25 - .../vm/objectMonitor_windows.inline.hpp | 23 - hotspot/src/share/vm/includeDB_compiler1 | 2 +- hotspot/src/share/vm/includeDB_core | 66 +- hotspot/src/share/vm/includeDB_features | 7 + hotspot/src/share/vm/includeDB_jvmti | 8 +- hotspot/src/share/vm/prims/jvmtiImpl.cpp | 71 - hotspot/src/share/vm/prims/jvmtiImpl.hpp | 71 - .../src/share/vm/prims/jvmtiRawMonitor.cpp | 420 ++ .../src/share/vm/prims/jvmtiRawMonitor.hpp | 99 + hotspot/src/share/vm/runtime/basicLock.cpp | 76 + hotspot/src/share/vm/runtime/basicLock.hpp | 72 + hotspot/src/share/vm/runtime/mutex.hpp | 45 - .../src/share/vm/runtime/objectMonitor.cpp | 2421 +++++++++ .../src/share/vm/runtime/objectMonitor.hpp | 148 +- .../share/vm/runtime/objectMonitor.inline.hpp | 4 - hotspot/src/share/vm/runtime/park.cpp | 237 + hotspot/src/share/vm/runtime/park.hpp | 169 + hotspot/src/share/vm/runtime/synchronizer.cpp | 4615 +++-------------- hotspot/src/share/vm/runtime/synchronizer.hpp | 73 +- hotspot/src/share/vm/runtime/thread.cpp | 429 +- hotspot/src/share/vm/runtime/thread.hpp | 99 +- 29 files changed, 4556 insertions(+), 4792 deletions(-) delete mode 100644 hotspot/src/os/linux/vm/objectMonitor_linux.cpp delete mode 100644 hotspot/src/os/linux/vm/objectMonitor_linux.hpp delete mode 100644 hotspot/src/os/linux/vm/objectMonitor_linux.inline.hpp delete mode 100644 hotspot/src/os/solaris/vm/objectMonitor_solaris.cpp delete mode 100644 hotspot/src/os/solaris/vm/objectMonitor_solaris.hpp delete mode 100644 hotspot/src/os/solaris/vm/objectMonitor_solaris.inline.hpp delete mode 100644 hotspot/src/os/windows/vm/objectMonitor_windows.cpp delete mode 100644 hotspot/src/os/windows/vm/objectMonitor_windows.hpp delete mode 100644 hotspot/src/os/windows/vm/objectMonitor_windows.inline.hpp create mode 100644 hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp create mode 100644 hotspot/src/share/vm/prims/jvmtiRawMonitor.hpp create mode 100644 hotspot/src/share/vm/runtime/basicLock.cpp create mode 100644 hotspot/src/share/vm/runtime/basicLock.hpp create mode 100644 hotspot/src/share/vm/runtime/objectMonitor.cpp create mode 100644 hotspot/src/share/vm/runtime/park.cpp create mode 100644 hotspot/src/share/vm/runtime/park.hpp diff --git a/hotspot/src/os/linux/vm/objectMonitor_linux.cpp b/hotspot/src/os/linux/vm/objectMonitor_linux.cpp deleted file mode 100644 index 4e7878d22fe..00000000000 --- a/hotspot/src/os/linux/vm/objectMonitor_linux.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -/* - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ diff --git a/hotspot/src/os/linux/vm/objectMonitor_linux.hpp b/hotspot/src/os/linux/vm/objectMonitor_linux.hpp deleted file mode 100644 index 663dd38a8a9..00000000000 --- a/hotspot/src/os/linux/vm/objectMonitor_linux.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - - private: diff --git a/hotspot/src/os/linux/vm/objectMonitor_linux.inline.hpp b/hotspot/src/os/linux/vm/objectMonitor_linux.inline.hpp deleted file mode 100644 index 2e84f688281..00000000000 --- a/hotspot/src/os/linux/vm/objectMonitor_linux.inline.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ diff --git a/hotspot/src/os/solaris/vm/objectMonitor_solaris.cpp b/hotspot/src/os/solaris/vm/objectMonitor_solaris.cpp deleted file mode 100644 index 07fe1598f87..00000000000 --- a/hotspot/src/os/solaris/vm/objectMonitor_solaris.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ diff --git a/hotspot/src/os/solaris/vm/objectMonitor_solaris.hpp b/hotspot/src/os/solaris/vm/objectMonitor_solaris.hpp deleted file mode 100644 index 0b4fc2f7138..00000000000 --- a/hotspot/src/os/solaris/vm/objectMonitor_solaris.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - - private: diff --git a/hotspot/src/os/solaris/vm/objectMonitor_solaris.inline.hpp b/hotspot/src/os/solaris/vm/objectMonitor_solaris.inline.hpp deleted file mode 100644 index 07fe1598f87..00000000000 --- a/hotspot/src/os/solaris/vm/objectMonitor_solaris.inline.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ diff --git a/hotspot/src/os/windows/vm/objectMonitor_windows.cpp b/hotspot/src/os/windows/vm/objectMonitor_windows.cpp deleted file mode 100644 index 0410186f51f..00000000000 --- a/hotspot/src/os/windows/vm/objectMonitor_windows.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "incls/_precompiled.incl" diff --git a/hotspot/src/os/windows/vm/objectMonitor_windows.hpp b/hotspot/src/os/windows/vm/objectMonitor_windows.hpp deleted file mode 100644 index 0b4fc2f7138..00000000000 --- a/hotspot/src/os/windows/vm/objectMonitor_windows.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - - private: diff --git a/hotspot/src/os/windows/vm/objectMonitor_windows.inline.hpp b/hotspot/src/os/windows/vm/objectMonitor_windows.inline.hpp deleted file mode 100644 index 07fe1598f87..00000000000 --- a/hotspot/src/os/windows/vm/objectMonitor_windows.inline.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ diff --git a/hotspot/src/share/vm/includeDB_compiler1 b/hotspot/src/share/vm/includeDB_compiler1 index f578561609e..71fbea13d56 100644 --- a/hotspot/src/share/vm/includeDB_compiler1 +++ b/hotspot/src/share/vm/includeDB_compiler1 @@ -301,6 +301,7 @@ c1_MacroAssembler.hpp assembler.hpp c1_MacroAssembler.hpp assembler_.inline.hpp c1_MacroAssembler_.cpp arrayOop.hpp +c1_MacroAssembler_.cpp basicLock.hpp c1_MacroAssembler_.cpp biasedLocking.hpp c1_MacroAssembler_.cpp c1_MacroAssembler.hpp c1_MacroAssembler_.cpp c1_Runtime1.hpp @@ -309,7 +310,6 @@ c1_MacroAssembler_.cpp interpreter.hpp c1_MacroAssembler_.cpp markOop.hpp c1_MacroAssembler_.cpp os.hpp c1_MacroAssembler_.cpp stubRoutines.hpp -c1_MacroAssembler_.cpp synchronizer.hpp c1_MacroAssembler_.cpp systemDictionary.hpp c1_MacroAssembler_.hpp generate_platform_dependent_include diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index 14d78e91d41..479363c61ec 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -300,10 +300,17 @@ barrierSet.hpp oopsHierarchy.hpp barrierSet.inline.hpp barrierSet.hpp barrierSet.inline.hpp cardTableModRefBS.hpp +basicLock.cpp basicLock.hpp +basicLock.cpp synchronizer.hpp + +basicLock.hpp handles.hpp +basicLock.hpp markOop.hpp +basicLock.hpp top.hpp + +biasedLocking.cpp basicLock.hpp biasedLocking.cpp biasedLocking.hpp biasedLocking.cpp klass.inline.hpp biasedLocking.cpp markOop.hpp -biasedLocking.cpp synchronizer.hpp biasedLocking.cpp task.hpp biasedLocking.cpp vframe.hpp biasedLocking.cpp vmThread.hpp @@ -404,13 +411,13 @@ bytecodeInterpreter_.cpp vframeArray.hpp bytecodeInterpreterWithChecks.cpp bytecodeInterpreter.cpp bytecodeInterpreter.hpp allocation.hpp +bytecodeInterpreter.hpp basicLock.hpp bytecodeInterpreter.hpp bytes_.hpp bytecodeInterpreter.hpp frame.hpp bytecodeInterpreter.hpp globalDefinitions.hpp bytecodeInterpreter.hpp globals.hpp bytecodeInterpreter.hpp methodDataOop.hpp bytecodeInterpreter.hpp methodOop.hpp -bytecodeInterpreter.hpp synchronizer.hpp bytecodeInterpreter.inline.hpp bytecodeInterpreter.hpp bytecodeInterpreter.inline.hpp stubRoutines.hpp @@ -1667,10 +1674,10 @@ frame.cpp stubRoutines.hpp frame.cpp universe.inline.hpp frame.hpp assembler.hpp +frame.hpp basicLock.hpp frame.hpp methodOop.hpp frame.hpp monitorChunk.hpp frame.hpp registerMap.hpp -frame.hpp synchronizer.hpp frame.hpp top.hpp frame.inline.hpp bytecodeInterpreter.hpp @@ -2120,6 +2127,7 @@ interfaceSupport.hpp vmThread.hpp interfaceSupport_.hpp generate_platform_dependent_include interp_masm_.cpp arrayOop.hpp +interp_masm_.cpp basicLock.hpp interp_masm_.cpp biasedLocking.hpp interp_masm_.cpp interp_masm_.hpp interp_masm_.cpp interpreterRuntime.hpp @@ -2131,7 +2139,6 @@ interp_masm_.cpp markOop.hpp interp_masm_.cpp methodDataOop.hpp interp_masm_.cpp methodOop.hpp interp_masm_.cpp sharedRuntime.hpp -interp_masm_.cpp synchronizer.hpp interp_masm_.cpp thread_.inline.hpp interp_masm_.hpp assembler_.inline.hpp @@ -3094,25 +3101,26 @@ objArrayOop.cpp oop.inline.hpp objArrayOop.hpp arrayOop.hpp +objectMonitor.cpp dtrace.hpp +objectMonitor.cpp handles.inline.hpp +objectMonitor.cpp interfaceSupport.hpp +objectMonitor.cpp markOop.hpp +objectMonitor.cpp mutexLocker.hpp +objectMonitor.cpp objectMonitor.hpp +objectMonitor.cpp objectMonitor.inline.hpp +objectMonitor.cpp oop.inline.hpp +objectMonitor.cpp osThread.hpp +objectMonitor.cpp os_.inline.hpp +objectMonitor.cpp preserveException.hpp +objectMonitor.cpp resourceArea.hpp +objectMonitor.cpp stubRoutines.hpp +objectMonitor.cpp thread.hpp +objectMonitor.cpp thread_.inline.hpp +objectMonitor.cpp threadService.hpp +objectMonitor.cpp vmSymbols.hpp + objectMonitor.hpp os.hpp - -objectMonitor_.cpp dtrace.hpp -objectMonitor_.cpp interfaceSupport.hpp -objectMonitor_.cpp objectMonitor.hpp -objectMonitor_.cpp objectMonitor.inline.hpp -objectMonitor_.cpp oop.inline.hpp -objectMonitor_.cpp osThread.hpp -objectMonitor_.cpp os_.inline.hpp -objectMonitor_.cpp threadService.hpp -objectMonitor_.cpp thread_.inline.hpp -objectMonitor_.cpp vmSymbols.hpp - -objectMonitor_.hpp generate_platform_dependent_include -objectMonitor_.hpp os_.inline.hpp -objectMonitor_.hpp thread_.inline.hpp -objectMonitor_.hpp top.hpp - -objectMonitor_.inline.hpp generate_platform_dependent_include +objectMonitor.hpp perfData.hpp oop.cpp copy.hpp oop.cpp handles.inline.hpp @@ -3329,7 +3337,6 @@ os_.cpp mutex_.inline.hpp os_.cpp nativeInst_.hpp os_.cpp no_precompiled_headers os_.cpp objectMonitor.hpp -os_.cpp objectMonitor.inline.hpp os_.cpp oop.inline.hpp os_.cpp osThread.hpp os_.cpp os_share_.hpp @@ -3389,6 +3396,12 @@ ostream.cpp xmlstream.hpp ostream.hpp allocation.hpp ostream.hpp timer.hpp +// include thread.hpp to prevent cyclic includes +park.cpp thread.hpp + +park.hpp debug.hpp +park.hpp globalDefinitions.hpp + pcDesc.cpp debugInfoRec.hpp pcDesc.cpp nmethod.hpp pcDesc.cpp pcDesc.hpp @@ -4063,10 +4076,10 @@ synchronizer.cpp preserveException.hpp synchronizer.cpp resourceArea.hpp synchronizer.cpp stubRoutines.hpp synchronizer.cpp synchronizer.hpp -synchronizer.cpp threadService.hpp synchronizer.cpp thread_.inline.hpp synchronizer.cpp vmSymbols.hpp +synchronizer.hpp basicLock.hpp synchronizer.hpp handles.hpp synchronizer.hpp markOop.hpp synchronizer.hpp perfData.hpp @@ -4238,7 +4251,6 @@ thread.cpp memprofiler.hpp thread.cpp mutexLocker.hpp thread.cpp objArrayOop.hpp thread.cpp objectMonitor.hpp -thread.cpp objectMonitor.inline.hpp thread.cpp oop.inline.hpp thread.cpp oopFactory.hpp thread.cpp osThread.hpp @@ -4276,6 +4288,7 @@ thread.hpp mutexLocker.hpp thread.hpp oop.hpp thread.hpp os.hpp thread.hpp osThread.hpp +thread.hpp park.hpp thread.hpp safepoint.hpp thread.hpp stubRoutines.hpp thread.hpp threadLocalAllocBuffer.hpp @@ -4587,6 +4600,7 @@ vframeArray.hpp frame.inline.hpp vframeArray.hpp growableArray.hpp vframeArray.hpp monitorChunk.hpp +vframe_hp.cpp basicLock.hpp vframe_hp.cpp codeCache.hpp vframe_hp.cpp debugInfoRec.hpp vframe_hp.cpp handles.inline.hpp @@ -4600,7 +4614,6 @@ vframe_hp.cpp pcDesc.hpp vframe_hp.cpp scopeDesc.hpp vframe_hp.cpp signature.hpp vframe_hp.cpp stubRoutines.hpp -vframe_hp.cpp synchronizer.hpp vframe_hp.cpp vframeArray.hpp vframe_hp.cpp vframe_hp.hpp @@ -4752,6 +4765,7 @@ workgroup.cpp os.hpp workgroup.cpp workgroup.hpp workgroup.hpp taskqueue.hpp + workgroup.hpp thread_.inline.hpp xmlstream.cpp allocation.hpp diff --git a/hotspot/src/share/vm/includeDB_features b/hotspot/src/share/vm/includeDB_features index 39e1149b06f..5e9b00c0cb9 100644 --- a/hotspot/src/share/vm/includeDB_features +++ b/hotspot/src/share/vm/includeDB_features @@ -184,6 +184,13 @@ jvmtiImpl.hpp stackValueCollection.hpp jvmtiImpl.hpp systemDictionary.hpp jvmtiImpl.hpp vm_operations.hpp +jvmtiRawMonitor.cpp interfaceSupport.hpp +jvmtiRawMonitor.cpp jvmtiRawMonitor.hpp +jvmtiRawMonitor.cpp thread.hpp + +jvmtiRawMonitor.hpp growableArray.hpp +jvmtiRawMonitor.hpp objectMonitor.hpp + jvmtiTagMap.cpp biasedLocking.hpp jvmtiTagMap.cpp javaCalls.hpp jvmtiTagMap.cpp jniHandles.hpp diff --git a/hotspot/src/share/vm/includeDB_jvmti b/hotspot/src/share/vm/includeDB_jvmti index 704cf78afef..837c1b34df2 100644 --- a/hotspot/src/share/vm/includeDB_jvmti +++ b/hotspot/src/share/vm/includeDB_jvmti @@ -35,6 +35,7 @@ jvmtiClassFileReconstituter.hpp jvmtiEnv.hpp // jvmtiCodeBlobEvents is jck optional, please put deps in includeDB_features jvmtiEnter.cpp jvmtiEnter.hpp +jvmtiEnter.cpp jvmtiRawMonitor.hpp jvmtiEnter.cpp jvmtiUtil.hpp jvmtiEnter.hpp interfaceSupport.hpp @@ -44,6 +45,7 @@ jvmtiEnter.hpp resourceArea.hpp jvmtiEnter.hpp systemDictionary.hpp jvmtiEnterTrace.cpp jvmtiEnter.hpp +jvmtiEnterTrace.cpp jvmtiRawMonitor.hpp jvmtiEnterTrace.cpp jvmtiUtil.hpp jvmtiEnv.cpp arguments.hpp @@ -66,11 +68,11 @@ jvmtiEnv.cpp jvmtiExtensions.hpp jvmtiEnv.cpp jvmtiGetLoadedClasses.hpp jvmtiEnv.cpp jvmtiImpl.hpp jvmtiEnv.cpp jvmtiManageCapabilities.hpp +jvmtiEnv.cpp jvmtiRawMonitor.hpp jvmtiEnv.cpp jvmtiRedefineClasses.hpp jvmtiEnv.cpp jvmtiTagMap.hpp jvmtiEnv.cpp jvmtiThreadState.inline.hpp jvmtiEnv.cpp jvmtiUtil.hpp -jvmtiEnv.cpp objectMonitor.inline.hpp jvmtiEnv.cpp osThread.hpp jvmtiEnv.cpp preserveException.hpp jvmtiEnv.cpp reflectionUtils.hpp @@ -178,11 +180,13 @@ jvmtiExport.cpp jvmtiEventController.inline.hpp jvmtiExport.cpp jvmtiExport.hpp jvmtiExport.cpp jvmtiImpl.hpp jvmtiExport.cpp jvmtiManageCapabilities.hpp +jvmtiExport.cpp jvmtiRawMonitor.hpp jvmtiExport.cpp jvmtiTagMap.hpp jvmtiExport.cpp jvmtiThreadState.inline.hpp jvmtiExport.cpp nmethod.hpp jvmtiExport.cpp objArrayKlass.hpp jvmtiExport.cpp objArrayOop.hpp +jvmtiExport.cpp objectMonitor.hpp jvmtiExport.cpp objectMonitor.inline.hpp jvmtiExport.cpp pcDesc.hpp jvmtiExport.cpp resourceArea.hpp @@ -210,6 +214,8 @@ jvmtiManageCapabilities.cpp jvmtiManageCapabilities.hpp jvmtiManageCapabilities.hpp allocation.hpp jvmtiManageCapabilities.hpp jvmti.h +// jvmtiRawMonitor is jck optional, please put deps in includeDB_features + jvmtiRedefineClasses.cpp bitMap.inline.hpp jvmtiRedefineClasses.cpp codeCache.hpp jvmtiRedefineClasses.cpp deoptimization.hpp diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.cpp b/hotspot/src/share/vm/prims/jvmtiImpl.cpp index 0fb385d1e7f..d18478cf6c8 100644 --- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp +++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp @@ -25,26 +25,6 @@ # include "incls/_precompiled.incl" # include "incls/_jvmtiImpl.cpp.incl" -GrowableArray *JvmtiPendingMonitors::_monitors = new (ResourceObj::C_HEAP) GrowableArray(1,true); - -void JvmtiPendingMonitors::transition_raw_monitors() { - assert((Threads::number_of_threads()==1), - "Java thread has not created yet or more than one java thread \ -is running. Raw monitor transition will not work"); - JavaThread *current_java_thread = JavaThread::current(); - assert(current_java_thread->thread_state() == _thread_in_vm, "Must be in vm"); - { - ThreadBlockInVM __tbivm(current_java_thread); - for(int i=0; i< count(); i++) { - JvmtiRawMonitor *rmonitor = monitors()->at(i); - int r = rmonitor->raw_enter(current_java_thread); - assert(r == ObjectMonitor::OM_OK, "raw_enter should have worked"); - } - } - // pending monitors are converted to real monitor so delete them all. - dispose(); -} - // // class JvmtiAgentThread // @@ -216,57 +196,6 @@ void GrowableCache::gc_epilogue() { } } - -// -// class JvmtiRawMonitor -// - -JvmtiRawMonitor::JvmtiRawMonitor(const char *name) { -#ifdef ASSERT - _name = strcpy(NEW_C_HEAP_ARRAY(char, strlen(name) + 1), name); -#else - _name = NULL; -#endif - _magic = JVMTI_RM_MAGIC; -} - -JvmtiRawMonitor::~JvmtiRawMonitor() { -#ifdef ASSERT - FreeHeap(_name); -#endif - _magic = 0; -} - - -bool -JvmtiRawMonitor::is_valid() { - int value = 0; - - // This object might not be a JvmtiRawMonitor so we can't assume - // the _magic field is properly aligned. Get the value in a safe - // way and then check against JVMTI_RM_MAGIC. - - switch (sizeof(_magic)) { - case 2: - value = Bytes::get_native_u2((address)&_magic); - break; - - case 4: - value = Bytes::get_native_u4((address)&_magic); - break; - - case 8: - value = Bytes::get_native_u8((address)&_magic); - break; - - default: - guarantee(false, "_magic field is an unexpected size"); - } - - return value == JVMTI_RM_MAGIC; -} - - // // class JvmtiBreakpoint // diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.hpp b/hotspot/src/share/vm/prims/jvmtiImpl.hpp index 0b649412d97..945cda5ac34 100644 --- a/hotspot/src/share/vm/prims/jvmtiImpl.hpp +++ b/hotspot/src/share/vm/prims/jvmtiImpl.hpp @@ -26,7 +26,6 @@ // Forward Declarations // -class JvmtiRawMonitor; class JvmtiBreakpoint; class JvmtiBreakpoints; @@ -327,76 +326,6 @@ bool JvmtiCurrentBreakpoints::is_breakpoint(address bcp) { return false; } - -/////////////////////////////////////////////////////////////// -// -// class JvmtiRawMonitor -// -// Used by JVMTI methods: All RawMonitor methods (CreateRawMonitor, EnterRawMonitor, etc.) -// -// Wrapper for ObjectMonitor class that saves the Monitor's name -// - -class JvmtiRawMonitor : public ObjectMonitor { -private: - int _magic; - char * _name; - // JVMTI_RM_MAGIC is set in contructor and unset in destructor. - enum { JVMTI_RM_MAGIC = (int)(('T' << 24) | ('I' << 16) | ('R' << 8) | 'M') }; - -public: - JvmtiRawMonitor(const char *name); - ~JvmtiRawMonitor(); - int magic() { return _magic; } - const char *get_name() { return _name; } - bool is_valid(); -}; - -// Onload pending raw monitors -// Class is used to cache onload or onstart monitor enter -// which will transition into real monitor when -// VM is fully initialized. -class JvmtiPendingMonitors : public AllStatic { - -private: - static GrowableArray *_monitors; // Cache raw monitor enter - - inline static GrowableArray* monitors() { return _monitors; } - - static void dispose() { - delete monitors(); - } - -public: - static void enter(JvmtiRawMonitor *monitor) { - monitors()->append(monitor); - } - - static int count() { - return monitors()->length(); - } - - static void destroy(JvmtiRawMonitor *monitor) { - while (monitors()->contains(monitor)) { - monitors()->remove(monitor); - } - } - - // Return false if monitor is not found in the list. - static bool exit(JvmtiRawMonitor *monitor) { - if (monitors()->contains(monitor)) { - monitors()->remove(monitor); - return true; - } else { - return false; - } - } - - static void transition_raw_monitors(); -}; - - - /////////////////////////////////////////////////////////////// // The get/set local operations must only be done by the VM thread // because the interpreter version needs to access oop maps, which can diff --git a/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp b/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp new file mode 100644 index 00000000000..c7dc2939f07 --- /dev/null +++ b/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp @@ -0,0 +1,420 @@ +/* + * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +# include "incls/_precompiled.incl" +# include "incls/_jvmtiRawMonitor.cpp.incl" + +GrowableArray *JvmtiPendingMonitors::_monitors = new (ResourceObj::C_HEAP) GrowableArray(1,true); + +void JvmtiPendingMonitors::transition_raw_monitors() { + assert((Threads::number_of_threads()==1), + "Java thread has not created yet or more than one java thread \ +is running. Raw monitor transition will not work"); + JavaThread *current_java_thread = JavaThread::current(); + assert(current_java_thread->thread_state() == _thread_in_vm, "Must be in vm"); + { + ThreadBlockInVM __tbivm(current_java_thread); + for(int i=0; i< count(); i++) { + JvmtiRawMonitor *rmonitor = monitors()->at(i); + int r = rmonitor->raw_enter(current_java_thread); + assert(r == ObjectMonitor::OM_OK, "raw_enter should have worked"); + } + } + // pending monitors are converted to real monitor so delete them all. + dispose(); +} + +// +// class JvmtiRawMonitor +// + +JvmtiRawMonitor::JvmtiRawMonitor(const char *name) { +#ifdef ASSERT + _name = strcpy(NEW_C_HEAP_ARRAY(char, strlen(name) + 1), name); +#else + _name = NULL; +#endif + _magic = JVMTI_RM_MAGIC; +} + +JvmtiRawMonitor::~JvmtiRawMonitor() { +#ifdef ASSERT + FreeHeap(_name); +#endif + _magic = 0; +} + + +bool +JvmtiRawMonitor::is_valid() { + int value = 0; + + // This object might not be a JvmtiRawMonitor so we can't assume + // the _magic field is properly aligned. Get the value in a safe + // way and then check against JVMTI_RM_MAGIC. + + switch (sizeof(_magic)) { + case 2: + value = Bytes::get_native_u2((address)&_magic); + break; + + case 4: + value = Bytes::get_native_u4((address)&_magic); + break; + + case 8: + value = Bytes::get_native_u8((address)&_magic); + break; + + default: + guarantee(false, "_magic field is an unexpected size"); + } + + return value == JVMTI_RM_MAGIC; +} + +// ------------------------------------------------------------------------- +// The raw monitor subsystem is entirely distinct from normal +// java-synchronization or jni-synchronization. raw monitors are not +// associated with objects. They can be implemented in any manner +// that makes sense. The original implementors decided to piggy-back +// the raw-monitor implementation on the existing Java objectMonitor mechanism. +// This flaw needs to fixed. We should reimplement raw monitors as sui-generis. +// Specifically, we should not implement raw monitors via java monitors. +// Time permitting, we should disentangle and deconvolve the two implementations +// and move the resulting raw monitor implementation over to the JVMTI directories. +// Ideally, the raw monitor implementation would be built on top of +// park-unpark and nothing else. +// +// raw monitors are used mainly by JVMTI +// The raw monitor implementation borrows the ObjectMonitor structure, +// but the operators are degenerate and extremely simple. +// +// Mixed use of a single objectMonitor instance -- as both a raw monitor +// and a normal java monitor -- is not permissible. +// +// Note that we use the single RawMonitor_lock to protect queue operations for +// _all_ raw monitors. This is a scalability impediment, but since raw monitor usage +// is deprecated and rare, this is not of concern. The RawMonitor_lock can not +// be held indefinitely. The critical sections must be short and bounded. +// +// ------------------------------------------------------------------------- + +int JvmtiRawMonitor::SimpleEnter (Thread * Self) { + for (;;) { + if (Atomic::cmpxchg_ptr (Self, &_owner, NULL) == NULL) { + return OS_OK ; + } + + ObjectWaiter Node (Self) ; + Self->_ParkEvent->reset() ; // strictly optional + Node.TState = ObjectWaiter::TS_ENTER ; + + RawMonitor_lock->lock_without_safepoint_check() ; + Node._next = _EntryList ; + _EntryList = &Node ; + OrderAccess::fence() ; + if (_owner == NULL && Atomic::cmpxchg_ptr (Self, &_owner, NULL) == NULL) { + _EntryList = Node._next ; + RawMonitor_lock->unlock() ; + return OS_OK ; + } + RawMonitor_lock->unlock() ; + while (Node.TState == ObjectWaiter::TS_ENTER) { + Self->_ParkEvent->park() ; + } + } +} + +int JvmtiRawMonitor::SimpleExit (Thread * Self) { + guarantee (_owner == Self, "invariant") ; + OrderAccess::release_store_ptr (&_owner, NULL) ; + OrderAccess::fence() ; + if (_EntryList == NULL) return OS_OK ; + ObjectWaiter * w ; + + RawMonitor_lock->lock_without_safepoint_check() ; + w = _EntryList ; + if (w != NULL) { + _EntryList = w->_next ; + } + RawMonitor_lock->unlock() ; + if (w != NULL) { + guarantee (w ->TState == ObjectWaiter::TS_ENTER, "invariant") ; + ParkEvent * ev = w->_event ; + w->TState = ObjectWaiter::TS_RUN ; + OrderAccess::fence() ; + ev->unpark() ; + } + return OS_OK ; +} + +int JvmtiRawMonitor::SimpleWait (Thread * Self, jlong millis) { + guarantee (_owner == Self , "invariant") ; + guarantee (_recursions == 0, "invariant") ; + + ObjectWaiter Node (Self) ; + Node._notified = 0 ; + Node.TState = ObjectWaiter::TS_WAIT ; + + RawMonitor_lock->lock_without_safepoint_check() ; + Node._next = _WaitSet ; + _WaitSet = &Node ; + RawMonitor_lock->unlock() ; + + SimpleExit (Self) ; + guarantee (_owner != Self, "invariant") ; + + int ret = OS_OK ; + if (millis <= 0) { + Self->_ParkEvent->park(); + } else { + ret = Self->_ParkEvent->park(millis); + } + + // If thread still resides on the waitset then unlink it. + // Double-checked locking -- the usage is safe in this context + // as we TState is volatile and the lock-unlock operators are + // serializing (barrier-equivalent). + + if (Node.TState == ObjectWaiter::TS_WAIT) { + RawMonitor_lock->lock_without_safepoint_check() ; + if (Node.TState == ObjectWaiter::TS_WAIT) { + // Simple O(n) unlink, but performance isn't critical here. + ObjectWaiter * p ; + ObjectWaiter * q = NULL ; + for (p = _WaitSet ; p != &Node; p = p->_next) { + q = p ; + } + guarantee (p == &Node, "invariant") ; + if (q == NULL) { + guarantee (p == _WaitSet, "invariant") ; + _WaitSet = p->_next ; + } else { + guarantee (p == q->_next, "invariant") ; + q->_next = p->_next ; + } + Node.TState = ObjectWaiter::TS_RUN ; + } + RawMonitor_lock->unlock() ; + } + + guarantee (Node.TState == ObjectWaiter::TS_RUN, "invariant") ; + SimpleEnter (Self) ; + + guarantee (_owner == Self, "invariant") ; + guarantee (_recursions == 0, "invariant") ; + return ret ; +} + +int JvmtiRawMonitor::SimpleNotify (Thread * Self, bool All) { + guarantee (_owner == Self, "invariant") ; + if (_WaitSet == NULL) return OS_OK ; + + // We have two options: + // A. Transfer the threads from the WaitSet to the EntryList + // B. Remove the thread from the WaitSet and unpark() it. + // + // We use (B), which is crude and results in lots of futile + // context switching. In particular (B) induces lots of contention. + + ParkEvent * ev = NULL ; // consider using a small auto array ... + RawMonitor_lock->lock_without_safepoint_check() ; + for (;;) { + ObjectWaiter * w = _WaitSet ; + if (w == NULL) break ; + _WaitSet = w->_next ; + if (ev != NULL) { ev->unpark(); ev = NULL; } + ev = w->_event ; + OrderAccess::loadstore() ; + w->TState = ObjectWaiter::TS_RUN ; + OrderAccess::storeload(); + if (!All) break ; + } + RawMonitor_lock->unlock() ; + if (ev != NULL) ev->unpark(); + return OS_OK ; +} + +// Any JavaThread will enter here with state _thread_blocked +int JvmtiRawMonitor::raw_enter(TRAPS) { + TEVENT (raw_enter) ; + void * Contended ; + + // don't enter raw monitor if thread is being externally suspended, it will + // surprise the suspender if a "suspended" thread can still enter monitor + JavaThread * jt = (JavaThread *)THREAD; + if (THREAD->is_Java_thread()) { + jt->SR_lock()->lock_without_safepoint_check(); + while (jt->is_external_suspend()) { + jt->SR_lock()->unlock(); + jt->java_suspend_self(); + jt->SR_lock()->lock_without_safepoint_check(); + } + // guarded by SR_lock to avoid racing with new external suspend requests. + Contended = Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) ; + jt->SR_lock()->unlock(); + } else { + Contended = Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) ; + } + + if (Contended == THREAD) { + _recursions ++ ; + return OM_OK ; + } + + if (Contended == NULL) { + guarantee (_owner == THREAD, "invariant") ; + guarantee (_recursions == 0, "invariant") ; + return OM_OK ; + } + + THREAD->set_current_pending_monitor(this); + + if (!THREAD->is_Java_thread()) { + // No other non-Java threads besides VM thread would acquire + // a raw monitor. + assert(THREAD->is_VM_thread(), "must be VM thread"); + SimpleEnter (THREAD) ; + } else { + guarantee (jt->thread_state() == _thread_blocked, "invariant") ; + for (;;) { + jt->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or + // java_suspend_self() + SimpleEnter (THREAD) ; + + // were we externally suspended while we were waiting? + if (!jt->handle_special_suspend_equivalent_condition()) break ; + + // This thread was externally suspended + // + // This logic isn't needed for JVMTI raw monitors, + // but doesn't hurt just in case the suspend rules change. This + // logic is needed for the JvmtiRawMonitor.wait() reentry phase. + // We have reentered the contended monitor, but while we were + // waiting another thread suspended us. We don't want to reenter + // the monitor while suspended because that would surprise the + // thread that suspended us. + // + // Drop the lock - + SimpleExit (THREAD) ; + + jt->java_suspend_self(); + } + + assert(_owner == THREAD, "Fatal error with monitor owner!"); + assert(_recursions == 0, "Fatal error with monitor recursions!"); + } + + THREAD->set_current_pending_monitor(NULL); + guarantee (_recursions == 0, "invariant") ; + return OM_OK; +} + +// Used mainly for JVMTI raw monitor implementation +// Also used for JvmtiRawMonitor::wait(). +int JvmtiRawMonitor::raw_exit(TRAPS) { + TEVENT (raw_exit) ; + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + if (_recursions > 0) { + --_recursions ; + return OM_OK ; + } + + void * List = _EntryList ; + SimpleExit (THREAD) ; + + return OM_OK; +} + +// Used for JVMTI raw monitor implementation. +// All JavaThreads will enter here with state _thread_blocked + +int JvmtiRawMonitor::raw_wait(jlong millis, bool interruptible, TRAPS) { + TEVENT (raw_wait) ; + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + + // To avoid spurious wakeups we reset the parkevent -- This is strictly optional. + // The caller must be able to tolerate spurious returns from raw_wait(). + THREAD->_ParkEvent->reset() ; + OrderAccess::fence() ; + + // check interrupt event + if (interruptible && Thread::is_interrupted(THREAD, true)) { + return OM_INTERRUPTED; + } + + intptr_t save = _recursions ; + _recursions = 0 ; + _waiters ++ ; + if (THREAD->is_Java_thread()) { + guarantee (((JavaThread *) THREAD)->thread_state() == _thread_blocked, "invariant") ; + ((JavaThread *)THREAD)->set_suspend_equivalent(); + } + int rv = SimpleWait (THREAD, millis) ; + _recursions = save ; + _waiters -- ; + + guarantee (THREAD == _owner, "invariant") ; + if (THREAD->is_Java_thread()) { + JavaThread * jSelf = (JavaThread *) THREAD ; + for (;;) { + if (!jSelf->handle_special_suspend_equivalent_condition()) break ; + SimpleExit (THREAD) ; + jSelf->java_suspend_self(); + SimpleEnter (THREAD) ; + jSelf->set_suspend_equivalent() ; + } + } + guarantee (THREAD == _owner, "invariant") ; + + if (interruptible && Thread::is_interrupted(THREAD, true)) { + return OM_INTERRUPTED; + } + return OM_OK ; +} + +int JvmtiRawMonitor::raw_notify(TRAPS) { + TEVENT (raw_notify) ; + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + SimpleNotify (THREAD, false) ; + return OM_OK; +} + +int JvmtiRawMonitor::raw_notifyAll(TRAPS) { + TEVENT (raw_notifyAll) ; + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + SimpleNotify (THREAD, true) ; + return OM_OK; +} + diff --git a/hotspot/src/share/vm/prims/jvmtiRawMonitor.hpp b/hotspot/src/share/vm/prims/jvmtiRawMonitor.hpp new file mode 100644 index 00000000000..41d481bf448 --- /dev/null +++ b/hotspot/src/share/vm/prims/jvmtiRawMonitor.hpp @@ -0,0 +1,99 @@ +/* + * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +// +// class JvmtiRawMonitor +// +// Used by JVMTI methods: All RawMonitor methods (CreateRawMonitor, EnterRawMonitor, etc.) +// +// Wrapper for ObjectMonitor class that saves the Monitor's name +// + +class JvmtiRawMonitor : public ObjectMonitor { +private: + int _magic; + char * _name; + // JVMTI_RM_MAGIC is set in contructor and unset in destructor. + enum { JVMTI_RM_MAGIC = (int)(('T' << 24) | ('I' << 16) | ('R' << 8) | 'M') }; + + int SimpleEnter (Thread * Self) ; + int SimpleExit (Thread * Self) ; + int SimpleWait (Thread * Self, jlong millis) ; + int SimpleNotify (Thread * Self, bool All) ; + +public: + JvmtiRawMonitor(const char *name); + ~JvmtiRawMonitor(); + int raw_enter(TRAPS); + int raw_exit(TRAPS); + int raw_wait(jlong millis, bool interruptable, TRAPS); + int raw_notify(TRAPS); + int raw_notifyAll(TRAPS); + int magic() { return _magic; } + const char *get_name() { return _name; } + bool is_valid(); +}; + +// Onload pending raw monitors +// Class is used to cache onload or onstart monitor enter +// which will transition into real monitor when +// VM is fully initialized. +class JvmtiPendingMonitors : public AllStatic { + +private: + static GrowableArray *_monitors; // Cache raw monitor enter + + inline static GrowableArray* monitors() { return _monitors; } + + static void dispose() { + delete monitors(); + } + +public: + static void enter(JvmtiRawMonitor *monitor) { + monitors()->append(monitor); + } + + static int count() { + return monitors()->length(); + } + + static void destroy(JvmtiRawMonitor *monitor) { + while (monitors()->contains(monitor)) { + monitors()->remove(monitor); + } + } + + // Return false if monitor is not found in the list. + static bool exit(JvmtiRawMonitor *monitor) { + if (monitors()->contains(monitor)) { + monitors()->remove(monitor); + return true; + } else { + return false; + } + } + + static void transition_raw_monitors(); +}; diff --git a/hotspot/src/share/vm/runtime/basicLock.cpp b/hotspot/src/share/vm/runtime/basicLock.cpp new file mode 100644 index 00000000000..12956597e79 --- /dev/null +++ b/hotspot/src/share/vm/runtime/basicLock.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +# include "incls/_precompiled.incl" +# include "incls/_basicLock.cpp.incl" + +void BasicLock::print_on(outputStream* st) const { + st->print("monitor"); +} + +void BasicLock::move_to(oop obj, BasicLock* dest) { + // Check to see if we need to inflate the lock. This is only needed + // if an object is locked using "this" lightweight monitor. In that + // case, the displaced_header() is unlocked, because the + // displaced_header() contains the header for the originally unlocked + // object. However the object could have already been inflated. But it + // does not matter, the inflation will just a no-op. For other cases, + // the displaced header will be either 0x0 or 0x3, which are location + // independent, therefore the BasicLock is free to move. + // + // During OSR we may need to relocate a BasicLock (which contains a + // displaced word) from a location in an interpreter frame to a + // new location in a compiled frame. "this" refers to the source + // basiclock in the interpreter frame. "dest" refers to the destination + // basiclock in the new compiled frame. We *always* inflate in move_to(). + // The always-Inflate policy works properly, but in 1.5.0 it can sometimes + // cause performance problems in code that makes heavy use of a small # of + // uncontended locks. (We'd inflate during OSR, and then sync performance + // would subsequently plummet because the thread would be forced thru the slow-path). + // This problem has been made largely moot on IA32 by inlining the inflated fast-path + // operations in Fast_Lock and Fast_Unlock in i486.ad. + // + // Note that there is a way to safely swing the object's markword from + // one stack location to another. This avoids inflation. Obviously, + // we need to ensure that both locations refer to the current thread's stack. + // There are some subtle concurrency issues, however, and since the benefit is + // is small (given the support for inflated fast-path locking in the fast_lock, etc) + // we'll leave that optimization for another time. + + if (displaced_header()->is_neutral()) { + ObjectSynchronizer::inflate_helper(obj); + // WARNING: We can not put check here, because the inflation + // will not update the displaced header. Once BasicLock is inflated, + // no one should ever look at its content. + } else { + // Typically the displaced header will be 0 (recursive stack lock) or + // unused_mark. Naively we'd like to assert that the displaced mark + // value is either 0, neutral, or 3. But with the advent of the + // store-before-CAS avoidance in fast_lock/compiler_lock_object + // we can find any flavor mark in the displaced mark. + } +// [RGV] The next line appears to do nothing! + intptr_t dh = (intptr_t) displaced_header(); + dest->set_displaced_header(displaced_header()); +} diff --git a/hotspot/src/share/vm/runtime/basicLock.hpp b/hotspot/src/share/vm/runtime/basicLock.hpp new file mode 100644 index 00000000000..a7061b417a1 --- /dev/null +++ b/hotspot/src/share/vm/runtime/basicLock.hpp @@ -0,0 +1,72 @@ +/* + * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +class BasicLock VALUE_OBJ_CLASS_SPEC { + friend class VMStructs; + private: + volatile markOop _displaced_header; + public: + markOop displaced_header() const { return _displaced_header; } + void set_displaced_header(markOop header) { _displaced_header = header; } + + void print_on(outputStream* st) const; + + // move a basic lock (used during deoptimization + void move_to(oop obj, BasicLock* dest); + + static int displaced_header_offset_in_bytes() { return offset_of(BasicLock, _displaced_header); } +}; + +// A BasicObjectLock associates a specific Java object with a BasicLock. +// It is currently embedded in an interpreter frame. + +// Because some machines have alignment restrictions on the control stack, +// the actual space allocated by the interpreter may include padding words +// after the end of the BasicObjectLock. Also, in order to guarantee +// alignment of the embedded BasicLock objects on such machines, we +// put the embedded BasicLock at the beginning of the struct. + +class BasicObjectLock VALUE_OBJ_CLASS_SPEC { + friend class VMStructs; + private: + BasicLock _lock; // the lock, must be double word aligned + oop _obj; // object holds the lock; + + public: + // Manipulation + oop obj() const { return _obj; } + void set_obj(oop obj) { _obj = obj; } + BasicLock* lock() { return &_lock; } + + // Note: Use frame::interpreter_frame_monitor_size() for the size of BasicObjectLocks + // in interpreter activation frames since it includes machine-specific padding. + static int size() { return sizeof(BasicObjectLock)/wordSize; } + + // GC support + void oops_do(OopClosure* f) { f->do_oop(&_obj); } + + static int obj_offset_in_bytes() { return offset_of(BasicObjectLock, _obj); } + static int lock_offset_in_bytes() { return offset_of(BasicObjectLock, _lock); } +}; + diff --git a/hotspot/src/share/vm/runtime/mutex.hpp b/hotspot/src/share/vm/runtime/mutex.hpp index eb9b5dc8c01..ee0ca717bf8 100644 --- a/hotspot/src/share/vm/runtime/mutex.hpp +++ b/hotspot/src/share/vm/runtime/mutex.hpp @@ -265,48 +265,3 @@ class Mutex : public Monitor { // degenerate Monitor } }; -/* - * Per-thread blocking support for JSR166. See the Java-level - * Documentation for rationale. Basically, park acts like wait, unpark - * like notify. - * - * 6271289 -- - * To avoid errors where an os thread expires but the JavaThread still - * exists, Parkers are immortal (type-stable) and are recycled across - * new threads. This parallels the ParkEvent implementation. - * Because park-unpark allow spurious wakeups it is harmless if an - * unpark call unparks a new thread using the old Parker reference. - * - * In the future we'll want to think about eliminating Parker and using - * ParkEvent instead. There's considerable duplication between the two - * services. - * - */ - -class Parker : public os::PlatformParker { -private: - volatile int _counter ; - Parker * FreeNext ; - JavaThread * AssociatedWith ; // Current association - -public: - Parker() : PlatformParker() { - _counter = 0 ; - FreeNext = NULL ; - AssociatedWith = NULL ; - } -protected: - ~Parker() { ShouldNotReachHere(); } -public: - // For simplicity of interface with Java, all forms of park (indefinite, - // relative, and absolute) are multiplexed into one call. - void park(bool isAbsolute, jlong time); - void unpark(); - - // Lifecycle operators - static Parker * Allocate (JavaThread * t) ; - static void Release (Parker * e) ; -private: - static Parker * volatile FreeList ; - static volatile int ListLock ; -}; diff --git a/hotspot/src/share/vm/runtime/objectMonitor.cpp b/hotspot/src/share/vm/runtime/objectMonitor.cpp new file mode 100644 index 00000000000..9a8178774fd --- /dev/null +++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp @@ -0,0 +1,2421 @@ +/* + * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +# include "incls/_precompiled.incl" +# include "incls/_objectMonitor.cpp.incl" + +#if defined(__GNUC__) && !defined(IA64) + // Need to inhibit inlining for older versions of GCC to avoid build-time failures + #define ATTR __attribute__((noinline)) +#else + #define ATTR +#endif + + +#ifdef DTRACE_ENABLED + +// Only bother with this argument setup if dtrace is available +// TODO-FIXME: probes should not fire when caller is _blocked. assert() accordingly. + +HS_DTRACE_PROBE_DECL4(hotspot, monitor__notify, + jlong, uintptr_t, char*, int); +HS_DTRACE_PROBE_DECL4(hotspot, monitor__notifyAll, + jlong, uintptr_t, char*, int); +HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__enter, + jlong, uintptr_t, char*, int); +HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__entered, + jlong, uintptr_t, char*, int); +HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__exit, + jlong, uintptr_t, char*, int); + +#define DTRACE_MONITOR_PROBE_COMMON(klassOop, thread) \ + char* bytes = NULL; \ + int len = 0; \ + jlong jtid = SharedRuntime::get_java_tid(thread); \ + symbolOop klassname = ((oop)(klassOop))->klass()->klass_part()->name(); \ + if (klassname != NULL) { \ + bytes = (char*)klassname->bytes(); \ + len = klassname->utf8_length(); \ + } + +#define DTRACE_MONITOR_WAIT_PROBE(monitor, klassOop, thread, millis) \ + { \ + if (DTraceMonitorProbes) { \ + DTRACE_MONITOR_PROBE_COMMON(klassOop, thread); \ + HS_DTRACE_PROBE5(hotspot, monitor__wait, jtid, \ + (monitor), bytes, len, (millis)); \ + } \ + } + +#define DTRACE_MONITOR_PROBE(probe, monitor, klassOop, thread) \ + { \ + if (DTraceMonitorProbes) { \ + DTRACE_MONITOR_PROBE_COMMON(klassOop, thread); \ + HS_DTRACE_PROBE4(hotspot, monitor__##probe, jtid, \ + (uintptr_t)(monitor), bytes, len); \ + } \ + } + +#else // ndef DTRACE_ENABLED + +#define DTRACE_MONITOR_WAIT_PROBE(klassOop, thread, millis, mon) {;} +#define DTRACE_MONITOR_PROBE(probe, klassOop, thread, mon) {;} + +#endif // ndef DTRACE_ENABLED + +// Tunables ... +// The knob* variables are effectively final. Once set they should +// never be modified hence. Consider using __read_mostly with GCC. + +int ObjectMonitor::Knob_Verbose = 0 ; +int ObjectMonitor::Knob_SpinLimit = 5000 ; // derived by an external tool - +static int Knob_LogSpins = 0 ; // enable jvmstat tally for spins +static int Knob_HandOff = 0 ; +static int Knob_ReportSettings = 0 ; + +static int Knob_SpinBase = 0 ; // Floor AKA SpinMin +static int Knob_SpinBackOff = 0 ; // spin-loop backoff +static int Knob_CASPenalty = -1 ; // Penalty for failed CAS +static int Knob_OXPenalty = -1 ; // Penalty for observed _owner change +static int Knob_SpinSetSucc = 1 ; // spinners set the _succ field +static int Knob_SpinEarly = 1 ; +static int Knob_SuccEnabled = 1 ; // futile wake throttling +static int Knob_SuccRestrict = 0 ; // Limit successors + spinners to at-most-one +static int Knob_MaxSpinners = -1 ; // Should be a function of # CPUs +static int Knob_Bonus = 100 ; // spin success bonus +static int Knob_BonusB = 100 ; // spin success bonus +static int Knob_Penalty = 200 ; // spin failure penalty +static int Knob_Poverty = 1000 ; +static int Knob_SpinAfterFutile = 1 ; // Spin after returning from park() +static int Knob_FixedSpin = 0 ; +static int Knob_OState = 3 ; // Spinner checks thread state of _owner +static int Knob_UsePause = 1 ; +static int Knob_ExitPolicy = 0 ; +static int Knob_PreSpin = 10 ; // 20-100 likely better +static int Knob_ResetEvent = 0 ; +static int BackOffMask = 0 ; + +static int Knob_FastHSSEC = 0 ; +static int Knob_MoveNotifyee = 2 ; // notify() - disposition of notifyee +static int Knob_QMode = 0 ; // EntryList-cxq policy - queue discipline +static volatile int InitDone = 0 ; + +#define TrySpin TrySpin_VaryDuration + +// ----------------------------------------------------------------------------- +// Theory of operations -- Monitors lists, thread residency, etc: +// +// * A thread acquires ownership of a monitor by successfully +// CAS()ing the _owner field from null to non-null. +// +// * Invariant: A thread appears on at most one monitor list -- +// cxq, EntryList or WaitSet -- at any one time. +// +// * Contending threads "push" themselves onto the cxq with CAS +// and then spin/park. +// +// * After a contending thread eventually acquires the lock it must +// dequeue itself from either the EntryList or the cxq. +// +// * The exiting thread identifies and unparks an "heir presumptive" +// tentative successor thread on the EntryList. Critically, the +// exiting thread doesn't unlink the successor thread from the EntryList. +// After having been unparked, the wakee will recontend for ownership of +// the monitor. The successor (wakee) will either acquire the lock or +// re-park itself. +// +// Succession is provided for by a policy of competitive handoff. +// The exiting thread does _not_ grant or pass ownership to the +// successor thread. (This is also referred to as "handoff" succession"). +// Instead the exiting thread releases ownership and possibly wakes +// a successor, so the successor can (re)compete for ownership of the lock. +// If the EntryList is empty but the cxq is populated the exiting +// thread will drain the cxq into the EntryList. It does so by +// by detaching the cxq (installing null with CAS) and folding +// the threads from the cxq into the EntryList. The EntryList is +// doubly linked, while the cxq is singly linked because of the +// CAS-based "push" used to enqueue recently arrived threads (RATs). +// +// * Concurrency invariants: +// +// -- only the monitor owner may access or mutate the EntryList. +// The mutex property of the monitor itself protects the EntryList +// from concurrent interference. +// -- Only the monitor owner may detach the cxq. +// +// * The monitor entry list operations avoid locks, but strictly speaking +// they're not lock-free. Enter is lock-free, exit is not. +// See http://j2se.east/~dice/PERSIST/040825-LockFreeQueues.html +// +// * The cxq can have multiple concurrent "pushers" but only one concurrent +// detaching thread. This mechanism is immune from the ABA corruption. +// More precisely, the CAS-based "push" onto cxq is ABA-oblivious. +// +// * Taken together, the cxq and the EntryList constitute or form a +// single logical queue of threads stalled trying to acquire the lock. +// We use two distinct lists to improve the odds of a constant-time +// dequeue operation after acquisition (in the ::enter() epilog) and +// to reduce heat on the list ends. (c.f. Michael Scott's "2Q" algorithm). +// A key desideratum is to minimize queue & monitor metadata manipulation +// that occurs while holding the monitor lock -- that is, we want to +// minimize monitor lock holds times. Note that even a small amount of +// fixed spinning will greatly reduce the # of enqueue-dequeue operations +// on EntryList|cxq. That is, spinning relieves contention on the "inner" +// locks and monitor metadata. +// +// Cxq points to the the set of Recently Arrived Threads attempting entry. +// Because we push threads onto _cxq with CAS, the RATs must take the form of +// a singly-linked LIFO. We drain _cxq into EntryList at unlock-time when +// the unlocking thread notices that EntryList is null but _cxq is != null. +// +// The EntryList is ordered by the prevailing queue discipline and +// can be organized in any convenient fashion, such as a doubly-linked list or +// a circular doubly-linked list. Critically, we want insert and delete operations +// to operate in constant-time. If we need a priority queue then something akin +// to Solaris' sleepq would work nicely. Viz., +// http://agg.eng/ws/on10_nightly/source/usr/src/uts/common/os/sleepq.c. +// Queue discipline is enforced at ::exit() time, when the unlocking thread +// drains the cxq into the EntryList, and orders or reorders the threads on the +// EntryList accordingly. +// +// Barring "lock barging", this mechanism provides fair cyclic ordering, +// somewhat similar to an elevator-scan. +// +// * The monitor synchronization subsystem avoids the use of native +// synchronization primitives except for the narrow platform-specific +// park-unpark abstraction. See the comments in os_solaris.cpp regarding +// the semantics of park-unpark. Put another way, this monitor implementation +// depends only on atomic operations and park-unpark. The monitor subsystem +// manages all RUNNING->BLOCKED and BLOCKED->READY transitions while the +// underlying OS manages the READY<->RUN transitions. +// +// * Waiting threads reside on the WaitSet list -- wait() puts +// the caller onto the WaitSet. +// +// * notify() or notifyAll() simply transfers threads from the WaitSet to +// either the EntryList or cxq. Subsequent exit() operations will +// unpark the notifyee. Unparking a notifee in notify() is inefficient - +// it's likely the notifyee would simply impale itself on the lock held +// by the notifier. +// +// * An interesting alternative is to encode cxq as (List,LockByte) where +// the LockByte is 0 iff the monitor is owned. _owner is simply an auxiliary +// variable, like _recursions, in the scheme. The threads or Events that form +// the list would have to be aligned in 256-byte addresses. A thread would +// try to acquire the lock or enqueue itself with CAS, but exiting threads +// could use a 1-0 protocol and simply STB to set the LockByte to 0. +// Note that is is *not* word-tearing, but it does presume that full-word +// CAS operations are coherent with intermix with STB operations. That's true +// on most common processors. +// +// * See also http://blogs.sun.com/dave + + +// ----------------------------------------------------------------------------- +// Enter support + +bool ObjectMonitor::try_enter(Thread* THREAD) { + if (THREAD != _owner) { + if (THREAD->is_lock_owned ((address)_owner)) { + assert(_recursions == 0, "internal state error"); + _owner = THREAD ; + _recursions = 1 ; + OwnerIsThread = 1 ; + return true; + } + if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) { + return false; + } + return true; + } else { + _recursions++; + return true; + } +} + +void ATTR ObjectMonitor::enter(TRAPS) { + // The following code is ordered to check the most common cases first + // and to reduce RTS->RTO cache line upgrades on SPARC and IA32 processors. + Thread * const Self = THREAD ; + void * cur ; + + cur = Atomic::cmpxchg_ptr (Self, &_owner, NULL) ; + if (cur == NULL) { + // Either ASSERT _recursions == 0 or explicitly set _recursions = 0. + assert (_recursions == 0 , "invariant") ; + assert (_owner == Self, "invariant") ; + // CONSIDER: set or assert OwnerIsThread == 1 + return ; + } + + if (cur == Self) { + // TODO-FIXME: check for integer overflow! BUGID 6557169. + _recursions ++ ; + return ; + } + + if (Self->is_lock_owned ((address)cur)) { + assert (_recursions == 0, "internal state error"); + _recursions = 1 ; + // Commute owner from a thread-specific on-stack BasicLockObject address to + // a full-fledged "Thread *". + _owner = Self ; + OwnerIsThread = 1 ; + return ; + } + + // We've encountered genuine contention. + assert (Self->_Stalled == 0, "invariant") ; + Self->_Stalled = intptr_t(this) ; + + // Try one round of spinning *before* enqueueing Self + // and before going through the awkward and expensive state + // transitions. The following spin is strictly optional ... + // Note that if we acquire the monitor from an initial spin + // we forgo posting JVMTI events and firing DTRACE probes. + if (Knob_SpinEarly && TrySpin (Self) > 0) { + assert (_owner == Self , "invariant") ; + assert (_recursions == 0 , "invariant") ; + assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; + Self->_Stalled = 0 ; + return ; + } + + assert (_owner != Self , "invariant") ; + assert (_succ != Self , "invariant") ; + assert (Self->is_Java_thread() , "invariant") ; + JavaThread * jt = (JavaThread *) Self ; + assert (!SafepointSynchronize::is_at_safepoint(), "invariant") ; + assert (jt->thread_state() != _thread_blocked , "invariant") ; + assert (this->object() != NULL , "invariant") ; + assert (_count >= 0, "invariant") ; + + // Prevent deflation at STW-time. See deflate_idle_monitors() and is_busy(). + // Ensure the object-monitor relationship remains stable while there's contention. + Atomic::inc_ptr(&_count); + + { // Change java thread status to indicate blocked on monitor enter. + JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this); + + DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt); + if (JvmtiExport::should_post_monitor_contended_enter()) { + JvmtiExport::post_monitor_contended_enter(jt, this); + } + + OSThreadContendState osts(Self->osthread()); + ThreadBlockInVM tbivm(jt); + + Self->set_current_pending_monitor(this); + + // TODO-FIXME: change the following for(;;) loop to straight-line code. + for (;;) { + jt->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() + // or java_suspend_self() + + EnterI (THREAD) ; + + if (!ExitSuspendEquivalent(jt)) break ; + + // + // We have acquired the contended monitor, but while we were + // waiting another thread suspended us. We don't want to enter + // the monitor while suspended because that would surprise the + // thread that suspended us. + // + _recursions = 0 ; + _succ = NULL ; + exit (Self) ; + + jt->java_suspend_self(); + } + Self->set_current_pending_monitor(NULL); + } + + Atomic::dec_ptr(&_count); + assert (_count >= 0, "invariant") ; + Self->_Stalled = 0 ; + + // Must either set _recursions = 0 or ASSERT _recursions == 0. + assert (_recursions == 0 , "invariant") ; + assert (_owner == Self , "invariant") ; + assert (_succ != Self , "invariant") ; + assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; + + // The thread -- now the owner -- is back in vm mode. + // Report the glorious news via TI,DTrace and jvmstat. + // The probe effect is non-trivial. All the reportage occurs + // while we hold the monitor, increasing the length of the critical + // section. Amdahl's parallel speedup law comes vividly into play. + // + // Another option might be to aggregate the events (thread local or + // per-monitor aggregation) and defer reporting until a more opportune + // time -- such as next time some thread encounters contention but has + // yet to acquire the lock. While spinning that thread could + // spinning we could increment JVMStat counters, etc. + + DTRACE_MONITOR_PROBE(contended__entered, this, object(), jt); + if (JvmtiExport::should_post_monitor_contended_entered()) { + JvmtiExport::post_monitor_contended_entered(jt, this); + } + if (ObjectMonitor::_sync_ContendedLockAttempts != NULL) { + ObjectMonitor::_sync_ContendedLockAttempts->inc() ; + } +} + + +// Caveat: TryLock() is not necessarily serializing if it returns failure. +// Callers must compensate as needed. + +int ObjectMonitor::TryLock (Thread * Self) { + for (;;) { + void * own = _owner ; + if (own != NULL) return 0 ; + if (Atomic::cmpxchg_ptr (Self, &_owner, NULL) == NULL) { + // Either guarantee _recursions == 0 or set _recursions = 0. + assert (_recursions == 0, "invariant") ; + assert (_owner == Self, "invariant") ; + // CONSIDER: set or assert that OwnerIsThread == 1 + return 1 ; + } + // The lock had been free momentarily, but we lost the race to the lock. + // Interference -- the CAS failed. + // We can either return -1 or retry. + // Retry doesn't make as much sense because the lock was just acquired. + if (true) return -1 ; + } +} + +void ATTR ObjectMonitor::EnterI (TRAPS) { + Thread * Self = THREAD ; + assert (Self->is_Java_thread(), "invariant") ; + assert (((JavaThread *) Self)->thread_state() == _thread_blocked , "invariant") ; + + // Try the lock - TATAS + if (TryLock (Self) > 0) { + assert (_succ != Self , "invariant") ; + assert (_owner == Self , "invariant") ; + assert (_Responsible != Self , "invariant") ; + return ; + } + + DeferredInitialize () ; + + // We try one round of spinning *before* enqueueing Self. + // + // If the _owner is ready but OFFPROC we could use a YieldTo() + // operation to donate the remainder of this thread's quantum + // to the owner. This has subtle but beneficial affinity + // effects. + + if (TrySpin (Self) > 0) { + assert (_owner == Self , "invariant") ; + assert (_succ != Self , "invariant") ; + assert (_Responsible != Self , "invariant") ; + return ; + } + + // The Spin failed -- Enqueue and park the thread ... + assert (_succ != Self , "invariant") ; + assert (_owner != Self , "invariant") ; + assert (_Responsible != Self , "invariant") ; + + // Enqueue "Self" on ObjectMonitor's _cxq. + // + // Node acts as a proxy for Self. + // As an aside, if were to ever rewrite the synchronization code mostly + // in Java, WaitNodes, ObjectMonitors, and Events would become 1st-class + // Java objects. This would avoid awkward lifecycle and liveness issues, + // as well as eliminate a subset of ABA issues. + // TODO: eliminate ObjectWaiter and enqueue either Threads or Events. + // + + ObjectWaiter node(Self) ; + Self->_ParkEvent->reset() ; + node._prev = (ObjectWaiter *) 0xBAD ; + node.TState = ObjectWaiter::TS_CXQ ; + + // Push "Self" onto the front of the _cxq. + // Once on cxq/EntryList, Self stays on-queue until it acquires the lock. + // Note that spinning tends to reduce the rate at which threads + // enqueue and dequeue on EntryList|cxq. + ObjectWaiter * nxt ; + for (;;) { + node._next = nxt = _cxq ; + if (Atomic::cmpxchg_ptr (&node, &_cxq, nxt) == nxt) break ; + + // Interference - the CAS failed because _cxq changed. Just retry. + // As an optional optimization we retry the lock. + if (TryLock (Self) > 0) { + assert (_succ != Self , "invariant") ; + assert (_owner == Self , "invariant") ; + assert (_Responsible != Self , "invariant") ; + return ; + } + } + + // Check for cxq|EntryList edge transition to non-null. This indicates + // the onset of contention. While contention persists exiting threads + // will use a ST:MEMBAR:LD 1-1 exit protocol. When contention abates exit + // operations revert to the faster 1-0 mode. This enter operation may interleave + // (race) a concurrent 1-0 exit operation, resulting in stranding, so we + // arrange for one of the contending thread to use a timed park() operations + // to detect and recover from the race. (Stranding is form of progress failure + // where the monitor is unlocked but all the contending threads remain parked). + // That is, at least one of the contended threads will periodically poll _owner. + // One of the contending threads will become the designated "Responsible" thread. + // The Responsible thread uses a timed park instead of a normal indefinite park + // operation -- it periodically wakes and checks for and recovers from potential + // strandings admitted by 1-0 exit operations. We need at most one Responsible + // thread per-monitor at any given moment. Only threads on cxq|EntryList may + // be responsible for a monitor. + // + // Currently, one of the contended threads takes on the added role of "Responsible". + // A viable alternative would be to use a dedicated "stranding checker" thread + // that periodically iterated over all the threads (or active monitors) and unparked + // successors where there was risk of stranding. This would help eliminate the + // timer scalability issues we see on some platforms as we'd only have one thread + // -- the checker -- parked on a timer. + + if ((SyncFlags & 16) == 0 && nxt == NULL && _EntryList == NULL) { + // Try to assume the role of responsible thread for the monitor. + // CONSIDER: ST vs CAS vs { if (Responsible==null) Responsible=Self } + Atomic::cmpxchg_ptr (Self, &_Responsible, NULL) ; + } + + // The lock have been released while this thread was occupied queueing + // itself onto _cxq. To close the race and avoid "stranding" and + // progress-liveness failure we must resample-retry _owner before parking. + // Note the Dekker/Lamport duality: ST cxq; MEMBAR; LD Owner. + // In this case the ST-MEMBAR is accomplished with CAS(). + // + // TODO: Defer all thread state transitions until park-time. + // Since state transitions are heavy and inefficient we'd like + // to defer the state transitions until absolutely necessary, + // and in doing so avoid some transitions ... + + TEVENT (Inflated enter - Contention) ; + int nWakeups = 0 ; + int RecheckInterval = 1 ; + + for (;;) { + + if (TryLock (Self) > 0) break ; + assert (_owner != Self, "invariant") ; + + if ((SyncFlags & 2) && _Responsible == NULL) { + Atomic::cmpxchg_ptr (Self, &_Responsible, NULL) ; + } + + // park self + if (_Responsible == Self || (SyncFlags & 1)) { + TEVENT (Inflated enter - park TIMED) ; + Self->_ParkEvent->park ((jlong) RecheckInterval) ; + // Increase the RecheckInterval, but clamp the value. + RecheckInterval *= 8 ; + if (RecheckInterval > 1000) RecheckInterval = 1000 ; + } else { + TEVENT (Inflated enter - park UNTIMED) ; + Self->_ParkEvent->park() ; + } + + if (TryLock(Self) > 0) break ; + + // The lock is still contested. + // Keep a tally of the # of futile wakeups. + // Note that the counter is not protected by a lock or updated by atomics. + // That is by design - we trade "lossy" counters which are exposed to + // races during updates for a lower probe effect. + TEVENT (Inflated enter - Futile wakeup) ; + if (ObjectMonitor::_sync_FutileWakeups != NULL) { + ObjectMonitor::_sync_FutileWakeups->inc() ; + } + ++ nWakeups ; + + // Assuming this is not a spurious wakeup we'll normally find _succ == Self. + // We can defer clearing _succ until after the spin completes + // TrySpin() must tolerate being called with _succ == Self. + // Try yet another round of adaptive spinning. + if ((Knob_SpinAfterFutile & 1) && TrySpin (Self) > 0) break ; + + // We can find that we were unpark()ed and redesignated _succ while + // we were spinning. That's harmless. If we iterate and call park(), + // park() will consume the event and return immediately and we'll + // just spin again. This pattern can repeat, leaving _succ to simply + // spin on a CPU. Enable Knob_ResetEvent to clear pending unparks(). + // Alternately, we can sample fired() here, and if set, forgo spinning + // in the next iteration. + + if ((Knob_ResetEvent & 1) && Self->_ParkEvent->fired()) { + Self->_ParkEvent->reset() ; + OrderAccess::fence() ; + } + if (_succ == Self) _succ = NULL ; + + // Invariant: after clearing _succ a thread *must* retry _owner before parking. + OrderAccess::fence() ; + } + + // Egress : + // Self has acquired the lock -- Unlink Self from the cxq or EntryList. + // Normally we'll find Self on the EntryList . + // From the perspective of the lock owner (this thread), the + // EntryList is stable and cxq is prepend-only. + // The head of cxq is volatile but the interior is stable. + // In addition, Self.TState is stable. + + assert (_owner == Self , "invariant") ; + assert (object() != NULL , "invariant") ; + // I'd like to write: + // guarantee (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; + // but as we're at a safepoint that's not safe. + + UnlinkAfterAcquire (Self, &node) ; + if (_succ == Self) _succ = NULL ; + + assert (_succ != Self, "invariant") ; + if (_Responsible == Self) { + _Responsible = NULL ; + // Dekker pivot-point. + // Consider OrderAccess::storeload() here + + // We may leave threads on cxq|EntryList without a designated + // "Responsible" thread. This is benign. When this thread subsequently + // exits the monitor it can "see" such preexisting "old" threads -- + // threads that arrived on the cxq|EntryList before the fence, above -- + // by LDing cxq|EntryList. Newly arrived threads -- that is, threads + // that arrive on cxq after the ST:MEMBAR, above -- will set Responsible + // non-null and elect a new "Responsible" timer thread. + // + // This thread executes: + // ST Responsible=null; MEMBAR (in enter epilog - here) + // LD cxq|EntryList (in subsequent exit) + // + // Entering threads in the slow/contended path execute: + // ST cxq=nonnull; MEMBAR; LD Responsible (in enter prolog) + // The (ST cxq; MEMBAR) is accomplished with CAS(). + // + // The MEMBAR, above, prevents the LD of cxq|EntryList in the subsequent + // exit operation from floating above the ST Responsible=null. + // + // In *practice* however, EnterI() is always followed by some atomic + // operation such as the decrement of _count in ::enter(). Those atomics + // obviate the need for the explicit MEMBAR, above. + } + + // We've acquired ownership with CAS(). + // CAS is serializing -- it has MEMBAR/FENCE-equivalent semantics. + // But since the CAS() this thread may have also stored into _succ, + // EntryList, cxq or Responsible. These meta-data updates must be + // visible __before this thread subsequently drops the lock. + // Consider what could occur if we didn't enforce this constraint -- + // STs to monitor meta-data and user-data could reorder with (become + // visible after) the ST in exit that drops ownership of the lock. + // Some other thread could then acquire the lock, but observe inconsistent + // or old monitor meta-data and heap data. That violates the JMM. + // To that end, the 1-0 exit() operation must have at least STST|LDST + // "release" barrier semantics. Specifically, there must be at least a + // STST|LDST barrier in exit() before the ST of null into _owner that drops + // the lock. The barrier ensures that changes to monitor meta-data and data + // protected by the lock will be visible before we release the lock, and + // therefore before some other thread (CPU) has a chance to acquire the lock. + // See also: http://gee.cs.oswego.edu/dl/jmm/cookbook.html. + // + // Critically, any prior STs to _succ or EntryList must be visible before + // the ST of null into _owner in the *subsequent* (following) corresponding + // monitorexit. Recall too, that in 1-0 mode monitorexit does not necessarily + // execute a serializing instruction. + + if (SyncFlags & 8) { + OrderAccess::fence() ; + } + return ; +} + +// ReenterI() is a specialized inline form of the latter half of the +// contended slow-path from EnterI(). We use ReenterI() only for +// monitor reentry in wait(). +// +// In the future we should reconcile EnterI() and ReenterI(), adding +// Knob_Reset and Knob_SpinAfterFutile support and restructuring the +// loop accordingly. + +void ATTR ObjectMonitor::ReenterI (Thread * Self, ObjectWaiter * SelfNode) { + assert (Self != NULL , "invariant") ; + assert (SelfNode != NULL , "invariant") ; + assert (SelfNode->_thread == Self , "invariant") ; + assert (_waiters > 0 , "invariant") ; + assert (((oop)(object()))->mark() == markOopDesc::encode(this) , "invariant") ; + assert (((JavaThread *)Self)->thread_state() != _thread_blocked, "invariant") ; + JavaThread * jt = (JavaThread *) Self ; + + int nWakeups = 0 ; + for (;;) { + ObjectWaiter::TStates v = SelfNode->TState ; + guarantee (v == ObjectWaiter::TS_ENTER || v == ObjectWaiter::TS_CXQ, "invariant") ; + assert (_owner != Self, "invariant") ; + + if (TryLock (Self) > 0) break ; + if (TrySpin (Self) > 0) break ; + + TEVENT (Wait Reentry - parking) ; + + // State transition wrappers around park() ... + // ReenterI() wisely defers state transitions until + // it's clear we must park the thread. + { + OSThreadContendState osts(Self->osthread()); + ThreadBlockInVM tbivm(jt); + + // cleared by handle_special_suspend_equivalent_condition() + // or java_suspend_self() + jt->set_suspend_equivalent(); + if (SyncFlags & 1) { + Self->_ParkEvent->park ((jlong)1000) ; + } else { + Self->_ParkEvent->park () ; + } + + // were we externally suspended while we were waiting? + for (;;) { + if (!ExitSuspendEquivalent (jt)) break ; + if (_succ == Self) { _succ = NULL; OrderAccess::fence(); } + jt->java_suspend_self(); + jt->set_suspend_equivalent(); + } + } + + // Try again, but just so we distinguish between futile wakeups and + // successful wakeups. The following test isn't algorithmically + // necessary, but it helps us maintain sensible statistics. + if (TryLock(Self) > 0) break ; + + // The lock is still contested. + // Keep a tally of the # of futile wakeups. + // Note that the counter is not protected by a lock or updated by atomics. + // That is by design - we trade "lossy" counters which are exposed to + // races during updates for a lower probe effect. + TEVENT (Wait Reentry - futile wakeup) ; + ++ nWakeups ; + + // Assuming this is not a spurious wakeup we'll normally + // find that _succ == Self. + if (_succ == Self) _succ = NULL ; + + // Invariant: after clearing _succ a contending thread + // *must* retry _owner before parking. + OrderAccess::fence() ; + + if (ObjectMonitor::_sync_FutileWakeups != NULL) { + ObjectMonitor::_sync_FutileWakeups->inc() ; + } + } + + // Self has acquired the lock -- Unlink Self from the cxq or EntryList . + // Normally we'll find Self on the EntryList. + // Unlinking from the EntryList is constant-time and atomic-free. + // From the perspective of the lock owner (this thread), the + // EntryList is stable and cxq is prepend-only. + // The head of cxq is volatile but the interior is stable. + // In addition, Self.TState is stable. + + assert (_owner == Self, "invariant") ; + assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; + UnlinkAfterAcquire (Self, SelfNode) ; + if (_succ == Self) _succ = NULL ; + assert (_succ != Self, "invariant") ; + SelfNode->TState = ObjectWaiter::TS_RUN ; + OrderAccess::fence() ; // see comments at the end of EnterI() +} + +// after the thread acquires the lock in ::enter(). Equally, we could defer +// unlinking the thread until ::exit()-time. + +void ObjectMonitor::UnlinkAfterAcquire (Thread * Self, ObjectWaiter * SelfNode) +{ + assert (_owner == Self, "invariant") ; + assert (SelfNode->_thread == Self, "invariant") ; + + if (SelfNode->TState == ObjectWaiter::TS_ENTER) { + // Normal case: remove Self from the DLL EntryList . + // This is a constant-time operation. + ObjectWaiter * nxt = SelfNode->_next ; + ObjectWaiter * prv = SelfNode->_prev ; + if (nxt != NULL) nxt->_prev = prv ; + if (prv != NULL) prv->_next = nxt ; + if (SelfNode == _EntryList ) _EntryList = nxt ; + assert (nxt == NULL || nxt->TState == ObjectWaiter::TS_ENTER, "invariant") ; + assert (prv == NULL || prv->TState == ObjectWaiter::TS_ENTER, "invariant") ; + TEVENT (Unlink from EntryList) ; + } else { + guarantee (SelfNode->TState == ObjectWaiter::TS_CXQ, "invariant") ; + // Inopportune interleaving -- Self is still on the cxq. + // This usually means the enqueue of self raced an exiting thread. + // Normally we'll find Self near the front of the cxq, so + // dequeueing is typically fast. If needbe we can accelerate + // this with some MCS/CHL-like bidirectional list hints and advisory + // back-links so dequeueing from the interior will normally operate + // in constant-time. + // Dequeue Self from either the head (with CAS) or from the interior + // with a linear-time scan and normal non-atomic memory operations. + // CONSIDER: if Self is on the cxq then simply drain cxq into EntryList + // and then unlink Self from EntryList. We have to drain eventually, + // so it might as well be now. + + ObjectWaiter * v = _cxq ; + assert (v != NULL, "invariant") ; + if (v != SelfNode || Atomic::cmpxchg_ptr (SelfNode->_next, &_cxq, v) != v) { + // The CAS above can fail from interference IFF a "RAT" arrived. + // In that case Self must be in the interior and can no longer be + // at the head of cxq. + if (v == SelfNode) { + assert (_cxq != v, "invariant") ; + v = _cxq ; // CAS above failed - start scan at head of list + } + ObjectWaiter * p ; + ObjectWaiter * q = NULL ; + for (p = v ; p != NULL && p != SelfNode; p = p->_next) { + q = p ; + assert (p->TState == ObjectWaiter::TS_CXQ, "invariant") ; + } + assert (v != SelfNode, "invariant") ; + assert (p == SelfNode, "Node not found on cxq") ; + assert (p != _cxq, "invariant") ; + assert (q != NULL, "invariant") ; + assert (q->_next == p, "invariant") ; + q->_next = p->_next ; + } + TEVENT (Unlink from cxq) ; + } + + // Diagnostic hygiene ... + SelfNode->_prev = (ObjectWaiter *) 0xBAD ; + SelfNode->_next = (ObjectWaiter *) 0xBAD ; + SelfNode->TState = ObjectWaiter::TS_RUN ; +} + +// ----------------------------------------------------------------------------- +// Exit support +// +// exit() +// ~~~~~~ +// Note that the collector can't reclaim the objectMonitor or deflate +// the object out from underneath the thread calling ::exit() as the +// thread calling ::exit() never transitions to a stable state. +// This inhibits GC, which in turn inhibits asynchronous (and +// inopportune) reclamation of "this". +// +// We'd like to assert that: (THREAD->thread_state() != _thread_blocked) ; +// There's one exception to the claim above, however. EnterI() can call +// exit() to drop a lock if the acquirer has been externally suspended. +// In that case exit() is called with _thread_state as _thread_blocked, +// but the monitor's _count field is > 0, which inhibits reclamation. +// +// 1-0 exit +// ~~~~~~~~ +// ::exit() uses a canonical 1-1 idiom with a MEMBAR although some of +// the fast-path operators have been optimized so the common ::exit() +// operation is 1-0. See i486.ad fast_unlock(), for instance. +// The code emitted by fast_unlock() elides the usual MEMBAR. This +// greatly improves latency -- MEMBAR and CAS having considerable local +// latency on modern processors -- but at the cost of "stranding". Absent the +// MEMBAR, a thread in fast_unlock() can race a thread in the slow +// ::enter() path, resulting in the entering thread being stranding +// and a progress-liveness failure. Stranding is extremely rare. +// We use timers (timed park operations) & periodic polling to detect +// and recover from stranding. Potentially stranded threads periodically +// wake up and poll the lock. See the usage of the _Responsible variable. +// +// The CAS() in enter provides for safety and exclusion, while the CAS or +// MEMBAR in exit provides for progress and avoids stranding. 1-0 locking +// eliminates the CAS/MEMBAR from the exist path, but it admits stranding. +// We detect and recover from stranding with timers. +// +// If a thread transiently strands it'll park until (a) another +// thread acquires the lock and then drops the lock, at which time the +// exiting thread will notice and unpark the stranded thread, or, (b) +// the timer expires. If the lock is high traffic then the stranding latency +// will be low due to (a). If the lock is low traffic then the odds of +// stranding are lower, although the worst-case stranding latency +// is longer. Critically, we don't want to put excessive load in the +// platform's timer subsystem. We want to minimize both the timer injection +// rate (timers created/sec) as well as the number of timers active at +// any one time. (more precisely, we want to minimize timer-seconds, which is +// the integral of the # of active timers at any instant over time). +// Both impinge on OS scalability. Given that, at most one thread parked on +// a monitor will use a timer. + +void ATTR ObjectMonitor::exit(TRAPS) { + Thread * Self = THREAD ; + if (THREAD != _owner) { + if (THREAD->is_lock_owned((address) _owner)) { + // Transmute _owner from a BasicLock pointer to a Thread address. + // We don't need to hold _mutex for this transition. + // Non-null to Non-null is safe as long as all readers can + // tolerate either flavor. + assert (_recursions == 0, "invariant") ; + _owner = THREAD ; + _recursions = 0 ; + OwnerIsThread = 1 ; + } else { + // NOTE: we need to handle unbalanced monitor enter/exit + // in native code by throwing an exception. + // TODO: Throw an IllegalMonitorStateException ? + TEVENT (Exit - Throw IMSX) ; + assert(false, "Non-balanced monitor enter/exit!"); + if (false) { + THROW(vmSymbols::java_lang_IllegalMonitorStateException()); + } + return; + } + } + + if (_recursions != 0) { + _recursions--; // this is simple recursive enter + TEVENT (Inflated exit - recursive) ; + return ; + } + + // Invariant: after setting Responsible=null an thread must execute + // a MEMBAR or other serializing instruction before fetching EntryList|cxq. + if ((SyncFlags & 4) == 0) { + _Responsible = NULL ; + } + + for (;;) { + assert (THREAD == _owner, "invariant") ; + + + if (Knob_ExitPolicy == 0) { + // release semantics: prior loads and stores from within the critical section + // must not float (reorder) past the following store that drops the lock. + // On SPARC that requires MEMBAR #loadstore|#storestore. + // But of course in TSO #loadstore|#storestore is not required. + // I'd like to write one of the following: + // A. OrderAccess::release() ; _owner = NULL + // B. OrderAccess::loadstore(); OrderAccess::storestore(); _owner = NULL; + // Unfortunately OrderAccess::release() and OrderAccess::loadstore() both + // store into a _dummy variable. That store is not needed, but can result + // in massive wasteful coherency traffic on classic SMP systems. + // Instead, I use release_store(), which is implemented as just a simple + // ST on x64, x86 and SPARC. + OrderAccess::release_store_ptr (&_owner, NULL) ; // drop the lock + OrderAccess::storeload() ; // See if we need to wake a successor + if ((intptr_t(_EntryList)|intptr_t(_cxq)) == 0 || _succ != NULL) { + TEVENT (Inflated exit - simple egress) ; + return ; + } + TEVENT (Inflated exit - complex egress) ; + + // Normally the exiting thread is responsible for ensuring succession, + // but if other successors are ready or other entering threads are spinning + // then this thread can simply store NULL into _owner and exit without + // waking a successor. The existence of spinners or ready successors + // guarantees proper succession (liveness). Responsibility passes to the + // ready or running successors. The exiting thread delegates the duty. + // More precisely, if a successor already exists this thread is absolved + // of the responsibility of waking (unparking) one. + // + // The _succ variable is critical to reducing futile wakeup frequency. + // _succ identifies the "heir presumptive" thread that has been made + // ready (unparked) but that has not yet run. We need only one such + // successor thread to guarantee progress. + // See http://www.usenix.org/events/jvm01/full_papers/dice/dice.pdf + // section 3.3 "Futile Wakeup Throttling" for details. + // + // Note that spinners in Enter() also set _succ non-null. + // In the current implementation spinners opportunistically set + // _succ so that exiting threads might avoid waking a successor. + // Another less appealing alternative would be for the exiting thread + // to drop the lock and then spin briefly to see if a spinner managed + // to acquire the lock. If so, the exiting thread could exit + // immediately without waking a successor, otherwise the exiting + // thread would need to dequeue and wake a successor. + // (Note that we'd need to make the post-drop spin short, but no + // shorter than the worst-case round-trip cache-line migration time. + // The dropped lock needs to become visible to the spinner, and then + // the acquisition of the lock by the spinner must become visible to + // the exiting thread). + // + + // It appears that an heir-presumptive (successor) must be made ready. + // Only the current lock owner can manipulate the EntryList or + // drain _cxq, so we need to reacquire the lock. If we fail + // to reacquire the lock the responsibility for ensuring succession + // falls to the new owner. + // + if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) { + return ; + } + TEVENT (Exit - Reacquired) ; + } else { + if ((intptr_t(_EntryList)|intptr_t(_cxq)) == 0 || _succ != NULL) { + OrderAccess::release_store_ptr (&_owner, NULL) ; // drop the lock + OrderAccess::storeload() ; + // Ratify the previously observed values. + if (_cxq == NULL || _succ != NULL) { + TEVENT (Inflated exit - simple egress) ; + return ; + } + + // inopportune interleaving -- the exiting thread (this thread) + // in the fast-exit path raced an entering thread in the slow-enter + // path. + // We have two choices: + // A. Try to reacquire the lock. + // If the CAS() fails return immediately, otherwise + // we either restart/rerun the exit operation, or simply + // fall-through into the code below which wakes a successor. + // B. If the elements forming the EntryList|cxq are TSM + // we could simply unpark() the lead thread and return + // without having set _succ. + if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) { + TEVENT (Inflated exit - reacquired succeeded) ; + return ; + } + TEVENT (Inflated exit - reacquired failed) ; + } else { + TEVENT (Inflated exit - complex egress) ; + } + } + + guarantee (_owner == THREAD, "invariant") ; + + ObjectWaiter * w = NULL ; + int QMode = Knob_QMode ; + + if (QMode == 2 && _cxq != NULL) { + // QMode == 2 : cxq has precedence over EntryList. + // Try to directly wake a successor from the cxq. + // If successful, the successor will need to unlink itself from cxq. + w = _cxq ; + assert (w != NULL, "invariant") ; + assert (w->TState == ObjectWaiter::TS_CXQ, "Invariant") ; + ExitEpilog (Self, w) ; + return ; + } + + if (QMode == 3 && _cxq != NULL) { + // Aggressively drain cxq into EntryList at the first opportunity. + // This policy ensure that recently-run threads live at the head of EntryList. + // Drain _cxq into EntryList - bulk transfer. + // First, detach _cxq. + // The following loop is tantamount to: w = swap (&cxq, NULL) + w = _cxq ; + for (;;) { + assert (w != NULL, "Invariant") ; + ObjectWaiter * u = (ObjectWaiter *) Atomic::cmpxchg_ptr (NULL, &_cxq, w) ; + if (u == w) break ; + w = u ; + } + assert (w != NULL , "invariant") ; + + ObjectWaiter * q = NULL ; + ObjectWaiter * p ; + for (p = w ; p != NULL ; p = p->_next) { + guarantee (p->TState == ObjectWaiter::TS_CXQ, "Invariant") ; + p->TState = ObjectWaiter::TS_ENTER ; + p->_prev = q ; + q = p ; + } + + // Append the RATs to the EntryList + // TODO: organize EntryList as a CDLL so we can locate the tail in constant-time. + ObjectWaiter * Tail ; + for (Tail = _EntryList ; Tail != NULL && Tail->_next != NULL ; Tail = Tail->_next) ; + if (Tail == NULL) { + _EntryList = w ; + } else { + Tail->_next = w ; + w->_prev = Tail ; + } + + // Fall thru into code that tries to wake a successor from EntryList + } + + if (QMode == 4 && _cxq != NULL) { + // Aggressively drain cxq into EntryList at the first opportunity. + // This policy ensure that recently-run threads live at the head of EntryList. + + // Drain _cxq into EntryList - bulk transfer. + // First, detach _cxq. + // The following loop is tantamount to: w = swap (&cxq, NULL) + w = _cxq ; + for (;;) { + assert (w != NULL, "Invariant") ; + ObjectWaiter * u = (ObjectWaiter *) Atomic::cmpxchg_ptr (NULL, &_cxq, w) ; + if (u == w) break ; + w = u ; + } + assert (w != NULL , "invariant") ; + + ObjectWaiter * q = NULL ; + ObjectWaiter * p ; + for (p = w ; p != NULL ; p = p->_next) { + guarantee (p->TState == ObjectWaiter::TS_CXQ, "Invariant") ; + p->TState = ObjectWaiter::TS_ENTER ; + p->_prev = q ; + q = p ; + } + + // Prepend the RATs to the EntryList + if (_EntryList != NULL) { + q->_next = _EntryList ; + _EntryList->_prev = q ; + } + _EntryList = w ; + + // Fall thru into code that tries to wake a successor from EntryList + } + + w = _EntryList ; + if (w != NULL) { + // I'd like to write: guarantee (w->_thread != Self). + // But in practice an exiting thread may find itself on the EntryList. + // Lets say thread T1 calls O.wait(). Wait() enqueues T1 on O's waitset and + // then calls exit(). Exit release the lock by setting O._owner to NULL. + // Lets say T1 then stalls. T2 acquires O and calls O.notify(). The + // notify() operation moves T1 from O's waitset to O's EntryList. T2 then + // release the lock "O". T2 resumes immediately after the ST of null into + // _owner, above. T2 notices that the EntryList is populated, so it + // reacquires the lock and then finds itself on the EntryList. + // Given all that, we have to tolerate the circumstance where "w" is + // associated with Self. + assert (w->TState == ObjectWaiter::TS_ENTER, "invariant") ; + ExitEpilog (Self, w) ; + return ; + } + + // If we find that both _cxq and EntryList are null then just + // re-run the exit protocol from the top. + w = _cxq ; + if (w == NULL) continue ; + + // Drain _cxq into EntryList - bulk transfer. + // First, detach _cxq. + // The following loop is tantamount to: w = swap (&cxq, NULL) + for (;;) { + assert (w != NULL, "Invariant") ; + ObjectWaiter * u = (ObjectWaiter *) Atomic::cmpxchg_ptr (NULL, &_cxq, w) ; + if (u == w) break ; + w = u ; + } + TEVENT (Inflated exit - drain cxq into EntryList) ; + + assert (w != NULL , "invariant") ; + assert (_EntryList == NULL , "invariant") ; + + // Convert the LIFO SLL anchored by _cxq into a DLL. + // The list reorganization step operates in O(LENGTH(w)) time. + // It's critical that this step operate quickly as + // "Self" still holds the outer-lock, restricting parallelism + // and effectively lengthening the critical section. + // Invariant: s chases t chases u. + // TODO-FIXME: consider changing EntryList from a DLL to a CDLL so + // we have faster access to the tail. + + if (QMode == 1) { + // QMode == 1 : drain cxq to EntryList, reversing order + // We also reverse the order of the list. + ObjectWaiter * s = NULL ; + ObjectWaiter * t = w ; + ObjectWaiter * u = NULL ; + while (t != NULL) { + guarantee (t->TState == ObjectWaiter::TS_CXQ, "invariant") ; + t->TState = ObjectWaiter::TS_ENTER ; + u = t->_next ; + t->_prev = u ; + t->_next = s ; + s = t; + t = u ; + } + _EntryList = s ; + assert (s != NULL, "invariant") ; + } else { + // QMode == 0 or QMode == 2 + _EntryList = w ; + ObjectWaiter * q = NULL ; + ObjectWaiter * p ; + for (p = w ; p != NULL ; p = p->_next) { + guarantee (p->TState == ObjectWaiter::TS_CXQ, "Invariant") ; + p->TState = ObjectWaiter::TS_ENTER ; + p->_prev = q ; + q = p ; + } + } + + // In 1-0 mode we need: ST EntryList; MEMBAR #storestore; ST _owner = NULL + // The MEMBAR is satisfied by the release_store() operation in ExitEpilog(). + + // See if we can abdicate to a spinner instead of waking a thread. + // A primary goal of the implementation is to reduce the + // context-switch rate. + if (_succ != NULL) continue; + + w = _EntryList ; + if (w != NULL) { + guarantee (w->TState == ObjectWaiter::TS_ENTER, "invariant") ; + ExitEpilog (Self, w) ; + return ; + } + } +} + +// ExitSuspendEquivalent: +// A faster alternate to handle_special_suspend_equivalent_condition() +// +// handle_special_suspend_equivalent_condition() unconditionally +// acquires the SR_lock. On some platforms uncontended MutexLocker() +// operations have high latency. Note that in ::enter() we call HSSEC +// while holding the monitor, so we effectively lengthen the critical sections. +// +// There are a number of possible solutions: +// +// A. To ameliorate the problem we might also defer state transitions +// to as late as possible -- just prior to parking. +// Given that, we'd call HSSEC after having returned from park(), +// but before attempting to acquire the monitor. This is only a +// partial solution. It avoids calling HSSEC while holding the +// monitor (good), but it still increases successor reacquisition latency -- +// the interval between unparking a successor and the time the successor +// resumes and retries the lock. See ReenterI(), which defers state transitions. +// If we use this technique we can also avoid EnterI()-exit() loop +// in ::enter() where we iteratively drop the lock and then attempt +// to reacquire it after suspending. +// +// B. In the future we might fold all the suspend bits into a +// composite per-thread suspend flag and then update it with CAS(). +// Alternately, a Dekker-like mechanism with multiple variables +// would suffice: +// ST Self->_suspend_equivalent = false +// MEMBAR +// LD Self_>_suspend_flags +// + + +bool ObjectMonitor::ExitSuspendEquivalent (JavaThread * jSelf) { + int Mode = Knob_FastHSSEC ; + if (Mode && !jSelf->is_external_suspend()) { + assert (jSelf->is_suspend_equivalent(), "invariant") ; + jSelf->clear_suspend_equivalent() ; + if (2 == Mode) OrderAccess::storeload() ; + if (!jSelf->is_external_suspend()) return false ; + // We raced a suspension -- fall thru into the slow path + TEVENT (ExitSuspendEquivalent - raced) ; + jSelf->set_suspend_equivalent() ; + } + return jSelf->handle_special_suspend_equivalent_condition() ; +} + + +void ObjectMonitor::ExitEpilog (Thread * Self, ObjectWaiter * Wakee) { + assert (_owner == Self, "invariant") ; + + // Exit protocol: + // 1. ST _succ = wakee + // 2. membar #loadstore|#storestore; + // 2. ST _owner = NULL + // 3. unpark(wakee) + + _succ = Knob_SuccEnabled ? Wakee->_thread : NULL ; + ParkEvent * Trigger = Wakee->_event ; + + // Hygiene -- once we've set _owner = NULL we can't safely dereference Wakee again. + // The thread associated with Wakee may have grabbed the lock and "Wakee" may be + // out-of-scope (non-extant). + Wakee = NULL ; + + // Drop the lock + OrderAccess::release_store_ptr (&_owner, NULL) ; + OrderAccess::fence() ; // ST _owner vs LD in unpark() + + if (SafepointSynchronize::do_call_back()) { + TEVENT (unpark before SAFEPOINT) ; + } + + DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self); + Trigger->unpark() ; + + // Maintain stats and report events to JVMTI + if (ObjectMonitor::_sync_Parks != NULL) { + ObjectMonitor::_sync_Parks->inc() ; + } +} + + +// ----------------------------------------------------------------------------- +// Class Loader deadlock handling. +// +// complete_exit exits a lock returning recursion count +// complete_exit/reenter operate as a wait without waiting +// complete_exit requires an inflated monitor +// The _owner field is not always the Thread addr even with an +// inflated monitor, e.g. the monitor can be inflated by a non-owning +// thread due to contention. +intptr_t ObjectMonitor::complete_exit(TRAPS) { + Thread * const Self = THREAD; + assert(Self->is_Java_thread(), "Must be Java thread!"); + JavaThread *jt = (JavaThread *)THREAD; + + DeferredInitialize(); + + if (THREAD != _owner) { + if (THREAD->is_lock_owned ((address)_owner)) { + assert(_recursions == 0, "internal state error"); + _owner = THREAD ; /* Convert from basiclock addr to Thread addr */ + _recursions = 0 ; + OwnerIsThread = 1 ; + } + } + + guarantee(Self == _owner, "complete_exit not owner"); + intptr_t save = _recursions; // record the old recursion count + _recursions = 0; // set the recursion level to be 0 + exit (Self) ; // exit the monitor + guarantee (_owner != Self, "invariant"); + return save; +} + +// reenter() enters a lock and sets recursion count +// complete_exit/reenter operate as a wait without waiting +void ObjectMonitor::reenter(intptr_t recursions, TRAPS) { + Thread * const Self = THREAD; + assert(Self->is_Java_thread(), "Must be Java thread!"); + JavaThread *jt = (JavaThread *)THREAD; + + guarantee(_owner != Self, "reenter already owner"); + enter (THREAD); // enter the monitor + guarantee (_recursions == 0, "reenter recursion"); + _recursions = recursions; + return; +} + + +// ----------------------------------------------------------------------------- +// A macro is used below because there may already be a pending +// exception which should not abort the execution of the routines +// which use this (which is why we don't put this into check_slow and +// call it with a CHECK argument). + +#define CHECK_OWNER() \ + do { \ + if (THREAD != _owner) { \ + if (THREAD->is_lock_owned((address) _owner)) { \ + _owner = THREAD ; /* Convert from basiclock addr to Thread addr */ \ + _recursions = 0; \ + OwnerIsThread = 1 ; \ + } else { \ + TEVENT (Throw IMSX) ; \ + THROW(vmSymbols::java_lang_IllegalMonitorStateException()); \ + } \ + } \ + } while (false) + +// check_slow() is a misnomer. It's called to simply to throw an IMSX exception. +// TODO-FIXME: remove check_slow() -- it's likely dead. + +void ObjectMonitor::check_slow(TRAPS) { + TEVENT (check_slow - throw IMSX) ; + assert(THREAD != _owner && !THREAD->is_lock_owned((address) _owner), "must not be owner"); + THROW_MSG(vmSymbols::java_lang_IllegalMonitorStateException(), "current thread not owner"); +} + +static int Adjust (volatile int * adr, int dx) { + int v ; + for (v = *adr ; Atomic::cmpxchg (v + dx, adr, v) != v; v = *adr) ; + return v ; +} +// ----------------------------------------------------------------------------- +// Wait/Notify/NotifyAll +// +// Note: a subset of changes to ObjectMonitor::wait() +// will need to be replicated in complete_exit above +void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { + Thread * const Self = THREAD ; + assert(Self->is_Java_thread(), "Must be Java thread!"); + JavaThread *jt = (JavaThread *)THREAD; + + DeferredInitialize () ; + + // Throw IMSX or IEX. + CHECK_OWNER(); + + // check for a pending interrupt + if (interruptible && Thread::is_interrupted(Self, true) && !HAS_PENDING_EXCEPTION) { + // post monitor waited event. Note that this is past-tense, we are done waiting. + if (JvmtiExport::should_post_monitor_waited()) { + // Note: 'false' parameter is passed here because the + // wait was not timed out due to thread interrupt. + JvmtiExport::post_monitor_waited(jt, this, false); + } + TEVENT (Wait - Throw IEX) ; + THROW(vmSymbols::java_lang_InterruptedException()); + return ; + } + TEVENT (Wait) ; + + assert (Self->_Stalled == 0, "invariant") ; + Self->_Stalled = intptr_t(this) ; + jt->set_current_waiting_monitor(this); + + // create a node to be put into the queue + // Critically, after we reset() the event but prior to park(), we must check + // for a pending interrupt. + ObjectWaiter node(Self); + node.TState = ObjectWaiter::TS_WAIT ; + Self->_ParkEvent->reset() ; + OrderAccess::fence(); // ST into Event; membar ; LD interrupted-flag + + // Enter the waiting queue, which is a circular doubly linked list in this case + // but it could be a priority queue or any data structure. + // _WaitSetLock protects the wait queue. Normally the wait queue is accessed only + // by the the owner of the monitor *except* in the case where park() + // returns because of a timeout of interrupt. Contention is exceptionally rare + // so we use a simple spin-lock instead of a heavier-weight blocking lock. + + Thread::SpinAcquire (&_WaitSetLock, "WaitSet - add") ; + AddWaiter (&node) ; + Thread::SpinRelease (&_WaitSetLock) ; + + if ((SyncFlags & 4) == 0) { + _Responsible = NULL ; + } + intptr_t save = _recursions; // record the old recursion count + _waiters++; // increment the number of waiters + _recursions = 0; // set the recursion level to be 1 + exit (Self) ; // exit the monitor + guarantee (_owner != Self, "invariant") ; + + // As soon as the ObjectMonitor's ownership is dropped in the exit() + // call above, another thread can enter() the ObjectMonitor, do the + // notify(), and exit() the ObjectMonitor. If the other thread's + // exit() call chooses this thread as the successor and the unpark() + // call happens to occur while this thread is posting a + // MONITOR_CONTENDED_EXIT event, then we run the risk of the event + // handler using RawMonitors and consuming the unpark(). + // + // To avoid the problem, we re-post the event. This does no harm + // even if the original unpark() was not consumed because we are the + // chosen successor for this monitor. + if (node._notified != 0 && _succ == Self) { + node._event->unpark(); + } + + // The thread is on the WaitSet list - now park() it. + // On MP systems it's conceivable that a brief spin before we park + // could be profitable. + // + // TODO-FIXME: change the following logic to a loop of the form + // while (!timeout && !interrupted && _notified == 0) park() + + int ret = OS_OK ; + int WasNotified = 0 ; + { // State transition wrappers + OSThread* osthread = Self->osthread(); + OSThreadWaitState osts(osthread, true); + { + ThreadBlockInVM tbivm(jt); + // Thread is in thread_blocked state and oop access is unsafe. + jt->set_suspend_equivalent(); + + if (interruptible && (Thread::is_interrupted(THREAD, false) || HAS_PENDING_EXCEPTION)) { + // Intentionally empty + } else + if (node._notified == 0) { + if (millis <= 0) { + Self->_ParkEvent->park () ; + } else { + ret = Self->_ParkEvent->park (millis) ; + } + } + + // were we externally suspended while we were waiting? + if (ExitSuspendEquivalent (jt)) { + // TODO-FIXME: add -- if succ == Self then succ = null. + jt->java_suspend_self(); + } + + } // Exit thread safepoint: transition _thread_blocked -> _thread_in_vm + + + // Node may be on the WaitSet, the EntryList (or cxq), or in transition + // from the WaitSet to the EntryList. + // See if we need to remove Node from the WaitSet. + // We use double-checked locking to avoid grabbing _WaitSetLock + // if the thread is not on the wait queue. + // + // Note that we don't need a fence before the fetch of TState. + // In the worst case we'll fetch a old-stale value of TS_WAIT previously + // written by the is thread. (perhaps the fetch might even be satisfied + // by a look-aside into the processor's own store buffer, although given + // the length of the code path between the prior ST and this load that's + // highly unlikely). If the following LD fetches a stale TS_WAIT value + // then we'll acquire the lock and then re-fetch a fresh TState value. + // That is, we fail toward safety. + + if (node.TState == ObjectWaiter::TS_WAIT) { + Thread::SpinAcquire (&_WaitSetLock, "WaitSet - unlink") ; + if (node.TState == ObjectWaiter::TS_WAIT) { + DequeueSpecificWaiter (&node) ; // unlink from WaitSet + assert(node._notified == 0, "invariant"); + node.TState = ObjectWaiter::TS_RUN ; + } + Thread::SpinRelease (&_WaitSetLock) ; + } + + // The thread is now either on off-list (TS_RUN), + // on the EntryList (TS_ENTER), or on the cxq (TS_CXQ). + // The Node's TState variable is stable from the perspective of this thread. + // No other threads will asynchronously modify TState. + guarantee (node.TState != ObjectWaiter::TS_WAIT, "invariant") ; + OrderAccess::loadload() ; + if (_succ == Self) _succ = NULL ; + WasNotified = node._notified ; + + // Reentry phase -- reacquire the monitor. + // re-enter contended monitor after object.wait(). + // retain OBJECT_WAIT state until re-enter successfully completes + // Thread state is thread_in_vm and oop access is again safe, + // although the raw address of the object may have changed. + // (Don't cache naked oops over safepoints, of course). + + // post monitor waited event. Note that this is past-tense, we are done waiting. + if (JvmtiExport::should_post_monitor_waited()) { + JvmtiExport::post_monitor_waited(jt, this, ret == OS_TIMEOUT); + } + OrderAccess::fence() ; + + assert (Self->_Stalled != 0, "invariant") ; + Self->_Stalled = 0 ; + + assert (_owner != Self, "invariant") ; + ObjectWaiter::TStates v = node.TState ; + if (v == ObjectWaiter::TS_RUN) { + enter (Self) ; + } else { + guarantee (v == ObjectWaiter::TS_ENTER || v == ObjectWaiter::TS_CXQ, "invariant") ; + ReenterI (Self, &node) ; + node.wait_reenter_end(this); + } + + // Self has reacquired the lock. + // Lifecycle - the node representing Self must not appear on any queues. + // Node is about to go out-of-scope, but even if it were immortal we wouldn't + // want residual elements associated with this thread left on any lists. + guarantee (node.TState == ObjectWaiter::TS_RUN, "invariant") ; + assert (_owner == Self, "invariant") ; + assert (_succ != Self , "invariant") ; + } // OSThreadWaitState() + + jt->set_current_waiting_monitor(NULL); + + guarantee (_recursions == 0, "invariant") ; + _recursions = save; // restore the old recursion count + _waiters--; // decrement the number of waiters + + // Verify a few postconditions + assert (_owner == Self , "invariant") ; + assert (_succ != Self , "invariant") ; + assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; + + if (SyncFlags & 32) { + OrderAccess::fence() ; + } + + // check if the notification happened + if (!WasNotified) { + // no, it could be timeout or Thread.interrupt() or both + // check for interrupt event, otherwise it is timeout + if (interruptible && Thread::is_interrupted(Self, true) && !HAS_PENDING_EXCEPTION) { + TEVENT (Wait - throw IEX from epilog) ; + THROW(vmSymbols::java_lang_InterruptedException()); + } + } + + // NOTE: Spurious wake up will be consider as timeout. + // Monitor notify has precedence over thread interrupt. +} + + +// Consider: +// If the lock is cool (cxq == null && succ == null) and we're on an MP system +// then instead of transferring a thread from the WaitSet to the EntryList +// we might just dequeue a thread from the WaitSet and directly unpark() it. + +void ObjectMonitor::notify(TRAPS) { + CHECK_OWNER(); + if (_WaitSet == NULL) { + TEVENT (Empty-Notify) ; + return ; + } + DTRACE_MONITOR_PROBE(notify, this, object(), THREAD); + + int Policy = Knob_MoveNotifyee ; + + Thread::SpinAcquire (&_WaitSetLock, "WaitSet - notify") ; + ObjectWaiter * iterator = DequeueWaiter() ; + if (iterator != NULL) { + TEVENT (Notify1 - Transfer) ; + guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant") ; + guarantee (iterator->_notified == 0, "invariant") ; + if (Policy != 4) { + iterator->TState = ObjectWaiter::TS_ENTER ; + } + iterator->_notified = 1 ; + + ObjectWaiter * List = _EntryList ; + if (List != NULL) { + assert (List->_prev == NULL, "invariant") ; + assert (List->TState == ObjectWaiter::TS_ENTER, "invariant") ; + assert (List != iterator, "invariant") ; + } + + if (Policy == 0) { // prepend to EntryList + if (List == NULL) { + iterator->_next = iterator->_prev = NULL ; + _EntryList = iterator ; + } else { + List->_prev = iterator ; + iterator->_next = List ; + iterator->_prev = NULL ; + _EntryList = iterator ; + } + } else + if (Policy == 1) { // append to EntryList + if (List == NULL) { + iterator->_next = iterator->_prev = NULL ; + _EntryList = iterator ; + } else { + // CONSIDER: finding the tail currently requires a linear-time walk of + // the EntryList. We can make tail access constant-time by converting to + // a CDLL instead of using our current DLL. + ObjectWaiter * Tail ; + for (Tail = List ; Tail->_next != NULL ; Tail = Tail->_next) ; + assert (Tail != NULL && Tail->_next == NULL, "invariant") ; + Tail->_next = iterator ; + iterator->_prev = Tail ; + iterator->_next = NULL ; + } + } else + if (Policy == 2) { // prepend to cxq + // prepend to cxq + if (List == NULL) { + iterator->_next = iterator->_prev = NULL ; + _EntryList = iterator ; + } else { + iterator->TState = ObjectWaiter::TS_CXQ ; + for (;;) { + ObjectWaiter * Front = _cxq ; + iterator->_next = Front ; + if (Atomic::cmpxchg_ptr (iterator, &_cxq, Front) == Front) { + break ; + } + } + } + } else + if (Policy == 3) { // append to cxq + iterator->TState = ObjectWaiter::TS_CXQ ; + for (;;) { + ObjectWaiter * Tail ; + Tail = _cxq ; + if (Tail == NULL) { + iterator->_next = NULL ; + if (Atomic::cmpxchg_ptr (iterator, &_cxq, NULL) == NULL) { + break ; + } + } else { + while (Tail->_next != NULL) Tail = Tail->_next ; + Tail->_next = iterator ; + iterator->_prev = Tail ; + iterator->_next = NULL ; + break ; + } + } + } else { + ParkEvent * ev = iterator->_event ; + iterator->TState = ObjectWaiter::TS_RUN ; + OrderAccess::fence() ; + ev->unpark() ; + } + + if (Policy < 4) { + iterator->wait_reenter_begin(this); + } + + // _WaitSetLock protects the wait queue, not the EntryList. We could + // move the add-to-EntryList operation, above, outside the critical section + // protected by _WaitSetLock. In practice that's not useful. With the + // exception of wait() timeouts and interrupts the monitor owner + // is the only thread that grabs _WaitSetLock. There's almost no contention + // on _WaitSetLock so it's not profitable to reduce the length of the + // critical section. + } + + Thread::SpinRelease (&_WaitSetLock) ; + + if (iterator != NULL && ObjectMonitor::_sync_Notifications != NULL) { + ObjectMonitor::_sync_Notifications->inc() ; + } +} + + +void ObjectMonitor::notifyAll(TRAPS) { + CHECK_OWNER(); + ObjectWaiter* iterator; + if (_WaitSet == NULL) { + TEVENT (Empty-NotifyAll) ; + return ; + } + DTRACE_MONITOR_PROBE(notifyAll, this, object(), THREAD); + + int Policy = Knob_MoveNotifyee ; + int Tally = 0 ; + Thread::SpinAcquire (&_WaitSetLock, "WaitSet - notifyall") ; + + for (;;) { + iterator = DequeueWaiter () ; + if (iterator == NULL) break ; + TEVENT (NotifyAll - Transfer1) ; + ++Tally ; + + // Disposition - what might we do with iterator ? + // a. add it directly to the EntryList - either tail or head. + // b. push it onto the front of the _cxq. + // For now we use (a). + + guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant") ; + guarantee (iterator->_notified == 0, "invariant") ; + iterator->_notified = 1 ; + if (Policy != 4) { + iterator->TState = ObjectWaiter::TS_ENTER ; + } + + ObjectWaiter * List = _EntryList ; + if (List != NULL) { + assert (List->_prev == NULL, "invariant") ; + assert (List->TState == ObjectWaiter::TS_ENTER, "invariant") ; + assert (List != iterator, "invariant") ; + } + + if (Policy == 0) { // prepend to EntryList + if (List == NULL) { + iterator->_next = iterator->_prev = NULL ; + _EntryList = iterator ; + } else { + List->_prev = iterator ; + iterator->_next = List ; + iterator->_prev = NULL ; + _EntryList = iterator ; + } + } else + if (Policy == 1) { // append to EntryList + if (List == NULL) { + iterator->_next = iterator->_prev = NULL ; + _EntryList = iterator ; + } else { + // CONSIDER: finding the tail currently requires a linear-time walk of + // the EntryList. We can make tail access constant-time by converting to + // a CDLL instead of using our current DLL. + ObjectWaiter * Tail ; + for (Tail = List ; Tail->_next != NULL ; Tail = Tail->_next) ; + assert (Tail != NULL && Tail->_next == NULL, "invariant") ; + Tail->_next = iterator ; + iterator->_prev = Tail ; + iterator->_next = NULL ; + } + } else + if (Policy == 2) { // prepend to cxq + // prepend to cxq + iterator->TState = ObjectWaiter::TS_CXQ ; + for (;;) { + ObjectWaiter * Front = _cxq ; + iterator->_next = Front ; + if (Atomic::cmpxchg_ptr (iterator, &_cxq, Front) == Front) { + break ; + } + } + } else + if (Policy == 3) { // append to cxq + iterator->TState = ObjectWaiter::TS_CXQ ; + for (;;) { + ObjectWaiter * Tail ; + Tail = _cxq ; + if (Tail == NULL) { + iterator->_next = NULL ; + if (Atomic::cmpxchg_ptr (iterator, &_cxq, NULL) == NULL) { + break ; + } + } else { + while (Tail->_next != NULL) Tail = Tail->_next ; + Tail->_next = iterator ; + iterator->_prev = Tail ; + iterator->_next = NULL ; + break ; + } + } + } else { + ParkEvent * ev = iterator->_event ; + iterator->TState = ObjectWaiter::TS_RUN ; + OrderAccess::fence() ; + ev->unpark() ; + } + + if (Policy < 4) { + iterator->wait_reenter_begin(this); + } + + // _WaitSetLock protects the wait queue, not the EntryList. We could + // move the add-to-EntryList operation, above, outside the critical section + // protected by _WaitSetLock. In practice that's not useful. With the + // exception of wait() timeouts and interrupts the monitor owner + // is the only thread that grabs _WaitSetLock. There's almost no contention + // on _WaitSetLock so it's not profitable to reduce the length of the + // critical section. + } + + Thread::SpinRelease (&_WaitSetLock) ; + + if (Tally != 0 && ObjectMonitor::_sync_Notifications != NULL) { + ObjectMonitor::_sync_Notifications->inc(Tally) ; + } +} + +// ----------------------------------------------------------------------------- +// Adaptive Spinning Support +// +// Adaptive spin-then-block - rational spinning +// +// Note that we spin "globally" on _owner with a classic SMP-polite TATAS +// algorithm. On high order SMP systems it would be better to start with +// a brief global spin and then revert to spinning locally. In the spirit of MCS/CLH, +// a contending thread could enqueue itself on the cxq and then spin locally +// on a thread-specific variable such as its ParkEvent._Event flag. +// That's left as an exercise for the reader. Note that global spinning is +// not problematic on Niagara, as the L2$ serves the interconnect and has both +// low latency and massive bandwidth. +// +// Broadly, we can fix the spin frequency -- that is, the % of contended lock +// acquisition attempts where we opt to spin -- at 100% and vary the spin count +// (duration) or we can fix the count at approximately the duration of +// a context switch and vary the frequency. Of course we could also +// vary both satisfying K == Frequency * Duration, where K is adaptive by monitor. +// See http://j2se.east/~dice/PERSIST/040824-AdaptiveSpinning.html. +// +// This implementation varies the duration "D", where D varies with +// the success rate of recent spin attempts. (D is capped at approximately +// length of a round-trip context switch). The success rate for recent +// spin attempts is a good predictor of the success rate of future spin +// attempts. The mechanism adapts automatically to varying critical +// section length (lock modality), system load and degree of parallelism. +// D is maintained per-monitor in _SpinDuration and is initialized +// optimistically. Spin frequency is fixed at 100%. +// +// Note that _SpinDuration is volatile, but we update it without locks +// or atomics. The code is designed so that _SpinDuration stays within +// a reasonable range even in the presence of races. The arithmetic +// operations on _SpinDuration are closed over the domain of legal values, +// so at worst a race will install and older but still legal value. +// At the very worst this introduces some apparent non-determinism. +// We might spin when we shouldn't or vice-versa, but since the spin +// count are relatively short, even in the worst case, the effect is harmless. +// +// Care must be taken that a low "D" value does not become an +// an absorbing state. Transient spinning failures -- when spinning +// is overall profitable -- should not cause the system to converge +// on low "D" values. We want spinning to be stable and predictable +// and fairly responsive to change and at the same time we don't want +// it to oscillate, become metastable, be "too" non-deterministic, +// or converge on or enter undesirable stable absorbing states. +// +// We implement a feedback-based control system -- using past behavior +// to predict future behavior. We face two issues: (a) if the +// input signal is random then the spin predictor won't provide optimal +// results, and (b) if the signal frequency is too high then the control +// system, which has some natural response lag, will "chase" the signal. +// (b) can arise from multimodal lock hold times. Transient preemption +// can also result in apparent bimodal lock hold times. +// Although sub-optimal, neither condition is particularly harmful, as +// in the worst-case we'll spin when we shouldn't or vice-versa. +// The maximum spin duration is rather short so the failure modes aren't bad. +// To be conservative, I've tuned the gain in system to bias toward +// _not spinning. Relatedly, the system can sometimes enter a mode where it +// "rings" or oscillates between spinning and not spinning. This happens +// when spinning is just on the cusp of profitability, however, so the +// situation is not dire. The state is benign -- there's no need to add +// hysteresis control to damp the transition rate between spinning and +// not spinning. +// + +intptr_t ObjectMonitor::SpinCallbackArgument = 0 ; +int (*ObjectMonitor::SpinCallbackFunction)(intptr_t, int) = NULL ; + +// Spinning: Fixed frequency (100%), vary duration + + +int ObjectMonitor::TrySpin_VaryDuration (Thread * Self) { + + // Dumb, brutal spin. Good for comparative measurements against adaptive spinning. + int ctr = Knob_FixedSpin ; + if (ctr != 0) { + while (--ctr >= 0) { + if (TryLock (Self) > 0) return 1 ; + SpinPause () ; + } + return 0 ; + } + + for (ctr = Knob_PreSpin + 1; --ctr >= 0 ; ) { + if (TryLock(Self) > 0) { + // Increase _SpinDuration ... + // Note that we don't clamp SpinDuration precisely at SpinLimit. + // Raising _SpurDuration to the poverty line is key. + int x = _SpinDuration ; + if (x < Knob_SpinLimit) { + if (x < Knob_Poverty) x = Knob_Poverty ; + _SpinDuration = x + Knob_BonusB ; + } + return 1 ; + } + SpinPause () ; + } + + // Admission control - verify preconditions for spinning + // + // We always spin a little bit, just to prevent _SpinDuration == 0 from + // becoming an absorbing state. Put another way, we spin briefly to + // sample, just in case the system load, parallelism, contention, or lock + // modality changed. + // + // Consider the following alternative: + // Periodically set _SpinDuration = _SpinLimit and try a long/full + // spin attempt. "Periodically" might mean after a tally of + // the # of failed spin attempts (or iterations) reaches some threshold. + // This takes us into the realm of 1-out-of-N spinning, where we + // hold the duration constant but vary the frequency. + + ctr = _SpinDuration ; + if (ctr < Knob_SpinBase) ctr = Knob_SpinBase ; + if (ctr <= 0) return 0 ; + + if (Knob_SuccRestrict && _succ != NULL) return 0 ; + if (Knob_OState && NotRunnable (Self, (Thread *) _owner)) { + TEVENT (Spin abort - notrunnable [TOP]); + return 0 ; + } + + int MaxSpin = Knob_MaxSpinners ; + if (MaxSpin >= 0) { + if (_Spinner > MaxSpin) { + TEVENT (Spin abort -- too many spinners) ; + return 0 ; + } + // Slighty racy, but benign ... + Adjust (&_Spinner, 1) ; + } + + // We're good to spin ... spin ingress. + // CONSIDER: use Prefetch::write() to avoid RTS->RTO upgrades + // when preparing to LD...CAS _owner, etc and the CAS is likely + // to succeed. + int hits = 0 ; + int msk = 0 ; + int caspty = Knob_CASPenalty ; + int oxpty = Knob_OXPenalty ; + int sss = Knob_SpinSetSucc ; + if (sss && _succ == NULL ) _succ = Self ; + Thread * prv = NULL ; + + // There are three ways to exit the following loop: + // 1. A successful spin where this thread has acquired the lock. + // 2. Spin failure with prejudice + // 3. Spin failure without prejudice + + while (--ctr >= 0) { + + // Periodic polling -- Check for pending GC + // Threads may spin while they're unsafe. + // We don't want spinning threads to delay the JVM from reaching + // a stop-the-world safepoint or to steal cycles from GC. + // If we detect a pending safepoint we abort in order that + // (a) this thread, if unsafe, doesn't delay the safepoint, and (b) + // this thread, if safe, doesn't steal cycles from GC. + // This is in keeping with the "no loitering in runtime" rule. + // We periodically check to see if there's a safepoint pending. + if ((ctr & 0xFF) == 0) { + if (SafepointSynchronize::do_call_back()) { + TEVENT (Spin: safepoint) ; + goto Abort ; // abrupt spin egress + } + if (Knob_UsePause & 1) SpinPause () ; + + int (*scb)(intptr_t,int) = SpinCallbackFunction ; + if (hits > 50 && scb != NULL) { + int abend = (*scb)(SpinCallbackArgument, 0) ; + } + } + + if (Knob_UsePause & 2) SpinPause() ; + + // Exponential back-off ... Stay off the bus to reduce coherency traffic. + // This is useful on classic SMP systems, but is of less utility on + // N1-style CMT platforms. + // + // Trade-off: lock acquisition latency vs coherency bandwidth. + // Lock hold times are typically short. A histogram + // of successful spin attempts shows that we usually acquire + // the lock early in the spin. That suggests we want to + // sample _owner frequently in the early phase of the spin, + // but then back-off and sample less frequently as the spin + // progresses. The back-off makes a good citizen on SMP big + // SMP systems. Oversampling _owner can consume excessive + // coherency bandwidth. Relatedly, if we _oversample _owner we + // can inadvertently interfere with the the ST m->owner=null. + // executed by the lock owner. + if (ctr & msk) continue ; + ++hits ; + if ((hits & 0xF) == 0) { + // The 0xF, above, corresponds to the exponent. + // Consider: (msk+1)|msk + msk = ((msk << 2)|3) & BackOffMask ; + } + + // Probe _owner with TATAS + // If this thread observes the monitor transition or flicker + // from locked to unlocked to locked, then the odds that this + // thread will acquire the lock in this spin attempt go down + // considerably. The same argument applies if the CAS fails + // or if we observe _owner change from one non-null value to + // another non-null value. In such cases we might abort + // the spin without prejudice or apply a "penalty" to the + // spin count-down variable "ctr", reducing it by 100, say. + + Thread * ox = (Thread *) _owner ; + if (ox == NULL) { + ox = (Thread *) Atomic::cmpxchg_ptr (Self, &_owner, NULL) ; + if (ox == NULL) { + // The CAS succeeded -- this thread acquired ownership + // Take care of some bookkeeping to exit spin state. + if (sss && _succ == Self) { + _succ = NULL ; + } + if (MaxSpin > 0) Adjust (&_Spinner, -1) ; + + // Increase _SpinDuration : + // The spin was successful (profitable) so we tend toward + // longer spin attempts in the future. + // CONSIDER: factor "ctr" into the _SpinDuration adjustment. + // If we acquired the lock early in the spin cycle it + // makes sense to increase _SpinDuration proportionally. + // Note that we don't clamp SpinDuration precisely at SpinLimit. + int x = _SpinDuration ; + if (x < Knob_SpinLimit) { + if (x < Knob_Poverty) x = Knob_Poverty ; + _SpinDuration = x + Knob_Bonus ; + } + return 1 ; + } + + // The CAS failed ... we can take any of the following actions: + // * penalize: ctr -= Knob_CASPenalty + // * exit spin with prejudice -- goto Abort; + // * exit spin without prejudice. + // * Since CAS is high-latency, retry again immediately. + prv = ox ; + TEVENT (Spin: cas failed) ; + if (caspty == -2) break ; + if (caspty == -1) goto Abort ; + ctr -= caspty ; + continue ; + } + + // Did lock ownership change hands ? + if (ox != prv && prv != NULL ) { + TEVENT (spin: Owner changed) + if (oxpty == -2) break ; + if (oxpty == -1) goto Abort ; + ctr -= oxpty ; + } + prv = ox ; + + // Abort the spin if the owner is not executing. + // The owner must be executing in order to drop the lock. + // Spinning while the owner is OFFPROC is idiocy. + // Consider: ctr -= RunnablePenalty ; + if (Knob_OState && NotRunnable (Self, ox)) { + TEVENT (Spin abort - notrunnable); + goto Abort ; + } + if (sss && _succ == NULL ) _succ = Self ; + } + + // Spin failed with prejudice -- reduce _SpinDuration. + // TODO: Use an AIMD-like policy to adjust _SpinDuration. + // AIMD is globally stable. + TEVENT (Spin failure) ; + { + int x = _SpinDuration ; + if (x > 0) { + // Consider an AIMD scheme like: x -= (x >> 3) + 100 + // This is globally sample and tends to damp the response. + x -= Knob_Penalty ; + if (x < 0) x = 0 ; + _SpinDuration = x ; + } + } + + Abort: + if (MaxSpin >= 0) Adjust (&_Spinner, -1) ; + if (sss && _succ == Self) { + _succ = NULL ; + // Invariant: after setting succ=null a contending thread + // must recheck-retry _owner before parking. This usually happens + // in the normal usage of TrySpin(), but it's safest + // to make TrySpin() as foolproof as possible. + OrderAccess::fence() ; + if (TryLock(Self) > 0) return 1 ; + } + return 0 ; +} + +// NotRunnable() -- informed spinning +// +// Don't bother spinning if the owner is not eligible to drop the lock. +// Peek at the owner's schedctl.sc_state and Thread._thread_values and +// spin only if the owner thread is _thread_in_Java or _thread_in_vm. +// The thread must be runnable in order to drop the lock in timely fashion. +// If the _owner is not runnable then spinning will not likely be +// successful (profitable). +// +// Beware -- the thread referenced by _owner could have died +// so a simply fetch from _owner->_thread_state might trap. +// Instead, we use SafeFetchXX() to safely LD _owner->_thread_state. +// Because of the lifecycle issues the schedctl and _thread_state values +// observed by NotRunnable() might be garbage. NotRunnable must +// tolerate this and consider the observed _thread_state value +// as advisory. +// +// Beware too, that _owner is sometimes a BasicLock address and sometimes +// a thread pointer. We differentiate the two cases with OwnerIsThread. +// Alternately, we might tag the type (thread pointer vs basiclock pointer) +// with the LSB of _owner. Another option would be to probablistically probe +// the putative _owner->TypeTag value. +// +// Checking _thread_state isn't perfect. Even if the thread is +// in_java it might be blocked on a page-fault or have been preempted +// and sitting on a ready/dispatch queue. _thread state in conjunction +// with schedctl.sc_state gives us a good picture of what the +// thread is doing, however. +// +// TODO: check schedctl.sc_state. +// We'll need to use SafeFetch32() to read from the schedctl block. +// See RFE #5004247 and http://sac.sfbay.sun.com/Archives/CaseLog/arc/PSARC/2005/351/ +// +// The return value from NotRunnable() is *advisory* -- the +// result is based on sampling and is not necessarily coherent. +// The caller must tolerate false-negative and false-positive errors. +// Spinning, in general, is probabilistic anyway. + + +int ObjectMonitor::NotRunnable (Thread * Self, Thread * ox) { + // Check either OwnerIsThread or ox->TypeTag == 2BAD. + if (!OwnerIsThread) return 0 ; + + if (ox == NULL) return 0 ; + + // Avoid transitive spinning ... + // Say T1 spins or blocks trying to acquire L. T1._Stalled is set to L. + // Immediately after T1 acquires L it's possible that T2, also + // spinning on L, will see L.Owner=T1 and T1._Stalled=L. + // This occurs transiently after T1 acquired L but before + // T1 managed to clear T1.Stalled. T2 does not need to abort + // its spin in this circumstance. + intptr_t BlockedOn = SafeFetchN ((intptr_t *) &ox->_Stalled, intptr_t(1)) ; + + if (BlockedOn == 1) return 1 ; + if (BlockedOn != 0) { + return BlockedOn != intptr_t(this) && _owner == ox ; + } + + assert (sizeof(((JavaThread *)ox)->_thread_state == sizeof(int)), "invariant") ; + int jst = SafeFetch32 ((int *) &((JavaThread *) ox)->_thread_state, -1) ; ; + // consider also: jst != _thread_in_Java -- but that's overspecific. + return jst == _thread_blocked || jst == _thread_in_native ; +} + + +// ----------------------------------------------------------------------------- +// WaitSet management ... + +ObjectWaiter::ObjectWaiter(Thread* thread) { + _next = NULL; + _prev = NULL; + _notified = 0; + TState = TS_RUN ; + _thread = thread; + _event = thread->_ParkEvent ; + _active = false; + assert (_event != NULL, "invariant") ; +} + +void ObjectWaiter::wait_reenter_begin(ObjectMonitor *mon) { + JavaThread *jt = (JavaThread *)this->_thread; + _active = JavaThreadBlockedOnMonitorEnterState::wait_reenter_begin(jt, mon); +} + +void ObjectWaiter::wait_reenter_end(ObjectMonitor *mon) { + JavaThread *jt = (JavaThread *)this->_thread; + JavaThreadBlockedOnMonitorEnterState::wait_reenter_end(jt, _active); +} + +inline void ObjectMonitor::AddWaiter(ObjectWaiter* node) { + assert(node != NULL, "should not dequeue NULL node"); + assert(node->_prev == NULL, "node already in list"); + assert(node->_next == NULL, "node already in list"); + // put node at end of queue (circular doubly linked list) + if (_WaitSet == NULL) { + _WaitSet = node; + node->_prev = node; + node->_next = node; + } else { + ObjectWaiter* head = _WaitSet ; + ObjectWaiter* tail = head->_prev; + assert(tail->_next == head, "invariant check"); + tail->_next = node; + head->_prev = node; + node->_next = head; + node->_prev = tail; + } +} + +inline ObjectWaiter* ObjectMonitor::DequeueWaiter() { + // dequeue the very first waiter + ObjectWaiter* waiter = _WaitSet; + if (waiter) { + DequeueSpecificWaiter(waiter); + } + return waiter; +} + +inline void ObjectMonitor::DequeueSpecificWaiter(ObjectWaiter* node) { + assert(node != NULL, "should not dequeue NULL node"); + assert(node->_prev != NULL, "node already removed from list"); + assert(node->_next != NULL, "node already removed from list"); + // when the waiter has woken up because of interrupt, + // timeout or other spurious wake-up, dequeue the + // waiter from waiting list + ObjectWaiter* next = node->_next; + if (next == node) { + assert(node->_prev == node, "invariant check"); + _WaitSet = NULL; + } else { + ObjectWaiter* prev = node->_prev; + assert(prev->_next == node, "invariant check"); + assert(next->_prev == node, "invariant check"); + next->_prev = prev; + prev->_next = next; + if (_WaitSet == node) { + _WaitSet = next; + } + } + node->_next = NULL; + node->_prev = NULL; +} + +// ----------------------------------------------------------------------------- +// PerfData support +PerfCounter * ObjectMonitor::_sync_ContendedLockAttempts = NULL ; +PerfCounter * ObjectMonitor::_sync_FutileWakeups = NULL ; +PerfCounter * ObjectMonitor::_sync_Parks = NULL ; +PerfCounter * ObjectMonitor::_sync_EmptyNotifications = NULL ; +PerfCounter * ObjectMonitor::_sync_Notifications = NULL ; +PerfCounter * ObjectMonitor::_sync_PrivateA = NULL ; +PerfCounter * ObjectMonitor::_sync_PrivateB = NULL ; +PerfCounter * ObjectMonitor::_sync_SlowExit = NULL ; +PerfCounter * ObjectMonitor::_sync_SlowEnter = NULL ; +PerfCounter * ObjectMonitor::_sync_SlowNotify = NULL ; +PerfCounter * ObjectMonitor::_sync_SlowNotifyAll = NULL ; +PerfCounter * ObjectMonitor::_sync_FailedSpins = NULL ; +PerfCounter * ObjectMonitor::_sync_SuccessfulSpins = NULL ; +PerfCounter * ObjectMonitor::_sync_MonInCirculation = NULL ; +PerfCounter * ObjectMonitor::_sync_MonScavenged = NULL ; +PerfCounter * ObjectMonitor::_sync_Inflations = NULL ; +PerfCounter * ObjectMonitor::_sync_Deflations = NULL ; +PerfLongVariable * ObjectMonitor::_sync_MonExtant = NULL ; + +// One-shot global initialization for the sync subsystem. +// We could also defer initialization and initialize on-demand +// the first time we call inflate(). Initialization would +// be protected - like so many things - by the MonitorCache_lock. + +void ObjectMonitor::Initialize () { + static int InitializationCompleted = 0 ; + assert (InitializationCompleted == 0, "invariant") ; + InitializationCompleted = 1 ; + if (UsePerfData) { + EXCEPTION_MARK ; + #define NEWPERFCOUNTER(n) {n = PerfDataManager::create_counter(SUN_RT, #n, PerfData::U_Events,CHECK); } + #define NEWPERFVARIABLE(n) {n = PerfDataManager::create_variable(SUN_RT, #n, PerfData::U_Events,CHECK); } + NEWPERFCOUNTER(_sync_Inflations) ; + NEWPERFCOUNTER(_sync_Deflations) ; + NEWPERFCOUNTER(_sync_ContendedLockAttempts) ; + NEWPERFCOUNTER(_sync_FutileWakeups) ; + NEWPERFCOUNTER(_sync_Parks) ; + NEWPERFCOUNTER(_sync_EmptyNotifications) ; + NEWPERFCOUNTER(_sync_Notifications) ; + NEWPERFCOUNTER(_sync_SlowEnter) ; + NEWPERFCOUNTER(_sync_SlowExit) ; + NEWPERFCOUNTER(_sync_SlowNotify) ; + NEWPERFCOUNTER(_sync_SlowNotifyAll) ; + NEWPERFCOUNTER(_sync_FailedSpins) ; + NEWPERFCOUNTER(_sync_SuccessfulSpins) ; + NEWPERFCOUNTER(_sync_PrivateA) ; + NEWPERFCOUNTER(_sync_PrivateB) ; + NEWPERFCOUNTER(_sync_MonInCirculation) ; + NEWPERFCOUNTER(_sync_MonScavenged) ; + NEWPERFVARIABLE(_sync_MonExtant) ; + #undef NEWPERFCOUNTER + } +} + + +// Compile-time asserts +// When possible, it's better to catch errors deterministically at +// compile-time than at runtime. The down-side to using compile-time +// asserts is that error message -- often something about negative array +// indices -- is opaque. + +#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @" INTPTR_FORMAT "\n", (intptr_t)tag); } + +void ObjectMonitor::ctAsserts() { + CTASSERT(offset_of (ObjectMonitor, _header) == 0); +} + + +static char * kvGet (char * kvList, const char * Key) { + if (kvList == NULL) return NULL ; + size_t n = strlen (Key) ; + char * Search ; + for (Search = kvList ; *Search ; Search += strlen(Search) + 1) { + if (strncmp (Search, Key, n) == 0) { + if (Search[n] == '=') return Search + n + 1 ; + if (Search[n] == 0) return (char *) "1" ; + } + } + return NULL ; +} + +static int kvGetInt (char * kvList, const char * Key, int Default) { + char * v = kvGet (kvList, Key) ; + int rslt = v ? ::strtol (v, NULL, 0) : Default ; + if (Knob_ReportSettings && v != NULL) { + ::printf (" SyncKnob: %s %d(%d)\n", Key, rslt, Default) ; + ::fflush (stdout) ; + } + return rslt ; +} + +void ObjectMonitor::DeferredInitialize () { + if (InitDone > 0) return ; + if (Atomic::cmpxchg (-1, &InitDone, 0) != 0) { + while (InitDone != 1) ; + return ; + } + + // One-shot global initialization ... + // The initialization is idempotent, so we don't need locks. + // In the future consider doing this via os::init_2(). + // SyncKnobs consist of = pairs in the style + // of environment variables. Start by converting ':' to NUL. + + if (SyncKnobs == NULL) SyncKnobs = "" ; + + size_t sz = strlen (SyncKnobs) ; + char * knobs = (char *) malloc (sz + 2) ; + if (knobs == NULL) { + vm_exit_out_of_memory (sz + 2, "Parse SyncKnobs") ; + guarantee (0, "invariant") ; + } + strcpy (knobs, SyncKnobs) ; + knobs[sz+1] = 0 ; + for (char * p = knobs ; *p ; p++) { + if (*p == ':') *p = 0 ; + } + + #define SETKNOB(x) { Knob_##x = kvGetInt (knobs, #x, Knob_##x); } + SETKNOB(ReportSettings) ; + SETKNOB(Verbose) ; + SETKNOB(FixedSpin) ; + SETKNOB(SpinLimit) ; + SETKNOB(SpinBase) ; + SETKNOB(SpinBackOff); + SETKNOB(CASPenalty) ; + SETKNOB(OXPenalty) ; + SETKNOB(LogSpins) ; + SETKNOB(SpinSetSucc) ; + SETKNOB(SuccEnabled) ; + SETKNOB(SuccRestrict) ; + SETKNOB(Penalty) ; + SETKNOB(Bonus) ; + SETKNOB(BonusB) ; + SETKNOB(Poverty) ; + SETKNOB(SpinAfterFutile) ; + SETKNOB(UsePause) ; + SETKNOB(SpinEarly) ; + SETKNOB(OState) ; + SETKNOB(MaxSpinners) ; + SETKNOB(PreSpin) ; + SETKNOB(ExitPolicy) ; + SETKNOB(QMode); + SETKNOB(ResetEvent) ; + SETKNOB(MoveNotifyee) ; + SETKNOB(FastHSSEC) ; + #undef SETKNOB + + if (os::is_MP()) { + BackOffMask = (1 << Knob_SpinBackOff) - 1 ; + if (Knob_ReportSettings) ::printf ("BackOffMask=%X\n", BackOffMask) ; + // CONSIDER: BackOffMask = ROUNDUP_NEXT_POWER2 (ncpus-1) + } else { + Knob_SpinLimit = 0 ; + Knob_SpinBase = 0 ; + Knob_PreSpin = 0 ; + Knob_FixedSpin = -1 ; + } + + if (Knob_LogSpins == 0) { + ObjectMonitor::_sync_FailedSpins = NULL ; + } + + free (knobs) ; + OrderAccess::fence() ; + InitDone = 1 ; +} + +#ifndef PRODUCT +void ObjectMonitor::verify() { +} + +void ObjectMonitor::print() { +} +#endif diff --git a/hotspot/src/share/vm/runtime/objectMonitor.hpp b/hotspot/src/share/vm/runtime/objectMonitor.hpp index 8bff00c2230..20f013619a1 100644 --- a/hotspot/src/share/vm/runtime/objectMonitor.hpp +++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp @@ -22,6 +22,32 @@ * */ + +// ObjectWaiter serves as a "proxy" or surrogate thread. +// TODO-FIXME: Eliminate ObjectWaiter and use the thread-specific +// ParkEvent instead. Beware, however, that the JVMTI code +// knows about ObjectWaiters, so we'll have to reconcile that code. +// See next_waiter(), first_waiter(), etc. + +class ObjectWaiter : public StackObj { + public: + enum TStates { TS_UNDEF, TS_READY, TS_RUN, TS_WAIT, TS_ENTER, TS_CXQ } ; + enum Sorted { PREPEND, APPEND, SORTED } ; + ObjectWaiter * volatile _next; + ObjectWaiter * volatile _prev; + Thread* _thread; + ParkEvent * _event; + volatile int _notified ; + volatile TStates TState ; + Sorted _Sorted ; // List placement disposition + bool _active ; // Contention monitoring is enabled + public: + ObjectWaiter(Thread* thread); + + void wait_reenter_begin(ObjectMonitor *mon); + void wait_reenter_end(ObjectMonitor *mon); +}; + // WARNING: // This is a very sensitive and fragile class. DO NOT make any // change unless you are fully aware of the underlying semantics. @@ -38,8 +64,6 @@ // It is also used as RawMonitor by the JVMTI -class ObjectWaiter; - class ObjectMonitor { public: enum { @@ -74,13 +98,16 @@ class ObjectMonitor { public: - ObjectMonitor(); - ~ObjectMonitor(); - markOop header() const; void set_header(markOop hdr); - intptr_t is_busy() const; + intptr_t is_busy() const { + // TODO-FIXME: merge _count and _waiters. + // TODO-FIXME: assert _owner == null implies _recursions = 0 + // TODO-FIXME: assert _WaitSet != null implies _count > 0 + return _count|_waiters|intptr_t(_owner)|intptr_t(_cxq)|intptr_t(_EntryList ) ; + } + intptr_t is_entered(Thread* current) const; void* owner() const; @@ -91,13 +118,58 @@ class ObjectMonitor { intptr_t count() const; void set_count(intptr_t count); intptr_t contentions() const ; + intptr_t recursions() const { return _recursions; } // JVM/DI GetMonitorInfo() needs this - Thread * thread_of_waiter (ObjectWaiter *) ; - ObjectWaiter * first_waiter () ; - ObjectWaiter * next_waiter(ObjectWaiter* o); + ObjectWaiter* first_waiter() { return _WaitSet; } + ObjectWaiter* next_waiter(ObjectWaiter* o) { return o->_next; } + Thread* thread_of_waiter(ObjectWaiter* o) { return o->_thread; } - intptr_t recursions() const { return _recursions; } + // initialize the monitor, exception the semaphore, all other fields + // are simple integers or pointers + ObjectMonitor() { + _header = NULL; + _count = 0; + _waiters = 0, + _recursions = 0; + _object = NULL; + _owner = NULL; + _WaitSet = NULL; + _WaitSetLock = 0 ; + _Responsible = NULL ; + _succ = NULL ; + _cxq = NULL ; + FreeNext = NULL ; + _EntryList = NULL ; + _SpinFreq = 0 ; + _SpinClock = 0 ; + OwnerIsThread = 0 ; + } + + ~ObjectMonitor() { + // TODO: Add asserts ... + // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0 + // _count == 0 _EntryList == NULL etc + } + +private: + void Recycle () { + // TODO: add stronger asserts ... + // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0 + // _count == 0 EntryList == NULL + // _recursions == 0 _WaitSet == NULL + // TODO: assert (is_busy()|_recursions) == 0 + _succ = NULL ; + _EntryList = NULL ; + _cxq = NULL ; + _WaitSet = NULL ; + _recursions = 0 ; + _SpinFreq = 0 ; + _SpinClock = 0 ; + OwnerIsThread = 0 ; + } + +public: void* object() const; void* object_addr(); @@ -122,22 +194,9 @@ class ObjectMonitor { intptr_t complete_exit(TRAPS); void reenter(intptr_t recursions, TRAPS); - int raw_enter(TRAPS); - int raw_exit(TRAPS); - int raw_wait(jlong millis, bool interruptable, TRAPS); - int raw_notify(TRAPS); - int raw_notifyAll(TRAPS); - private: - // JVMTI support -- remove ASAP - int SimpleEnter (Thread * Self) ; - int SimpleExit (Thread * Self) ; - int SimpleWait (Thread * Self, jlong millis) ; - int SimpleNotify (Thread * Self, bool All) ; - - private: - void Recycle () ; void AddWaiter (ObjectWaiter * waiter) ; + static void DeferredInitialize(); ObjectWaiter * DequeueWaiter () ; void DequeueSpecificWaiter (ObjectWaiter * waiter) ; @@ -172,13 +231,17 @@ class ObjectMonitor { // The VM assumes write ordering wrt these fields, which can be // read from other threads. + protected: // protected for jvmtiRawMonitor void * volatile _owner; // pointer to owning thread OR BasicLock volatile intptr_t _recursions; // recursion count, 0 for first entry + private: int OwnerIsThread ; // _owner is (Thread *) vs SP/BasicLock ObjectWaiter * volatile _cxq ; // LL of recently-arrived threads blocked on entry. // The list is actually composed of WaitNodes, acting // as proxies for Threads. + protected: ObjectWaiter * volatile _EntryList ; // Threads blocked on entry or reentry. + private: Thread * volatile _succ ; // Heir presumptive thread - used for futile wakeup throttling Thread * volatile _Responsible ; int _PromptDrain ; // rqst to drain cxq into EntryList ASAP @@ -196,8 +259,12 @@ class ObjectMonitor { volatile intptr_t _count; // reference count to prevent reclaimation/deflation // at stop-the-world time. See deflate_idle_monitors(). // _count is approximately |_WaitSet| + |_EntryList| + protected: volatile intptr_t _waiters; // number of waiting threads + private: + protected: ObjectWaiter * volatile _WaitSet; // LL of threads wait()ing on the monitor + private: volatile int _WaitSetLock; // protects Wait Queue - simple spinlock public: @@ -205,4 +272,37 @@ class ObjectMonitor { ObjectMonitor * FreeNext ; // Free list linkage intptr_t StatA, StatsB ; + public: + static void Initialize () ; + static PerfCounter * _sync_ContendedLockAttempts ; + static PerfCounter * _sync_FutileWakeups ; + static PerfCounter * _sync_Parks ; + static PerfCounter * _sync_EmptyNotifications ; + static PerfCounter * _sync_Notifications ; + static PerfCounter * _sync_SlowEnter ; + static PerfCounter * _sync_SlowExit ; + static PerfCounter * _sync_SlowNotify ; + static PerfCounter * _sync_SlowNotifyAll ; + static PerfCounter * _sync_FailedSpins ; + static PerfCounter * _sync_SuccessfulSpins ; + static PerfCounter * _sync_PrivateA ; + static PerfCounter * _sync_PrivateB ; + static PerfCounter * _sync_MonInCirculation ; + static PerfCounter * _sync_MonScavenged ; + static PerfCounter * _sync_Inflations ; + static PerfCounter * _sync_Deflations ; + static PerfLongVariable * _sync_MonExtant ; + + public: + static int Knob_Verbose; + static int Knob_SpinLimit; }; + +#undef TEVENT +#define TEVENT(nom) {if (SyncVerbose) FEVENT(nom); } + +#define FEVENT(nom) { static volatile int ctr = 0 ; int v = ++ctr ; if ((v & (v-1)) == 0) { ::printf (#nom " : %d \n", v); ::fflush(stdout); }} + +#undef TEVENT +#define TEVENT(nom) {;} + diff --git a/hotspot/src/share/vm/runtime/objectMonitor.inline.hpp b/hotspot/src/share/vm/runtime/objectMonitor.inline.hpp index 3a4ee4e2aee..114b7c10c52 100644 --- a/hotspot/src/share/vm/runtime/objectMonitor.inline.hpp +++ b/hotspot/src/share/vm/runtime/objectMonitor.inline.hpp @@ -104,7 +104,3 @@ inline void ObjectMonitor::set_owner(void* owner) { _count = 0; } - -// here are the platform-dependent bodies: - -# include "incls/_objectMonitor_pd.inline.hpp.incl" diff --git a/hotspot/src/share/vm/runtime/park.cpp b/hotspot/src/share/vm/runtime/park.cpp new file mode 100644 index 00000000000..4fdb4fc541a --- /dev/null +++ b/hotspot/src/share/vm/runtime/park.cpp @@ -0,0 +1,237 @@ +/* + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + + +# include "incls/_precompiled.incl" +# include "incls/_park.cpp.incl" + + +// Lifecycle management for TSM ParkEvents. +// ParkEvents are type-stable (TSM). +// In our particular implementation they happen to be immortal. +// +// We manage concurrency on the FreeList with a CAS-based +// detach-modify-reattach idiom that avoids the ABA problems +// that would otherwise be present in a simple CAS-based +// push-pop implementation. (push-one and pop-all) +// +// Caveat: Allocate() and Release() may be called from threads +// other than the thread associated with the Event! +// If we need to call Allocate() when running as the thread in +// question then look for the PD calls to initialize native TLS. +// Native TLS (Win32/Linux/Solaris) can only be initialized or +// accessed by the associated thread. +// See also pd_initialize(). +// +// Note that we could defer associating a ParkEvent with a thread +// until the 1st time the thread calls park(). unpark() calls to +// an unprovisioned thread would be ignored. The first park() call +// for a thread would allocate and associate a ParkEvent and return +// immediately. + +volatile int ParkEvent::ListLock = 0 ; +ParkEvent * volatile ParkEvent::FreeList = NULL ; + +ParkEvent * ParkEvent::Allocate (Thread * t) { + // In rare cases -- JVM_RawMonitor* operations -- we can find t == null. + ParkEvent * ev ; + + // Start by trying to recycle an existing but unassociated + // ParkEvent from the global free list. + for (;;) { + ev = FreeList ; + if (ev == NULL) break ; + // 1: Detach - sequester or privatize the list + // Tantamount to ev = Swap (&FreeList, NULL) + if (Atomic::cmpxchg_ptr (NULL, &FreeList, ev) != ev) { + continue ; + } + + // We've detached the list. The list in-hand is now + // local to this thread. This thread can operate on the + // list without risk of interference from other threads. + // 2: Extract -- pop the 1st element from the list. + ParkEvent * List = ev->FreeNext ; + if (List == NULL) break ; + for (;;) { + // 3: Try to reattach the residual list + guarantee (List != NULL, "invariant") ; + ParkEvent * Arv = (ParkEvent *) Atomic::cmpxchg_ptr (List, &FreeList, NULL) ; + if (Arv == NULL) break ; + + // New nodes arrived. Try to detach the recent arrivals. + if (Atomic::cmpxchg_ptr (NULL, &FreeList, Arv) != Arv) { + continue ; + } + guarantee (Arv != NULL, "invariant") ; + // 4: Merge Arv into List + ParkEvent * Tail = List ; + while (Tail->FreeNext != NULL) Tail = Tail->FreeNext ; + Tail->FreeNext = Arv ; + } + break ; + } + + if (ev != NULL) { + guarantee (ev->AssociatedWith == NULL, "invariant") ; + } else { + // Do this the hard way -- materialize a new ParkEvent. + // In rare cases an allocating thread might detach a long list -- + // installing null into FreeList -- and then stall or be obstructed. + // A 2nd thread calling Allocate() would see FreeList == null. + // The list held privately by the 1st thread is unavailable to the 2nd thread. + // In that case the 2nd thread would have to materialize a new ParkEvent, + // even though free ParkEvents existed in the system. In this case we end up + // with more ParkEvents in circulation than we need, but the race is + // rare and the outcome is benign. Ideally, the # of extant ParkEvents + // is equal to the maximum # of threads that existed at any one time. + // Because of the race mentioned above, segments of the freelist + // can be transiently inaccessible. At worst we may end up with the + // # of ParkEvents in circulation slightly above the ideal. + // Note that if we didn't have the TSM/immortal constraint, then + // when reattaching, above, we could trim the list. + ev = new ParkEvent () ; + guarantee ((intptr_t(ev) & 0xFF) == 0, "invariant") ; + } + ev->reset() ; // courtesy to caller + ev->AssociatedWith = t ; // Associate ev with t + ev->FreeNext = NULL ; + return ev ; +} + +void ParkEvent::Release (ParkEvent * ev) { + if (ev == NULL) return ; + guarantee (ev->FreeNext == NULL , "invariant") ; + ev->AssociatedWith = NULL ; + for (;;) { + // Push ev onto FreeList + // The mechanism is "half" lock-free. + ParkEvent * List = FreeList ; + ev->FreeNext = List ; + if (Atomic::cmpxchg_ptr (ev, &FreeList, List) == List) break ; + } +} + +// Override operator new and delete so we can ensure that the +// least significant byte of ParkEvent addresses is 0. +// Beware that excessive address alignment is undesirable +// as it can result in D$ index usage imbalance as +// well as bank access imbalance on Niagara-like platforms, +// although Niagara's hash function should help. + +void * ParkEvent::operator new (size_t sz) { + return (void *) ((intptr_t (CHeapObj::operator new (sz + 256)) + 256) & -256) ; +} + +void ParkEvent::operator delete (void * a) { + // ParkEvents are type-stable and immortal ... + ShouldNotReachHere(); +} + + +// 6399321 As a temporary measure we copied & modified the ParkEvent:: +// allocate() and release() code for use by Parkers. The Parker:: forms +// will eventually be removed as we consolide and shift over to ParkEvents +// for both builtin synchronization and JSR166 operations. + +volatile int Parker::ListLock = 0 ; +Parker * volatile Parker::FreeList = NULL ; + +Parker * Parker::Allocate (JavaThread * t) { + guarantee (t != NULL, "invariant") ; + Parker * p ; + + // Start by trying to recycle an existing but unassociated + // Parker from the global free list. + for (;;) { + p = FreeList ; + if (p == NULL) break ; + // 1: Detach + // Tantamount to p = Swap (&FreeList, NULL) + if (Atomic::cmpxchg_ptr (NULL, &FreeList, p) != p) { + continue ; + } + + // We've detached the list. The list in-hand is now + // local to this thread. This thread can operate on the + // list without risk of interference from other threads. + // 2: Extract -- pop the 1st element from the list. + Parker * List = p->FreeNext ; + if (List == NULL) break ; + for (;;) { + // 3: Try to reattach the residual list + guarantee (List != NULL, "invariant") ; + Parker * Arv = (Parker *) Atomic::cmpxchg_ptr (List, &FreeList, NULL) ; + if (Arv == NULL) break ; + + // New nodes arrived. Try to detach the recent arrivals. + if (Atomic::cmpxchg_ptr (NULL, &FreeList, Arv) != Arv) { + continue ; + } + guarantee (Arv != NULL, "invariant") ; + // 4: Merge Arv into List + Parker * Tail = List ; + while (Tail->FreeNext != NULL) Tail = Tail->FreeNext ; + Tail->FreeNext = Arv ; + } + break ; + } + + if (p != NULL) { + guarantee (p->AssociatedWith == NULL, "invariant") ; + } else { + // Do this the hard way -- materialize a new Parker.. + // In rare cases an allocating thread might detach + // a long list -- installing null into FreeList --and + // then stall. Another thread calling Allocate() would see + // FreeList == null and then invoke the ctor. In this case we + // end up with more Parkers in circulation than we need, but + // the race is rare and the outcome is benign. + // Ideally, the # of extant Parkers is equal to the + // maximum # of threads that existed at any one time. + // Because of the race mentioned above, segments of the + // freelist can be transiently inaccessible. At worst + // we may end up with the # of Parkers in circulation + // slightly above the ideal. + p = new Parker() ; + } + p->AssociatedWith = t ; // Associate p with t + p->FreeNext = NULL ; + return p ; +} + + +void Parker::Release (Parker * p) { + if (p == NULL) return ; + guarantee (p->AssociatedWith != NULL, "invariant") ; + guarantee (p->FreeNext == NULL , "invariant") ; + p->AssociatedWith = NULL ; + for (;;) { + // Push p onto FreeList + Parker * List = FreeList ; + p->FreeNext = List ; + if (Atomic::cmpxchg_ptr (p, &FreeList, List) == List) break ; + } +} + diff --git a/hotspot/src/share/vm/runtime/park.hpp b/hotspot/src/share/vm/runtime/park.hpp new file mode 100644 index 00000000000..8979b4dc007 --- /dev/null +++ b/hotspot/src/share/vm/runtime/park.hpp @@ -0,0 +1,169 @@ +/* + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ +/* + * Per-thread blocking support for JSR166. See the Java-level + * Documentation for rationale. Basically, park acts like wait, unpark + * like notify. + * + * 6271289 -- + * To avoid errors where an os thread expires but the JavaThread still + * exists, Parkers are immortal (type-stable) and are recycled across + * new threads. This parallels the ParkEvent implementation. + * Because park-unpark allow spurious wakeups it is harmless if an + * unpark call unparks a new thread using the old Parker reference. + * + * In the future we'll want to think about eliminating Parker and using + * ParkEvent instead. There's considerable duplication between the two + * services. + * + */ + +class Parker : public os::PlatformParker { +private: + volatile int _counter ; + Parker * FreeNext ; + JavaThread * AssociatedWith ; // Current association + +public: + Parker() : PlatformParker() { + _counter = 0 ; + FreeNext = NULL ; + AssociatedWith = NULL ; + } +protected: + ~Parker() { ShouldNotReachHere(); } +public: + // For simplicity of interface with Java, all forms of park (indefinite, + // relative, and absolute) are multiplexed into one call. + void park(bool isAbsolute, jlong time); + void unpark(); + + // Lifecycle operators + static Parker * Allocate (JavaThread * t) ; + static void Release (Parker * e) ; +private: + static Parker * volatile FreeList ; + static volatile int ListLock ; + +}; + +///////////////////////////////////////////////////////////// +// +// ParkEvents are type-stable and immortal. +// +// Lifecycle: Once a ParkEvent is associated with a thread that ParkEvent remains +// associated with the thread for the thread's entire lifetime - the relationship is +// stable. A thread will be associated at most one ParkEvent. When the thread +// expires, the ParkEvent moves to the EventFreeList. New threads attempt to allocate from +// the EventFreeList before creating a new Event. Type-stability frees us from +// worrying about stale Event or Thread references in the objectMonitor subsystem. +// (A reference to ParkEvent is always valid, even though the event may no longer be associated +// with the desired or expected thread. A key aspect of this design is that the callers of +// park, unpark, etc must tolerate stale references and spurious wakeups). +// +// Only the "associated" thread can block (park) on the ParkEvent, although +// any other thread can unpark a reachable parkevent. Park() is allowed to +// return spuriously. In fact park-unpark a really just an optimization to +// avoid unbounded spinning and surrender the CPU to be a polite system citizen. +// A degenerate albeit "impolite" park-unpark implementation could simply return. +// See http://blogs.sun.com/dave for more details. +// +// Eventually I'd like to eliminate Events and ObjectWaiters, both of which serve as +// thread proxies, and simply make the THREAD structure type-stable and persistent. +// Currently, we unpark events associated with threads, but ideally we'd just +// unpark threads. +// +// The base-class, PlatformEvent, is platform-specific while the ParkEvent is +// platform-independent. PlatformEvent provides park(), unpark(), etc., and +// is abstract -- that is, a PlatformEvent should never be instantiated except +// as part of a ParkEvent. +// Equivalently we could have defined a platform-independent base-class that +// exported Allocate(), Release(), etc. The platform-specific class would extend +// that base-class, adding park(), unpark(), etc. +// +// A word of caution: The JVM uses 2 very similar constructs: +// 1. ParkEvent are used for Java-level "monitor" synchronization. +// 2. Parkers are used by JSR166-JUC park-unpark. +// +// We'll want to eventually merge these redundant facilities and use ParkEvent. + + +class ParkEvent : public os::PlatformEvent { + private: + ParkEvent * FreeNext ; + + // Current association + Thread * AssociatedWith ; + intptr_t RawThreadIdentity ; // LWPID etc + volatile int Incarnation ; + + // diagnostic : keep track of last thread to wake this thread. + // this is useful for construction of dependency graphs. + void * LastWaker ; + + public: + // MCS-CLH list linkage and Native Mutex/Monitor + ParkEvent * volatile ListNext ; + ParkEvent * volatile ListPrev ; + volatile intptr_t OnList ; + volatile int TState ; + volatile int Notified ; // for native monitor construct + volatile int IsWaiting ; // Enqueued on WaitSet + + + private: + static ParkEvent * volatile FreeList ; + static volatile int ListLock ; + + // It's prudent to mark the dtor as "private" + // ensuring that it's not visible outside the package. + // Unfortunately gcc warns about such usage, so + // we revert to the less desirable "protected" visibility. + // The other compilers accept private dtors. + + protected: // Ensure dtor is never invoked + ~ParkEvent() { guarantee (0, "invariant") ; } + + ParkEvent() : PlatformEvent() { + AssociatedWith = NULL ; + FreeNext = NULL ; + ListNext = NULL ; + ListPrev = NULL ; + OnList = 0 ; + TState = 0 ; + Notified = 0 ; + IsWaiting = 0 ; + } + + // We use placement-new to force ParkEvent instances to be + // aligned on 256-byte address boundaries. This ensures that the least + // significant byte of a ParkEvent address is always 0. + + void * operator new (size_t sz) ; + void operator delete (void * a) ; + + public: + static ParkEvent * Allocate (Thread * t) ; + static void Release (ParkEvent * e) ; +} ; diff --git a/hotspot/src/share/vm/runtime/synchronizer.cpp b/hotspot/src/share/vm/runtime/synchronizer.cpp index c390c076a64..642c9815662 100644 --- a/hotspot/src/share/vm/runtime/synchronizer.cpp +++ b/hotspot/src/share/vm/runtime/synchronizer.cpp @@ -32,15 +32,12 @@ #define ATTR #endif -// Native markword accessors for synchronization and hashCode(). -// // The "core" versions of monitor enter and exit reside in this file. // The interpreter and compilers contain specialized transliterated // variants of the enter-exit fast-path operations. See i486.ad fast_lock(), // for instance. If you make changes here, make sure to modify the // interpreter, and both C1 and C2 fast-path inline locking code emission. // -// TODO: merge the objectMonitor and synchronizer classes. // // ----------------------------------------------------------------------------- @@ -53,16 +50,6 @@ HS_DTRACE_PROBE_DECL5(hotspot, monitor__wait, jlong, uintptr_t, char*, int, long); HS_DTRACE_PROBE_DECL4(hotspot, monitor__waited, jlong, uintptr_t, char*, int); -HS_DTRACE_PROBE_DECL4(hotspot, monitor__notify, - jlong, uintptr_t, char*, int); -HS_DTRACE_PROBE_DECL4(hotspot, monitor__notifyAll, - jlong, uintptr_t, char*, int); -HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__enter, - jlong, uintptr_t, char*, int); -HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__entered, - jlong, uintptr_t, char*, int); -HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__exit, - jlong, uintptr_t, char*, int); #define DTRACE_MONITOR_PROBE_COMMON(klassOop, thread) \ char* bytes = NULL; \ @@ -99,61 +86,300 @@ HS_DTRACE_PROBE_DECL4(hotspot, monitor__contended__exit, #endif // ndef DTRACE_ENABLED -// ObjectWaiter serves as a "proxy" or surrogate thread. -// TODO-FIXME: Eliminate ObjectWaiter and use the thread-specific -// ParkEvent instead. Beware, however, that the JVMTI code -// knows about ObjectWaiters, so we'll have to reconcile that code. -// See next_waiter(), first_waiter(), etc. +// This exists only as a workaround of dtrace bug 6254741 +int dtrace_waited_probe(ObjectMonitor* monitor, Handle obj, Thread* thr) { + DTRACE_MONITOR_PROBE(waited, monitor, obj(), thr); + return 0; +} -class ObjectWaiter : public StackObj { - public: - enum TStates { TS_UNDEF, TS_READY, TS_RUN, TS_WAIT, TS_ENTER, TS_CXQ } ; - enum Sorted { PREPEND, APPEND, SORTED } ; - ObjectWaiter * volatile _next; - ObjectWaiter * volatile _prev; - Thread* _thread; - ParkEvent * _event; - volatile int _notified ; - volatile TStates TState ; - Sorted _Sorted ; // List placement disposition - bool _active ; // Contention monitoring is enabled - public: - ObjectWaiter(Thread* thread) { - _next = NULL; - _prev = NULL; - _notified = 0; - TState = TS_RUN ; - _thread = thread; - _event = thread->_ParkEvent ; - _active = false; - assert (_event != NULL, "invariant") ; +#define NINFLATIONLOCKS 256 +static volatile intptr_t InflationLocks [NINFLATIONLOCKS] ; + +ObjectMonitor * ObjectSynchronizer::gBlockList = NULL ; +ObjectMonitor * volatile ObjectSynchronizer::gFreeList = NULL ; +ObjectMonitor * volatile ObjectSynchronizer::gOmInUseList = NULL ; +int ObjectSynchronizer::gOmInUseCount = 0; +static volatile intptr_t ListLock = 0 ; // protects global monitor free-list cache +static volatile int MonitorFreeCount = 0 ; // # on gFreeList +static volatile int MonitorPopulation = 0 ; // # Extant -- in circulation +#define CHAINMARKER ((oop)-1) + +// ----------------------------------------------------------------------------- +// Fast Monitor Enter/Exit +// This the fast monitor enter. The interpreter and compiler use +// some assembly copies of this code. Make sure update those code +// if the following function is changed. The implementation is +// extremely sensitive to race condition. Be careful. + +void ObjectSynchronizer::fast_enter(Handle obj, BasicLock* lock, bool attempt_rebias, TRAPS) { + if (UseBiasedLocking) { + if (!SafepointSynchronize::is_at_safepoint()) { + BiasedLocking::Condition cond = BiasedLocking::revoke_and_rebias(obj, attempt_rebias, THREAD); + if (cond == BiasedLocking::BIAS_REVOKED_AND_REBIASED) { + return; + } + } else { + assert(!attempt_rebias, "can not rebias toward VM thread"); + BiasedLocking::revoke_at_safepoint(obj); + } + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + + slow_enter (obj, lock, THREAD) ; +} + +void ObjectSynchronizer::fast_exit(oop object, BasicLock* lock, TRAPS) { + assert(!object->mark()->has_bias_pattern(), "should not see bias pattern here"); + // if displaced header is null, the previous enter is recursive enter, no-op + markOop dhw = lock->displaced_header(); + markOop mark ; + if (dhw == NULL) { + // Recursive stack-lock. + // Diagnostics -- Could be: stack-locked, inflating, inflated. + mark = object->mark() ; + assert (!mark->is_neutral(), "invariant") ; + if (mark->has_locker() && mark != markOopDesc::INFLATING()) { + assert(THREAD->is_lock_owned((address)mark->locker()), "invariant") ; + } + if (mark->has_monitor()) { + ObjectMonitor * m = mark->monitor() ; + assert(((oop)(m->object()))->mark() == mark, "invariant") ; + assert(m->is_entered(THREAD), "invariant") ; + } + return ; } - void wait_reenter_begin(ObjectMonitor *mon) { - JavaThread *jt = (JavaThread *)this->_thread; - _active = JavaThreadBlockedOnMonitorEnterState::wait_reenter_begin(jt, mon); + mark = object->mark() ; + + // If the object is stack-locked by the current thread, try to + // swing the displaced header from the box back to the mark. + if (mark == (markOop) lock) { + assert (dhw->is_neutral(), "invariant") ; + if ((markOop) Atomic::cmpxchg_ptr (dhw, object->mark_addr(), mark) == mark) { + TEVENT (fast_exit: release stacklock) ; + return; + } } - void wait_reenter_end(ObjectMonitor *mon) { - JavaThread *jt = (JavaThread *)this->_thread; - JavaThreadBlockedOnMonitorEnterState::wait_reenter_end(jt, _active); + ObjectSynchronizer::inflate(THREAD, object)->exit (THREAD) ; +} + +// ----------------------------------------------------------------------------- +// Interpreter/Compiler Slow Case +// This routine is used to handle interpreter/compiler slow case +// We don't need to use fast path here, because it must have been +// failed in the interpreter/compiler code. +void ObjectSynchronizer::slow_enter(Handle obj, BasicLock* lock, TRAPS) { + markOop mark = obj->mark(); + assert(!mark->has_bias_pattern(), "should not see bias pattern here"); + + if (mark->is_neutral()) { + // Anticipate successful CAS -- the ST of the displaced mark must + // be visible <= the ST performed by the CAS. + lock->set_displaced_header(mark); + if (mark == (markOop) Atomic::cmpxchg_ptr(lock, obj()->mark_addr(), mark)) { + TEVENT (slow_enter: release stacklock) ; + return ; + } + // Fall through to inflate() ... + } else + if (mark->has_locker() && THREAD->is_lock_owned((address)mark->locker())) { + assert(lock != mark->locker(), "must not re-lock the same lock"); + assert(lock != (BasicLock*)obj->mark(), "don't relock with same BasicLock"); + lock->set_displaced_header(NULL); + return; } -}; -enum ManifestConstants { - ClearResponsibleAtSTW = 0, - MaximumRecheckInterval = 1000 -} ; +#if 0 + // The following optimization isn't particularly useful. + if (mark->has_monitor() && mark->monitor()->is_entered(THREAD)) { + lock->set_displaced_header (NULL) ; + return ; + } +#endif + + // The object header will never be displaced to this lock, + // so it does not matter what the value is, except that it + // must be non-zero to avoid looking like a re-entrant lock, + // and must not look locked either. + lock->set_displaced_header(markOopDesc::unused_mark()); + ObjectSynchronizer::inflate(THREAD, obj())->enter(THREAD); +} + +// This routine is used to handle interpreter/compiler slow case +// We don't need to use fast path here, because it must have +// failed in the interpreter/compiler code. Simply use the heavy +// weight monitor should be ok, unless someone find otherwise. +void ObjectSynchronizer::slow_exit(oop object, BasicLock* lock, TRAPS) { + fast_exit (object, lock, THREAD) ; +} + +// ----------------------------------------------------------------------------- +// Class Loader support to workaround deadlocks on the class loader lock objects +// Also used by GC +// complete_exit()/reenter() are used to wait on a nested lock +// i.e. to give up an outer lock completely and then re-enter +// Used when holding nested locks - lock acquisition order: lock1 then lock2 +// 1) complete_exit lock1 - saving recursion count +// 2) wait on lock2 +// 3) when notified on lock2, unlock lock2 +// 4) reenter lock1 with original recursion count +// 5) lock lock2 +// NOTE: must use heavy weight monitor to handle complete_exit/reenter() +intptr_t ObjectSynchronizer::complete_exit(Handle obj, TRAPS) { + TEVENT (complete_exit) ; + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + + ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); + + return monitor->complete_exit(THREAD); +} + +// NOTE: must use heavy weight monitor to handle complete_exit/reenter() +void ObjectSynchronizer::reenter(Handle obj, intptr_t recursion, TRAPS) { + TEVENT (reenter) ; + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + + ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); + + monitor->reenter(recursion, THREAD); +} +// ----------------------------------------------------------------------------- +// JNI locks on java objects +// NOTE: must use heavy weight monitor to handle jni monitor enter +void ObjectSynchronizer::jni_enter(Handle obj, TRAPS) { // possible entry from jni enter + // the current locking is from JNI instead of Java code + TEVENT (jni_enter) ; + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + THREAD->set_current_pending_monitor_is_from_java(false); + ObjectSynchronizer::inflate(THREAD, obj())->enter(THREAD); + THREAD->set_current_pending_monitor_is_from_java(true); +} + +// NOTE: must use heavy weight monitor to handle jni monitor enter +bool ObjectSynchronizer::jni_try_enter(Handle obj, Thread* THREAD) { + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + + ObjectMonitor* monitor = ObjectSynchronizer::inflate_helper(obj()); + return monitor->try_enter(THREAD); +} -#undef TEVENT -#define TEVENT(nom) {if (SyncVerbose) FEVENT(nom); } +// NOTE: must use heavy weight monitor to handle jni monitor exit +void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) { + TEVENT (jni_exit) ; + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + } + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); -#define FEVENT(nom) { static volatile int ctr = 0 ; int v = ++ctr ; if ((v & (v-1)) == 0) { ::printf (#nom " : %d \n", v); ::fflush(stdout); }} + ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj); + // If this thread has locked the object, exit the monitor. Note: can't use + // monitor->check(CHECK); must exit even if an exception is pending. + if (monitor->check(THREAD)) { + monitor->exit(THREAD); + } +} -#undef TEVENT -#define TEVENT(nom) {;} +// ----------------------------------------------------------------------------- +// Internal VM locks on java objects +// standard constructor, allows locking failures +ObjectLocker::ObjectLocker(Handle obj, Thread* thread, bool doLock) { + _dolock = doLock; + _thread = thread; + debug_only(if (StrictSafepointChecks) _thread->check_for_valid_safepoint_state(false);) + _obj = obj; + if (_dolock) { + TEVENT (ObjectLocker) ; + + ObjectSynchronizer::fast_enter(_obj, &_lock, false, _thread); + } +} + +ObjectLocker::~ObjectLocker() { + if (_dolock) { + ObjectSynchronizer::fast_exit(_obj(), &_lock, _thread); + } +} + + +// ----------------------------------------------------------------------------- +// Wait/Notify/NotifyAll +// NOTE: must use heavy weight monitor to handle wait() +void ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) { + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + if (millis < 0) { + TEVENT (wait - throw IAX) ; + THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); + } + ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); + DTRACE_MONITOR_WAIT_PROBE(monitor, obj(), THREAD, millis); + monitor->wait(millis, true, THREAD); + + /* This dummy call is in place to get around dtrace bug 6254741. Once + that's fixed we can uncomment the following line and remove the call */ + // DTRACE_MONITOR_PROBE(waited, monitor, obj(), THREAD); + dtrace_waited_probe(monitor, obj, THREAD); +} + +void ObjectSynchronizer::waitUninterruptibly (Handle obj, jlong millis, TRAPS) { + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + if (millis < 0) { + TEVENT (wait - throw IAX) ; + THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); + } + ObjectSynchronizer::inflate(THREAD, obj()) -> wait(millis, false, THREAD) ; +} + +void ObjectSynchronizer::notify(Handle obj, TRAPS) { + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + + markOop mark = obj->mark(); + if (mark->has_locker() && THREAD->is_lock_owned((address)mark->locker())) { + return; + } + ObjectSynchronizer::inflate(THREAD, obj())->notify(THREAD); +} + +// NOTE: see comment of notify() +void ObjectSynchronizer::notifyall(Handle obj, TRAPS) { + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(obj, false, THREAD); + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + + markOop mark = obj->mark(); + if (mark->has_locker() && THREAD->is_lock_owned((address)mark->locker())) { + return; + } + ObjectSynchronizer::inflate(THREAD, obj())->notifyAll(THREAD); +} + +// ----------------------------------------------------------------------------- +// Hash Code handling +// // Performance concern: // OrderAccess::storestore() calls release() which STs 0 into the global volatile // OrderAccess::Dummy variable. This store is unnecessary for correctness. @@ -188,44 +414,73 @@ static SharedGlobals GVars ; static int MonitorScavengeThreshold = 1000000 ; static volatile int ForceMonitorScavenge = 0 ; // Scavenge required and pending +static markOop ReadStableMark (oop obj) { + markOop mark = obj->mark() ; + if (!mark->is_being_inflated()) { + return mark ; // normal fast-path return + } -// Tunables ... -// The knob* variables are effectively final. Once set they should -// never be modified hence. Consider using __read_mostly with GCC. + int its = 0 ; + for (;;) { + markOop mark = obj->mark() ; + if (!mark->is_being_inflated()) { + return mark ; // normal fast-path return + } -static int Knob_LogSpins = 0 ; // enable jvmstat tally for spins -static int Knob_HandOff = 0 ; -static int Knob_Verbose = 0 ; -static int Knob_ReportSettings = 0 ; - -static int Knob_SpinLimit = 5000 ; // derived by an external tool - -static int Knob_SpinBase = 0 ; // Floor AKA SpinMin -static int Knob_SpinBackOff = 0 ; // spin-loop backoff -static int Knob_CASPenalty = -1 ; // Penalty for failed CAS -static int Knob_OXPenalty = -1 ; // Penalty for observed _owner change -static int Knob_SpinSetSucc = 1 ; // spinners set the _succ field -static int Knob_SpinEarly = 1 ; -static int Knob_SuccEnabled = 1 ; // futile wake throttling -static int Knob_SuccRestrict = 0 ; // Limit successors + spinners to at-most-one -static int Knob_MaxSpinners = -1 ; // Should be a function of # CPUs -static int Knob_Bonus = 100 ; // spin success bonus -static int Knob_BonusB = 100 ; // spin success bonus -static int Knob_Penalty = 200 ; // spin failure penalty -static int Knob_Poverty = 1000 ; -static int Knob_SpinAfterFutile = 1 ; // Spin after returning from park() -static int Knob_FixedSpin = 0 ; -static int Knob_OState = 3 ; // Spinner checks thread state of _owner -static int Knob_UsePause = 1 ; -static int Knob_ExitPolicy = 0 ; -static int Knob_PreSpin = 10 ; // 20-100 likely better -static int Knob_ResetEvent = 0 ; -static int BackOffMask = 0 ; - -static int Knob_FastHSSEC = 0 ; -static int Knob_MoveNotifyee = 2 ; // notify() - disposition of notifyee -static int Knob_QMode = 0 ; // EntryList-cxq policy - queue discipline -static volatile int InitDone = 0 ; + // The object is being inflated by some other thread. + // The caller of ReadStableMark() must wait for inflation to complete. + // Avoid live-lock + // TODO: consider calling SafepointSynchronize::do_call_back() while + // spinning to see if there's a safepoint pending. If so, immediately + // yielding or blocking would be appropriate. Avoid spinning while + // there is a safepoint pending. + // TODO: add inflation contention performance counters. + // TODO: restrict the aggregate number of spinners. + ++its ; + if (its > 10000 || !os::is_MP()) { + if (its & 1) { + os::NakedYield() ; + TEVENT (Inflate: INFLATING - yield) ; + } else { + // Note that the following code attenuates the livelock problem but is not + // a complete remedy. A more complete solution would require that the inflating + // thread hold the associated inflation lock. The following code simply restricts + // the number of spinners to at most one. We'll have N-2 threads blocked + // on the inflationlock, 1 thread holding the inflation lock and using + // a yield/park strategy, and 1 thread in the midst of inflation. + // A more refined approach would be to change the encoding of INFLATING + // to allow encapsulation of a native thread pointer. Threads waiting for + // inflation to complete would use CAS to push themselves onto a singly linked + // list rooted at the markword. Once enqueued, they'd loop, checking a per-thread flag + // and calling park(). When inflation was complete the thread that accomplished inflation + // would detach the list and set the markword to inflated with a single CAS and + // then for each thread on the list, set the flag and unpark() the thread. + // This is conceptually similar to muxAcquire-muxRelease, except that muxRelease + // wakes at most one thread whereas we need to wake the entire list. + int ix = (intptr_t(obj) >> 5) & (NINFLATIONLOCKS-1) ; + int YieldThenBlock = 0 ; + assert (ix >= 0 && ix < NINFLATIONLOCKS, "invariant") ; + assert ((NINFLATIONLOCKS & (NINFLATIONLOCKS-1)) == 0, "invariant") ; + Thread::muxAcquire (InflationLocks + ix, "InflationLock") ; + while (obj->mark() == markOopDesc::INFLATING()) { + // Beware: NakedYield() is advisory and has almost no effect on some platforms + // so we periodically call Self->_ParkEvent->park(1). + // We use a mixed spin/yield/block mechanism. + if ((YieldThenBlock++) >= 16) { + Thread::current()->_ParkEvent->park(1) ; + } else { + os::NakedYield() ; + } + } + Thread::muxRelease (InflationLocks + ix ) ; + TEVENT (Inflate: INFLATING - yield/park) ; + } + } else { + SpinPause() ; // SMP-polite spinning + } + } +} // hashCode() generation : // @@ -290,416 +545,272 @@ static inline intptr_t get_next_hash(Thread * Self, oop obj) { TEVENT (hashCode: GENERATE) ; return value; } - -void BasicLock::print_on(outputStream* st) const { - st->print("monitor"); -} - -void BasicLock::move_to(oop obj, BasicLock* dest) { - // Check to see if we need to inflate the lock. This is only needed - // if an object is locked using "this" lightweight monitor. In that - // case, the displaced_header() is unlocked, because the - // displaced_header() contains the header for the originally unlocked - // object. However the object could have already been inflated. But it - // does not matter, the inflation will just a no-op. For other cases, - // the displaced header will be either 0x0 or 0x3, which are location - // independent, therefore the BasicLock is free to move. - // - // During OSR we may need to relocate a BasicLock (which contains a - // displaced word) from a location in an interpreter frame to a - // new location in a compiled frame. "this" refers to the source - // basiclock in the interpreter frame. "dest" refers to the destination - // basiclock in the new compiled frame. We *always* inflate in move_to(). - // The always-Inflate policy works properly, but in 1.5.0 it can sometimes - // cause performance problems in code that makes heavy use of a small # of - // uncontended locks. (We'd inflate during OSR, and then sync performance - // would subsequently plummet because the thread would be forced thru the slow-path). - // This problem has been made largely moot on IA32 by inlining the inflated fast-path - // operations in Fast_Lock and Fast_Unlock in i486.ad. - // - // Note that there is a way to safely swing the object's markword from - // one stack location to another. This avoids inflation. Obviously, - // we need to ensure that both locations refer to the current thread's stack. - // There are some subtle concurrency issues, however, and since the benefit is - // is small (given the support for inflated fast-path locking in the fast_lock, etc) - // we'll leave that optimization for another time. - - if (displaced_header()->is_neutral()) { - ObjectSynchronizer::inflate_helper(obj); - // WARNING: We can not put check here, because the inflation - // will not update the displaced header. Once BasicLock is inflated, - // no one should ever look at its content. - } else { - // Typically the displaced header will be 0 (recursive stack lock) or - // unused_mark. Naively we'd like to assert that the displaced mark - // value is either 0, neutral, or 3. But with the advent of the - // store-before-CAS avoidance in fast_lock/compiler_lock_object - // we can find any flavor mark in the displaced mark. - } -// [RGV] The next line appears to do nothing! - intptr_t dh = (intptr_t) displaced_header(); - dest->set_displaced_header(displaced_header()); -} - -// ----------------------------------------------------------------------------- - -// standard constructor, allows locking failures -ObjectLocker::ObjectLocker(Handle obj, Thread* thread, bool doLock) { - _dolock = doLock; - _thread = thread; - debug_only(if (StrictSafepointChecks) _thread->check_for_valid_safepoint_state(false);) - _obj = obj; - - if (_dolock) { - TEVENT (ObjectLocker) ; - - ObjectSynchronizer::fast_enter(_obj, &_lock, false, _thread); - } -} - -ObjectLocker::~ObjectLocker() { - if (_dolock) { - ObjectSynchronizer::fast_exit(_obj(), &_lock, _thread); - } -} - -// ----------------------------------------------------------------------------- - - -PerfCounter * ObjectSynchronizer::_sync_Inflations = NULL ; -PerfCounter * ObjectSynchronizer::_sync_Deflations = NULL ; -PerfCounter * ObjectSynchronizer::_sync_ContendedLockAttempts = NULL ; -PerfCounter * ObjectSynchronizer::_sync_FutileWakeups = NULL ; -PerfCounter * ObjectSynchronizer::_sync_Parks = NULL ; -PerfCounter * ObjectSynchronizer::_sync_EmptyNotifications = NULL ; -PerfCounter * ObjectSynchronizer::_sync_Notifications = NULL ; -PerfCounter * ObjectSynchronizer::_sync_PrivateA = NULL ; -PerfCounter * ObjectSynchronizer::_sync_PrivateB = NULL ; -PerfCounter * ObjectSynchronizer::_sync_SlowExit = NULL ; -PerfCounter * ObjectSynchronizer::_sync_SlowEnter = NULL ; -PerfCounter * ObjectSynchronizer::_sync_SlowNotify = NULL ; -PerfCounter * ObjectSynchronizer::_sync_SlowNotifyAll = NULL ; -PerfCounter * ObjectSynchronizer::_sync_FailedSpins = NULL ; -PerfCounter * ObjectSynchronizer::_sync_SuccessfulSpins = NULL ; -PerfCounter * ObjectSynchronizer::_sync_MonInCirculation = NULL ; -PerfCounter * ObjectSynchronizer::_sync_MonScavenged = NULL ; -PerfLongVariable * ObjectSynchronizer::_sync_MonExtant = NULL ; - -// One-shot global initialization for the sync subsystem. -// We could also defer initialization and initialize on-demand -// the first time we call inflate(). Initialization would -// be protected - like so many things - by the MonitorCache_lock. - -void ObjectSynchronizer::Initialize () { - static int InitializationCompleted = 0 ; - assert (InitializationCompleted == 0, "invariant") ; - InitializationCompleted = 1 ; - if (UsePerfData) { - EXCEPTION_MARK ; - #define NEWPERFCOUNTER(n) {n = PerfDataManager::create_counter(SUN_RT, #n, PerfData::U_Events,CHECK); } - #define NEWPERFVARIABLE(n) {n = PerfDataManager::create_variable(SUN_RT, #n, PerfData::U_Events,CHECK); } - NEWPERFCOUNTER(_sync_Inflations) ; - NEWPERFCOUNTER(_sync_Deflations) ; - NEWPERFCOUNTER(_sync_ContendedLockAttempts) ; - NEWPERFCOUNTER(_sync_FutileWakeups) ; - NEWPERFCOUNTER(_sync_Parks) ; - NEWPERFCOUNTER(_sync_EmptyNotifications) ; - NEWPERFCOUNTER(_sync_Notifications) ; - NEWPERFCOUNTER(_sync_SlowEnter) ; - NEWPERFCOUNTER(_sync_SlowExit) ; - NEWPERFCOUNTER(_sync_SlowNotify) ; - NEWPERFCOUNTER(_sync_SlowNotifyAll) ; - NEWPERFCOUNTER(_sync_FailedSpins) ; - NEWPERFCOUNTER(_sync_SuccessfulSpins) ; - NEWPERFCOUNTER(_sync_PrivateA) ; - NEWPERFCOUNTER(_sync_PrivateB) ; - NEWPERFCOUNTER(_sync_MonInCirculation) ; - NEWPERFCOUNTER(_sync_MonScavenged) ; - NEWPERFVARIABLE(_sync_MonExtant) ; - #undef NEWPERFCOUNTER - } -} - -// Compile-time asserts -// When possible, it's better to catch errors deterministically at -// compile-time than at runtime. The down-side to using compile-time -// asserts is that error message -- often something about negative array -// indices -- is opaque. - -#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @" INTPTR_FORMAT "\n", (intptr_t)tag); } - -void ObjectMonitor::ctAsserts() { - CTASSERT(offset_of (ObjectMonitor, _header) == 0); -} - -static int Adjust (volatile int * adr, int dx) { - int v ; - for (v = *adr ; Atomic::cmpxchg (v + dx, adr, v) != v; v = *adr) ; - return v ; -} - -// Ad-hoc mutual exclusion primitives: SpinLock and Mux // -// We employ SpinLocks _only for low-contention, fixed-length -// short-duration critical sections where we're concerned -// about native mutex_t or HotSpot Mutex:: latency. -// The mux construct provides a spin-then-block mutual exclusion -// mechanism. -// -// Testing has shown that contention on the ListLock guarding gFreeList -// is common. If we implement ListLock as a simple SpinLock it's common -// for the JVM to devolve to yielding with little progress. This is true -// despite the fact that the critical sections protected by ListLock are -// extremely short. -// -// TODO-FIXME: ListLock should be of type SpinLock. -// We should make this a 1st-class type, integrated into the lock -// hierarchy as leaf-locks. Critically, the SpinLock structure -// should have sufficient padding to avoid false-sharing and excessive -// cache-coherency traffic. - - -typedef volatile int SpinLockT ; - -void Thread::SpinAcquire (volatile int * adr, const char * LockName) { - if (Atomic::cmpxchg (1, adr, 0) == 0) { - return ; // normal fast-path return +intptr_t ObjectSynchronizer::FastHashCode (Thread * Self, oop obj) { + if (UseBiasedLocking) { + // NOTE: many places throughout the JVM do not expect a safepoint + // to be taken here, in particular most operations on perm gen + // objects. However, we only ever bias Java instances and all of + // the call sites of identity_hash that might revoke biases have + // been checked to make sure they can handle a safepoint. The + // added check of the bias pattern is to avoid useless calls to + // thread-local storage. + if (obj->mark()->has_bias_pattern()) { + // Box and unbox the raw reference just in case we cause a STW safepoint. + Handle hobj (Self, obj) ; + // Relaxing assertion for bug 6320749. + assert (Universe::verify_in_progress() || + !SafepointSynchronize::is_at_safepoint(), + "biases should not be seen by VM thread here"); + BiasedLocking::revoke_and_rebias(hobj, false, JavaThread::current()); + obj = hobj() ; + assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } } - // Slow-path : We've encountered contention -- Spin/Yield/Block strategy. - TEVENT (SpinAcquire - ctx) ; - int ctr = 0 ; - int Yields = 0 ; - for (;;) { - while (*adr != 0) { - ++ctr ; - if ((ctr & 0xFFF) == 0 || !os::is_MP()) { - if (Yields > 5) { - // Consider using a simple NakedSleep() instead. - // Then SpinAcquire could be called by non-JVM threads - Thread::current()->_ParkEvent->park(1) ; - } else { - os::NakedYield() ; - ++Yields ; - } - } else { - SpinPause() ; - } - } - if (Atomic::cmpxchg (1, adr, 0) == 0) return ; + // hashCode() is a heap mutator ... + // Relaxing assertion for bug 6320749. + assert (Universe::verify_in_progress() || + !SafepointSynchronize::is_at_safepoint(), "invariant") ; + assert (Universe::verify_in_progress() || + Self->is_Java_thread() , "invariant") ; + assert (Universe::verify_in_progress() || + ((JavaThread *)Self)->thread_state() != _thread_blocked, "invariant") ; + + ObjectMonitor* monitor = NULL; + markOop temp, test; + intptr_t hash; + markOop mark = ReadStableMark (obj); + + // object should remain ineligible for biased locking + assert (!mark->has_bias_pattern(), "invariant") ; + + if (mark->is_neutral()) { + hash = mark->hash(); // this is a normal header + if (hash) { // if it has hash, just return it + return hash; + } + hash = get_next_hash(Self, obj); // allocate a new hash code + temp = mark->copy_set_hash(hash); // merge the hash code into header + // use (machine word version) atomic operation to install the hash + test = (markOop) Atomic::cmpxchg_ptr(temp, obj->mark_addr(), mark); + if (test == mark) { + return hash; + } + // If atomic operation failed, we must inflate the header + // into heavy weight monitor. We could add more code here + // for fast path, but it does not worth the complexity. + } else if (mark->has_monitor()) { + monitor = mark->monitor(); + temp = monitor->header(); + assert (temp->is_neutral(), "invariant") ; + hash = temp->hash(); + if (hash) { + return hash; + } + // Skip to the following code to reduce code size + } else if (Self->is_lock_owned((address)mark->locker())) { + temp = mark->displaced_mark_helper(); // this is a lightweight monitor owned + assert (temp->is_neutral(), "invariant") ; + hash = temp->hash(); // by current thread, check if the displaced + if (hash) { // header contains hash code + return hash; + } + // WARNING: + // The displaced header is strictly immutable. + // It can NOT be changed in ANY cases. So we have + // to inflate the header into heavyweight monitor + // even the current thread owns the lock. The reason + // is the BasicLock (stack slot) will be asynchronously + // read by other threads during the inflate() function. + // Any change to stack may not propagate to other threads + // correctly. } + + // Inflate the monitor to set hash code + monitor = ObjectSynchronizer::inflate(Self, obj); + // Load displaced header and check it has hash code + mark = monitor->header(); + assert (mark->is_neutral(), "invariant") ; + hash = mark->hash(); + if (hash == 0) { + hash = get_next_hash(Self, obj); + temp = mark->copy_set_hash(hash); // merge hash code into header + assert (temp->is_neutral(), "invariant") ; + test = (markOop) Atomic::cmpxchg_ptr(temp, monitor, mark); + if (test != mark) { + // The only update to the header in the monitor (outside GC) + // is install the hash code. If someone add new usage of + // displaced header, please update this code + hash = test->hash(); + assert (test->is_neutral(), "invariant") ; + assert (hash != 0, "Trivial unexpected object/monitor header usage."); + } + } + // We finally get the hash + return hash; } -void Thread::SpinRelease (volatile int * adr) { - assert (*adr != 0, "invariant") ; - OrderAccess::fence() ; // guarantee at least release consistency. - // Roach-motel semantics. - // It's safe if subsequent LDs and STs float "up" into the critical section, - // but prior LDs and STs within the critical section can't be allowed - // to reorder or float past the ST that releases the lock. - *adr = 0 ; +// Deprecated -- use FastHashCode() instead. + +intptr_t ObjectSynchronizer::identity_hash_value_for(Handle obj) { + return FastHashCode (Thread::current(), obj()) ; } -// muxAcquire and muxRelease: -// -// * muxAcquire and muxRelease support a single-word lock-word construct. -// The LSB of the word is set IFF the lock is held. -// The remainder of the word points to the head of a singly-linked list -// of threads blocked on the lock. -// -// * The current implementation of muxAcquire-muxRelease uses its own -// dedicated Thread._MuxEvent instance. If we're interested in -// minimizing the peak number of extant ParkEvent instances then -// we could eliminate _MuxEvent and "borrow" _ParkEvent as long -// as certain invariants were satisfied. Specifically, care would need -// to be taken with regards to consuming unpark() "permits". -// A safe rule of thumb is that a thread would never call muxAcquire() -// if it's enqueued (cxq, EntryList, WaitList, etc) and will subsequently -// park(). Otherwise the _ParkEvent park() operation in muxAcquire() could -// consume an unpark() permit intended for monitorenter, for instance. -// One way around this would be to widen the restricted-range semaphore -// implemented in park(). Another alternative would be to provide -// multiple instances of the PlatformEvent() for each thread. One -// instance would be dedicated to muxAcquire-muxRelease, for instance. -// -// * Usage: -// -- Only as leaf locks -// -- for short-term locking only as muxAcquire does not perform -// thread state transitions. -// -// Alternatives: -// * We could implement muxAcquire and muxRelease with MCS or CLH locks -// but with parking or spin-then-park instead of pure spinning. -// * Use Taura-Oyama-Yonenzawa locks. -// * It's possible to construct a 1-0 lock if we encode the lockword as -// (List,LockByte). Acquire will CAS the full lockword while Release -// will STB 0 into the LockByte. The 1-0 scheme admits stranding, so -// acquiring threads use timers (ParkTimed) to detect and recover from -// the stranding window. Thread/Node structures must be aligned on 256-byte -// boundaries by using placement-new. -// * Augment MCS with advisory back-link fields maintained with CAS(). -// Pictorially: LockWord -> T1 <-> T2 <-> T3 <-> ... <-> Tn <-> Owner. -// The validity of the backlinks must be ratified before we trust the value. -// If the backlinks are invalid the exiting thread must back-track through the -// the forward links, which are always trustworthy. -// * Add a successor indication. The LockWord is currently encoded as -// (List, LOCKBIT:1). We could also add a SUCCBIT or an explicit _succ variable -// to provide the usual futile-wakeup optimization. -// See RTStt for details. -// * Consider schedctl.sc_nopreempt to cover the critical section. -// - -typedef volatile intptr_t MutexT ; // Mux Lock-word -enum MuxBits { LOCKBIT = 1 } ; - -void Thread::muxAcquire (volatile intptr_t * Lock, const char * LockName) { - intptr_t w = Atomic::cmpxchg_ptr (LOCKBIT, Lock, 0) ; - if (w == 0) return ; - if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { - return ; +bool ObjectSynchronizer::current_thread_holds_lock(JavaThread* thread, + Handle h_obj) { + if (UseBiasedLocking) { + BiasedLocking::revoke_and_rebias(h_obj, false, thread); + assert(!h_obj->mark()->has_bias_pattern(), "biases should be revoked by now"); } - TEVENT (muxAcquire - Contention) ; - ParkEvent * const Self = Thread::current()->_MuxEvent ; - assert ((intptr_t(Self) & LOCKBIT) == 0, "invariant") ; - for (;;) { - int its = (os::is_MP() ? 100 : 0) + 1 ; + assert(thread == JavaThread::current(), "Can only be called on current thread"); + oop obj = h_obj(); - // Optional spin phase: spin-then-park strategy - while (--its >= 0) { - w = *Lock ; - if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { - return ; - } - } + markOop mark = ReadStableMark (obj) ; - Self->reset() ; - Self->OnList = intptr_t(Lock) ; - // The following fence() isn't _strictly necessary as the subsequent - // CAS() both serializes execution and ratifies the fetched *Lock value. - OrderAccess::fence(); - for (;;) { - w = *Lock ; - if ((w & LOCKBIT) == 0) { - if (Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { - Self->OnList = 0 ; // hygiene - allows stronger asserts - return ; - } - continue ; // Interference -- *Lock changed -- Just retry - } - assert (w & LOCKBIT, "invariant") ; - Self->ListNext = (ParkEvent *) (w & ~LOCKBIT ); - if (Atomic::cmpxchg_ptr (intptr_t(Self)|LOCKBIT, Lock, w) == w) break ; - } - - while (Self->OnList != 0) { - Self->park() ; - } + // Uncontended case, header points to stack + if (mark->has_locker()) { + return thread->is_lock_owned((address)mark->locker()); } + // Contended case, header points to ObjectMonitor (tagged pointer) + if (mark->has_monitor()) { + ObjectMonitor* monitor = mark->monitor(); + return monitor->is_entered(thread) != 0 ; + } + // Unlocked case, header in place + assert(mark->is_neutral(), "sanity check"); + return false; } -void Thread::muxAcquireW (volatile intptr_t * Lock, ParkEvent * ev) { - intptr_t w = Atomic::cmpxchg_ptr (LOCKBIT, Lock, 0) ; - if (w == 0) return ; - if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { - return ; +// Be aware of this method could revoke bias of the lock object. +// This method querys the ownership of the lock handle specified by 'h_obj'. +// If the current thread owns the lock, it returns owner_self. If no +// thread owns the lock, it returns owner_none. Otherwise, it will return +// ower_other. +ObjectSynchronizer::LockOwnership ObjectSynchronizer::query_lock_ownership +(JavaThread *self, Handle h_obj) { + // The caller must beware this method can revoke bias, and + // revocation can result in a safepoint. + assert (!SafepointSynchronize::is_at_safepoint(), "invariant") ; + assert (self->thread_state() != _thread_blocked , "invariant") ; + + // Possible mark states: neutral, biased, stack-locked, inflated + + if (UseBiasedLocking && h_obj()->mark()->has_bias_pattern()) { + // CASE: biased + BiasedLocking::revoke_and_rebias(h_obj, false, self); + assert(!h_obj->mark()->has_bias_pattern(), + "biases should be revoked by now"); } - TEVENT (muxAcquire - Contention) ; - ParkEvent * ReleaseAfter = NULL ; - if (ev == NULL) { - ev = ReleaseAfter = ParkEvent::Allocate (NULL) ; - } - assert ((intptr_t(ev) & LOCKBIT) == 0, "invariant") ; - for (;;) { - guarantee (ev->OnList == 0, "invariant") ; - int its = (os::is_MP() ? 100 : 0) + 1 ; + assert(self == JavaThread::current(), "Can only be called on current thread"); + oop obj = h_obj(); + markOop mark = ReadStableMark (obj) ; - // Optional spin phase: spin-then-park strategy - while (--its >= 0) { - w = *Lock ; - if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { - if (ReleaseAfter != NULL) { - ParkEvent::Release (ReleaseAfter) ; - } - return ; + // CASE: stack-locked. Mark points to a BasicLock on the owner's stack. + if (mark->has_locker()) { + return self->is_lock_owned((address)mark->locker()) ? + owner_self : owner_other; + } + + // CASE: inflated. Mark (tagged pointer) points to an objectMonitor. + // The Object:ObjectMonitor relationship is stable as long as we're + // not at a safepoint. + if (mark->has_monitor()) { + void * owner = mark->monitor()->_owner ; + if (owner == NULL) return owner_none ; + return (owner == self || + self->is_lock_owned((address)owner)) ? owner_self : owner_other; + } + + // CASE: neutral + assert(mark->is_neutral(), "sanity check"); + return owner_none ; // it's unlocked +} + +// FIXME: jvmti should call this +JavaThread* ObjectSynchronizer::get_lock_owner(Handle h_obj, bool doLock) { + if (UseBiasedLocking) { + if (SafepointSynchronize::is_at_safepoint()) { + BiasedLocking::revoke_at_safepoint(h_obj); + } else { + BiasedLocking::revoke_and_rebias(h_obj, false, JavaThread::current()); + } + assert(!h_obj->mark()->has_bias_pattern(), "biases should be revoked by now"); + } + + oop obj = h_obj(); + address owner = NULL; + + markOop mark = ReadStableMark (obj) ; + + // Uncontended case, header points to stack + if (mark->has_locker()) { + owner = (address) mark->locker(); + } + + // Contended case, header points to ObjectMonitor (tagged pointer) + if (mark->has_monitor()) { + ObjectMonitor* monitor = mark->monitor(); + assert(monitor != NULL, "monitor should be non-null"); + owner = (address) monitor->owner(); + } + + if (owner != NULL) { + return Threads::owning_thread_from_monitor_owner(owner, doLock); + } + + // Unlocked case, header in place + // Cannot have assertion since this object may have been + // locked by another thread when reaching here. + // assert(mark->is_neutral(), "sanity check"); + + return NULL; +} +// Visitors ... + +void ObjectSynchronizer::monitors_iterate(MonitorClosure* closure) { + ObjectMonitor* block = gBlockList; + ObjectMonitor* mid; + while (block) { + assert(block->object() == CHAINMARKER, "must be a block header"); + for (int i = _BLOCKSIZE - 1; i > 0; i--) { + mid = block + i; + oop object = (oop) mid->object(); + if (object != NULL) { + closure->do_monitor(mid); } } + block = (ObjectMonitor*) block->FreeNext; + } +} - ev->reset() ; - ev->OnList = intptr_t(Lock) ; - // The following fence() isn't _strictly necessary as the subsequent - // CAS() both serializes execution and ratifies the fetched *Lock value. - OrderAccess::fence(); - for (;;) { - w = *Lock ; - if ((w & LOCKBIT) == 0) { - if (Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { - ev->OnList = 0 ; - // We call ::Release while holding the outer lock, thus - // artificially lengthening the critical section. - // Consider deferring the ::Release() until the subsequent unlock(), - // after we've dropped the outer lock. - if (ReleaseAfter != NULL) { - ParkEvent::Release (ReleaseAfter) ; - } - return ; - } - continue ; // Interference -- *Lock changed -- Just retry +// Get the next block in the block list. +static inline ObjectMonitor* next(ObjectMonitor* block) { + assert(block->object() == CHAINMARKER, "must be a block header"); + block = block->FreeNext ; + assert(block == NULL || block->object() == CHAINMARKER, "must be a block header"); + return block; +} + + +void ObjectSynchronizer::oops_do(OopClosure* f) { + assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); + for (ObjectMonitor* block = gBlockList; block != NULL; block = next(block)) { + assert(block->object() == CHAINMARKER, "must be a block header"); + for (int i = 1; i < _BLOCKSIZE; i++) { + ObjectMonitor* mid = &block[i]; + if (mid->object() != NULL) { + f->do_oop((oop*)mid->object_addr()); } - assert (w & LOCKBIT, "invariant") ; - ev->ListNext = (ParkEvent *) (w & ~LOCKBIT ); - if (Atomic::cmpxchg_ptr (intptr_t(ev)|LOCKBIT, Lock, w) == w) break ; - } - - while (ev->OnList != 0) { - ev->park() ; } } } -// Release() must extract a successor from the list and then wake that thread. -// It can "pop" the front of the list or use a detach-modify-reattach (DMR) scheme -// similar to that used by ParkEvent::Allocate() and ::Release(). DMR-based -// Release() would : -// (A) CAS() or swap() null to *Lock, releasing the lock and detaching the list. -// (B) Extract a successor from the private list "in-hand" -// (C) attempt to CAS() the residual back into *Lock over null. -// If there were any newly arrived threads and the CAS() would fail. -// In that case Release() would detach the RATs, re-merge the list in-hand -// with the RATs and repeat as needed. Alternately, Release() might -// detach and extract a successor, but then pass the residual list to the wakee. -// The wakee would be responsible for reattaching and remerging before it -// competed for the lock. -// -// Both "pop" and DMR are immune from ABA corruption -- there can be -// multiple concurrent pushers, but only one popper or detacher. -// This implementation pops from the head of the list. This is unfair, -// but tends to provide excellent throughput as hot threads remain hot. -// (We wake recently run threads first). - -void Thread::muxRelease (volatile intptr_t * Lock) { - for (;;) { - const intptr_t w = Atomic::cmpxchg_ptr (0, Lock, LOCKBIT) ; - assert (w & LOCKBIT, "invariant") ; - if (w == LOCKBIT) return ; - ParkEvent * List = (ParkEvent *) (w & ~LOCKBIT) ; - assert (List != NULL, "invariant") ; - assert (List->OnList == intptr_t(Lock), "invariant") ; - ParkEvent * nxt = List->ListNext ; - - // The following CAS() releases the lock and pops the head element. - if (Atomic::cmpxchg_ptr (intptr_t(nxt), Lock, w) != w) { - continue ; - } - List->OnList = 0 ; - OrderAccess::fence() ; - List->unpark () ; - return ; - } -} +// ----------------------------------------------------------------------------- // ObjectMonitor Lifecycle // ----------------------- // Inflation unlinks monitors from the global gFreeList and @@ -718,41 +829,7 @@ void Thread::muxRelease (volatile intptr_t * Lock) { // -- assigned to an object. The object is inflated and the mark refers // to the objectmonitor. // -// TODO-FIXME: -// -// * We currently protect the gFreeList with a simple lock. -// An alternate lock-free scheme would be to pop elements from the gFreeList -// with CAS. This would be safe from ABA corruption as long we only -// recycled previously appearing elements onto the list in deflate_idle_monitors() -// at STW-time. Completely new elements could always be pushed onto the gFreeList -// with CAS. Elements that appeared previously on the list could only -// be installed at STW-time. -// -// * For efficiency and to help reduce the store-before-CAS penalty -// the objectmonitors on gFreeList or local free lists should be ready to install -// with the exception of _header and _object. _object can be set after inflation. -// In particular, keep all objectMonitors on a thread's private list in ready-to-install -// state with m.Owner set properly. -// -// * We could all diffuse contention by using multiple global (FreeList, Lock) -// pairs -- threads could use trylock() and a cyclic-scan strategy to search for -// an unlocked free list. -// -// * Add lifecycle tags and assert()s. -// -// * Be more consistent about when we clear an objectmonitor's fields: -// A. After extracting the objectmonitor from a free list. -// B. After adding an objectmonitor to a free list. -// -ObjectMonitor * ObjectSynchronizer::gBlockList = NULL ; -ObjectMonitor * volatile ObjectSynchronizer::gFreeList = NULL ; -ObjectMonitor * volatile ObjectSynchronizer::gOmInUseList = NULL ; -int ObjectSynchronizer::gOmInUseCount = 0; -static volatile intptr_t ListLock = 0 ; // protects global monitor free-list cache -static volatile int MonitorFreeCount = 0 ; // # on gFreeList -static volatile int MonitorPopulation = 0 ; // # Extant -- in circulation -#define CHAINMARKER ((oop)-1) // Constraining monitor pool growth via MonitorBound ... // @@ -768,41 +845,8 @@ static volatile int MonitorPopulation = 0 ; // # Extant -- in circulation // we'll incur more safepoints, which are harmful to performance. // See also: GuaranteedSafepointInterval // -// As noted elsewhere, the correct long-term solution is to deflate at -// monitorexit-time, in which case the number of inflated objects is bounded -// by the number of threads. That policy obviates the need for scavenging at -// STW safepoint time. As an aside, scavenging can be time-consuming when the -// # of extant monitors is large. Unfortunately there's a day-1 assumption baked -// into much HotSpot code that the object::monitor relationship, once established -// or observed, will remain stable except over potential safepoints. -// -// We can use either a blocking synchronous VM operation or an async VM operation. -// -- If we use a blocking VM operation : -// Calls to ScavengeCheck() should be inserted only into 'safe' locations in paths -// that lead to ::inflate() or ::omAlloc(). -// Even though the safepoint will not directly induce GC, a GC might -// piggyback on the safepoint operation, so the caller should hold no naked oops. -// Furthermore, monitor::object relationships are NOT necessarily stable over this call -// unless the caller has made provisions to "pin" the object to the monitor, say -// by incrementing the monitor's _count field. -// -- If we use a non-blocking asynchronous VM operation : -// the constraints above don't apply. The safepoint will fire in the future -// at a more convenient time. On the other hand the latency between posting and -// running the safepoint introduces or admits "slop" or laxity during which the -// monitor population can climb further above the threshold. The monitor population, -// however, tends to converge asymptotically over time to a count that's slightly -// above the target value specified by MonitorBound. That is, we avoid unbounded -// growth, albeit with some imprecision. -// // The current implementation uses asynchronous VM operations. // -// Ideally we'd check if (MonitorPopulation > MonitorBound) in omAlloc() -// immediately before trying to grow the global list via allocation. -// If the predicate was true then we'd induce a synchronous safepoint, wait -// for the safepoint to complete, and then again to allocate from the global -// free list. This approach is much simpler and precise, admitting no "slop". -// Unfortunately we can't safely safepoint in the midst of omAlloc(), so -// instead we use asynchronous safepoints. static void InduceScavenge (Thread * Self, const char * Whence) { // Induce STW safepoint to trim monitors @@ -812,7 +856,7 @@ static void InduceScavenge (Thread * Self, const char * Whence) { // TODO: assert thread state is reasonable if (ForceMonitorScavenge == 0 && Atomic::xchg (1, &ForceMonitorScavenge) == 0) { - if (Knob_Verbose) { + if (ObjectMonitor::Knob_Verbose) { ::printf ("Monitor scavenge - Induced STW @%s (%d)\n", Whence, ForceMonitorScavenge) ; ::fflush(stdout) ; } @@ -822,7 +866,7 @@ static void InduceScavenge (Thread * Self, const char * Whence) { // The VMThread will delete the op when completed. VMThread::execute (new VM_ForceAsyncSafepoint()) ; - if (Knob_Verbose) { + if (ObjectMonitor::Knob_Verbose) { ::printf ("Monitor scavenge - STW posted @%s (%d)\n", Whence, ForceMonitorScavenge) ; ::fflush(stdout) ; } @@ -844,7 +888,6 @@ void ObjectSynchronizer::verifyInUse (Thread *Self) { assert(freetally == Self->omFreeCount, "free count off"); } */ - ObjectMonitor * ATTR ObjectSynchronizer::omAlloc (Thread * Self) { // A large MAXPRIVATE value reduces both list lock contention // and list coherency traffic, but also tends to increase the @@ -974,12 +1017,6 @@ ObjectMonitor * ATTR ObjectSynchronizer::omAlloc (Thread * Self) { // attempt failed. This doesn't allow unbounded #s of monitors to // accumulate on a thread's free list. // -// In the future the usage of omRelease() might change and monitors -// could migrate between free lists. In that case to avoid excessive -// accumulation we could limit omCount to (omProvision*2), otherwise return -// the objectMonitor to the global list. We should drain (return) in reasonable chunks. -// That is, *not* one-at-a-time. - void ObjectSynchronizer::omRelease (Thread * Self, ObjectMonitor * m, bool fromPerThreadAlloc) { guarantee (m->object() == NULL, "invariant") ; @@ -1082,15 +1119,6 @@ void ObjectSynchronizer::omFlush (Thread * Self) { TEVENT (omFlush) ; } - -// Get the next block in the block list. -static inline ObjectMonitor* next(ObjectMonitor* block) { - assert(block->object() == CHAINMARKER, "must be a block header"); - block = block->FreeNext ; - assert(block == NULL || block->object() == CHAINMARKER, "must be a block header"); - return block; -} - // Fast path code shared by multiple functions ObjectMonitor* ObjectSynchronizer::inflate_helper(oop obj) { markOop mark = obj->mark(); @@ -1102,79 +1130,10 @@ ObjectMonitor* ObjectSynchronizer::inflate_helper(oop obj) { return ObjectSynchronizer::inflate(Thread::current(), obj); } + // Note that we could encounter some performance loss through false-sharing as // multiple locks occupy the same $ line. Padding might be appropriate. -#define NINFLATIONLOCKS 256 -static volatile intptr_t InflationLocks [NINFLATIONLOCKS] ; - -static markOop ReadStableMark (oop obj) { - markOop mark = obj->mark() ; - if (!mark->is_being_inflated()) { - return mark ; // normal fast-path return - } - - int its = 0 ; - for (;;) { - markOop mark = obj->mark() ; - if (!mark->is_being_inflated()) { - return mark ; // normal fast-path return - } - - // The object is being inflated by some other thread. - // The caller of ReadStableMark() must wait for inflation to complete. - // Avoid live-lock - // TODO: consider calling SafepointSynchronize::do_call_back() while - // spinning to see if there's a safepoint pending. If so, immediately - // yielding or blocking would be appropriate. Avoid spinning while - // there is a safepoint pending. - // TODO: add inflation contention performance counters. - // TODO: restrict the aggregate number of spinners. - - ++its ; - if (its > 10000 || !os::is_MP()) { - if (its & 1) { - os::NakedYield() ; - TEVENT (Inflate: INFLATING - yield) ; - } else { - // Note that the following code attenuates the livelock problem but is not - // a complete remedy. A more complete solution would require that the inflating - // thread hold the associated inflation lock. The following code simply restricts - // the number of spinners to at most one. We'll have N-2 threads blocked - // on the inflationlock, 1 thread holding the inflation lock and using - // a yield/park strategy, and 1 thread in the midst of inflation. - // A more refined approach would be to change the encoding of INFLATING - // to allow encapsulation of a native thread pointer. Threads waiting for - // inflation to complete would use CAS to push themselves onto a singly linked - // list rooted at the markword. Once enqueued, they'd loop, checking a per-thread flag - // and calling park(). When inflation was complete the thread that accomplished inflation - // would detach the list and set the markword to inflated with a single CAS and - // then for each thread on the list, set the flag and unpark() the thread. - // This is conceptually similar to muxAcquire-muxRelease, except that muxRelease - // wakes at most one thread whereas we need to wake the entire list. - int ix = (intptr_t(obj) >> 5) & (NINFLATIONLOCKS-1) ; - int YieldThenBlock = 0 ; - assert (ix >= 0 && ix < NINFLATIONLOCKS, "invariant") ; - assert ((NINFLATIONLOCKS & (NINFLATIONLOCKS-1)) == 0, "invariant") ; - Thread::muxAcquire (InflationLocks + ix, "InflationLock") ; - while (obj->mark() == markOopDesc::INFLATING()) { - // Beware: NakedYield() is advisory and has almost no effect on some platforms - // so we periodically call Self->_ParkEvent->park(1). - // We use a mixed spin/yield/block mechanism. - if ((YieldThenBlock++) >= 16) { - Thread::current()->_ParkEvent->park(1) ; - } else { - os::NakedYield() ; - } - } - Thread::muxRelease (InflationLocks + ix ) ; - TEVENT (Inflate: INFLATING - yield/park) ; - } - } else { - SpinPause() ; // SMP-polite spinning - } - } -} ObjectMonitor * ATTR ObjectSynchronizer::inflate (Thread * Self, oop object) { // Inflate mutates the heap ... @@ -1242,7 +1201,7 @@ ObjectMonitor * ATTR ObjectSynchronizer::inflate (Thread * Self, oop object) { m->_Responsible = NULL ; m->OwnerIsThread = 0 ; m->_recursions = 0 ; - m->_SpinDuration = Knob_SpinLimit ; // Consider: maintain by type/class + m->_SpinDuration = ObjectMonitor::Knob_SpinLimit ; // Consider: maintain by type/class markOop cmp = (markOop) Atomic::cmpxchg_ptr (markOopDesc::INFLATING(), object->mark_addr(), mark) ; if (cmp != mark) { @@ -1302,7 +1261,7 @@ ObjectMonitor * ATTR ObjectSynchronizer::inflate (Thread * Self, oop object) { // Hopefully the performance counters are allocated on distinct cache lines // to avoid false sharing on MP systems ... - if (_sync_Inflations != NULL) _sync_Inflations->inc() ; + if (ObjectMonitor::_sync_Inflations != NULL) ObjectMonitor::_sync_Inflations->inc() ; TEVENT(Inflate: overwrite stacklock) ; if (TraceMonitorInflation) { if (object->is_instance()) { @@ -1335,7 +1294,7 @@ ObjectMonitor * ATTR ObjectSynchronizer::inflate (Thread * Self, oop object) { m->OwnerIsThread = 1 ; m->_recursions = 0 ; m->_Responsible = NULL ; - m->_SpinDuration = Knob_SpinLimit ; // consider: keep metastats by type/class + m->_SpinDuration = ObjectMonitor::Knob_SpinLimit ; // consider: keep metastats by type/class if (Atomic::cmpxchg_ptr (markOopDesc::encode(m), object->mark_addr(), mark) != mark) { m->set_object (NULL) ; @@ -1352,7 +1311,7 @@ ObjectMonitor * ATTR ObjectSynchronizer::inflate (Thread * Self, oop object) { // Hopefully the performance counters are allocated on distinct // cache lines to avoid false sharing on MP systems ... - if (_sync_Inflations != NULL) _sync_Inflations->inc() ; + if (ObjectMonitor::_sync_Inflations != NULL) ObjectMonitor::_sync_Inflations->inc() ; TEVENT(Inflate: overwrite neutral) ; if (TraceMonitorInflation) { if (object->is_instance()) { @@ -1366,547 +1325,9 @@ ObjectMonitor * ATTR ObjectSynchronizer::inflate (Thread * Self, oop object) { } } +// Note that we could encounter some performance loss through false-sharing as +// multiple locks occupy the same $ line. Padding might be appropriate. -// This the fast monitor enter. The interpreter and compiler use -// some assembly copies of this code. Make sure update those code -// if the following function is changed. The implementation is -// extremely sensitive to race condition. Be careful. - -void ObjectSynchronizer::fast_enter(Handle obj, BasicLock* lock, bool attempt_rebias, TRAPS) { - if (UseBiasedLocking) { - if (!SafepointSynchronize::is_at_safepoint()) { - BiasedLocking::Condition cond = BiasedLocking::revoke_and_rebias(obj, attempt_rebias, THREAD); - if (cond == BiasedLocking::BIAS_REVOKED_AND_REBIASED) { - return; - } - } else { - assert(!attempt_rebias, "can not rebias toward VM thread"); - BiasedLocking::revoke_at_safepoint(obj); - } - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - slow_enter (obj, lock, THREAD) ; -} - -void ObjectSynchronizer::fast_exit(oop object, BasicLock* lock, TRAPS) { - assert(!object->mark()->has_bias_pattern(), "should not see bias pattern here"); - // if displaced header is null, the previous enter is recursive enter, no-op - markOop dhw = lock->displaced_header(); - markOop mark ; - if (dhw == NULL) { - // Recursive stack-lock. - // Diagnostics -- Could be: stack-locked, inflating, inflated. - mark = object->mark() ; - assert (!mark->is_neutral(), "invariant") ; - if (mark->has_locker() && mark != markOopDesc::INFLATING()) { - assert(THREAD->is_lock_owned((address)mark->locker()), "invariant") ; - } - if (mark->has_monitor()) { - ObjectMonitor * m = mark->monitor() ; - assert(((oop)(m->object()))->mark() == mark, "invariant") ; - assert(m->is_entered(THREAD), "invariant") ; - } - return ; - } - - mark = object->mark() ; - - // If the object is stack-locked by the current thread, try to - // swing the displaced header from the box back to the mark. - if (mark == (markOop) lock) { - assert (dhw->is_neutral(), "invariant") ; - if ((markOop) Atomic::cmpxchg_ptr (dhw, object->mark_addr(), mark) == mark) { - TEVENT (fast_exit: release stacklock) ; - return; - } - } - - ObjectSynchronizer::inflate(THREAD, object)->exit (THREAD) ; -} - -// This routine is used to handle interpreter/compiler slow case -// We don't need to use fast path here, because it must have been -// failed in the interpreter/compiler code. -void ObjectSynchronizer::slow_enter(Handle obj, BasicLock* lock, TRAPS) { - markOop mark = obj->mark(); - assert(!mark->has_bias_pattern(), "should not see bias pattern here"); - - if (mark->is_neutral()) { - // Anticipate successful CAS -- the ST of the displaced mark must - // be visible <= the ST performed by the CAS. - lock->set_displaced_header(mark); - if (mark == (markOop) Atomic::cmpxchg_ptr(lock, obj()->mark_addr(), mark)) { - TEVENT (slow_enter: release stacklock) ; - return ; - } - // Fall through to inflate() ... - } else - if (mark->has_locker() && THREAD->is_lock_owned((address)mark->locker())) { - assert(lock != mark->locker(), "must not re-lock the same lock"); - assert(lock != (BasicLock*)obj->mark(), "don't relock with same BasicLock"); - lock->set_displaced_header(NULL); - return; - } - -#if 0 - // The following optimization isn't particularly useful. - if (mark->has_monitor() && mark->monitor()->is_entered(THREAD)) { - lock->set_displaced_header (NULL) ; - return ; - } -#endif - - // The object header will never be displaced to this lock, - // so it does not matter what the value is, except that it - // must be non-zero to avoid looking like a re-entrant lock, - // and must not look locked either. - lock->set_displaced_header(markOopDesc::unused_mark()); - ObjectSynchronizer::inflate(THREAD, obj())->enter(THREAD); -} - -// This routine is used to handle interpreter/compiler slow case -// We don't need to use fast path here, because it must have -// failed in the interpreter/compiler code. Simply use the heavy -// weight monitor should be ok, unless someone find otherwise. -void ObjectSynchronizer::slow_exit(oop object, BasicLock* lock, TRAPS) { - fast_exit (object, lock, THREAD) ; -} - -// NOTE: must use heavy weight monitor to handle jni monitor enter -void ObjectSynchronizer::jni_enter(Handle obj, TRAPS) { // possible entry from jni enter - // the current locking is from JNI instead of Java code - TEVENT (jni_enter) ; - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - THREAD->set_current_pending_monitor_is_from_java(false); - ObjectSynchronizer::inflate(THREAD, obj())->enter(THREAD); - THREAD->set_current_pending_monitor_is_from_java(true); -} - -// NOTE: must use heavy weight monitor to handle jni monitor enter -bool ObjectSynchronizer::jni_try_enter(Handle obj, Thread* THREAD) { - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - ObjectMonitor* monitor = ObjectSynchronizer::inflate_helper(obj()); - return monitor->try_enter(THREAD); -} - - -// NOTE: must use heavy weight monitor to handle jni monitor exit -void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) { - TEVENT (jni_exit) ; - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - } - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - - ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj); - // If this thread has locked the object, exit the monitor. Note: can't use - // monitor->check(CHECK); must exit even if an exception is pending. - if (monitor->check(THREAD)) { - monitor->exit(THREAD); - } -} - -// complete_exit()/reenter() are used to wait on a nested lock -// i.e. to give up an outer lock completely and then re-enter -// Used when holding nested locks - lock acquisition order: lock1 then lock2 -// 1) complete_exit lock1 - saving recursion count -// 2) wait on lock2 -// 3) when notified on lock2, unlock lock2 -// 4) reenter lock1 with original recursion count -// 5) lock lock2 -// NOTE: must use heavy weight monitor to handle complete_exit/reenter() -intptr_t ObjectSynchronizer::complete_exit(Handle obj, TRAPS) { - TEVENT (complete_exit) ; - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); - - return monitor->complete_exit(THREAD); -} - -// NOTE: must use heavy weight monitor to handle complete_exit/reenter() -void ObjectSynchronizer::reenter(Handle obj, intptr_t recursion, TRAPS) { - TEVENT (reenter) ; - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); - - monitor->reenter(recursion, THREAD); -} - -// This exists only as a workaround of dtrace bug 6254741 -int dtrace_waited_probe(ObjectMonitor* monitor, Handle obj, Thread* thr) { - DTRACE_MONITOR_PROBE(waited, monitor, obj(), thr); - return 0; -} - -// NOTE: must use heavy weight monitor to handle wait() -void ObjectSynchronizer::wait(Handle obj, jlong millis, TRAPS) { - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - if (millis < 0) { - TEVENT (wait - throw IAX) ; - THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); - } - ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj()); - DTRACE_MONITOR_WAIT_PROBE(monitor, obj(), THREAD, millis); - monitor->wait(millis, true, THREAD); - - /* This dummy call is in place to get around dtrace bug 6254741. Once - that's fixed we can uncomment the following line and remove the call */ - // DTRACE_MONITOR_PROBE(waited, monitor, obj(), THREAD); - dtrace_waited_probe(monitor, obj, THREAD); -} - -void ObjectSynchronizer::waitUninterruptibly (Handle obj, jlong millis, TRAPS) { - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - if (millis < 0) { - TEVENT (wait - throw IAX) ; - THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "timeout value is negative"); - } - ObjectSynchronizer::inflate(THREAD, obj()) -> wait(millis, false, THREAD) ; -} - -void ObjectSynchronizer::notify(Handle obj, TRAPS) { - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - markOop mark = obj->mark(); - if (mark->has_locker() && THREAD->is_lock_owned((address)mark->locker())) { - return; - } - ObjectSynchronizer::inflate(THREAD, obj())->notify(THREAD); -} - -// NOTE: see comment of notify() -void ObjectSynchronizer::notifyall(Handle obj, TRAPS) { - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(obj, false, THREAD); - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - markOop mark = obj->mark(); - if (mark->has_locker() && THREAD->is_lock_owned((address)mark->locker())) { - return; - } - ObjectSynchronizer::inflate(THREAD, obj())->notifyAll(THREAD); -} - -intptr_t ObjectSynchronizer::FastHashCode (Thread * Self, oop obj) { - if (UseBiasedLocking) { - // NOTE: many places throughout the JVM do not expect a safepoint - // to be taken here, in particular most operations on perm gen - // objects. However, we only ever bias Java instances and all of - // the call sites of identity_hash that might revoke biases have - // been checked to make sure they can handle a safepoint. The - // added check of the bias pattern is to avoid useless calls to - // thread-local storage. - if (obj->mark()->has_bias_pattern()) { - // Box and unbox the raw reference just in case we cause a STW safepoint. - Handle hobj (Self, obj) ; - // Relaxing assertion for bug 6320749. - assert (Universe::verify_in_progress() || - !SafepointSynchronize::is_at_safepoint(), - "biases should not be seen by VM thread here"); - BiasedLocking::revoke_and_rebias(hobj, false, JavaThread::current()); - obj = hobj() ; - assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - } - - // hashCode() is a heap mutator ... - // Relaxing assertion for bug 6320749. - assert (Universe::verify_in_progress() || - !SafepointSynchronize::is_at_safepoint(), "invariant") ; - assert (Universe::verify_in_progress() || - Self->is_Java_thread() , "invariant") ; - assert (Universe::verify_in_progress() || - ((JavaThread *)Self)->thread_state() != _thread_blocked, "invariant") ; - - ObjectMonitor* monitor = NULL; - markOop temp, test; - intptr_t hash; - markOop mark = ReadStableMark (obj); - - // object should remain ineligible for biased locking - assert (!mark->has_bias_pattern(), "invariant") ; - - if (mark->is_neutral()) { - hash = mark->hash(); // this is a normal header - if (hash) { // if it has hash, just return it - return hash; - } - hash = get_next_hash(Self, obj); // allocate a new hash code - temp = mark->copy_set_hash(hash); // merge the hash code into header - // use (machine word version) atomic operation to install the hash - test = (markOop) Atomic::cmpxchg_ptr(temp, obj->mark_addr(), mark); - if (test == mark) { - return hash; - } - // If atomic operation failed, we must inflate the header - // into heavy weight monitor. We could add more code here - // for fast path, but it does not worth the complexity. - } else if (mark->has_monitor()) { - monitor = mark->monitor(); - temp = monitor->header(); - assert (temp->is_neutral(), "invariant") ; - hash = temp->hash(); - if (hash) { - return hash; - } - // Skip to the following code to reduce code size - } else if (Self->is_lock_owned((address)mark->locker())) { - temp = mark->displaced_mark_helper(); // this is a lightweight monitor owned - assert (temp->is_neutral(), "invariant") ; - hash = temp->hash(); // by current thread, check if the displaced - if (hash) { // header contains hash code - return hash; - } - // WARNING: - // The displaced header is strictly immutable. - // It can NOT be changed in ANY cases. So we have - // to inflate the header into heavyweight monitor - // even the current thread owns the lock. The reason - // is the BasicLock (stack slot) will be asynchronously - // read by other threads during the inflate() function. - // Any change to stack may not propagate to other threads - // correctly. - } - - // Inflate the monitor to set hash code - monitor = ObjectSynchronizer::inflate(Self, obj); - // Load displaced header and check it has hash code - mark = monitor->header(); - assert (mark->is_neutral(), "invariant") ; - hash = mark->hash(); - if (hash == 0) { - hash = get_next_hash(Self, obj); - temp = mark->copy_set_hash(hash); // merge hash code into header - assert (temp->is_neutral(), "invariant") ; - test = (markOop) Atomic::cmpxchg_ptr(temp, monitor, mark); - if (test != mark) { - // The only update to the header in the monitor (outside GC) - // is install the hash code. If someone add new usage of - // displaced header, please update this code - hash = test->hash(); - assert (test->is_neutral(), "invariant") ; - assert (hash != 0, "Trivial unexpected object/monitor header usage."); - } - } - // We finally get the hash - return hash; -} - -// Deprecated -- use FastHashCode() instead. - -intptr_t ObjectSynchronizer::identity_hash_value_for(Handle obj) { - return FastHashCode (Thread::current(), obj()) ; -} - -bool ObjectSynchronizer::current_thread_holds_lock(JavaThread* thread, - Handle h_obj) { - if (UseBiasedLocking) { - BiasedLocking::revoke_and_rebias(h_obj, false, thread); - assert(!h_obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - assert(thread == JavaThread::current(), "Can only be called on current thread"); - oop obj = h_obj(); - - markOop mark = ReadStableMark (obj) ; - - // Uncontended case, header points to stack - if (mark->has_locker()) { - return thread->is_lock_owned((address)mark->locker()); - } - // Contended case, header points to ObjectMonitor (tagged pointer) - if (mark->has_monitor()) { - ObjectMonitor* monitor = mark->monitor(); - return monitor->is_entered(thread) != 0 ; - } - // Unlocked case, header in place - assert(mark->is_neutral(), "sanity check"); - return false; -} - -// Be aware of this method could revoke bias of the lock object. -// This method querys the ownership of the lock handle specified by 'h_obj'. -// If the current thread owns the lock, it returns owner_self. If no -// thread owns the lock, it returns owner_none. Otherwise, it will return -// ower_other. -ObjectSynchronizer::LockOwnership ObjectSynchronizer::query_lock_ownership -(JavaThread *self, Handle h_obj) { - // The caller must beware this method can revoke bias, and - // revocation can result in a safepoint. - assert (!SafepointSynchronize::is_at_safepoint(), "invariant") ; - assert (self->thread_state() != _thread_blocked , "invariant") ; - - // Possible mark states: neutral, biased, stack-locked, inflated - - if (UseBiasedLocking && h_obj()->mark()->has_bias_pattern()) { - // CASE: biased - BiasedLocking::revoke_and_rebias(h_obj, false, self); - assert(!h_obj->mark()->has_bias_pattern(), - "biases should be revoked by now"); - } - - assert(self == JavaThread::current(), "Can only be called on current thread"); - oop obj = h_obj(); - markOop mark = ReadStableMark (obj) ; - - // CASE: stack-locked. Mark points to a BasicLock on the owner's stack. - if (mark->has_locker()) { - return self->is_lock_owned((address)mark->locker()) ? - owner_self : owner_other; - } - - // CASE: inflated. Mark (tagged pointer) points to an objectMonitor. - // The Object:ObjectMonitor relationship is stable as long as we're - // not at a safepoint. - if (mark->has_monitor()) { - void * owner = mark->monitor()->_owner ; - if (owner == NULL) return owner_none ; - return (owner == self || - self->is_lock_owned((address)owner)) ? owner_self : owner_other; - } - - // CASE: neutral - assert(mark->is_neutral(), "sanity check"); - return owner_none ; // it's unlocked -} - -// FIXME: jvmti should call this -JavaThread* ObjectSynchronizer::get_lock_owner(Handle h_obj, bool doLock) { - if (UseBiasedLocking) { - if (SafepointSynchronize::is_at_safepoint()) { - BiasedLocking::revoke_at_safepoint(h_obj); - } else { - BiasedLocking::revoke_and_rebias(h_obj, false, JavaThread::current()); - } - assert(!h_obj->mark()->has_bias_pattern(), "biases should be revoked by now"); - } - - oop obj = h_obj(); - address owner = NULL; - - markOop mark = ReadStableMark (obj) ; - - // Uncontended case, header points to stack - if (mark->has_locker()) { - owner = (address) mark->locker(); - } - - // Contended case, header points to ObjectMonitor (tagged pointer) - if (mark->has_monitor()) { - ObjectMonitor* monitor = mark->monitor(); - assert(monitor != NULL, "monitor should be non-null"); - owner = (address) monitor->owner(); - } - - if (owner != NULL) { - return Threads::owning_thread_from_monitor_owner(owner, doLock); - } - - // Unlocked case, header in place - // Cannot have assertion since this object may have been - // locked by another thread when reaching here. - // assert(mark->is_neutral(), "sanity check"); - - return NULL; -} - -// Iterate through monitor cache and attempt to release thread's monitors -// Gives up on a particular monitor if an exception occurs, but continues -// the overall iteration, swallowing the exception. -class ReleaseJavaMonitorsClosure: public MonitorClosure { -private: - TRAPS; - -public: - ReleaseJavaMonitorsClosure(Thread* thread) : THREAD(thread) {} - void do_monitor(ObjectMonitor* mid) { - if (mid->owner() == THREAD) { - (void)mid->complete_exit(CHECK); - } - } -}; - -// Release all inflated monitors owned by THREAD. Lightweight monitors are -// ignored. This is meant to be called during JNI thread detach which assumes -// all remaining monitors are heavyweight. All exceptions are swallowed. -// Scanning the extant monitor list can be time consuming. -// A simple optimization is to add a per-thread flag that indicates a thread -// called jni_monitorenter() during its lifetime. -// -// Instead of No_Savepoint_Verifier it might be cheaper to -// use an idiom of the form: -// auto int tmp = SafepointSynchronize::_safepoint_counter ; -// -// guarantee (((tmp ^ _safepoint_counter) | (tmp & 1)) == 0) ; -// Since the tests are extremely cheap we could leave them enabled -// for normal product builds. - -void ObjectSynchronizer::release_monitors_owned_by_thread(TRAPS) { - assert(THREAD == JavaThread::current(), "must be current Java thread"); - No_Safepoint_Verifier nsv ; - ReleaseJavaMonitorsClosure rjmc(THREAD); - Thread::muxAcquire(&ListLock, "release_monitors_owned_by_thread"); - ObjectSynchronizer::monitors_iterate(&rjmc); - Thread::muxRelease(&ListLock); - THREAD->clear_pending_exception(); -} - -// Visitors ... - -void ObjectSynchronizer::monitors_iterate(MonitorClosure* closure) { - ObjectMonitor* block = gBlockList; - ObjectMonitor* mid; - while (block) { - assert(block->object() == CHAINMARKER, "must be a block header"); - for (int i = _BLOCKSIZE - 1; i > 0; i--) { - mid = block + i; - oop object = (oop) mid->object(); - if (object != NULL) { - closure->do_monitor(mid); - } - } - block = (ObjectMonitor*) block->FreeNext; - } -} - -void ObjectSynchronizer::oops_do(OopClosure* f) { - assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); - for (ObjectMonitor* block = gBlockList; block != NULL; block = next(block)) { - assert(block->object() == CHAINMARKER, "must be a block header"); - for (int i = 1; i < _BLOCKSIZE; i++) { - ObjectMonitor* mid = &block[i]; - if (mid->object() != NULL) { - f->do_oop((oop*)mid->object_addr()); - } - } - } -} // Deflate_idle_monitors() is called at all safepoints, immediately // after all mutators are stopped, but before any objects have moved. @@ -1936,12 +1357,11 @@ void ObjectSynchronizer::oops_do(OopClosure* f) { // which in turn can mean large(r) numbers of objectmonitors in circulation. // This is an unfortunate aspect of this design. // -// Another refinement would be to refrain from calling deflate_idle_monitors() -// except at stop-the-world points associated with garbage collections. -// -// An even better solution would be to deflate on-the-fly, aggressively, -// at monitorexit-time as is done in EVM's metalock or Relaxed Locks. +enum ManifestConstants { + ClearResponsibleAtSTW = 0, + MaximumRecheckInterval = 1000 +} ; // Deflate a single monitor if not in use // Return true if deflated, false if in use @@ -2088,7 +1508,7 @@ void ObjectSynchronizer::deflate_idle_monitors() { // Consider: audit gFreeList to ensure that MonitorFreeCount and list agree. - if (Knob_Verbose) { + if (ObjectMonitor::Knob_Verbose) { ::printf ("Deflate: InCirc=%d InUse=%d Scavenged=%d ForceMonitorScavenge=%d : pop=%d free=%d\n", nInCirculation, nInuse, nScavenged, ForceMonitorScavenge, MonitorPopulation, MonitorFreeCount) ; @@ -2107,8 +1527,8 @@ void ObjectSynchronizer::deflate_idle_monitors() { } Thread::muxRelease (&ListLock) ; - if (_sync_Deflations != NULL) _sync_Deflations->inc(nScavenged) ; - if (_sync_MonExtant != NULL) _sync_MonExtant ->set_value(nInCirculation); + if (ObjectMonitor::_sync_Deflations != NULL) ObjectMonitor::_sync_Deflations->inc(nScavenged) ; + if (ObjectMonitor::_sync_MonExtant != NULL) ObjectMonitor::_sync_MonExtant ->set_value(nInCirculation); // TODO: Add objectMonitor leak detection. // Audit/inventory the objectMonitors -- make sure they're all accounted for. @@ -2116,2810 +1536,49 @@ void ObjectSynchronizer::deflate_idle_monitors() { GVars.stwCycle ++ ; } -// A macro is used below because there may already be a pending -// exception which should not abort the execution of the routines -// which use this (which is why we don't put this into check_slow and -// call it with a CHECK argument). +// Monitor cleanup on JavaThread::exit -#define CHECK_OWNER() \ - do { \ - if (THREAD != _owner) { \ - if (THREAD->is_lock_owned((address) _owner)) { \ - _owner = THREAD ; /* Convert from basiclock addr to Thread addr */ \ - _recursions = 0; \ - OwnerIsThread = 1 ; \ - } else { \ - TEVENT (Throw IMSX) ; \ - THROW(vmSymbols::java_lang_IllegalMonitorStateException()); \ - } \ - } \ - } while (false) +// Iterate through monitor cache and attempt to release thread's monitors +// Gives up on a particular monitor if an exception occurs, but continues +// the overall iteration, swallowing the exception. +class ReleaseJavaMonitorsClosure: public MonitorClosure { +private: + TRAPS; -// TODO-FIXME: eliminate ObjectWaiters. Replace this visitor/enumerator -// interface with a simple FirstWaitingThread(), NextWaitingThread() interface. - -ObjectWaiter* ObjectMonitor::first_waiter() { - return _WaitSet; -} - -ObjectWaiter* ObjectMonitor::next_waiter(ObjectWaiter* o) { - return o->_next; -} - -Thread* ObjectMonitor::thread_of_waiter(ObjectWaiter* o) { - return o->_thread; -} - -// initialize the monitor, exception the semaphore, all other fields -// are simple integers or pointers -ObjectMonitor::ObjectMonitor() { - _header = NULL; - _count = 0; - _waiters = 0, - _recursions = 0; - _object = NULL; - _owner = NULL; - _WaitSet = NULL; - _WaitSetLock = 0 ; - _Responsible = NULL ; - _succ = NULL ; - _cxq = NULL ; - FreeNext = NULL ; - _EntryList = NULL ; - _SpinFreq = 0 ; - _SpinClock = 0 ; - OwnerIsThread = 0 ; -} - -ObjectMonitor::~ObjectMonitor() { - // TODO: Add asserts ... - // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0 - // _count == 0 _EntryList == NULL etc -} - -intptr_t ObjectMonitor::is_busy() const { - // TODO-FIXME: merge _count and _waiters. - // TODO-FIXME: assert _owner == null implies _recursions = 0 - // TODO-FIXME: assert _WaitSet != null implies _count > 0 - return _count|_waiters|intptr_t(_owner)|intptr_t(_cxq)|intptr_t(_EntryList ) ; -} - -void ObjectMonitor::Recycle () { - // TODO: add stronger asserts ... - // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0 - // _count == 0 EntryList == NULL - // _recursions == 0 _WaitSet == NULL - // TODO: assert (is_busy()|_recursions) == 0 - _succ = NULL ; - _EntryList = NULL ; - _cxq = NULL ; - _WaitSet = NULL ; - _recursions = 0 ; - _SpinFreq = 0 ; - _SpinClock = 0 ; - OwnerIsThread = 0 ; -} - -// WaitSet management ... - -inline void ObjectMonitor::AddWaiter(ObjectWaiter* node) { - assert(node != NULL, "should not dequeue NULL node"); - assert(node->_prev == NULL, "node already in list"); - assert(node->_next == NULL, "node already in list"); - // put node at end of queue (circular doubly linked list) - if (_WaitSet == NULL) { - _WaitSet = node; - node->_prev = node; - node->_next = node; - } else { - ObjectWaiter* head = _WaitSet ; - ObjectWaiter* tail = head->_prev; - assert(tail->_next == head, "invariant check"); - tail->_next = node; - head->_prev = node; - node->_next = head; - node->_prev = tail; - } -} - -inline ObjectWaiter* ObjectMonitor::DequeueWaiter() { - // dequeue the very first waiter - ObjectWaiter* waiter = _WaitSet; - if (waiter) { - DequeueSpecificWaiter(waiter); - } - return waiter; -} - -inline void ObjectMonitor::DequeueSpecificWaiter(ObjectWaiter* node) { - assert(node != NULL, "should not dequeue NULL node"); - assert(node->_prev != NULL, "node already removed from list"); - assert(node->_next != NULL, "node already removed from list"); - // when the waiter has woken up because of interrupt, - // timeout or other spurious wake-up, dequeue the - // waiter from waiting list - ObjectWaiter* next = node->_next; - if (next == node) { - assert(node->_prev == node, "invariant check"); - _WaitSet = NULL; - } else { - ObjectWaiter* prev = node->_prev; - assert(prev->_next == node, "invariant check"); - assert(next->_prev == node, "invariant check"); - next->_prev = prev; - prev->_next = next; - if (_WaitSet == node) { - _WaitSet = next; +public: + ReleaseJavaMonitorsClosure(Thread* thread) : THREAD(thread) {} + void do_monitor(ObjectMonitor* mid) { + if (mid->owner() == THREAD) { + (void)mid->complete_exit(CHECK); } } - node->_next = NULL; - node->_prev = NULL; +}; + +// Release all inflated monitors owned by THREAD. Lightweight monitors are +// ignored. This is meant to be called during JNI thread detach which assumes +// all remaining monitors are heavyweight. All exceptions are swallowed. +// Scanning the extant monitor list can be time consuming. +// A simple optimization is to add a per-thread flag that indicates a thread +// called jni_monitorenter() during its lifetime. +// +// Instead of No_Savepoint_Verifier it might be cheaper to +// use an idiom of the form: +// auto int tmp = SafepointSynchronize::_safepoint_counter ; +// +// guarantee (((tmp ^ _safepoint_counter) | (tmp & 1)) == 0) ; +// Since the tests are extremely cheap we could leave them enabled +// for normal product builds. + +void ObjectSynchronizer::release_monitors_owned_by_thread(TRAPS) { + assert(THREAD == JavaThread::current(), "must be current Java thread"); + No_Safepoint_Verifier nsv ; + ReleaseJavaMonitorsClosure rjmc(THREAD); + Thread::muxAcquire(&ListLock, "release_monitors_owned_by_thread"); + ObjectSynchronizer::monitors_iterate(&rjmc); + Thread::muxRelease(&ListLock); + THREAD->clear_pending_exception(); } -static char * kvGet (char * kvList, const char * Key) { - if (kvList == NULL) return NULL ; - size_t n = strlen (Key) ; - char * Search ; - for (Search = kvList ; *Search ; Search += strlen(Search) + 1) { - if (strncmp (Search, Key, n) == 0) { - if (Search[n] == '=') return Search + n + 1 ; - if (Search[n] == 0) return (char *) "1" ; - } - } - return NULL ; -} - -static int kvGetInt (char * kvList, const char * Key, int Default) { - char * v = kvGet (kvList, Key) ; - int rslt = v ? ::strtol (v, NULL, 0) : Default ; - if (Knob_ReportSettings && v != NULL) { - ::printf (" SyncKnob: %s %d(%d)\n", Key, rslt, Default) ; - ::fflush (stdout) ; - } - return rslt ; -} - -// By convention we unlink a contending thread from EntryList|cxq immediately -// after the thread acquires the lock in ::enter(). Equally, we could defer -// unlinking the thread until ::exit()-time. - -void ObjectMonitor::UnlinkAfterAcquire (Thread * Self, ObjectWaiter * SelfNode) -{ - assert (_owner == Self, "invariant") ; - assert (SelfNode->_thread == Self, "invariant") ; - - if (SelfNode->TState == ObjectWaiter::TS_ENTER) { - // Normal case: remove Self from the DLL EntryList . - // This is a constant-time operation. - ObjectWaiter * nxt = SelfNode->_next ; - ObjectWaiter * prv = SelfNode->_prev ; - if (nxt != NULL) nxt->_prev = prv ; - if (prv != NULL) prv->_next = nxt ; - if (SelfNode == _EntryList ) _EntryList = nxt ; - assert (nxt == NULL || nxt->TState == ObjectWaiter::TS_ENTER, "invariant") ; - assert (prv == NULL || prv->TState == ObjectWaiter::TS_ENTER, "invariant") ; - TEVENT (Unlink from EntryList) ; - } else { - guarantee (SelfNode->TState == ObjectWaiter::TS_CXQ, "invariant") ; - // Inopportune interleaving -- Self is still on the cxq. - // This usually means the enqueue of self raced an exiting thread. - // Normally we'll find Self near the front of the cxq, so - // dequeueing is typically fast. If needbe we can accelerate - // this with some MCS/CHL-like bidirectional list hints and advisory - // back-links so dequeueing from the interior will normally operate - // in constant-time. - // Dequeue Self from either the head (with CAS) or from the interior - // with a linear-time scan and normal non-atomic memory operations. - // CONSIDER: if Self is on the cxq then simply drain cxq into EntryList - // and then unlink Self from EntryList. We have to drain eventually, - // so it might as well be now. - - ObjectWaiter * v = _cxq ; - assert (v != NULL, "invariant") ; - if (v != SelfNode || Atomic::cmpxchg_ptr (SelfNode->_next, &_cxq, v) != v) { - // The CAS above can fail from interference IFF a "RAT" arrived. - // In that case Self must be in the interior and can no longer be - // at the head of cxq. - if (v == SelfNode) { - assert (_cxq != v, "invariant") ; - v = _cxq ; // CAS above failed - start scan at head of list - } - ObjectWaiter * p ; - ObjectWaiter * q = NULL ; - for (p = v ; p != NULL && p != SelfNode; p = p->_next) { - q = p ; - assert (p->TState == ObjectWaiter::TS_CXQ, "invariant") ; - } - assert (v != SelfNode, "invariant") ; - assert (p == SelfNode, "Node not found on cxq") ; - assert (p != _cxq, "invariant") ; - assert (q != NULL, "invariant") ; - assert (q->_next == p, "invariant") ; - q->_next = p->_next ; - } - TEVENT (Unlink from cxq) ; - } - - // Diagnostic hygiene ... - SelfNode->_prev = (ObjectWaiter *) 0xBAD ; - SelfNode->_next = (ObjectWaiter *) 0xBAD ; - SelfNode->TState = ObjectWaiter::TS_RUN ; -} - -// Caveat: TryLock() is not necessarily serializing if it returns failure. -// Callers must compensate as needed. - -int ObjectMonitor::TryLock (Thread * Self) { - for (;;) { - void * own = _owner ; - if (own != NULL) return 0 ; - if (Atomic::cmpxchg_ptr (Self, &_owner, NULL) == NULL) { - // Either guarantee _recursions == 0 or set _recursions = 0. - assert (_recursions == 0, "invariant") ; - assert (_owner == Self, "invariant") ; - // CONSIDER: set or assert that OwnerIsThread == 1 - return 1 ; - } - // The lock had been free momentarily, but we lost the race to the lock. - // Interference -- the CAS failed. - // We can either return -1 or retry. - // Retry doesn't make as much sense because the lock was just acquired. - if (true) return -1 ; - } -} - -// NotRunnable() -- informed spinning -// -// Don't bother spinning if the owner is not eligible to drop the lock. -// Peek at the owner's schedctl.sc_state and Thread._thread_values and -// spin only if the owner thread is _thread_in_Java or _thread_in_vm. -// The thread must be runnable in order to drop the lock in timely fashion. -// If the _owner is not runnable then spinning will not likely be -// successful (profitable). -// -// Beware -- the thread referenced by _owner could have died -// so a simply fetch from _owner->_thread_state might trap. -// Instead, we use SafeFetchXX() to safely LD _owner->_thread_state. -// Because of the lifecycle issues the schedctl and _thread_state values -// observed by NotRunnable() might be garbage. NotRunnable must -// tolerate this and consider the observed _thread_state value -// as advisory. -// -// Beware too, that _owner is sometimes a BasicLock address and sometimes -// a thread pointer. We differentiate the two cases with OwnerIsThread. -// Alternately, we might tag the type (thread pointer vs basiclock pointer) -// with the LSB of _owner. Another option would be to probablistically probe -// the putative _owner->TypeTag value. -// -// Checking _thread_state isn't perfect. Even if the thread is -// in_java it might be blocked on a page-fault or have been preempted -// and sitting on a ready/dispatch queue. _thread state in conjunction -// with schedctl.sc_state gives us a good picture of what the -// thread is doing, however. -// -// TODO: check schedctl.sc_state. -// We'll need to use SafeFetch32() to read from the schedctl block. -// See RFE #5004247 and http://sac.sfbay.sun.com/Archives/CaseLog/arc/PSARC/2005/351/ -// -// The return value from NotRunnable() is *advisory* -- the -// result is based on sampling and is not necessarily coherent. -// The caller must tolerate false-negative and false-positive errors. -// Spinning, in general, is probabilistic anyway. - - -int ObjectMonitor::NotRunnable (Thread * Self, Thread * ox) { - // Check either OwnerIsThread or ox->TypeTag == 2BAD. - if (!OwnerIsThread) return 0 ; - - if (ox == NULL) return 0 ; - - // Avoid transitive spinning ... - // Say T1 spins or blocks trying to acquire L. T1._Stalled is set to L. - // Immediately after T1 acquires L it's possible that T2, also - // spinning on L, will see L.Owner=T1 and T1._Stalled=L. - // This occurs transiently after T1 acquired L but before - // T1 managed to clear T1.Stalled. T2 does not need to abort - // its spin in this circumstance. - intptr_t BlockedOn = SafeFetchN ((intptr_t *) &ox->_Stalled, intptr_t(1)) ; - - if (BlockedOn == 1) return 1 ; - if (BlockedOn != 0) { - return BlockedOn != intptr_t(this) && _owner == ox ; - } - - assert (sizeof(((JavaThread *)ox)->_thread_state == sizeof(int)), "invariant") ; - int jst = SafeFetch32 ((int *) &((JavaThread *) ox)->_thread_state, -1) ; ; - // consider also: jst != _thread_in_Java -- but that's overspecific. - return jst == _thread_blocked || jst == _thread_in_native ; -} - - -// Adaptive spin-then-block - rational spinning -// -// Note that we spin "globally" on _owner with a classic SMP-polite TATAS -// algorithm. On high order SMP systems it would be better to start with -// a brief global spin and then revert to spinning locally. In the spirit of MCS/CLH, -// a contending thread could enqueue itself on the cxq and then spin locally -// on a thread-specific variable such as its ParkEvent._Event flag. -// That's left as an exercise for the reader. Note that global spinning is -// not problematic on Niagara, as the L2$ serves the interconnect and has both -// low latency and massive bandwidth. -// -// Broadly, we can fix the spin frequency -- that is, the % of contended lock -// acquisition attempts where we opt to spin -- at 100% and vary the spin count -// (duration) or we can fix the count at approximately the duration of -// a context switch and vary the frequency. Of course we could also -// vary both satisfying K == Frequency * Duration, where K is adaptive by monitor. -// See http://j2se.east/~dice/PERSIST/040824-AdaptiveSpinning.html. -// -// This implementation varies the duration "D", where D varies with -// the success rate of recent spin attempts. (D is capped at approximately -// length of a round-trip context switch). The success rate for recent -// spin attempts is a good predictor of the success rate of future spin -// attempts. The mechanism adapts automatically to varying critical -// section length (lock modality), system load and degree of parallelism. -// D is maintained per-monitor in _SpinDuration and is initialized -// optimistically. Spin frequency is fixed at 100%. -// -// Note that _SpinDuration is volatile, but we update it without locks -// or atomics. The code is designed so that _SpinDuration stays within -// a reasonable range even in the presence of races. The arithmetic -// operations on _SpinDuration are closed over the domain of legal values, -// so at worst a race will install and older but still legal value. -// At the very worst this introduces some apparent non-determinism. -// We might spin when we shouldn't or vice-versa, but since the spin -// count are relatively short, even in the worst case, the effect is harmless. -// -// Care must be taken that a low "D" value does not become an -// an absorbing state. Transient spinning failures -- when spinning -// is overall profitable -- should not cause the system to converge -// on low "D" values. We want spinning to be stable and predictable -// and fairly responsive to change and at the same time we don't want -// it to oscillate, become metastable, be "too" non-deterministic, -// or converge on or enter undesirable stable absorbing states. -// -// We implement a feedback-based control system -- using past behavior -// to predict future behavior. We face two issues: (a) if the -// input signal is random then the spin predictor won't provide optimal -// results, and (b) if the signal frequency is too high then the control -// system, which has some natural response lag, will "chase" the signal. -// (b) can arise from multimodal lock hold times. Transient preemption -// can also result in apparent bimodal lock hold times. -// Although sub-optimal, neither condition is particularly harmful, as -// in the worst-case we'll spin when we shouldn't or vice-versa. -// The maximum spin duration is rather short so the failure modes aren't bad. -// To be conservative, I've tuned the gain in system to bias toward -// _not spinning. Relatedly, the system can sometimes enter a mode where it -// "rings" or oscillates between spinning and not spinning. This happens -// when spinning is just on the cusp of profitability, however, so the -// situation is not dire. The state is benign -- there's no need to add -// hysteresis control to damp the transition rate between spinning and -// not spinning. -// -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// -// Spin-then-block strategies ... -// -// Thoughts on ways to improve spinning : -// -// * Periodically call {psr_}getloadavg() while spinning, and -// permit unbounded spinning if the load average is < -// the number of processors. Beware, however, that getloadavg() -// is exceptionally fast on solaris (about 1/10 the cost of a full -// spin cycle, but quite expensive on linux. Beware also, that -// multiple JVMs could "ring" or oscillate in a feedback loop. -// Sufficient damping would solve that problem. -// -// * We currently use spin loops with iteration counters to approximate -// spinning for some interval. Given the availability of high-precision -// time sources such as gethrtime(), %TICK, %STICK, RDTSC, etc., we should -// someday reimplement the spin loops to duration-based instead of iteration-based. -// -// * Don't spin if there are more than N = (CPUs/2) threads -// currently spinning on the monitor (or globally). -// That is, limit the number of concurrent spinners. -// We might also limit the # of spinners in the JVM, globally. -// -// * If a spinning thread observes _owner change hands it should -// abort the spin (and park immediately) or at least debit -// the spin counter by a large "penalty". -// -// * Classically, the spin count is either K*(CPUs-1) or is a -// simple constant that approximates the length of a context switch. -// We currently use a value -- computed by a special utility -- that -// approximates round-trip context switch times. -// -// * Normally schedctl_start()/_stop() is used to advise the kernel -// to avoid preempting threads that are running in short, bounded -// critical sections. We could use the schedctl hooks in an inverted -// sense -- spinners would set the nopreempt flag, but poll the preempt -// pending flag. If a spinner observed a pending preemption it'd immediately -// abort the spin and park. As such, the schedctl service acts as -// a preemption warning mechanism. -// -// * In lieu of spinning, if the system is running below saturation -// (that is, loadavg() << #cpus), we can instead suppress futile -// wakeup throttling, or even wake more than one successor at exit-time. -// The net effect is largely equivalent to spinning. In both cases, -// contending threads go ONPROC and opportunistically attempt to acquire -// the lock, decreasing lock handover latency at the expense of wasted -// cycles and context switching. -// -// * We might to spin less after we've parked as the thread will -// have less $ and TLB affinity with the processor. -// Likewise, we might spin less if we come ONPROC on a different -// processor or after a long period (>> rechose_interval). -// -// * A table-driven state machine similar to Solaris' dispadmin scheduling -// tables might be a better design. Instead of encoding information in -// _SpinDuration, _SpinFreq and _SpinClock we'd just use explicit, -// discrete states. Success or failure during a spin would drive -// state transitions, and each state node would contain a spin count. -// -// * If the processor is operating in a mode intended to conserve power -// (such as Intel's SpeedStep) or to reduce thermal output (thermal -// step-down mode) then the Java synchronization subsystem should -// forgo spinning. -// -// * The minimum spin duration should be approximately the worst-case -// store propagation latency on the platform. That is, the time -// it takes a store on CPU A to become visible on CPU B, where A and -// B are "distant". -// -// * We might want to factor a thread's priority in the spin policy. -// Threads with a higher priority might spin for slightly longer. -// Similarly, if we use back-off in the TATAS loop, lower priority -// threads might back-off longer. We don't currently use a -// thread's priority when placing it on the entry queue. We may -// want to consider doing so in future releases. -// -// * We might transiently drop a thread's scheduling priority while it spins. -// SCHED_BATCH on linux and FX scheduling class at priority=0 on Solaris -// would suffice. We could even consider letting the thread spin indefinitely at -// a depressed or "idle" priority. This brings up fairness issues, however -- -// in a saturated system a thread would with a reduced priority could languish -// for extended periods on the ready queue. -// -// * While spinning try to use the otherwise wasted time to help the VM make -// progress: -// -// -- YieldTo() the owner, if the owner is OFFPROC but ready -// Done our remaining quantum directly to the ready thread. -// This helps "push" the lock owner through the critical section. -// It also tends to improve affinity/locality as the lock -// "migrates" less frequently between CPUs. -// -- Walk our own stack in anticipation of blocking. Memoize the roots. -// -- Perform strand checking for other thread. Unpark potential strandees. -// -- Help GC: trace or mark -- this would need to be a bounded unit of work. -// Unfortunately this will pollute our $ and TLBs. Recall that we -// spin to avoid context switching -- context switching has an -// immediate cost in latency, a disruptive cost to other strands on a CMT -// processor, and an amortized cost because of the D$ and TLB cache -// reload transient when the thread comes back ONPROC and repopulates -// $s and TLBs. -// -- call getloadavg() to see if the system is saturated. It'd probably -// make sense to call getloadavg() half way through the spin. -// If the system isn't at full capacity the we'd simply reset -// the spin counter to and extend the spin attempt. -// -- Doug points out that we should use the same "helping" policy -// in thread.yield(). -// -// * Try MONITOR-MWAIT on systems that support those instructions. -// -// * The spin statistics that drive spin decisions & frequency are -// maintained in the objectmonitor structure so if we deflate and reinflate -// we lose spin state. In practice this is not usually a concern -// as the default spin state after inflation is aggressive (optimistic) -// and tends toward spinning. So in the worst case for a lock where -// spinning is not profitable we may spin unnecessarily for a brief -// period. But then again, if a lock is contended it'll tend not to deflate -// in the first place. - - -intptr_t ObjectMonitor::SpinCallbackArgument = 0 ; -int (*ObjectMonitor::SpinCallbackFunction)(intptr_t, int) = NULL ; - -// Spinning: Fixed frequency (100%), vary duration - -int ObjectMonitor::TrySpin_VaryDuration (Thread * Self) { - - // Dumb, brutal spin. Good for comparative measurements against adaptive spinning. - int ctr = Knob_FixedSpin ; - if (ctr != 0) { - while (--ctr >= 0) { - if (TryLock (Self) > 0) return 1 ; - SpinPause () ; - } - return 0 ; - } - - for (ctr = Knob_PreSpin + 1; --ctr >= 0 ; ) { - if (TryLock(Self) > 0) { - // Increase _SpinDuration ... - // Note that we don't clamp SpinDuration precisely at SpinLimit. - // Raising _SpurDuration to the poverty line is key. - int x = _SpinDuration ; - if (x < Knob_SpinLimit) { - if (x < Knob_Poverty) x = Knob_Poverty ; - _SpinDuration = x + Knob_BonusB ; - } - return 1 ; - } - SpinPause () ; - } - - // Admission control - verify preconditions for spinning - // - // We always spin a little bit, just to prevent _SpinDuration == 0 from - // becoming an absorbing state. Put another way, we spin briefly to - // sample, just in case the system load, parallelism, contention, or lock - // modality changed. - // - // Consider the following alternative: - // Periodically set _SpinDuration = _SpinLimit and try a long/full - // spin attempt. "Periodically" might mean after a tally of - // the # of failed spin attempts (or iterations) reaches some threshold. - // This takes us into the realm of 1-out-of-N spinning, where we - // hold the duration constant but vary the frequency. - - ctr = _SpinDuration ; - if (ctr < Knob_SpinBase) ctr = Knob_SpinBase ; - if (ctr <= 0) return 0 ; - - if (Knob_SuccRestrict && _succ != NULL) return 0 ; - if (Knob_OState && NotRunnable (Self, (Thread *) _owner)) { - TEVENT (Spin abort - notrunnable [TOP]); - return 0 ; - } - - int MaxSpin = Knob_MaxSpinners ; - if (MaxSpin >= 0) { - if (_Spinner > MaxSpin) { - TEVENT (Spin abort -- too many spinners) ; - return 0 ; - } - // Slighty racy, but benign ... - Adjust (&_Spinner, 1) ; - } - - // We're good to spin ... spin ingress. - // CONSIDER: use Prefetch::write() to avoid RTS->RTO upgrades - // when preparing to LD...CAS _owner, etc and the CAS is likely - // to succeed. - int hits = 0 ; - int msk = 0 ; - int caspty = Knob_CASPenalty ; - int oxpty = Knob_OXPenalty ; - int sss = Knob_SpinSetSucc ; - if (sss && _succ == NULL ) _succ = Self ; - Thread * prv = NULL ; - - // There are three ways to exit the following loop: - // 1. A successful spin where this thread has acquired the lock. - // 2. Spin failure with prejudice - // 3. Spin failure without prejudice - - while (--ctr >= 0) { - - // Periodic polling -- Check for pending GC - // Threads may spin while they're unsafe. - // We don't want spinning threads to delay the JVM from reaching - // a stop-the-world safepoint or to steal cycles from GC. - // If we detect a pending safepoint we abort in order that - // (a) this thread, if unsafe, doesn't delay the safepoint, and (b) - // this thread, if safe, doesn't steal cycles from GC. - // This is in keeping with the "no loitering in runtime" rule. - // We periodically check to see if there's a safepoint pending. - if ((ctr & 0xFF) == 0) { - if (SafepointSynchronize::do_call_back()) { - TEVENT (Spin: safepoint) ; - goto Abort ; // abrupt spin egress - } - if (Knob_UsePause & 1) SpinPause () ; - - int (*scb)(intptr_t,int) = SpinCallbackFunction ; - if (hits > 50 && scb != NULL) { - int abend = (*scb)(SpinCallbackArgument, 0) ; - } - } - - if (Knob_UsePause & 2) SpinPause() ; - - // Exponential back-off ... Stay off the bus to reduce coherency traffic. - // This is useful on classic SMP systems, but is of less utility on - // N1-style CMT platforms. - // - // Trade-off: lock acquisition latency vs coherency bandwidth. - // Lock hold times are typically short. A histogram - // of successful spin attempts shows that we usually acquire - // the lock early in the spin. That suggests we want to - // sample _owner frequently in the early phase of the spin, - // but then back-off and sample less frequently as the spin - // progresses. The back-off makes a good citizen on SMP big - // SMP systems. Oversampling _owner can consume excessive - // coherency bandwidth. Relatedly, if we _oversample _owner we - // can inadvertently interfere with the the ST m->owner=null. - // executed by the lock owner. - if (ctr & msk) continue ; - ++hits ; - if ((hits & 0xF) == 0) { - // The 0xF, above, corresponds to the exponent. - // Consider: (msk+1)|msk - msk = ((msk << 2)|3) & BackOffMask ; - } - - // Probe _owner with TATAS - // If this thread observes the monitor transition or flicker - // from locked to unlocked to locked, then the odds that this - // thread will acquire the lock in this spin attempt go down - // considerably. The same argument applies if the CAS fails - // or if we observe _owner change from one non-null value to - // another non-null value. In such cases we might abort - // the spin without prejudice or apply a "penalty" to the - // spin count-down variable "ctr", reducing it by 100, say. - - Thread * ox = (Thread *) _owner ; - if (ox == NULL) { - ox = (Thread *) Atomic::cmpxchg_ptr (Self, &_owner, NULL) ; - if (ox == NULL) { - // The CAS succeeded -- this thread acquired ownership - // Take care of some bookkeeping to exit spin state. - if (sss && _succ == Self) { - _succ = NULL ; - } - if (MaxSpin > 0) Adjust (&_Spinner, -1) ; - - // Increase _SpinDuration : - // The spin was successful (profitable) so we tend toward - // longer spin attempts in the future. - // CONSIDER: factor "ctr" into the _SpinDuration adjustment. - // If we acquired the lock early in the spin cycle it - // makes sense to increase _SpinDuration proportionally. - // Note that we don't clamp SpinDuration precisely at SpinLimit. - int x = _SpinDuration ; - if (x < Knob_SpinLimit) { - if (x < Knob_Poverty) x = Knob_Poverty ; - _SpinDuration = x + Knob_Bonus ; - } - return 1 ; - } - - // The CAS failed ... we can take any of the following actions: - // * penalize: ctr -= Knob_CASPenalty - // * exit spin with prejudice -- goto Abort; - // * exit spin without prejudice. - // * Since CAS is high-latency, retry again immediately. - prv = ox ; - TEVENT (Spin: cas failed) ; - if (caspty == -2) break ; - if (caspty == -1) goto Abort ; - ctr -= caspty ; - continue ; - } - - // Did lock ownership change hands ? - if (ox != prv && prv != NULL ) { - TEVENT (spin: Owner changed) - if (oxpty == -2) break ; - if (oxpty == -1) goto Abort ; - ctr -= oxpty ; - } - prv = ox ; - - // Abort the spin if the owner is not executing. - // The owner must be executing in order to drop the lock. - // Spinning while the owner is OFFPROC is idiocy. - // Consider: ctr -= RunnablePenalty ; - if (Knob_OState && NotRunnable (Self, ox)) { - TEVENT (Spin abort - notrunnable); - goto Abort ; - } - if (sss && _succ == NULL ) _succ = Self ; - } - - // Spin failed with prejudice -- reduce _SpinDuration. - // TODO: Use an AIMD-like policy to adjust _SpinDuration. - // AIMD is globally stable. - TEVENT (Spin failure) ; - { - int x = _SpinDuration ; - if (x > 0) { - // Consider an AIMD scheme like: x -= (x >> 3) + 100 - // This is globally sample and tends to damp the response. - x -= Knob_Penalty ; - if (x < 0) x = 0 ; - _SpinDuration = x ; - } - } - - Abort: - if (MaxSpin >= 0) Adjust (&_Spinner, -1) ; - if (sss && _succ == Self) { - _succ = NULL ; - // Invariant: after setting succ=null a contending thread - // must recheck-retry _owner before parking. This usually happens - // in the normal usage of TrySpin(), but it's safest - // to make TrySpin() as foolproof as possible. - OrderAccess::fence() ; - if (TryLock(Self) > 0) return 1 ; - } - return 0 ; -} - -#define TrySpin TrySpin_VaryDuration - -static void DeferredInitialize () { - if (InitDone > 0) return ; - if (Atomic::cmpxchg (-1, &InitDone, 0) != 0) { - while (InitDone != 1) ; - return ; - } - - // One-shot global initialization ... - // The initialization is idempotent, so we don't need locks. - // In the future consider doing this via os::init_2(). - // SyncKnobs consist of = pairs in the style - // of environment variables. Start by converting ':' to NUL. - - if (SyncKnobs == NULL) SyncKnobs = "" ; - - size_t sz = strlen (SyncKnobs) ; - char * knobs = (char *) malloc (sz + 2) ; - if (knobs == NULL) { - vm_exit_out_of_memory (sz + 2, "Parse SyncKnobs") ; - guarantee (0, "invariant") ; - } - strcpy (knobs, SyncKnobs) ; - knobs[sz+1] = 0 ; - for (char * p = knobs ; *p ; p++) { - if (*p == ':') *p = 0 ; - } - - #define SETKNOB(x) { Knob_##x = kvGetInt (knobs, #x, Knob_##x); } - SETKNOB(ReportSettings) ; - SETKNOB(Verbose) ; - SETKNOB(FixedSpin) ; - SETKNOB(SpinLimit) ; - SETKNOB(SpinBase) ; - SETKNOB(SpinBackOff); - SETKNOB(CASPenalty) ; - SETKNOB(OXPenalty) ; - SETKNOB(LogSpins) ; - SETKNOB(SpinSetSucc) ; - SETKNOB(SuccEnabled) ; - SETKNOB(SuccRestrict) ; - SETKNOB(Penalty) ; - SETKNOB(Bonus) ; - SETKNOB(BonusB) ; - SETKNOB(Poverty) ; - SETKNOB(SpinAfterFutile) ; - SETKNOB(UsePause) ; - SETKNOB(SpinEarly) ; - SETKNOB(OState) ; - SETKNOB(MaxSpinners) ; - SETKNOB(PreSpin) ; - SETKNOB(ExitPolicy) ; - SETKNOB(QMode); - SETKNOB(ResetEvent) ; - SETKNOB(MoveNotifyee) ; - SETKNOB(FastHSSEC) ; - #undef SETKNOB - - if (os::is_MP()) { - BackOffMask = (1 << Knob_SpinBackOff) - 1 ; - if (Knob_ReportSettings) ::printf ("BackOffMask=%X\n", BackOffMask) ; - // CONSIDER: BackOffMask = ROUNDUP_NEXT_POWER2 (ncpus-1) - } else { - Knob_SpinLimit = 0 ; - Knob_SpinBase = 0 ; - Knob_PreSpin = 0 ; - Knob_FixedSpin = -1 ; - } - - if (Knob_LogSpins == 0) { - ObjectSynchronizer::_sync_FailedSpins = NULL ; - } - - free (knobs) ; - OrderAccess::fence() ; - InitDone = 1 ; -} - -// Theory of operations -- Monitors lists, thread residency, etc: -// -// * A thread acquires ownership of a monitor by successfully -// CAS()ing the _owner field from null to non-null. -// -// * Invariant: A thread appears on at most one monitor list -- -// cxq, EntryList or WaitSet -- at any one time. -// -// * Contending threads "push" themselves onto the cxq with CAS -// and then spin/park. -// -// * After a contending thread eventually acquires the lock it must -// dequeue itself from either the EntryList or the cxq. -// -// * The exiting thread identifies and unparks an "heir presumptive" -// tentative successor thread on the EntryList. Critically, the -// exiting thread doesn't unlink the successor thread from the EntryList. -// After having been unparked, the wakee will recontend for ownership of -// the monitor. The successor (wakee) will either acquire the lock or -// re-park itself. -// -// Succession is provided for by a policy of competitive handoff. -// The exiting thread does _not_ grant or pass ownership to the -// successor thread. (This is also referred to as "handoff" succession"). -// Instead the exiting thread releases ownership and possibly wakes -// a successor, so the successor can (re)compete for ownership of the lock. -// If the EntryList is empty but the cxq is populated the exiting -// thread will drain the cxq into the EntryList. It does so by -// by detaching the cxq (installing null with CAS) and folding -// the threads from the cxq into the EntryList. The EntryList is -// doubly linked, while the cxq is singly linked because of the -// CAS-based "push" used to enqueue recently arrived threads (RATs). -// -// * Concurrency invariants: -// -// -- only the monitor owner may access or mutate the EntryList. -// The mutex property of the monitor itself protects the EntryList -// from concurrent interference. -// -- Only the monitor owner may detach the cxq. -// -// * The monitor entry list operations avoid locks, but strictly speaking -// they're not lock-free. Enter is lock-free, exit is not. -// See http://j2se.east/~dice/PERSIST/040825-LockFreeQueues.html -// -// * The cxq can have multiple concurrent "pushers" but only one concurrent -// detaching thread. This mechanism is immune from the ABA corruption. -// More precisely, the CAS-based "push" onto cxq is ABA-oblivious. -// -// * Taken together, the cxq and the EntryList constitute or form a -// single logical queue of threads stalled trying to acquire the lock. -// We use two distinct lists to improve the odds of a constant-time -// dequeue operation after acquisition (in the ::enter() epilog) and -// to reduce heat on the list ends. (c.f. Michael Scott's "2Q" algorithm). -// A key desideratum is to minimize queue & monitor metadata manipulation -// that occurs while holding the monitor lock -- that is, we want to -// minimize monitor lock holds times. Note that even a small amount of -// fixed spinning will greatly reduce the # of enqueue-dequeue operations -// on EntryList|cxq. That is, spinning relieves contention on the "inner" -// locks and monitor metadata. -// -// Cxq points to the the set of Recently Arrived Threads attempting entry. -// Because we push threads onto _cxq with CAS, the RATs must take the form of -// a singly-linked LIFO. We drain _cxq into EntryList at unlock-time when -// the unlocking thread notices that EntryList is null but _cxq is != null. -// -// The EntryList is ordered by the prevailing queue discipline and -// can be organized in any convenient fashion, such as a doubly-linked list or -// a circular doubly-linked list. Critically, we want insert and delete operations -// to operate in constant-time. If we need a priority queue then something akin -// to Solaris' sleepq would work nicely. Viz., -// http://agg.eng/ws/on10_nightly/source/usr/src/uts/common/os/sleepq.c. -// Queue discipline is enforced at ::exit() time, when the unlocking thread -// drains the cxq into the EntryList, and orders or reorders the threads on the -// EntryList accordingly. -// -// Barring "lock barging", this mechanism provides fair cyclic ordering, -// somewhat similar to an elevator-scan. -// -// * The monitor synchronization subsystem avoids the use of native -// synchronization primitives except for the narrow platform-specific -// park-unpark abstraction. See the comments in os_solaris.cpp regarding -// the semantics of park-unpark. Put another way, this monitor implementation -// depends only on atomic operations and park-unpark. The monitor subsystem -// manages all RUNNING->BLOCKED and BLOCKED->READY transitions while the -// underlying OS manages the READY<->RUN transitions. -// -// * Waiting threads reside on the WaitSet list -- wait() puts -// the caller onto the WaitSet. -// -// * notify() or notifyAll() simply transfers threads from the WaitSet to -// either the EntryList or cxq. Subsequent exit() operations will -// unpark the notifyee. Unparking a notifee in notify() is inefficient - -// it's likely the notifyee would simply impale itself on the lock held -// by the notifier. -// -// * An interesting alternative is to encode cxq as (List,LockByte) where -// the LockByte is 0 iff the monitor is owned. _owner is simply an auxiliary -// variable, like _recursions, in the scheme. The threads or Events that form -// the list would have to be aligned in 256-byte addresses. A thread would -// try to acquire the lock or enqueue itself with CAS, but exiting threads -// could use a 1-0 protocol and simply STB to set the LockByte to 0. -// Note that is is *not* word-tearing, but it does presume that full-word -// CAS operations are coherent with intermix with STB operations. That's true -// on most common processors. -// -// * See also http://blogs.sun.com/dave - - -void ATTR ObjectMonitor::EnterI (TRAPS) { - Thread * Self = THREAD ; - assert (Self->is_Java_thread(), "invariant") ; - assert (((JavaThread *) Self)->thread_state() == _thread_blocked , "invariant") ; - - // Try the lock - TATAS - if (TryLock (Self) > 0) { - assert (_succ != Self , "invariant") ; - assert (_owner == Self , "invariant") ; - assert (_Responsible != Self , "invariant") ; - return ; - } - - DeferredInitialize () ; - - // We try one round of spinning *before* enqueueing Self. - // - // If the _owner is ready but OFFPROC we could use a YieldTo() - // operation to donate the remainder of this thread's quantum - // to the owner. This has subtle but beneficial affinity - // effects. - - if (TrySpin (Self) > 0) { - assert (_owner == Self , "invariant") ; - assert (_succ != Self , "invariant") ; - assert (_Responsible != Self , "invariant") ; - return ; - } - - // The Spin failed -- Enqueue and park the thread ... - assert (_succ != Self , "invariant") ; - assert (_owner != Self , "invariant") ; - assert (_Responsible != Self , "invariant") ; - - // Enqueue "Self" on ObjectMonitor's _cxq. - // - // Node acts as a proxy for Self. - // As an aside, if were to ever rewrite the synchronization code mostly - // in Java, WaitNodes, ObjectMonitors, and Events would become 1st-class - // Java objects. This would avoid awkward lifecycle and liveness issues, - // as well as eliminate a subset of ABA issues. - // TODO: eliminate ObjectWaiter and enqueue either Threads or Events. - // - - ObjectWaiter node(Self) ; - Self->_ParkEvent->reset() ; - node._prev = (ObjectWaiter *) 0xBAD ; - node.TState = ObjectWaiter::TS_CXQ ; - - // Push "Self" onto the front of the _cxq. - // Once on cxq/EntryList, Self stays on-queue until it acquires the lock. - // Note that spinning tends to reduce the rate at which threads - // enqueue and dequeue on EntryList|cxq. - ObjectWaiter * nxt ; - for (;;) { - node._next = nxt = _cxq ; - if (Atomic::cmpxchg_ptr (&node, &_cxq, nxt) == nxt) break ; - - // Interference - the CAS failed because _cxq changed. Just retry. - // As an optional optimization we retry the lock. - if (TryLock (Self) > 0) { - assert (_succ != Self , "invariant") ; - assert (_owner == Self , "invariant") ; - assert (_Responsible != Self , "invariant") ; - return ; - } - } - - // Check for cxq|EntryList edge transition to non-null. This indicates - // the onset of contention. While contention persists exiting threads - // will use a ST:MEMBAR:LD 1-1 exit protocol. When contention abates exit - // operations revert to the faster 1-0 mode. This enter operation may interleave - // (race) a concurrent 1-0 exit operation, resulting in stranding, so we - // arrange for one of the contending thread to use a timed park() operations - // to detect and recover from the race. (Stranding is form of progress failure - // where the monitor is unlocked but all the contending threads remain parked). - // That is, at least one of the contended threads will periodically poll _owner. - // One of the contending threads will become the designated "Responsible" thread. - // The Responsible thread uses a timed park instead of a normal indefinite park - // operation -- it periodically wakes and checks for and recovers from potential - // strandings admitted by 1-0 exit operations. We need at most one Responsible - // thread per-monitor at any given moment. Only threads on cxq|EntryList may - // be responsible for a monitor. - // - // Currently, one of the contended threads takes on the added role of "Responsible". - // A viable alternative would be to use a dedicated "stranding checker" thread - // that periodically iterated over all the threads (or active monitors) and unparked - // successors where there was risk of stranding. This would help eliminate the - // timer scalability issues we see on some platforms as we'd only have one thread - // -- the checker -- parked on a timer. - - if ((SyncFlags & 16) == 0 && nxt == NULL && _EntryList == NULL) { - // Try to assume the role of responsible thread for the monitor. - // CONSIDER: ST vs CAS vs { if (Responsible==null) Responsible=Self } - Atomic::cmpxchg_ptr (Self, &_Responsible, NULL) ; - } - - // The lock have been released while this thread was occupied queueing - // itself onto _cxq. To close the race and avoid "stranding" and - // progress-liveness failure we must resample-retry _owner before parking. - // Note the Dekker/Lamport duality: ST cxq; MEMBAR; LD Owner. - // In this case the ST-MEMBAR is accomplished with CAS(). - // - // TODO: Defer all thread state transitions until park-time. - // Since state transitions are heavy and inefficient we'd like - // to defer the state transitions until absolutely necessary, - // and in doing so avoid some transitions ... - - TEVENT (Inflated enter - Contention) ; - int nWakeups = 0 ; - int RecheckInterval = 1 ; - - for (;;) { - - if (TryLock (Self) > 0) break ; - assert (_owner != Self, "invariant") ; - - if ((SyncFlags & 2) && _Responsible == NULL) { - Atomic::cmpxchg_ptr (Self, &_Responsible, NULL) ; - } - - // park self - if (_Responsible == Self || (SyncFlags & 1)) { - TEVENT (Inflated enter - park TIMED) ; - Self->_ParkEvent->park ((jlong) RecheckInterval) ; - // Increase the RecheckInterval, but clamp the value. - RecheckInterval *= 8 ; - if (RecheckInterval > 1000) RecheckInterval = 1000 ; - } else { - TEVENT (Inflated enter - park UNTIMED) ; - Self->_ParkEvent->park() ; - } - - if (TryLock(Self) > 0) break ; - - // The lock is still contested. - // Keep a tally of the # of futile wakeups. - // Note that the counter is not protected by a lock or updated by atomics. - // That is by design - we trade "lossy" counters which are exposed to - // races during updates for a lower probe effect. - TEVENT (Inflated enter - Futile wakeup) ; - if (ObjectSynchronizer::_sync_FutileWakeups != NULL) { - ObjectSynchronizer::_sync_FutileWakeups->inc() ; - } - ++ nWakeups ; - - // Assuming this is not a spurious wakeup we'll normally find _succ == Self. - // We can defer clearing _succ until after the spin completes - // TrySpin() must tolerate being called with _succ == Self. - // Try yet another round of adaptive spinning. - if ((Knob_SpinAfterFutile & 1) && TrySpin (Self) > 0) break ; - - // We can find that we were unpark()ed and redesignated _succ while - // we were spinning. That's harmless. If we iterate and call park(), - // park() will consume the event and return immediately and we'll - // just spin again. This pattern can repeat, leaving _succ to simply - // spin on a CPU. Enable Knob_ResetEvent to clear pending unparks(). - // Alternately, we can sample fired() here, and if set, forgo spinning - // in the next iteration. - - if ((Knob_ResetEvent & 1) && Self->_ParkEvent->fired()) { - Self->_ParkEvent->reset() ; - OrderAccess::fence() ; - } - if (_succ == Self) _succ = NULL ; - - // Invariant: after clearing _succ a thread *must* retry _owner before parking. - OrderAccess::fence() ; - } - - // Egress : - // Self has acquired the lock -- Unlink Self from the cxq or EntryList. - // Normally we'll find Self on the EntryList . - // From the perspective of the lock owner (this thread), the - // EntryList is stable and cxq is prepend-only. - // The head of cxq is volatile but the interior is stable. - // In addition, Self.TState is stable. - - assert (_owner == Self , "invariant") ; - assert (object() != NULL , "invariant") ; - // I'd like to write: - // guarantee (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; - // but as we're at a safepoint that's not safe. - - UnlinkAfterAcquire (Self, &node) ; - if (_succ == Self) _succ = NULL ; - - assert (_succ != Self, "invariant") ; - if (_Responsible == Self) { - _Responsible = NULL ; - // Dekker pivot-point. - // Consider OrderAccess::storeload() here - - // We may leave threads on cxq|EntryList without a designated - // "Responsible" thread. This is benign. When this thread subsequently - // exits the monitor it can "see" such preexisting "old" threads -- - // threads that arrived on the cxq|EntryList before the fence, above -- - // by LDing cxq|EntryList. Newly arrived threads -- that is, threads - // that arrive on cxq after the ST:MEMBAR, above -- will set Responsible - // non-null and elect a new "Responsible" timer thread. - // - // This thread executes: - // ST Responsible=null; MEMBAR (in enter epilog - here) - // LD cxq|EntryList (in subsequent exit) - // - // Entering threads in the slow/contended path execute: - // ST cxq=nonnull; MEMBAR; LD Responsible (in enter prolog) - // The (ST cxq; MEMBAR) is accomplished with CAS(). - // - // The MEMBAR, above, prevents the LD of cxq|EntryList in the subsequent - // exit operation from floating above the ST Responsible=null. - // - // In *practice* however, EnterI() is always followed by some atomic - // operation such as the decrement of _count in ::enter(). Those atomics - // obviate the need for the explicit MEMBAR, above. - } - - // We've acquired ownership with CAS(). - // CAS is serializing -- it has MEMBAR/FENCE-equivalent semantics. - // But since the CAS() this thread may have also stored into _succ, - // EntryList, cxq or Responsible. These meta-data updates must be - // visible __before this thread subsequently drops the lock. - // Consider what could occur if we didn't enforce this constraint -- - // STs to monitor meta-data and user-data could reorder with (become - // visible after) the ST in exit that drops ownership of the lock. - // Some other thread could then acquire the lock, but observe inconsistent - // or old monitor meta-data and heap data. That violates the JMM. - // To that end, the 1-0 exit() operation must have at least STST|LDST - // "release" barrier semantics. Specifically, there must be at least a - // STST|LDST barrier in exit() before the ST of null into _owner that drops - // the lock. The barrier ensures that changes to monitor meta-data and data - // protected by the lock will be visible before we release the lock, and - // therefore before some other thread (CPU) has a chance to acquire the lock. - // See also: http://gee.cs.oswego.edu/dl/jmm/cookbook.html. - // - // Critically, any prior STs to _succ or EntryList must be visible before - // the ST of null into _owner in the *subsequent* (following) corresponding - // monitorexit. Recall too, that in 1-0 mode monitorexit does not necessarily - // execute a serializing instruction. - - if (SyncFlags & 8) { - OrderAccess::fence() ; - } - return ; -} - -// ExitSuspendEquivalent: -// A faster alternate to handle_special_suspend_equivalent_condition() -// -// handle_special_suspend_equivalent_condition() unconditionally -// acquires the SR_lock. On some platforms uncontended MutexLocker() -// operations have high latency. Note that in ::enter() we call HSSEC -// while holding the monitor, so we effectively lengthen the critical sections. -// -// There are a number of possible solutions: -// -// A. To ameliorate the problem we might also defer state transitions -// to as late as possible -- just prior to parking. -// Given that, we'd call HSSEC after having returned from park(), -// but before attempting to acquire the monitor. This is only a -// partial solution. It avoids calling HSSEC while holding the -// monitor (good), but it still increases successor reacquisition latency -- -// the interval between unparking a successor and the time the successor -// resumes and retries the lock. See ReenterI(), which defers state transitions. -// If we use this technique we can also avoid EnterI()-exit() loop -// in ::enter() where we iteratively drop the lock and then attempt -// to reacquire it after suspending. -// -// B. In the future we might fold all the suspend bits into a -// composite per-thread suspend flag and then update it with CAS(). -// Alternately, a Dekker-like mechanism with multiple variables -// would suffice: -// ST Self->_suspend_equivalent = false -// MEMBAR -// LD Self_>_suspend_flags -// - - -bool ObjectMonitor::ExitSuspendEquivalent (JavaThread * jSelf) { - int Mode = Knob_FastHSSEC ; - if (Mode && !jSelf->is_external_suspend()) { - assert (jSelf->is_suspend_equivalent(), "invariant") ; - jSelf->clear_suspend_equivalent() ; - if (2 == Mode) OrderAccess::storeload() ; - if (!jSelf->is_external_suspend()) return false ; - // We raced a suspension -- fall thru into the slow path - TEVENT (ExitSuspendEquivalent - raced) ; - jSelf->set_suspend_equivalent() ; - } - return jSelf->handle_special_suspend_equivalent_condition() ; -} - - -// ReenterI() is a specialized inline form of the latter half of the -// contended slow-path from EnterI(). We use ReenterI() only for -// monitor reentry in wait(). -// -// In the future we should reconcile EnterI() and ReenterI(), adding -// Knob_Reset and Knob_SpinAfterFutile support and restructuring the -// loop accordingly. - -void ATTR ObjectMonitor::ReenterI (Thread * Self, ObjectWaiter * SelfNode) { - assert (Self != NULL , "invariant") ; - assert (SelfNode != NULL , "invariant") ; - assert (SelfNode->_thread == Self , "invariant") ; - assert (_waiters > 0 , "invariant") ; - assert (((oop)(object()))->mark() == markOopDesc::encode(this) , "invariant") ; - assert (((JavaThread *)Self)->thread_state() != _thread_blocked, "invariant") ; - JavaThread * jt = (JavaThread *) Self ; - - int nWakeups = 0 ; - for (;;) { - ObjectWaiter::TStates v = SelfNode->TState ; - guarantee (v == ObjectWaiter::TS_ENTER || v == ObjectWaiter::TS_CXQ, "invariant") ; - assert (_owner != Self, "invariant") ; - - if (TryLock (Self) > 0) break ; - if (TrySpin (Self) > 0) break ; - - TEVENT (Wait Reentry - parking) ; - - // State transition wrappers around park() ... - // ReenterI() wisely defers state transitions until - // it's clear we must park the thread. - { - OSThreadContendState osts(Self->osthread()); - ThreadBlockInVM tbivm(jt); - - // cleared by handle_special_suspend_equivalent_condition() - // or java_suspend_self() - jt->set_suspend_equivalent(); - if (SyncFlags & 1) { - Self->_ParkEvent->park ((jlong)1000) ; - } else { - Self->_ParkEvent->park () ; - } - - // were we externally suspended while we were waiting? - for (;;) { - if (!ExitSuspendEquivalent (jt)) break ; - if (_succ == Self) { _succ = NULL; OrderAccess::fence(); } - jt->java_suspend_self(); - jt->set_suspend_equivalent(); - } - } - - // Try again, but just so we distinguish between futile wakeups and - // successful wakeups. The following test isn't algorithmically - // necessary, but it helps us maintain sensible statistics. - if (TryLock(Self) > 0) break ; - - // The lock is still contested. - // Keep a tally of the # of futile wakeups. - // Note that the counter is not protected by a lock or updated by atomics. - // That is by design - we trade "lossy" counters which are exposed to - // races during updates for a lower probe effect. - TEVENT (Wait Reentry - futile wakeup) ; - ++ nWakeups ; - - // Assuming this is not a spurious wakeup we'll normally - // find that _succ == Self. - if (_succ == Self) _succ = NULL ; - - // Invariant: after clearing _succ a contending thread - // *must* retry _owner before parking. - OrderAccess::fence() ; - - if (ObjectSynchronizer::_sync_FutileWakeups != NULL) { - ObjectSynchronizer::_sync_FutileWakeups->inc() ; - } - } - - // Self has acquired the lock -- Unlink Self from the cxq or EntryList . - // Normally we'll find Self on the EntryList. - // Unlinking from the EntryList is constant-time and atomic-free. - // From the perspective of the lock owner (this thread), the - // EntryList is stable and cxq is prepend-only. - // The head of cxq is volatile but the interior is stable. - // In addition, Self.TState is stable. - - assert (_owner == Self, "invariant") ; - assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; - UnlinkAfterAcquire (Self, SelfNode) ; - if (_succ == Self) _succ = NULL ; - assert (_succ != Self, "invariant") ; - SelfNode->TState = ObjectWaiter::TS_RUN ; - OrderAccess::fence() ; // see comments at the end of EnterI() -} - -bool ObjectMonitor::try_enter(Thread* THREAD) { - if (THREAD != _owner) { - if (THREAD->is_lock_owned ((address)_owner)) { - assert(_recursions == 0, "internal state error"); - _owner = THREAD ; - _recursions = 1 ; - OwnerIsThread = 1 ; - return true; - } - if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) { - return false; - } - return true; - } else { - _recursions++; - return true; - } -} - -void ATTR ObjectMonitor::enter(TRAPS) { - // The following code is ordered to check the most common cases first - // and to reduce RTS->RTO cache line upgrades on SPARC and IA32 processors. - Thread * const Self = THREAD ; - void * cur ; - - cur = Atomic::cmpxchg_ptr (Self, &_owner, NULL) ; - if (cur == NULL) { - // Either ASSERT _recursions == 0 or explicitly set _recursions = 0. - assert (_recursions == 0 , "invariant") ; - assert (_owner == Self, "invariant") ; - // CONSIDER: set or assert OwnerIsThread == 1 - return ; - } - - if (cur == Self) { - // TODO-FIXME: check for integer overflow! BUGID 6557169. - _recursions ++ ; - return ; - } - - if (Self->is_lock_owned ((address)cur)) { - assert (_recursions == 0, "internal state error"); - _recursions = 1 ; - // Commute owner from a thread-specific on-stack BasicLockObject address to - // a full-fledged "Thread *". - _owner = Self ; - OwnerIsThread = 1 ; - return ; - } - - // We've encountered genuine contention. - assert (Self->_Stalled == 0, "invariant") ; - Self->_Stalled = intptr_t(this) ; - - // Try one round of spinning *before* enqueueing Self - // and before going through the awkward and expensive state - // transitions. The following spin is strictly optional ... - // Note that if we acquire the monitor from an initial spin - // we forgo posting JVMTI events and firing DTRACE probes. - if (Knob_SpinEarly && TrySpin (Self) > 0) { - assert (_owner == Self , "invariant") ; - assert (_recursions == 0 , "invariant") ; - assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; - Self->_Stalled = 0 ; - return ; - } - - assert (_owner != Self , "invariant") ; - assert (_succ != Self , "invariant") ; - assert (Self->is_Java_thread() , "invariant") ; - JavaThread * jt = (JavaThread *) Self ; - assert (!SafepointSynchronize::is_at_safepoint(), "invariant") ; - assert (jt->thread_state() != _thread_blocked , "invariant") ; - assert (this->object() != NULL , "invariant") ; - assert (_count >= 0, "invariant") ; - - // Prevent deflation at STW-time. See deflate_idle_monitors() and is_busy(). - // Ensure the object-monitor relationship remains stable while there's contention. - Atomic::inc_ptr(&_count); - - { // Change java thread status to indicate blocked on monitor enter. - JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this); - - DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt); - if (JvmtiExport::should_post_monitor_contended_enter()) { - JvmtiExport::post_monitor_contended_enter(jt, this); - } - - OSThreadContendState osts(Self->osthread()); - ThreadBlockInVM tbivm(jt); - - Self->set_current_pending_monitor(this); - - // TODO-FIXME: change the following for(;;) loop to straight-line code. - for (;;) { - jt->set_suspend_equivalent(); - // cleared by handle_special_suspend_equivalent_condition() - // or java_suspend_self() - - EnterI (THREAD) ; - - if (!ExitSuspendEquivalent(jt)) break ; - - // - // We have acquired the contended monitor, but while we were - // waiting another thread suspended us. We don't want to enter - // the monitor while suspended because that would surprise the - // thread that suspended us. - // - _recursions = 0 ; - _succ = NULL ; - exit (Self) ; - - jt->java_suspend_self(); - } - Self->set_current_pending_monitor(NULL); - } - - Atomic::dec_ptr(&_count); - assert (_count >= 0, "invariant") ; - Self->_Stalled = 0 ; - - // Must either set _recursions = 0 or ASSERT _recursions == 0. - assert (_recursions == 0 , "invariant") ; - assert (_owner == Self , "invariant") ; - assert (_succ != Self , "invariant") ; - assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; - - // The thread -- now the owner -- is back in vm mode. - // Report the glorious news via TI,DTrace and jvmstat. - // The probe effect is non-trivial. All the reportage occurs - // while we hold the monitor, increasing the length of the critical - // section. Amdahl's parallel speedup law comes vividly into play. - // - // Another option might be to aggregate the events (thread local or - // per-monitor aggregation) and defer reporting until a more opportune - // time -- such as next time some thread encounters contention but has - // yet to acquire the lock. While spinning that thread could - // spinning we could increment JVMStat counters, etc. - - DTRACE_MONITOR_PROBE(contended__entered, this, object(), jt); - if (JvmtiExport::should_post_monitor_contended_entered()) { - JvmtiExport::post_monitor_contended_entered(jt, this); - } - if (ObjectSynchronizer::_sync_ContendedLockAttempts != NULL) { - ObjectSynchronizer::_sync_ContendedLockAttempts->inc() ; - } -} - -void ObjectMonitor::ExitEpilog (Thread * Self, ObjectWaiter * Wakee) { - assert (_owner == Self, "invariant") ; - - // Exit protocol: - // 1. ST _succ = wakee - // 2. membar #loadstore|#storestore; - // 2. ST _owner = NULL - // 3. unpark(wakee) - - _succ = Knob_SuccEnabled ? Wakee->_thread : NULL ; - ParkEvent * Trigger = Wakee->_event ; - - // Hygiene -- once we've set _owner = NULL we can't safely dereference Wakee again. - // The thread associated with Wakee may have grabbed the lock and "Wakee" may be - // out-of-scope (non-extant). - Wakee = NULL ; - - // Drop the lock - OrderAccess::release_store_ptr (&_owner, NULL) ; - OrderAccess::fence() ; // ST _owner vs LD in unpark() - - // TODO-FIXME: - // If there's a safepoint pending the best policy would be to - // get _this thread to a safepoint and only wake the successor - // after the safepoint completed. monitorexit uses a "leaf" - // state transition, however, so this thread can't become - // safe at this point in time. (Its stack isn't walkable). - // The next best thing is to defer waking the successor by - // adding to a list of thread to be unparked after at the - // end of the forthcoming STW). - if (SafepointSynchronize::do_call_back()) { - TEVENT (unpark before SAFEPOINT) ; - } - - // Possible optimizations ... - // - // * Consider: set Wakee->UnparkTime = timeNow() - // When the thread wakes up it'll compute (timeNow() - Self->UnparkTime()). - // By measuring recent ONPROC latency we can approximate the - // system load. In turn, we can feed that information back - // into the spinning & succession policies. - // (ONPROC latency correlates strongly with load). - // - // * Pull affinity: - // If the wakee is cold then transiently setting it's affinity - // to the current CPU is a good idea. - // See http://j2se.east/~dice/PERSIST/050624-PullAffinity.txt - DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self); - Trigger->unpark() ; - - // Maintain stats and report events to JVMTI - if (ObjectSynchronizer::_sync_Parks != NULL) { - ObjectSynchronizer::_sync_Parks->inc() ; - } -} - - -// exit() -// ~~~~~~ -// Note that the collector can't reclaim the objectMonitor or deflate -// the object out from underneath the thread calling ::exit() as the -// thread calling ::exit() never transitions to a stable state. -// This inhibits GC, which in turn inhibits asynchronous (and -// inopportune) reclamation of "this". -// -// We'd like to assert that: (THREAD->thread_state() != _thread_blocked) ; -// There's one exception to the claim above, however. EnterI() can call -// exit() to drop a lock if the acquirer has been externally suspended. -// In that case exit() is called with _thread_state as _thread_blocked, -// but the monitor's _count field is > 0, which inhibits reclamation. -// -// 1-0 exit -// ~~~~~~~~ -// ::exit() uses a canonical 1-1 idiom with a MEMBAR although some of -// the fast-path operators have been optimized so the common ::exit() -// operation is 1-0. See i486.ad fast_unlock(), for instance. -// The code emitted by fast_unlock() elides the usual MEMBAR. This -// greatly improves latency -- MEMBAR and CAS having considerable local -// latency on modern processors -- but at the cost of "stranding". Absent the -// MEMBAR, a thread in fast_unlock() can race a thread in the slow -// ::enter() path, resulting in the entering thread being stranding -// and a progress-liveness failure. Stranding is extremely rare. -// We use timers (timed park operations) & periodic polling to detect -// and recover from stranding. Potentially stranded threads periodically -// wake up and poll the lock. See the usage of the _Responsible variable. -// -// The CAS() in enter provides for safety and exclusion, while the CAS or -// MEMBAR in exit provides for progress and avoids stranding. 1-0 locking -// eliminates the CAS/MEMBAR from the exist path, but it admits stranding. -// We detect and recover from stranding with timers. -// -// If a thread transiently strands it'll park until (a) another -// thread acquires the lock and then drops the lock, at which time the -// exiting thread will notice and unpark the stranded thread, or, (b) -// the timer expires. If the lock is high traffic then the stranding latency -// will be low due to (a). If the lock is low traffic then the odds of -// stranding are lower, although the worst-case stranding latency -// is longer. Critically, we don't want to put excessive load in the -// platform's timer subsystem. We want to minimize both the timer injection -// rate (timers created/sec) as well as the number of timers active at -// any one time. (more precisely, we want to minimize timer-seconds, which is -// the integral of the # of active timers at any instant over time). -// Both impinge on OS scalability. Given that, at most one thread parked on -// a monitor will use a timer. - -void ATTR ObjectMonitor::exit(TRAPS) { - Thread * Self = THREAD ; - if (THREAD != _owner) { - if (THREAD->is_lock_owned((address) _owner)) { - // Transmute _owner from a BasicLock pointer to a Thread address. - // We don't need to hold _mutex for this transition. - // Non-null to Non-null is safe as long as all readers can - // tolerate either flavor. - assert (_recursions == 0, "invariant") ; - _owner = THREAD ; - _recursions = 0 ; - OwnerIsThread = 1 ; - } else { - // NOTE: we need to handle unbalanced monitor enter/exit - // in native code by throwing an exception. - // TODO: Throw an IllegalMonitorStateException ? - TEVENT (Exit - Throw IMSX) ; - assert(false, "Non-balanced monitor enter/exit!"); - if (false) { - THROW(vmSymbols::java_lang_IllegalMonitorStateException()); - } - return; - } - } - - if (_recursions != 0) { - _recursions--; // this is simple recursive enter - TEVENT (Inflated exit - recursive) ; - return ; - } - - // Invariant: after setting Responsible=null an thread must execute - // a MEMBAR or other serializing instruction before fetching EntryList|cxq. - if ((SyncFlags & 4) == 0) { - _Responsible = NULL ; - } - - for (;;) { - assert (THREAD == _owner, "invariant") ; - - // Fast-path monitor exit: - // - // Observe the Dekker/Lamport duality: - // A thread in ::exit() executes: - // ST Owner=null; MEMBAR; LD EntryList|cxq. - // A thread in the contended ::enter() path executes the complementary: - // ST EntryList|cxq = nonnull; MEMBAR; LD Owner. - // - // Note that there's a benign race in the exit path. We can drop the - // lock, another thread can reacquire the lock immediately, and we can - // then wake a thread unnecessarily (yet another flavor of futile wakeup). - // This is benign, and we've structured the code so the windows are short - // and the frequency of such futile wakeups is low. - // - // We could eliminate the race by encoding both the "LOCKED" state and - // the queue head in a single word. Exit would then use either CAS to - // clear the LOCKED bit/byte. This precludes the desirable 1-0 optimization, - // however. - // - // Possible fast-path ::exit() optimization: - // The current fast-path exit implementation fetches both cxq and EntryList. - // See also i486.ad fast_unlock(). Testing has shown that two LDs - // isn't measurably slower than a single LD on any platforms. - // Still, we could reduce the 2 LDs to one or zero by one of the following: - // - // - Use _count instead of cxq|EntryList - // We intend to eliminate _count, however, when we switch - // to on-the-fly deflation in ::exit() as is used in - // Metalocks and RelaxedLocks. - // - // - Establish the invariant that cxq == null implies EntryList == null. - // set cxq == EMPTY (1) to encode the state where cxq is empty - // by EntryList != null. EMPTY is a distinguished value. - // The fast-path exit() would fetch cxq but not EntryList. - // - // - Encode succ as follows: - // succ = t : Thread t is the successor -- t is ready or is spinning. - // Exiting thread does not need to wake a successor. - // succ = 0 : No successor required -> (EntryList|cxq) == null - // Exiting thread does not need to wake a successor - // succ = 1 : Successor required -> (EntryList|cxq) != null and - // logically succ == null. - // Exiting thread must wake a successor. - // - // The 1-1 fast-exit path would appear as : - // _owner = null ; membar ; - // if (_succ == 1 && CAS (&_owner, null, Self) == null) goto SlowPath - // goto FastPathDone ; - // - // and the 1-0 fast-exit path would appear as: - // if (_succ == 1) goto SlowPath - // Owner = null ; - // goto FastPathDone - // - // - Encode the LSB of _owner as 1 to indicate that exit() - // must use the slow-path and make a successor ready. - // (_owner & 1) == 0 IFF succ != null || (EntryList|cxq) == null - // (_owner & 1) == 0 IFF succ == null && (EntryList|cxq) != null (obviously) - // The 1-0 fast exit path would read: - // if (_owner != Self) goto SlowPath - // _owner = null - // goto FastPathDone - - if (Knob_ExitPolicy == 0) { - // release semantics: prior loads and stores from within the critical section - // must not float (reorder) past the following store that drops the lock. - // On SPARC that requires MEMBAR #loadstore|#storestore. - // But of course in TSO #loadstore|#storestore is not required. - // I'd like to write one of the following: - // A. OrderAccess::release() ; _owner = NULL - // B. OrderAccess::loadstore(); OrderAccess::storestore(); _owner = NULL; - // Unfortunately OrderAccess::release() and OrderAccess::loadstore() both - // store into a _dummy variable. That store is not needed, but can result - // in massive wasteful coherency traffic on classic SMP systems. - // Instead, I use release_store(), which is implemented as just a simple - // ST on x64, x86 and SPARC. - OrderAccess::release_store_ptr (&_owner, NULL) ; // drop the lock - OrderAccess::storeload() ; // See if we need to wake a successor - if ((intptr_t(_EntryList)|intptr_t(_cxq)) == 0 || _succ != NULL) { - TEVENT (Inflated exit - simple egress) ; - return ; - } - TEVENT (Inflated exit - complex egress) ; - - // Normally the exiting thread is responsible for ensuring succession, - // but if other successors are ready or other entering threads are spinning - // then this thread can simply store NULL into _owner and exit without - // waking a successor. The existence of spinners or ready successors - // guarantees proper succession (liveness). Responsibility passes to the - // ready or running successors. The exiting thread delegates the duty. - // More precisely, if a successor already exists this thread is absolved - // of the responsibility of waking (unparking) one. - // - // The _succ variable is critical to reducing futile wakeup frequency. - // _succ identifies the "heir presumptive" thread that has been made - // ready (unparked) but that has not yet run. We need only one such - // successor thread to guarantee progress. - // See http://www.usenix.org/events/jvm01/full_papers/dice/dice.pdf - // section 3.3 "Futile Wakeup Throttling" for details. - // - // Note that spinners in Enter() also set _succ non-null. - // In the current implementation spinners opportunistically set - // _succ so that exiting threads might avoid waking a successor. - // Another less appealing alternative would be for the exiting thread - // to drop the lock and then spin briefly to see if a spinner managed - // to acquire the lock. If so, the exiting thread could exit - // immediately without waking a successor, otherwise the exiting - // thread would need to dequeue and wake a successor. - // (Note that we'd need to make the post-drop spin short, but no - // shorter than the worst-case round-trip cache-line migration time. - // The dropped lock needs to become visible to the spinner, and then - // the acquisition of the lock by the spinner must become visible to - // the exiting thread). - // - - // It appears that an heir-presumptive (successor) must be made ready. - // Only the current lock owner can manipulate the EntryList or - // drain _cxq, so we need to reacquire the lock. If we fail - // to reacquire the lock the responsibility for ensuring succession - // falls to the new owner. - // - if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) { - return ; - } - TEVENT (Exit - Reacquired) ; - } else { - if ((intptr_t(_EntryList)|intptr_t(_cxq)) == 0 || _succ != NULL) { - OrderAccess::release_store_ptr (&_owner, NULL) ; // drop the lock - OrderAccess::storeload() ; - // Ratify the previously observed values. - if (_cxq == NULL || _succ != NULL) { - TEVENT (Inflated exit - simple egress) ; - return ; - } - - // inopportune interleaving -- the exiting thread (this thread) - // in the fast-exit path raced an entering thread in the slow-enter - // path. - // We have two choices: - // A. Try to reacquire the lock. - // If the CAS() fails return immediately, otherwise - // we either restart/rerun the exit operation, or simply - // fall-through into the code below which wakes a successor. - // B. If the elements forming the EntryList|cxq are TSM - // we could simply unpark() the lead thread and return - // without having set _succ. - if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) { - TEVENT (Inflated exit - reacquired succeeded) ; - return ; - } - TEVENT (Inflated exit - reacquired failed) ; - } else { - TEVENT (Inflated exit - complex egress) ; - } - } - - guarantee (_owner == THREAD, "invariant") ; - - // Select an appropriate successor ("heir presumptive") from the EntryList - // and make it ready. Generally we just wake the head of EntryList . - // There's no algorithmic constraint that we use the head - it's just - // a policy decision. Note that the thread at head of the EntryList - // remains at the head until it acquires the lock. This means we'll - // repeatedly wake the same thread until it manages to grab the lock. - // This is generally a good policy - if we're seeing lots of futile wakeups - // at least we're waking/rewaking a thread that's like to be hot or warm - // (have residual D$ and TLB affinity). - // - // "Wakeup locality" optimization: - // http://j2se.east/~dice/PERSIST/040825-WakeLocality.txt - // In the future we'll try to bias the selection mechanism - // to preferentially pick a thread that recently ran on - // a processor element that shares cache with the CPU on which - // the exiting thread is running. We need access to Solaris' - // schedctl.sc_cpu to make that work. - // - ObjectWaiter * w = NULL ; - int QMode = Knob_QMode ; - - if (QMode == 2 && _cxq != NULL) { - // QMode == 2 : cxq has precedence over EntryList. - // Try to directly wake a successor from the cxq. - // If successful, the successor will need to unlink itself from cxq. - w = _cxq ; - assert (w != NULL, "invariant") ; - assert (w->TState == ObjectWaiter::TS_CXQ, "Invariant") ; - ExitEpilog (Self, w) ; - return ; - } - - if (QMode == 3 && _cxq != NULL) { - // Aggressively drain cxq into EntryList at the first opportunity. - // This policy ensure that recently-run threads live at the head of EntryList. - // Drain _cxq into EntryList - bulk transfer. - // First, detach _cxq. - // The following loop is tantamount to: w = swap (&cxq, NULL) - w = _cxq ; - for (;;) { - assert (w != NULL, "Invariant") ; - ObjectWaiter * u = (ObjectWaiter *) Atomic::cmpxchg_ptr (NULL, &_cxq, w) ; - if (u == w) break ; - w = u ; - } - assert (w != NULL , "invariant") ; - - ObjectWaiter * q = NULL ; - ObjectWaiter * p ; - for (p = w ; p != NULL ; p = p->_next) { - guarantee (p->TState == ObjectWaiter::TS_CXQ, "Invariant") ; - p->TState = ObjectWaiter::TS_ENTER ; - p->_prev = q ; - q = p ; - } - - // Append the RATs to the EntryList - // TODO: organize EntryList as a CDLL so we can locate the tail in constant-time. - ObjectWaiter * Tail ; - for (Tail = _EntryList ; Tail != NULL && Tail->_next != NULL ; Tail = Tail->_next) ; - if (Tail == NULL) { - _EntryList = w ; - } else { - Tail->_next = w ; - w->_prev = Tail ; - } - - // Fall thru into code that tries to wake a successor from EntryList - } - - if (QMode == 4 && _cxq != NULL) { - // Aggressively drain cxq into EntryList at the first opportunity. - // This policy ensure that recently-run threads live at the head of EntryList. - - // Drain _cxq into EntryList - bulk transfer. - // First, detach _cxq. - // The following loop is tantamount to: w = swap (&cxq, NULL) - w = _cxq ; - for (;;) { - assert (w != NULL, "Invariant") ; - ObjectWaiter * u = (ObjectWaiter *) Atomic::cmpxchg_ptr (NULL, &_cxq, w) ; - if (u == w) break ; - w = u ; - } - assert (w != NULL , "invariant") ; - - ObjectWaiter * q = NULL ; - ObjectWaiter * p ; - for (p = w ; p != NULL ; p = p->_next) { - guarantee (p->TState == ObjectWaiter::TS_CXQ, "Invariant") ; - p->TState = ObjectWaiter::TS_ENTER ; - p->_prev = q ; - q = p ; - } - - // Prepend the RATs to the EntryList - if (_EntryList != NULL) { - q->_next = _EntryList ; - _EntryList->_prev = q ; - } - _EntryList = w ; - - // Fall thru into code that tries to wake a successor from EntryList - } - - w = _EntryList ; - if (w != NULL) { - // I'd like to write: guarantee (w->_thread != Self). - // But in practice an exiting thread may find itself on the EntryList. - // Lets say thread T1 calls O.wait(). Wait() enqueues T1 on O's waitset and - // then calls exit(). Exit release the lock by setting O._owner to NULL. - // Lets say T1 then stalls. T2 acquires O and calls O.notify(). The - // notify() operation moves T1 from O's waitset to O's EntryList. T2 then - // release the lock "O". T2 resumes immediately after the ST of null into - // _owner, above. T2 notices that the EntryList is populated, so it - // reacquires the lock and then finds itself on the EntryList. - // Given all that, we have to tolerate the circumstance where "w" is - // associated with Self. - assert (w->TState == ObjectWaiter::TS_ENTER, "invariant") ; - ExitEpilog (Self, w) ; - return ; - } - - // If we find that both _cxq and EntryList are null then just - // re-run the exit protocol from the top. - w = _cxq ; - if (w == NULL) continue ; - - // Drain _cxq into EntryList - bulk transfer. - // First, detach _cxq. - // The following loop is tantamount to: w = swap (&cxq, NULL) - for (;;) { - assert (w != NULL, "Invariant") ; - ObjectWaiter * u = (ObjectWaiter *) Atomic::cmpxchg_ptr (NULL, &_cxq, w) ; - if (u == w) break ; - w = u ; - } - TEVENT (Inflated exit - drain cxq into EntryList) ; - - assert (w != NULL , "invariant") ; - assert (_EntryList == NULL , "invariant") ; - - // Convert the LIFO SLL anchored by _cxq into a DLL. - // The list reorganization step operates in O(LENGTH(w)) time. - // It's critical that this step operate quickly as - // "Self" still holds the outer-lock, restricting parallelism - // and effectively lengthening the critical section. - // Invariant: s chases t chases u. - // TODO-FIXME: consider changing EntryList from a DLL to a CDLL so - // we have faster access to the tail. - - if (QMode == 1) { - // QMode == 1 : drain cxq to EntryList, reversing order - // We also reverse the order of the list. - ObjectWaiter * s = NULL ; - ObjectWaiter * t = w ; - ObjectWaiter * u = NULL ; - while (t != NULL) { - guarantee (t->TState == ObjectWaiter::TS_CXQ, "invariant") ; - t->TState = ObjectWaiter::TS_ENTER ; - u = t->_next ; - t->_prev = u ; - t->_next = s ; - s = t; - t = u ; - } - _EntryList = s ; - assert (s != NULL, "invariant") ; - } else { - // QMode == 0 or QMode == 2 - _EntryList = w ; - ObjectWaiter * q = NULL ; - ObjectWaiter * p ; - for (p = w ; p != NULL ; p = p->_next) { - guarantee (p->TState == ObjectWaiter::TS_CXQ, "Invariant") ; - p->TState = ObjectWaiter::TS_ENTER ; - p->_prev = q ; - q = p ; - } - } - - // In 1-0 mode we need: ST EntryList; MEMBAR #storestore; ST _owner = NULL - // The MEMBAR is satisfied by the release_store() operation in ExitEpilog(). - - // See if we can abdicate to a spinner instead of waking a thread. - // A primary goal of the implementation is to reduce the - // context-switch rate. - if (_succ != NULL) continue; - - w = _EntryList ; - if (w != NULL) { - guarantee (w->TState == ObjectWaiter::TS_ENTER, "invariant") ; - ExitEpilog (Self, w) ; - return ; - } - } -} -// complete_exit exits a lock returning recursion count -// complete_exit/reenter operate as a wait without waiting -// complete_exit requires an inflated monitor -// The _owner field is not always the Thread addr even with an -// inflated monitor, e.g. the monitor can be inflated by a non-owning -// thread due to contention. -intptr_t ObjectMonitor::complete_exit(TRAPS) { - Thread * const Self = THREAD; - assert(Self->is_Java_thread(), "Must be Java thread!"); - JavaThread *jt = (JavaThread *)THREAD; - - DeferredInitialize(); - - if (THREAD != _owner) { - if (THREAD->is_lock_owned ((address)_owner)) { - assert(_recursions == 0, "internal state error"); - _owner = THREAD ; /* Convert from basiclock addr to Thread addr */ - _recursions = 0 ; - OwnerIsThread = 1 ; - } - } - - guarantee(Self == _owner, "complete_exit not owner"); - intptr_t save = _recursions; // record the old recursion count - _recursions = 0; // set the recursion level to be 0 - exit (Self) ; // exit the monitor - guarantee (_owner != Self, "invariant"); - return save; -} - -// reenter() enters a lock and sets recursion count -// complete_exit/reenter operate as a wait without waiting -void ObjectMonitor::reenter(intptr_t recursions, TRAPS) { - Thread * const Self = THREAD; - assert(Self->is_Java_thread(), "Must be Java thread!"); - JavaThread *jt = (JavaThread *)THREAD; - - guarantee(_owner != Self, "reenter already owner"); - enter (THREAD); // enter the monitor - guarantee (_recursions == 0, "reenter recursion"); - _recursions = recursions; - return; -} - -// Note: a subset of changes to ObjectMonitor::wait() -// will need to be replicated in complete_exit above -void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { - Thread * const Self = THREAD ; - assert(Self->is_Java_thread(), "Must be Java thread!"); - JavaThread *jt = (JavaThread *)THREAD; - - DeferredInitialize () ; - - // Throw IMSX or IEX. - CHECK_OWNER(); - - // check for a pending interrupt - if (interruptible && Thread::is_interrupted(Self, true) && !HAS_PENDING_EXCEPTION) { - // post monitor waited event. Note that this is past-tense, we are done waiting. - if (JvmtiExport::should_post_monitor_waited()) { - // Note: 'false' parameter is passed here because the - // wait was not timed out due to thread interrupt. - JvmtiExport::post_monitor_waited(jt, this, false); - } - TEVENT (Wait - Throw IEX) ; - THROW(vmSymbols::java_lang_InterruptedException()); - return ; - } - TEVENT (Wait) ; - - assert (Self->_Stalled == 0, "invariant") ; - Self->_Stalled = intptr_t(this) ; - jt->set_current_waiting_monitor(this); - - // create a node to be put into the queue - // Critically, after we reset() the event but prior to park(), we must check - // for a pending interrupt. - ObjectWaiter node(Self); - node.TState = ObjectWaiter::TS_WAIT ; - Self->_ParkEvent->reset() ; - OrderAccess::fence(); // ST into Event; membar ; LD interrupted-flag - - // Enter the waiting queue, which is a circular doubly linked list in this case - // but it could be a priority queue or any data structure. - // _WaitSetLock protects the wait queue. Normally the wait queue is accessed only - // by the the owner of the monitor *except* in the case where park() - // returns because of a timeout of interrupt. Contention is exceptionally rare - // so we use a simple spin-lock instead of a heavier-weight blocking lock. - - Thread::SpinAcquire (&_WaitSetLock, "WaitSet - add") ; - AddWaiter (&node) ; - Thread::SpinRelease (&_WaitSetLock) ; - - if ((SyncFlags & 4) == 0) { - _Responsible = NULL ; - } - intptr_t save = _recursions; // record the old recursion count - _waiters++; // increment the number of waiters - _recursions = 0; // set the recursion level to be 1 - exit (Self) ; // exit the monitor - guarantee (_owner != Self, "invariant") ; - - // As soon as the ObjectMonitor's ownership is dropped in the exit() - // call above, another thread can enter() the ObjectMonitor, do the - // notify(), and exit() the ObjectMonitor. If the other thread's - // exit() call chooses this thread as the successor and the unpark() - // call happens to occur while this thread is posting a - // MONITOR_CONTENDED_EXIT event, then we run the risk of the event - // handler using RawMonitors and consuming the unpark(). - // - // To avoid the problem, we re-post the event. This does no harm - // even if the original unpark() was not consumed because we are the - // chosen successor for this monitor. - if (node._notified != 0 && _succ == Self) { - node._event->unpark(); - } - - // The thread is on the WaitSet list - now park() it. - // On MP systems it's conceivable that a brief spin before we park - // could be profitable. - // - // TODO-FIXME: change the following logic to a loop of the form - // while (!timeout && !interrupted && _notified == 0) park() - - int ret = OS_OK ; - int WasNotified = 0 ; - { // State transition wrappers - OSThread* osthread = Self->osthread(); - OSThreadWaitState osts(osthread, true); - { - ThreadBlockInVM tbivm(jt); - // Thread is in thread_blocked state and oop access is unsafe. - jt->set_suspend_equivalent(); - - if (interruptible && (Thread::is_interrupted(THREAD, false) || HAS_PENDING_EXCEPTION)) { - // Intentionally empty - } else - if (node._notified == 0) { - if (millis <= 0) { - Self->_ParkEvent->park () ; - } else { - ret = Self->_ParkEvent->park (millis) ; - } - } - - // were we externally suspended while we were waiting? - if (ExitSuspendEquivalent (jt)) { - // TODO-FIXME: add -- if succ == Self then succ = null. - jt->java_suspend_self(); - } - - } // Exit thread safepoint: transition _thread_blocked -> _thread_in_vm - - - // Node may be on the WaitSet, the EntryList (or cxq), or in transition - // from the WaitSet to the EntryList. - // See if we need to remove Node from the WaitSet. - // We use double-checked locking to avoid grabbing _WaitSetLock - // if the thread is not on the wait queue. - // - // Note that we don't need a fence before the fetch of TState. - // In the worst case we'll fetch a old-stale value of TS_WAIT previously - // written by the is thread. (perhaps the fetch might even be satisfied - // by a look-aside into the processor's own store buffer, although given - // the length of the code path between the prior ST and this load that's - // highly unlikely). If the following LD fetches a stale TS_WAIT value - // then we'll acquire the lock and then re-fetch a fresh TState value. - // That is, we fail toward safety. - - if (node.TState == ObjectWaiter::TS_WAIT) { - Thread::SpinAcquire (&_WaitSetLock, "WaitSet - unlink") ; - if (node.TState == ObjectWaiter::TS_WAIT) { - DequeueSpecificWaiter (&node) ; // unlink from WaitSet - assert(node._notified == 0, "invariant"); - node.TState = ObjectWaiter::TS_RUN ; - } - Thread::SpinRelease (&_WaitSetLock) ; - } - - // The thread is now either on off-list (TS_RUN), - // on the EntryList (TS_ENTER), or on the cxq (TS_CXQ). - // The Node's TState variable is stable from the perspective of this thread. - // No other threads will asynchronously modify TState. - guarantee (node.TState != ObjectWaiter::TS_WAIT, "invariant") ; - OrderAccess::loadload() ; - if (_succ == Self) _succ = NULL ; - WasNotified = node._notified ; - - // Reentry phase -- reacquire the monitor. - // re-enter contended monitor after object.wait(). - // retain OBJECT_WAIT state until re-enter successfully completes - // Thread state is thread_in_vm and oop access is again safe, - // although the raw address of the object may have changed. - // (Don't cache naked oops over safepoints, of course). - - // post monitor waited event. Note that this is past-tense, we are done waiting. - if (JvmtiExport::should_post_monitor_waited()) { - JvmtiExport::post_monitor_waited(jt, this, ret == OS_TIMEOUT); - } - OrderAccess::fence() ; - - assert (Self->_Stalled != 0, "invariant") ; - Self->_Stalled = 0 ; - - assert (_owner != Self, "invariant") ; - ObjectWaiter::TStates v = node.TState ; - if (v == ObjectWaiter::TS_RUN) { - enter (Self) ; - } else { - guarantee (v == ObjectWaiter::TS_ENTER || v == ObjectWaiter::TS_CXQ, "invariant") ; - ReenterI (Self, &node) ; - node.wait_reenter_end(this); - } - - // Self has reacquired the lock. - // Lifecycle - the node representing Self must not appear on any queues. - // Node is about to go out-of-scope, but even if it were immortal we wouldn't - // want residual elements associated with this thread left on any lists. - guarantee (node.TState == ObjectWaiter::TS_RUN, "invariant") ; - assert (_owner == Self, "invariant") ; - assert (_succ != Self , "invariant") ; - } // OSThreadWaitState() - - jt->set_current_waiting_monitor(NULL); - - guarantee (_recursions == 0, "invariant") ; - _recursions = save; // restore the old recursion count - _waiters--; // decrement the number of waiters - - // Verify a few postconditions - assert (_owner == Self , "invariant") ; - assert (_succ != Self , "invariant") ; - assert (((oop)(object()))->mark() == markOopDesc::encode(this), "invariant") ; - - if (SyncFlags & 32) { - OrderAccess::fence() ; - } - - // check if the notification happened - if (!WasNotified) { - // no, it could be timeout or Thread.interrupt() or both - // check for interrupt event, otherwise it is timeout - if (interruptible && Thread::is_interrupted(Self, true) && !HAS_PENDING_EXCEPTION) { - TEVENT (Wait - throw IEX from epilog) ; - THROW(vmSymbols::java_lang_InterruptedException()); - } - } - - // NOTE: Spurious wake up will be consider as timeout. - // Monitor notify has precedence over thread interrupt. -} - - -// Consider: -// If the lock is cool (cxq == null && succ == null) and we're on an MP system -// then instead of transferring a thread from the WaitSet to the EntryList -// we might just dequeue a thread from the WaitSet and directly unpark() it. - -void ObjectMonitor::notify(TRAPS) { - CHECK_OWNER(); - if (_WaitSet == NULL) { - TEVENT (Empty-Notify) ; - return ; - } - DTRACE_MONITOR_PROBE(notify, this, object(), THREAD); - - int Policy = Knob_MoveNotifyee ; - - Thread::SpinAcquire (&_WaitSetLock, "WaitSet - notify") ; - ObjectWaiter * iterator = DequeueWaiter() ; - if (iterator != NULL) { - TEVENT (Notify1 - Transfer) ; - guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant") ; - guarantee (iterator->_notified == 0, "invariant") ; - // Disposition - what might we do with iterator ? - // a. add it directly to the EntryList - either tail or head. - // b. push it onto the front of the _cxq. - // For now we use (a). - if (Policy != 4) { - iterator->TState = ObjectWaiter::TS_ENTER ; - } - iterator->_notified = 1 ; - - ObjectWaiter * List = _EntryList ; - if (List != NULL) { - assert (List->_prev == NULL, "invariant") ; - assert (List->TState == ObjectWaiter::TS_ENTER, "invariant") ; - assert (List != iterator, "invariant") ; - } - - if (Policy == 0) { // prepend to EntryList - if (List == NULL) { - iterator->_next = iterator->_prev = NULL ; - _EntryList = iterator ; - } else { - List->_prev = iterator ; - iterator->_next = List ; - iterator->_prev = NULL ; - _EntryList = iterator ; - } - } else - if (Policy == 1) { // append to EntryList - if (List == NULL) { - iterator->_next = iterator->_prev = NULL ; - _EntryList = iterator ; - } else { - // CONSIDER: finding the tail currently requires a linear-time walk of - // the EntryList. We can make tail access constant-time by converting to - // a CDLL instead of using our current DLL. - ObjectWaiter * Tail ; - for (Tail = List ; Tail->_next != NULL ; Tail = Tail->_next) ; - assert (Tail != NULL && Tail->_next == NULL, "invariant") ; - Tail->_next = iterator ; - iterator->_prev = Tail ; - iterator->_next = NULL ; - } - } else - if (Policy == 2) { // prepend to cxq - // prepend to cxq - if (List == NULL) { - iterator->_next = iterator->_prev = NULL ; - _EntryList = iterator ; - } else { - iterator->TState = ObjectWaiter::TS_CXQ ; - for (;;) { - ObjectWaiter * Front = _cxq ; - iterator->_next = Front ; - if (Atomic::cmpxchg_ptr (iterator, &_cxq, Front) == Front) { - break ; - } - } - } - } else - if (Policy == 3) { // append to cxq - iterator->TState = ObjectWaiter::TS_CXQ ; - for (;;) { - ObjectWaiter * Tail ; - Tail = _cxq ; - if (Tail == NULL) { - iterator->_next = NULL ; - if (Atomic::cmpxchg_ptr (iterator, &_cxq, NULL) == NULL) { - break ; - } - } else { - while (Tail->_next != NULL) Tail = Tail->_next ; - Tail->_next = iterator ; - iterator->_prev = Tail ; - iterator->_next = NULL ; - break ; - } - } - } else { - ParkEvent * ev = iterator->_event ; - iterator->TState = ObjectWaiter::TS_RUN ; - OrderAccess::fence() ; - ev->unpark() ; - } - - if (Policy < 4) { - iterator->wait_reenter_begin(this); - } - - // _WaitSetLock protects the wait queue, not the EntryList. We could - // move the add-to-EntryList operation, above, outside the critical section - // protected by _WaitSetLock. In practice that's not useful. With the - // exception of wait() timeouts and interrupts the monitor owner - // is the only thread that grabs _WaitSetLock. There's almost no contention - // on _WaitSetLock so it's not profitable to reduce the length of the - // critical section. - } - - Thread::SpinRelease (&_WaitSetLock) ; - - if (iterator != NULL && ObjectSynchronizer::_sync_Notifications != NULL) { - ObjectSynchronizer::_sync_Notifications->inc() ; - } -} - - -void ObjectMonitor::notifyAll(TRAPS) { - CHECK_OWNER(); - ObjectWaiter* iterator; - if (_WaitSet == NULL) { - TEVENT (Empty-NotifyAll) ; - return ; - } - DTRACE_MONITOR_PROBE(notifyAll, this, object(), THREAD); - - int Policy = Knob_MoveNotifyee ; - int Tally = 0 ; - Thread::SpinAcquire (&_WaitSetLock, "WaitSet - notifyall") ; - - for (;;) { - iterator = DequeueWaiter () ; - if (iterator == NULL) break ; - TEVENT (NotifyAll - Transfer1) ; - ++Tally ; - - // Disposition - what might we do with iterator ? - // a. add it directly to the EntryList - either tail or head. - // b. push it onto the front of the _cxq. - // For now we use (a). - // - // TODO-FIXME: currently notifyAll() transfers the waiters one-at-a-time from the waitset - // to the EntryList. This could be done more efficiently with a single bulk transfer, - // but in practice it's not time-critical. Beware too, that in prepend-mode we invert the - // order of the waiters. Lets say that the waitset is "ABCD" and the EntryList is "XYZ". - // After a notifyAll() in prepend mode the waitset will be empty and the EntryList will - // be "DCBAXYZ". - - guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant") ; - guarantee (iterator->_notified == 0, "invariant") ; - iterator->_notified = 1 ; - if (Policy != 4) { - iterator->TState = ObjectWaiter::TS_ENTER ; - } - - ObjectWaiter * List = _EntryList ; - if (List != NULL) { - assert (List->_prev == NULL, "invariant") ; - assert (List->TState == ObjectWaiter::TS_ENTER, "invariant") ; - assert (List != iterator, "invariant") ; - } - - if (Policy == 0) { // prepend to EntryList - if (List == NULL) { - iterator->_next = iterator->_prev = NULL ; - _EntryList = iterator ; - } else { - List->_prev = iterator ; - iterator->_next = List ; - iterator->_prev = NULL ; - _EntryList = iterator ; - } - } else - if (Policy == 1) { // append to EntryList - if (List == NULL) { - iterator->_next = iterator->_prev = NULL ; - _EntryList = iterator ; - } else { - // CONSIDER: finding the tail currently requires a linear-time walk of - // the EntryList. We can make tail access constant-time by converting to - // a CDLL instead of using our current DLL. - ObjectWaiter * Tail ; - for (Tail = List ; Tail->_next != NULL ; Tail = Tail->_next) ; - assert (Tail != NULL && Tail->_next == NULL, "invariant") ; - Tail->_next = iterator ; - iterator->_prev = Tail ; - iterator->_next = NULL ; - } - } else - if (Policy == 2) { // prepend to cxq - // prepend to cxq - iterator->TState = ObjectWaiter::TS_CXQ ; - for (;;) { - ObjectWaiter * Front = _cxq ; - iterator->_next = Front ; - if (Atomic::cmpxchg_ptr (iterator, &_cxq, Front) == Front) { - break ; - } - } - } else - if (Policy == 3) { // append to cxq - iterator->TState = ObjectWaiter::TS_CXQ ; - for (;;) { - ObjectWaiter * Tail ; - Tail = _cxq ; - if (Tail == NULL) { - iterator->_next = NULL ; - if (Atomic::cmpxchg_ptr (iterator, &_cxq, NULL) == NULL) { - break ; - } - } else { - while (Tail->_next != NULL) Tail = Tail->_next ; - Tail->_next = iterator ; - iterator->_prev = Tail ; - iterator->_next = NULL ; - break ; - } - } - } else { - ParkEvent * ev = iterator->_event ; - iterator->TState = ObjectWaiter::TS_RUN ; - OrderAccess::fence() ; - ev->unpark() ; - } - - if (Policy < 4) { - iterator->wait_reenter_begin(this); - } - - // _WaitSetLock protects the wait queue, not the EntryList. We could - // move the add-to-EntryList operation, above, outside the critical section - // protected by _WaitSetLock. In practice that's not useful. With the - // exception of wait() timeouts and interrupts the monitor owner - // is the only thread that grabs _WaitSetLock. There's almost no contention - // on _WaitSetLock so it's not profitable to reduce the length of the - // critical section. - } - - Thread::SpinRelease (&_WaitSetLock) ; - - if (Tally != 0 && ObjectSynchronizer::_sync_Notifications != NULL) { - ObjectSynchronizer::_sync_Notifications->inc(Tally) ; - } -} - -// check_slow() is a misnomer. It's called to simply to throw an IMSX exception. -// TODO-FIXME: remove check_slow() -- it's likely dead. - -void ObjectMonitor::check_slow(TRAPS) { - TEVENT (check_slow - throw IMSX) ; - assert(THREAD != _owner && !THREAD->is_lock_owned((address) _owner), "must not be owner"); - THROW_MSG(vmSymbols::java_lang_IllegalMonitorStateException(), "current thread not owner"); -} - - -// ------------------------------------------------------------------------- -// The raw monitor subsystem is entirely distinct from normal -// java-synchronization or jni-synchronization. raw monitors are not -// associated with objects. They can be implemented in any manner -// that makes sense. The original implementors decided to piggy-back -// the raw-monitor implementation on the existing Java objectMonitor mechanism. -// This flaw needs to fixed. We should reimplement raw monitors as sui-generis. -// Specifically, we should not implement raw monitors via java monitors. -// Time permitting, we should disentangle and deconvolve the two implementations -// and move the resulting raw monitor implementation over to the JVMTI directories. -// Ideally, the raw monitor implementation would be built on top of -// park-unpark and nothing else. -// -// raw monitors are used mainly by JVMTI -// The raw monitor implementation borrows the ObjectMonitor structure, -// but the operators are degenerate and extremely simple. -// -// Mixed use of a single objectMonitor instance -- as both a raw monitor -// and a normal java monitor -- is not permissible. -// -// Note that we use the single RawMonitor_lock to protect queue operations for -// _all_ raw monitors. This is a scalability impediment, but since raw monitor usage -// is deprecated and rare, this is not of concern. The RawMonitor_lock can not -// be held indefinitely. The critical sections must be short and bounded. -// -// ------------------------------------------------------------------------- - -int ObjectMonitor::SimpleEnter (Thread * Self) { - for (;;) { - if (Atomic::cmpxchg_ptr (Self, &_owner, NULL) == NULL) { - return OS_OK ; - } - - ObjectWaiter Node (Self) ; - Self->_ParkEvent->reset() ; // strictly optional - Node.TState = ObjectWaiter::TS_ENTER ; - - RawMonitor_lock->lock_without_safepoint_check() ; - Node._next = _EntryList ; - _EntryList = &Node ; - OrderAccess::fence() ; - if (_owner == NULL && Atomic::cmpxchg_ptr (Self, &_owner, NULL) == NULL) { - _EntryList = Node._next ; - RawMonitor_lock->unlock() ; - return OS_OK ; - } - RawMonitor_lock->unlock() ; - while (Node.TState == ObjectWaiter::TS_ENTER) { - Self->_ParkEvent->park() ; - } - } -} - -int ObjectMonitor::SimpleExit (Thread * Self) { - guarantee (_owner == Self, "invariant") ; - OrderAccess::release_store_ptr (&_owner, NULL) ; - OrderAccess::fence() ; - if (_EntryList == NULL) return OS_OK ; - ObjectWaiter * w ; - - RawMonitor_lock->lock_without_safepoint_check() ; - w = _EntryList ; - if (w != NULL) { - _EntryList = w->_next ; - } - RawMonitor_lock->unlock() ; - if (w != NULL) { - guarantee (w ->TState == ObjectWaiter::TS_ENTER, "invariant") ; - ParkEvent * ev = w->_event ; - w->TState = ObjectWaiter::TS_RUN ; - OrderAccess::fence() ; - ev->unpark() ; - } - return OS_OK ; -} - -int ObjectMonitor::SimpleWait (Thread * Self, jlong millis) { - guarantee (_owner == Self , "invariant") ; - guarantee (_recursions == 0, "invariant") ; - - ObjectWaiter Node (Self) ; - Node._notified = 0 ; - Node.TState = ObjectWaiter::TS_WAIT ; - - RawMonitor_lock->lock_without_safepoint_check() ; - Node._next = _WaitSet ; - _WaitSet = &Node ; - RawMonitor_lock->unlock() ; - - SimpleExit (Self) ; - guarantee (_owner != Self, "invariant") ; - - int ret = OS_OK ; - if (millis <= 0) { - Self->_ParkEvent->park(); - } else { - ret = Self->_ParkEvent->park(millis); - } - - // If thread still resides on the waitset then unlink it. - // Double-checked locking -- the usage is safe in this context - // as we TState is volatile and the lock-unlock operators are - // serializing (barrier-equivalent). - - if (Node.TState == ObjectWaiter::TS_WAIT) { - RawMonitor_lock->lock_without_safepoint_check() ; - if (Node.TState == ObjectWaiter::TS_WAIT) { - // Simple O(n) unlink, but performance isn't critical here. - ObjectWaiter * p ; - ObjectWaiter * q = NULL ; - for (p = _WaitSet ; p != &Node; p = p->_next) { - q = p ; - } - guarantee (p == &Node, "invariant") ; - if (q == NULL) { - guarantee (p == _WaitSet, "invariant") ; - _WaitSet = p->_next ; - } else { - guarantee (p == q->_next, "invariant") ; - q->_next = p->_next ; - } - Node.TState = ObjectWaiter::TS_RUN ; - } - RawMonitor_lock->unlock() ; - } - - guarantee (Node.TState == ObjectWaiter::TS_RUN, "invariant") ; - SimpleEnter (Self) ; - - guarantee (_owner == Self, "invariant") ; - guarantee (_recursions == 0, "invariant") ; - return ret ; -} - -int ObjectMonitor::SimpleNotify (Thread * Self, bool All) { - guarantee (_owner == Self, "invariant") ; - if (_WaitSet == NULL) return OS_OK ; - - // We have two options: - // A. Transfer the threads from the WaitSet to the EntryList - // B. Remove the thread from the WaitSet and unpark() it. - // - // We use (B), which is crude and results in lots of futile - // context switching. In particular (B) induces lots of contention. - - ParkEvent * ev = NULL ; // consider using a small auto array ... - RawMonitor_lock->lock_without_safepoint_check() ; - for (;;) { - ObjectWaiter * w = _WaitSet ; - if (w == NULL) break ; - _WaitSet = w->_next ; - if (ev != NULL) { ev->unpark(); ev = NULL; } - ev = w->_event ; - OrderAccess::loadstore() ; - w->TState = ObjectWaiter::TS_RUN ; - OrderAccess::storeload(); - if (!All) break ; - } - RawMonitor_lock->unlock() ; - if (ev != NULL) ev->unpark(); - return OS_OK ; -} - -// Any JavaThread will enter here with state _thread_blocked -int ObjectMonitor::raw_enter(TRAPS) { - TEVENT (raw_enter) ; - void * Contended ; - - // don't enter raw monitor if thread is being externally suspended, it will - // surprise the suspender if a "suspended" thread can still enter monitor - JavaThread * jt = (JavaThread *)THREAD; - if (THREAD->is_Java_thread()) { - jt->SR_lock()->lock_without_safepoint_check(); - while (jt->is_external_suspend()) { - jt->SR_lock()->unlock(); - jt->java_suspend_self(); - jt->SR_lock()->lock_without_safepoint_check(); - } - // guarded by SR_lock to avoid racing with new external suspend requests. - Contended = Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) ; - jt->SR_lock()->unlock(); - } else { - Contended = Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) ; - } - - if (Contended == THREAD) { - _recursions ++ ; - return OM_OK ; - } - - if (Contended == NULL) { - guarantee (_owner == THREAD, "invariant") ; - guarantee (_recursions == 0, "invariant") ; - return OM_OK ; - } - - THREAD->set_current_pending_monitor(this); - - if (!THREAD->is_Java_thread()) { - // No other non-Java threads besides VM thread would acquire - // a raw monitor. - assert(THREAD->is_VM_thread(), "must be VM thread"); - SimpleEnter (THREAD) ; - } else { - guarantee (jt->thread_state() == _thread_blocked, "invariant") ; - for (;;) { - jt->set_suspend_equivalent(); - // cleared by handle_special_suspend_equivalent_condition() or - // java_suspend_self() - SimpleEnter (THREAD) ; - - // were we externally suspended while we were waiting? - if (!jt->handle_special_suspend_equivalent_condition()) break ; - - // This thread was externally suspended - // - // This logic isn't needed for JVMTI raw monitors, - // but doesn't hurt just in case the suspend rules change. This - // logic is needed for the ObjectMonitor.wait() reentry phase. - // We have reentered the contended monitor, but while we were - // waiting another thread suspended us. We don't want to reenter - // the monitor while suspended because that would surprise the - // thread that suspended us. - // - // Drop the lock - - SimpleExit (THREAD) ; - - jt->java_suspend_self(); - } - - assert(_owner == THREAD, "Fatal error with monitor owner!"); - assert(_recursions == 0, "Fatal error with monitor recursions!"); - } - - THREAD->set_current_pending_monitor(NULL); - guarantee (_recursions == 0, "invariant") ; - return OM_OK; -} - -// Used mainly for JVMTI raw monitor implementation -// Also used for ObjectMonitor::wait(). -int ObjectMonitor::raw_exit(TRAPS) { - TEVENT (raw_exit) ; - if (THREAD != _owner) { - return OM_ILLEGAL_MONITOR_STATE; - } - if (_recursions > 0) { - --_recursions ; - return OM_OK ; - } - - void * List = _EntryList ; - SimpleExit (THREAD) ; - - return OM_OK; -} - -// Used for JVMTI raw monitor implementation. -// All JavaThreads will enter here with state _thread_blocked - -int ObjectMonitor::raw_wait(jlong millis, bool interruptible, TRAPS) { - TEVENT (raw_wait) ; - if (THREAD != _owner) { - return OM_ILLEGAL_MONITOR_STATE; - } - - // To avoid spurious wakeups we reset the parkevent -- This is strictly optional. - // The caller must be able to tolerate spurious returns from raw_wait(). - THREAD->_ParkEvent->reset() ; - OrderAccess::fence() ; - - // check interrupt event - if (interruptible && Thread::is_interrupted(THREAD, true)) { - return OM_INTERRUPTED; - } - - intptr_t save = _recursions ; - _recursions = 0 ; - _waiters ++ ; - if (THREAD->is_Java_thread()) { - guarantee (((JavaThread *) THREAD)->thread_state() == _thread_blocked, "invariant") ; - ((JavaThread *)THREAD)->set_suspend_equivalent(); - } - int rv = SimpleWait (THREAD, millis) ; - _recursions = save ; - _waiters -- ; - - guarantee (THREAD == _owner, "invariant") ; - if (THREAD->is_Java_thread()) { - JavaThread * jSelf = (JavaThread *) THREAD ; - for (;;) { - if (!jSelf->handle_special_suspend_equivalent_condition()) break ; - SimpleExit (THREAD) ; - jSelf->java_suspend_self(); - SimpleEnter (THREAD) ; - jSelf->set_suspend_equivalent() ; - } - } - guarantee (THREAD == _owner, "invariant") ; - - if (interruptible && Thread::is_interrupted(THREAD, true)) { - return OM_INTERRUPTED; - } - return OM_OK ; -} - -int ObjectMonitor::raw_notify(TRAPS) { - TEVENT (raw_notify) ; - if (THREAD != _owner) { - return OM_ILLEGAL_MONITOR_STATE; - } - SimpleNotify (THREAD, false) ; - return OM_OK; -} - -int ObjectMonitor::raw_notifyAll(TRAPS) { - TEVENT (raw_notifyAll) ; - if (THREAD != _owner) { - return OM_ILLEGAL_MONITOR_STATE; - } - SimpleNotify (THREAD, true) ; - return OM_OK; -} - -#ifndef PRODUCT -void ObjectMonitor::verify() { -} - -void ObjectMonitor::print() { -} -#endif - //------------------------------------------------------------------------------ // Non-product code diff --git a/hotspot/src/share/vm/runtime/synchronizer.hpp b/hotspot/src/share/vm/runtime/synchronizer.hpp index 90af13ab00e..8c7132a9f31 100644 --- a/hotspot/src/share/vm/runtime/synchronizer.hpp +++ b/hotspot/src/share/vm/runtime/synchronizer.hpp @@ -22,53 +22,6 @@ * */ -class BasicLock VALUE_OBJ_CLASS_SPEC { - friend class VMStructs; - private: - volatile markOop _displaced_header; - public: - markOop displaced_header() const { return _displaced_header; } - void set_displaced_header(markOop header) { _displaced_header = header; } - - void print_on(outputStream* st) const; - - // move a basic lock (used during deoptimization - void move_to(oop obj, BasicLock* dest); - - static int displaced_header_offset_in_bytes() { return offset_of(BasicLock, _displaced_header); } -}; - -// A BasicObjectLock associates a specific Java object with a BasicLock. -// It is currently embedded in an interpreter frame. - -// Because some machines have alignment restrictions on the control stack, -// the actual space allocated by the interpreter may include padding words -// after the end of the BasicObjectLock. Also, in order to guarantee -// alignment of the embedded BasicLock objects on such machines, we -// put the embedded BasicLock at the beginning of the struct. - -class BasicObjectLock VALUE_OBJ_CLASS_SPEC { - friend class VMStructs; - private: - BasicLock _lock; // the lock, must be double word aligned - oop _obj; // object holds the lock; - - public: - // Manipulation - oop obj() const { return _obj; } - void set_obj(oop obj) { _obj = obj; } - BasicLock* lock() { return &_lock; } - - // Note: Use frame::interpreter_frame_monitor_size() for the size of BasicObjectLocks - // in interpreter activation frames since it includes machine-specific padding. - static int size() { return sizeof(BasicObjectLock)/wordSize; } - - // GC support - void oops_do(OopClosure* f) { f->do_oop(&_obj); } - - static int obj_offset_in_bytes() { return offset_of(BasicObjectLock, _obj); } - static int lock_offset_in_bytes() { return offset_of(BasicObjectLock, _lock); } -}; class ObjectMonitor; @@ -163,6 +116,8 @@ class ObjectSynchronizer : AllStatic { static void verify() PRODUCT_RETURN; static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0; + static void RegisterSpinCallback (int (*)(intptr_t, int), intptr_t) ; + private: enum { _BLOCKSIZE = 128 }; static ObjectMonitor* gBlockList; @@ -170,30 +125,6 @@ class ObjectSynchronizer : AllStatic { static ObjectMonitor * volatile gOmInUseList; // for moribund thread, so monitors they inflated still get scanned static int gOmInUseCount; - public: - static void Initialize () ; - static PerfCounter * _sync_ContendedLockAttempts ; - static PerfCounter * _sync_FutileWakeups ; - static PerfCounter * _sync_Parks ; - static PerfCounter * _sync_EmptyNotifications ; - static PerfCounter * _sync_Notifications ; - static PerfCounter * _sync_SlowEnter ; - static PerfCounter * _sync_SlowExit ; - static PerfCounter * _sync_SlowNotify ; - static PerfCounter * _sync_SlowNotifyAll ; - static PerfCounter * _sync_FailedSpins ; - static PerfCounter * _sync_SuccessfulSpins ; - static PerfCounter * _sync_PrivateA ; - static PerfCounter * _sync_PrivateB ; - static PerfCounter * _sync_MonInCirculation ; - static PerfCounter * _sync_MonScavenged ; - static PerfCounter * _sync_Inflations ; - static PerfCounter * _sync_Deflations ; - static PerfLongVariable * _sync_MonExtant ; - - public: - static void RegisterSpinCallback (int (*)(intptr_t, int), intptr_t) ; - }; // ObjectLocker enforced balanced locking and can never thrown an diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 27ea367302b..1abd9cc61cc 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -2995,8 +2995,8 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { // crash Linux VM, see notes in os_linux.cpp. main_thread->create_stack_guard_pages(); - // Initialize Java-Leve synchronization subsystem - ObjectSynchronizer::Initialize() ; + // Initialize Java-Level synchronization subsystem + ObjectMonitor::Initialize() ; // Initialize global modules jint status = init_globals(); @@ -3965,215 +3965,272 @@ void Threads::print_on_error(outputStream* st, Thread* current, char* buf, int b } } +// Internal SpinLock and Mutex +// Based on ParkEvent -// Lifecycle management for TSM ParkEvents. -// ParkEvents are type-stable (TSM). -// In our particular implementation they happen to be immortal. +// Ad-hoc mutual exclusion primitives: SpinLock and Mux // -// We manage concurrency on the FreeList with a CAS-based -// detach-modify-reattach idiom that avoids the ABA problems -// that would otherwise be present in a simple CAS-based -// push-pop implementation. (push-one and pop-all) +// We employ SpinLocks _only for low-contention, fixed-length +// short-duration critical sections where we're concerned +// about native mutex_t or HotSpot Mutex:: latency. +// The mux construct provides a spin-then-block mutual exclusion +// mechanism. // -// Caveat: Allocate() and Release() may be called from threads -// other than the thread associated with the Event! -// If we need to call Allocate() when running as the thread in -// question then look for the PD calls to initialize native TLS. -// Native TLS (Win32/Linux/Solaris) can only be initialized or -// accessed by the associated thread. -// See also pd_initialize(). +// Testing has shown that contention on the ListLock guarding gFreeList +// is common. If we implement ListLock as a simple SpinLock it's common +// for the JVM to devolve to yielding with little progress. This is true +// despite the fact that the critical sections protected by ListLock are +// extremely short. // -// Note that we could defer associating a ParkEvent with a thread -// until the 1st time the thread calls park(). unpark() calls to -// an unprovisioned thread would be ignored. The first park() call -// for a thread would allocate and associate a ParkEvent and return -// immediately. +// TODO-FIXME: ListLock should be of type SpinLock. +// We should make this a 1st-class type, integrated into the lock +// hierarchy as leaf-locks. Critically, the SpinLock structure +// should have sufficient padding to avoid false-sharing and excessive +// cache-coherency traffic. -volatile int ParkEvent::ListLock = 0 ; -ParkEvent * volatile ParkEvent::FreeList = NULL ; -ParkEvent * ParkEvent::Allocate (Thread * t) { - // In rare cases -- JVM_RawMonitor* operations -- we can find t == null. - ParkEvent * ev ; +typedef volatile int SpinLockT ; - // Start by trying to recycle an existing but unassociated - // ParkEvent from the global free list. +void Thread::SpinAcquire (volatile int * adr, const char * LockName) { + if (Atomic::cmpxchg (1, adr, 0) == 0) { + return ; // normal fast-path return + } + + // Slow-path : We've encountered contention -- Spin/Yield/Block strategy. + TEVENT (SpinAcquire - ctx) ; + int ctr = 0 ; + int Yields = 0 ; for (;;) { - ev = FreeList ; - if (ev == NULL) break ; - // 1: Detach - sequester or privatize the list - // Tantamount to ev = Swap (&FreeList, NULL) - if (Atomic::cmpxchg_ptr (NULL, &FreeList, ev) != ev) { - continue ; - } - - // We've detached the list. The list in-hand is now - // local to this thread. This thread can operate on the - // list without risk of interference from other threads. - // 2: Extract -- pop the 1st element from the list. - ParkEvent * List = ev->FreeNext ; - if (List == NULL) break ; - for (;;) { - // 3: Try to reattach the residual list - guarantee (List != NULL, "invariant") ; - ParkEvent * Arv = (ParkEvent *) Atomic::cmpxchg_ptr (List, &FreeList, NULL) ; - if (Arv == NULL) break ; - - // New nodes arrived. Try to detach the recent arrivals. - if (Atomic::cmpxchg_ptr (NULL, &FreeList, Arv) != Arv) { - continue ; + while (*adr != 0) { + ++ctr ; + if ((ctr & 0xFFF) == 0 || !os::is_MP()) { + if (Yields > 5) { + // Consider using a simple NakedSleep() instead. + // Then SpinAcquire could be called by non-JVM threads + Thread::current()->_ParkEvent->park(1) ; + } else { + os::NakedYield() ; + ++Yields ; + } + } else { + SpinPause() ; } - guarantee (Arv != NULL, "invariant") ; - // 4: Merge Arv into List - ParkEvent * Tail = List ; - while (Tail->FreeNext != NULL) Tail = Tail->FreeNext ; - Tail->FreeNext = Arv ; - } - break ; + } + if (Atomic::cmpxchg (1, adr, 0) == 0) return ; } - - if (ev != NULL) { - guarantee (ev->AssociatedWith == NULL, "invariant") ; - } else { - // Do this the hard way -- materialize a new ParkEvent. - // In rare cases an allocating thread might detach a long list -- - // installing null into FreeList -- and then stall or be obstructed. - // A 2nd thread calling Allocate() would see FreeList == null. - // The list held privately by the 1st thread is unavailable to the 2nd thread. - // In that case the 2nd thread would have to materialize a new ParkEvent, - // even though free ParkEvents existed in the system. In this case we end up - // with more ParkEvents in circulation than we need, but the race is - // rare and the outcome is benign. Ideally, the # of extant ParkEvents - // is equal to the maximum # of threads that existed at any one time. - // Because of the race mentioned above, segments of the freelist - // can be transiently inaccessible. At worst we may end up with the - // # of ParkEvents in circulation slightly above the ideal. - // Note that if we didn't have the TSM/immortal constraint, then - // when reattaching, above, we could trim the list. - ev = new ParkEvent () ; - guarantee ((intptr_t(ev) & 0xFF) == 0, "invariant") ; - } - ev->reset() ; // courtesy to caller - ev->AssociatedWith = t ; // Associate ev with t - ev->FreeNext = NULL ; - return ev ; } -void ParkEvent::Release (ParkEvent * ev) { - if (ev == NULL) return ; - guarantee (ev->FreeNext == NULL , "invariant") ; - ev->AssociatedWith = NULL ; +void Thread::SpinRelease (volatile int * adr) { + assert (*adr != 0, "invariant") ; + OrderAccess::fence() ; // guarantee at least release consistency. + // Roach-motel semantics. + // It's safe if subsequent LDs and STs float "up" into the critical section, + // but prior LDs and STs within the critical section can't be allowed + // to reorder or float past the ST that releases the lock. + *adr = 0 ; +} + +// muxAcquire and muxRelease: +// +// * muxAcquire and muxRelease support a single-word lock-word construct. +// The LSB of the word is set IFF the lock is held. +// The remainder of the word points to the head of a singly-linked list +// of threads blocked on the lock. +// +// * The current implementation of muxAcquire-muxRelease uses its own +// dedicated Thread._MuxEvent instance. If we're interested in +// minimizing the peak number of extant ParkEvent instances then +// we could eliminate _MuxEvent and "borrow" _ParkEvent as long +// as certain invariants were satisfied. Specifically, care would need +// to be taken with regards to consuming unpark() "permits". +// A safe rule of thumb is that a thread would never call muxAcquire() +// if it's enqueued (cxq, EntryList, WaitList, etc) and will subsequently +// park(). Otherwise the _ParkEvent park() operation in muxAcquire() could +// consume an unpark() permit intended for monitorenter, for instance. +// One way around this would be to widen the restricted-range semaphore +// implemented in park(). Another alternative would be to provide +// multiple instances of the PlatformEvent() for each thread. One +// instance would be dedicated to muxAcquire-muxRelease, for instance. +// +// * Usage: +// -- Only as leaf locks +// -- for short-term locking only as muxAcquire does not perform +// thread state transitions. +// +// Alternatives: +// * We could implement muxAcquire and muxRelease with MCS or CLH locks +// but with parking or spin-then-park instead of pure spinning. +// * Use Taura-Oyama-Yonenzawa locks. +// * It's possible to construct a 1-0 lock if we encode the lockword as +// (List,LockByte). Acquire will CAS the full lockword while Release +// will STB 0 into the LockByte. The 1-0 scheme admits stranding, so +// acquiring threads use timers (ParkTimed) to detect and recover from +// the stranding window. Thread/Node structures must be aligned on 256-byte +// boundaries by using placement-new. +// * Augment MCS with advisory back-link fields maintained with CAS(). +// Pictorially: LockWord -> T1 <-> T2 <-> T3 <-> ... <-> Tn <-> Owner. +// The validity of the backlinks must be ratified before we trust the value. +// If the backlinks are invalid the exiting thread must back-track through the +// the forward links, which are always trustworthy. +// * Add a successor indication. The LockWord is currently encoded as +// (List, LOCKBIT:1). We could also add a SUCCBIT or an explicit _succ variable +// to provide the usual futile-wakeup optimization. +// See RTStt for details. +// * Consider schedctl.sc_nopreempt to cover the critical section. +// + + +typedef volatile intptr_t MutexT ; // Mux Lock-word +enum MuxBits { LOCKBIT = 1 } ; + +void Thread::muxAcquire (volatile intptr_t * Lock, const char * LockName) { + intptr_t w = Atomic::cmpxchg_ptr (LOCKBIT, Lock, 0) ; + if (w == 0) return ; + if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { + return ; + } + + TEVENT (muxAcquire - Contention) ; + ParkEvent * const Self = Thread::current()->_MuxEvent ; + assert ((intptr_t(Self) & LOCKBIT) == 0, "invariant") ; for (;;) { - // Push ev onto FreeList - // The mechanism is "half" lock-free. - ParkEvent * List = FreeList ; - ev->FreeNext = List ; - if (Atomic::cmpxchg_ptr (ev, &FreeList, List) == List) break ; - } -} + int its = (os::is_MP() ? 100 : 0) + 1 ; -// Override operator new and delete so we can ensure that the -// least significant byte of ParkEvent addresses is 0. -// Beware that excessive address alignment is undesirable -// as it can result in D$ index usage imbalance as -// well as bank access imbalance on Niagara-like platforms, -// although Niagara's hash function should help. + // Optional spin phase: spin-then-park strategy + while (--its >= 0) { + w = *Lock ; + if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { + return ; + } + } -void * ParkEvent::operator new (size_t sz) { - return (void *) ((intptr_t (CHeapObj::operator new (sz + 256)) + 256) & -256) ; -} - -void ParkEvent::operator delete (void * a) { - // ParkEvents are type-stable and immortal ... - ShouldNotReachHere(); -} - - -// 6399321 As a temporary measure we copied & modified the ParkEvent:: -// allocate() and release() code for use by Parkers. The Parker:: forms -// will eventually be removed as we consolide and shift over to ParkEvents -// for both builtin synchronization and JSR166 operations. - -volatile int Parker::ListLock = 0 ; -Parker * volatile Parker::FreeList = NULL ; - -Parker * Parker::Allocate (JavaThread * t) { - guarantee (t != NULL, "invariant") ; - Parker * p ; - - // Start by trying to recycle an existing but unassociated - // Parker from the global free list. - for (;;) { - p = FreeList ; - if (p == NULL) break ; - // 1: Detach - // Tantamount to p = Swap (&FreeList, NULL) - if (Atomic::cmpxchg_ptr (NULL, &FreeList, p) != p) { - continue ; - } - - // We've detached the list. The list in-hand is now - // local to this thread. This thread can operate on the - // list without risk of interference from other threads. - // 2: Extract -- pop the 1st element from the list. - Parker * List = p->FreeNext ; - if (List == NULL) break ; - for (;;) { - // 3: Try to reattach the residual list - guarantee (List != NULL, "invariant") ; - Parker * Arv = (Parker *) Atomic::cmpxchg_ptr (List, &FreeList, NULL) ; - if (Arv == NULL) break ; - - // New nodes arrived. Try to detach the recent arrivals. - if (Atomic::cmpxchg_ptr (NULL, &FreeList, Arv) != Arv) { - continue ; + Self->reset() ; + Self->OnList = intptr_t(Lock) ; + // The following fence() isn't _strictly necessary as the subsequent + // CAS() both serializes execution and ratifies the fetched *Lock value. + OrderAccess::fence(); + for (;;) { + w = *Lock ; + if ((w & LOCKBIT) == 0) { + if (Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { + Self->OnList = 0 ; // hygiene - allows stronger asserts + return ; + } + continue ; // Interference -- *Lock changed -- Just retry } - guarantee (Arv != NULL, "invariant") ; - // 4: Merge Arv into List - Parker * Tail = List ; - while (Tail->FreeNext != NULL) Tail = Tail->FreeNext ; - Tail->FreeNext = Arv ; - } - break ; - } + assert (w & LOCKBIT, "invariant") ; + Self->ListNext = (ParkEvent *) (w & ~LOCKBIT ); + if (Atomic::cmpxchg_ptr (intptr_t(Self)|LOCKBIT, Lock, w) == w) break ; + } - if (p != NULL) { - guarantee (p->AssociatedWith == NULL, "invariant") ; - } else { - // Do this the hard way -- materialize a new Parker.. - // In rare cases an allocating thread might detach - // a long list -- installing null into FreeList --and - // then stall. Another thread calling Allocate() would see - // FreeList == null and then invoke the ctor. In this case we - // end up with more Parkers in circulation than we need, but - // the race is rare and the outcome is benign. - // Ideally, the # of extant Parkers is equal to the - // maximum # of threads that existed at any one time. - // Because of the race mentioned above, segments of the - // freelist can be transiently inaccessible. At worst - // we may end up with the # of Parkers in circulation - // slightly above the ideal. - p = new Parker() ; + while (Self->OnList != 0) { + Self->park() ; + } } - p->AssociatedWith = t ; // Associate p with t - p->FreeNext = NULL ; - return p ; } +void Thread::muxAcquireW (volatile intptr_t * Lock, ParkEvent * ev) { + intptr_t w = Atomic::cmpxchg_ptr (LOCKBIT, Lock, 0) ; + if (w == 0) return ; + if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { + return ; + } -void Parker::Release (Parker * p) { - if (p == NULL) return ; - guarantee (p->AssociatedWith != NULL, "invariant") ; - guarantee (p->FreeNext == NULL , "invariant") ; - p->AssociatedWith = NULL ; + TEVENT (muxAcquire - Contention) ; + ParkEvent * ReleaseAfter = NULL ; + if (ev == NULL) { + ev = ReleaseAfter = ParkEvent::Allocate (NULL) ; + } + assert ((intptr_t(ev) & LOCKBIT) == 0, "invariant") ; for (;;) { - // Push p onto FreeList - Parker * List = FreeList ; - p->FreeNext = List ; - if (Atomic::cmpxchg_ptr (p, &FreeList, List) == List) break ; + guarantee (ev->OnList == 0, "invariant") ; + int its = (os::is_MP() ? 100 : 0) + 1 ; + + // Optional spin phase: spin-then-park strategy + while (--its >= 0) { + w = *Lock ; + if ((w & LOCKBIT) == 0 && Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { + if (ReleaseAfter != NULL) { + ParkEvent::Release (ReleaseAfter) ; + } + return ; + } + } + + ev->reset() ; + ev->OnList = intptr_t(Lock) ; + // The following fence() isn't _strictly necessary as the subsequent + // CAS() both serializes execution and ratifies the fetched *Lock value. + OrderAccess::fence(); + for (;;) { + w = *Lock ; + if ((w & LOCKBIT) == 0) { + if (Atomic::cmpxchg_ptr (w|LOCKBIT, Lock, w) == w) { + ev->OnList = 0 ; + // We call ::Release while holding the outer lock, thus + // artificially lengthening the critical section. + // Consider deferring the ::Release() until the subsequent unlock(), + // after we've dropped the outer lock. + if (ReleaseAfter != NULL) { + ParkEvent::Release (ReleaseAfter) ; + } + return ; + } + continue ; // Interference -- *Lock changed -- Just retry + } + assert (w & LOCKBIT, "invariant") ; + ev->ListNext = (ParkEvent *) (w & ~LOCKBIT ); + if (Atomic::cmpxchg_ptr (intptr_t(ev)|LOCKBIT, Lock, w) == w) break ; + } + + while (ev->OnList != 0) { + ev->park() ; + } } } +// Release() must extract a successor from the list and then wake that thread. +// It can "pop" the front of the list or use a detach-modify-reattach (DMR) scheme +// similar to that used by ParkEvent::Allocate() and ::Release(). DMR-based +// Release() would : +// (A) CAS() or swap() null to *Lock, releasing the lock and detaching the list. +// (B) Extract a successor from the private list "in-hand" +// (C) attempt to CAS() the residual back into *Lock over null. +// If there were any newly arrived threads and the CAS() would fail. +// In that case Release() would detach the RATs, re-merge the list in-hand +// with the RATs and repeat as needed. Alternately, Release() might +// detach and extract a successor, but then pass the residual list to the wakee. +// The wakee would be responsible for reattaching and remerging before it +// competed for the lock. +// +// Both "pop" and DMR are immune from ABA corruption -- there can be +// multiple concurrent pushers, but only one popper or detacher. +// This implementation pops from the head of the list. This is unfair, +// but tends to provide excellent throughput as hot threads remain hot. +// (We wake recently run threads first). + +void Thread::muxRelease (volatile intptr_t * Lock) { + for (;;) { + const intptr_t w = Atomic::cmpxchg_ptr (0, Lock, LOCKBIT) ; + assert (w & LOCKBIT, "invariant") ; + if (w == LOCKBIT) return ; + ParkEvent * List = (ParkEvent *) (w & ~LOCKBIT) ; + assert (List != NULL, "invariant") ; + assert (List->OnList == intptr_t(Lock), "invariant") ; + ParkEvent * nxt = List->ListNext ; + + // The following CAS() releases the lock and pops the head element. + if (Atomic::cmpxchg_ptr (intptr_t(nxt), Lock, w) != w) { + continue ; + } + List->OnList = 0 ; + OrderAccess::fence() ; + List->unpark () ; + return ; + } +} + + void Threads::verify() { ALL_JAVA_THREADS(p) { p->verify(); diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp index 548c836ebb3..f02f5c6cb63 100644 --- a/hotspot/src/share/vm/runtime/thread.hpp +++ b/hotspot/src/share/vm/runtime/thread.hpp @@ -30,6 +30,7 @@ class JvmtiGetLoadedClassesClosure; class ThreadStatistics; class ConcurrentLocksDump; class ParkEvent ; +class Parker; class ciEnv; class CompileThread; @@ -544,7 +545,6 @@ public: static void muxAcquire (volatile intptr_t * Lock, const char * Name) ; static void muxAcquireW (volatile intptr_t * Lock, ParkEvent * ev) ; static void muxRelease (volatile intptr_t * Lock) ; - }; // Inline implementation of Thread::current() @@ -1769,100 +1769,3 @@ public: } }; -// ParkEvents are type-stable and immortal. -// -// Lifecycle: Once a ParkEvent is associated with a thread that ParkEvent remains -// associated with the thread for the thread's entire lifetime - the relationship is -// stable. A thread will be associated at most one ParkEvent. When the thread -// expires, the ParkEvent moves to the EventFreeList. New threads attempt to allocate from -// the EventFreeList before creating a new Event. Type-stability frees us from -// worrying about stale Event or Thread references in the objectMonitor subsystem. -// (A reference to ParkEvent is always valid, even though the event may no longer be associated -// with the desired or expected thread. A key aspect of this design is that the callers of -// park, unpark, etc must tolerate stale references and spurious wakeups). -// -// Only the "associated" thread can block (park) on the ParkEvent, although -// any other thread can unpark a reachable parkevent. Park() is allowed to -// return spuriously. In fact park-unpark a really just an optimization to -// avoid unbounded spinning and surrender the CPU to be a polite system citizen. -// A degenerate albeit "impolite" park-unpark implementation could simply return. -// See http://blogs.sun.com/dave for more details. -// -// Eventually I'd like to eliminate Events and ObjectWaiters, both of which serve as -// thread proxies, and simply make the THREAD structure type-stable and persistent. -// Currently, we unpark events associated with threads, but ideally we'd just -// unpark threads. -// -// The base-class, PlatformEvent, is platform-specific while the ParkEvent is -// platform-independent. PlatformEvent provides park(), unpark(), etc., and -// is abstract -- that is, a PlatformEvent should never be instantiated except -// as part of a ParkEvent. -// Equivalently we could have defined a platform-independent base-class that -// exported Allocate(), Release(), etc. The platform-specific class would extend -// that base-class, adding park(), unpark(), etc. -// -// A word of caution: The JVM uses 2 very similar constructs: -// 1. ParkEvent are used for Java-level "monitor" synchronization. -// 2. Parkers are used by JSR166-JUC park-unpark. -// -// We'll want to eventually merge these redundant facilities and use ParkEvent. - - -class ParkEvent : public os::PlatformEvent { - private: - ParkEvent * FreeNext ; - - // Current association - Thread * AssociatedWith ; - intptr_t RawThreadIdentity ; // LWPID etc - volatile int Incarnation ; - - // diagnostic : keep track of last thread to wake this thread. - // this is useful for construction of dependency graphs. - void * LastWaker ; - - public: - // MCS-CLH list linkage and Native Mutex/Monitor - ParkEvent * volatile ListNext ; - ParkEvent * volatile ListPrev ; - volatile intptr_t OnList ; - volatile int TState ; - volatile int Notified ; // for native monitor construct - volatile int IsWaiting ; // Enqueued on WaitSet - - - private: - static ParkEvent * volatile FreeList ; - static volatile int ListLock ; - - // It's prudent to mark the dtor as "private" - // ensuring that it's not visible outside the package. - // Unfortunately gcc warns about such usage, so - // we revert to the less desirable "protected" visibility. - // The other compilers accept private dtors. - - protected: // Ensure dtor is never invoked - ~ParkEvent() { guarantee (0, "invariant") ; } - - ParkEvent() : PlatformEvent() { - AssociatedWith = NULL ; - FreeNext = NULL ; - ListNext = NULL ; - ListPrev = NULL ; - OnList = 0 ; - TState = 0 ; - Notified = 0 ; - IsWaiting = 0 ; - } - - // We use placement-new to force ParkEvent instances to be - // aligned on 256-byte address boundaries. This ensures that the least - // significant byte of a ParkEvent address is always 0. - - void * operator new (size_t sz) ; - void operator delete (void * a) ; - - public: - static ParkEvent * Allocate (Thread * t) ; - static void Release (ParkEvent * e) ; -} ; From 35cc8afcf96f338b2cf22415b592ecc1bd7af1ce Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Fri, 22 Oct 2010 14:04:33 -0700 Subject: [PATCH 154/722] 6993301: catch parameters do not have correct kind (i.e. ElementKind.EXCEPTION_PARAMETER) Reviewed-by: mcimadamore --- .../com/sun/tools/javac/comp/Attr.java | 2 +- langtools/test/tools/javac/T6993301.java | 105 ++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 langtools/test/tools/javac/T6993301.java diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java index 7e80d2693cb..3319b7f7ba1 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java @@ -1055,7 +1055,7 @@ public class Attr extends JCTree.Visitor { } c.param.sym.flags_field = c.param.sym.flags() | DISJOINT; } - if (c.param.type.tsym.kind == Kinds.VAR) { + if (c.param.sym.kind == Kinds.VAR) { c.param.sym.setData(ElementKind.EXCEPTION_PARAMETER); } chk.checkType(c.param.vartype.pos(), diff --git a/langtools/test/tools/javac/T6993301.java b/langtools/test/tools/javac/T6993301.java new file mode 100644 index 00000000000..ab5d532a3d5 --- /dev/null +++ b/langtools/test/tools/javac/T6993301.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6993301 + * @summary catch parameters do not have correct kind (i.e. ElementKind.EXCEPTION_PARAMETER) + */ + +import com.sun.source.tree.CompilationUnitTree; +import com.sun.source.tree.IdentifierTree; +import com.sun.source.tree.VariableTree; +import com.sun.source.util.TreePathScanner; +import com.sun.source.util.Trees; +import com.sun.tools.javac.api.JavacTaskImpl; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; +import javax.tools.JavaCompiler; +import javax.tools.JavaFileObject; +import javax.tools.SimpleJavaFileObject; +import javax.tools.ToolProvider; + +/** + * + * @author Jan Lahoda + */ +public class T6993301 { + public static void main(String... args) throws Exception { + new T6993301().testExceptionParameterCorrectKind(); + } + + static class MyFileObject extends SimpleJavaFileObject { + private String text; + public MyFileObject(String text) { + super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); + this.text = text; + } + @Override + public CharSequence getCharContent(boolean ignoreEncodingErrors) { + return text; + } + } + + public void testExceptionParameterCorrectKind() throws IOException { + final String bootPath = System.getProperty("sun.boot.class.path"); + final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); + assert tool != null; + + String code = "package test; public class Test { { try { } catch (NullPointerException ex) {} } }"; + + final JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, null, null, + Arrays.asList("-bootclasspath", bootPath), + null, Arrays.asList(new MyFileObject(code))); + CompilationUnitTree cut = ct.parse().iterator().next(); + + ct.analyze(); + + new TreePathScanner() { + @Override + public Void visitVariable(VariableTree node, Void p) { + Element el = Trees.instance(ct).getElement(getCurrentPath()); + + assertNotNull(el); + assertEquals(ElementKind.EXCEPTION_PARAMETER, el.getKind()); + + return super.visitVariable(node, p); + } + }.scan(cut, null); + } + + private void assertNotNull(Object o) { + if (o == null) + throw new AssertionError(); + } + + private void assertEquals(T expected, T actual) { + if (expected == null ? actual == null : expected.equals(actual)) + return; + throw new AssertionError("expected: " + expected + ", actual: " + actual); + } + +} From cbc7f8756a7e9569bbe1a38ce7cab0c0c6002bf7 Mon Sep 17 00:00:00 2001 From: "Y. Srinivas Ramakrishna" Date: Sat, 23 Oct 2010 23:03:49 -0700 Subject: [PATCH 155/722] 6896603: CMS/GCH: collection_attempt_is_safe() ergo should use more recent data Deprecated HandlePromotionFailure, removing the ability to turn off that feature, did away with one epoch look-ahead when deciding if a scavenge is likely to fail, relying on current data. Reviewed-by: jmasa, johnc, poonam --- .../concurrentMarkSweepGeneration.cpp | 84 ++++--------------- .../concurrentMarkSweepGeneration.hpp | 3 +- .../parNew/parNewGeneration.cpp | 17 +--- .../src/share/vm/memory/collectorPolicy.cpp | 8 +- .../src/share/vm/memory/defNewGeneration.cpp | 56 ++++--------- .../src/share/vm/memory/defNewGeneration.hpp | 14 ++-- .../src/share/vm/memory/genCollectedHeap.cpp | 14 +--- .../src/share/vm/memory/genCollectedHeap.hpp | 39 +++++---- hotspot/src/share/vm/memory/generation.cpp | 15 ++-- hotspot/src/share/vm/memory/generation.hpp | 22 +++-- .../src/share/vm/memory/tenuredGeneration.cpp | 35 +++----- .../src/share/vm/memory/tenuredGeneration.hpp | 3 +- hotspot/src/share/vm/runtime/arguments.cpp | 6 +- hotspot/src/share/vm/runtime/globals.hpp | 7 -- 14 files changed, 101 insertions(+), 222 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index 2573d31a808..ceb7ad5dfd4 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -354,12 +354,8 @@ void CMSStats::adjust_cms_free_adjustment_factor(bool fail, size_t free) { double CMSStats::time_until_cms_gen_full() const { size_t cms_free = _cms_gen->cmsSpace()->free(); GenCollectedHeap* gch = GenCollectedHeap::heap(); - size_t expected_promotion = gch->get_gen(0)->capacity(); - if (HandlePromotionFailure) { - expected_promotion = MIN2( - (size_t) _cms_gen->gc_stats()->avg_promoted()->padded_average(), - expected_promotion); - } + size_t expected_promotion = MIN2(gch->get_gen(0)->capacity(), + (size_t) _cms_gen->gc_stats()->avg_promoted()->padded_average()); if (cms_free > expected_promotion) { // Start a cms collection if there isn't enough space to promote // for the next minor collection. Use the padded average as @@ -865,57 +861,18 @@ size_t ConcurrentMarkSweepGeneration::max_available() const { return free() + _virtual_space.uncommitted_size(); } -bool ConcurrentMarkSweepGeneration::promotion_attempt_is_safe( - size_t max_promotion_in_bytes, - bool younger_handles_promotion_failure) const { - - // This is the most conservative test. Full promotion is - // guaranteed if this is used. The multiplicative factor is to - // account for the worst case "dilatation". - double adjusted_max_promo_bytes = _dilatation_factor * max_promotion_in_bytes; - if (adjusted_max_promo_bytes > (double)max_uintx) { // larger than size_t - adjusted_max_promo_bytes = (double)max_uintx; +bool ConcurrentMarkSweepGeneration::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const { + size_t available = max_available(); + size_t av_promo = (size_t)gc_stats()->avg_promoted()->padded_average(); + bool res = (available >= av_promo) || (available >= max_promotion_in_bytes); + if (PrintGC && Verbose) { + gclog_or_tty->print_cr( + "CMS: promo attempt is%s safe: available("SIZE_FORMAT") %s av_promo("SIZE_FORMAT")," + "max_promo("SIZE_FORMAT")", + res? "":" not", available, res? ">=":"<", + av_promo, max_promotion_in_bytes); } - bool result = (max_contiguous_available() >= (size_t)adjusted_max_promo_bytes); - - if (younger_handles_promotion_failure && !result) { - // Full promotion is not guaranteed because fragmentation - // of the cms generation can prevent the full promotion. - result = (max_available() >= (size_t)adjusted_max_promo_bytes); - - if (!result) { - // With promotion failure handling the test for the ability - // to support the promotion does not have to be guaranteed. - // Use an average of the amount promoted. - result = max_available() >= (size_t) - gc_stats()->avg_promoted()->padded_average(); - if (PrintGC && Verbose && result) { - gclog_or_tty->print_cr( - "\nConcurrentMarkSweepGeneration::promotion_attempt_is_safe" - " max_available: " SIZE_FORMAT - " avg_promoted: " SIZE_FORMAT, - max_available(), (size_t) - gc_stats()->avg_promoted()->padded_average()); - } - } else { - if (PrintGC && Verbose) { - gclog_or_tty->print_cr( - "\nConcurrentMarkSweepGeneration::promotion_attempt_is_safe" - " max_available: " SIZE_FORMAT - " adj_max_promo_bytes: " SIZE_FORMAT, - max_available(), (size_t)adjusted_max_promo_bytes); - } - } - } else { - if (PrintGC && Verbose) { - gclog_or_tty->print_cr( - "\nConcurrentMarkSweepGeneration::promotion_attempt_is_safe" - " contiguous_available: " SIZE_FORMAT - " adj_max_promo_bytes: " SIZE_FORMAT, - max_contiguous_available(), (size_t)adjusted_max_promo_bytes); - } - } - return result; + return res; } // At a promotion failure dump information on block layout in heap @@ -6091,23 +6048,14 @@ void CMSCollector::sweep(bool asynch) { assert(_collectorState == Resizing, "Change of collector state to" " Resizing must be done under the freelistLocks (plural)"); - // Now that sweeping has been completed, if the GCH's - // incremental_collection_will_fail flag is set, clear it, + // Now that sweeping has been completed, we clear + // the incremental_collection_failed flag, // thus inviting a younger gen collection to promote into // this generation. If such a promotion may still fail, // the flag will be set again when a young collection is // attempted. - // I think the incremental_collection_will_fail flag's use - // is specific to a 2 generation collection policy, so i'll - // assert that that's the configuration we are operating within. - // The use of the flag can and should be generalized appropriately - // in the future to deal with a general n-generation system. - GenCollectedHeap* gch = GenCollectedHeap::heap(); - assert(gch->collector_policy()->is_two_generation_policy(), - "Resetting of incremental_collection_will_fail flag" - " may be incorrect otherwise"); - gch->clear_incremental_collection_will_fail(); + gch->clear_incremental_collection_failed(); // Worth retrying as fresh space may have been freed up gch->update_full_collections_completed(_collection_count_start); } diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp index 7a0670734e4..dce44e39729 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp @@ -1185,8 +1185,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration { virtual void par_promote_alloc_done(int thread_num); virtual void par_oop_since_save_marks_iterate_done(int thread_num); - virtual bool promotion_attempt_is_safe(size_t promotion_in_bytes, - bool younger_handles_promotion_failure) const; + virtual bool promotion_attempt_is_safe(size_t promotion_in_bytes) const; // Inform this (non-young) generation that a promotion failure was // encountered during a collection of a younger generation that diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp index 2aa4e7f4447..12064fa7aa0 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @@ -846,7 +846,7 @@ void ParNewGeneration::collect(bool full, // from this generation, pass on collection; let the next generation // do it. if (!collection_attempt_is_safe()) { - gch->set_incremental_collection_will_fail(); + gch->set_incremental_collection_failed(); // slight lie, in that we did not even attempt one return; } assert(to()->is_empty(), "Else not collection_attempt_is_safe"); @@ -935,8 +935,6 @@ void ParNewGeneration::collect(bool full, assert(to()->is_empty(), "to space should be empty now"); } else { - assert(HandlePromotionFailure, - "Should only be here if promotion failure handling is on"); assert(_promo_failure_scan_stack.is_empty(), "post condition"); _promo_failure_scan_stack.clear(true); // Clear cached segments. @@ -947,7 +945,7 @@ void ParNewGeneration::collect(bool full, // All the spaces are in play for mark-sweep. swap_spaces(); // Make life simpler for CMS || rescan; see 6483690. from()->set_next_compaction_space(to()); - gch->set_incremental_collection_will_fail(); + gch->set_incremental_collection_failed(); // Inform the next generation that a promotion failure occurred. _next_gen->promotion_failure_occurred(); @@ -1092,11 +1090,6 @@ oop ParNewGeneration::copy_to_survivor_space_avoiding_promotion_undo( old, m, sz); if (new_obj == NULL) { - if (!HandlePromotionFailure) { - // A failed promotion likely means the MaxLiveObjectEvacuationRatio flag - // is incorrectly set. In any case, its seriously wrong to be here! - vm_exit_out_of_memory(sz*wordSize, "promotion"); - } // promotion failed, forward to self _promotion_failed = true; new_obj = old; @@ -1206,12 +1199,6 @@ oop ParNewGeneration::copy_to_survivor_space_with_undo( old, m, sz); if (new_obj == NULL) { - if (!HandlePromotionFailure) { - // A failed promotion likely means the MaxLiveObjectEvacuationRatio - // flag is incorrectly set. In any case, its seriously wrong to be - // here! - vm_exit_out_of_memory(sz*wordSize, "promotion"); - } // promotion failed, forward to self forward_ptr = old->forward_to_atomic(old); new_obj = old; diff --git a/hotspot/src/share/vm/memory/collectorPolicy.cpp b/hotspot/src/share/vm/memory/collectorPolicy.cpp index c6b8e3875e4..3ddb0f65bc5 100644 --- a/hotspot/src/share/vm/memory/collectorPolicy.cpp +++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp @@ -659,9 +659,6 @@ HeapWord* GenCollectorPolicy::satisfy_failed_allocation(size_t size, } return result; // could be null if we are out of space } else if (!gch->incremental_collection_will_fail()) { - // The gc_prologues have not executed yet. The value - // for incremental_collection_will_fail() is the remanent - // of the last collection. // Do an incremental collection. gch->do_collection(false /* full */, false /* clear_all_soft_refs */, @@ -739,9 +736,8 @@ bool GenCollectorPolicy::should_try_older_generation_allocation( GenCollectedHeap* gch = GenCollectedHeap::heap(); size_t gen0_capacity = gch->get_gen(0)->capacity_before_gc(); return (word_size > heap_word_size(gen0_capacity)) - || (GC_locker::is_active_and_needs_gc()) - || ( gch->last_incremental_collection_failed() - && gch->incremental_collection_will_fail()); + || GC_locker::is_active_and_needs_gc() + || gch->incremental_collection_failed(); } diff --git a/hotspot/src/share/vm/memory/defNewGeneration.cpp b/hotspot/src/share/vm/memory/defNewGeneration.cpp index ac7cc267f23..6976e1660f2 100644 --- a/hotspot/src/share/vm/memory/defNewGeneration.cpp +++ b/hotspot/src/share/vm/memory/defNewGeneration.cpp @@ -510,7 +510,7 @@ void DefNewGeneration::collect(bool full, // from this generation, pass on collection; let the next generation // do it. if (!collection_attempt_is_safe()) { - gch->set_incremental_collection_will_fail(); + gch->set_incremental_collection_failed(); // Slight lie: we did not even attempt one return; } assert(to()->is_empty(), "Else not collection_attempt_is_safe"); @@ -596,9 +596,8 @@ void DefNewGeneration::collect(bool full, if (PrintGC && !PrintGCDetails) { gch->print_heap_change(gch_prev_used); } + assert(!gch->incremental_collection_failed(), "Should be clear"); } else { - assert(HandlePromotionFailure, - "Should not be here unless promotion failure handling is on"); assert(_promo_failure_scan_stack.is_empty(), "post condition"); _promo_failure_scan_stack.clear(true); // Clear cached segments. @@ -613,7 +612,7 @@ void DefNewGeneration::collect(bool full, // and from-space. swap_spaces(); // For uniformity wrt ParNewGeneration. from()->set_next_compaction_space(to()); - gch->set_incremental_collection_will_fail(); + gch->set_incremental_collection_failed(); // Inform the next generation that a promotion failure occurred. _next_gen->promotion_failure_occurred(); @@ -700,12 +699,6 @@ oop DefNewGeneration::copy_to_survivor_space(oop old) { if (obj == NULL) { obj = _next_gen->promote(old, s); if (obj == NULL) { - if (!HandlePromotionFailure) { - // A failed promotion likely means the MaxLiveObjectEvacuationRatio flag - // is incorrectly set. In any case, its seriously wrong to be here! - vm_exit_out_of_memory(s*wordSize, "promotion"); - } - handle_promotion_failure(old); return old; } @@ -812,31 +805,7 @@ bool DefNewGeneration::collection_attempt_is_safe() { assert(_next_gen != NULL, "This must be the youngest gen, and not the only gen"); } - - // Decide if there's enough room for a full promotion - // When using extremely large edens, we effectively lose a - // large amount of old space. Use the "MaxLiveObjectEvacuationRatio" - // flag to reduce the minimum evacuation space requirements. If - // there is not enough space to evacuate eden during a scavenge, - // the VM will immediately exit with an out of memory error. - // This flag has not been tested - // with collectors other than simple mark & sweep. - // - // Note that with the addition of promotion failure handling, the - // VM will not immediately exit but will undo the young generation - // collection. The parameter is left here for compatibility. - const double evacuation_ratio = MaxLiveObjectEvacuationRatio / 100.0; - - // worst_case_evacuation is based on "used()". For the case where this - // method is called after a collection, this is still appropriate because - // the case that needs to be detected is one in which a full collection - // has been done and has overflowed into the young generation. In that - // case a minor collection will fail (the overflow of the full collection - // means there is no space in the old generation for any promotion). - size_t worst_case_evacuation = (size_t)(used() * evacuation_ratio); - - return _next_gen->promotion_attempt_is_safe(worst_case_evacuation, - HandlePromotionFailure); + return _next_gen->promotion_attempt_is_safe(used()); } void DefNewGeneration::gc_epilogue(bool full) { @@ -845,14 +814,17 @@ void DefNewGeneration::gc_epilogue(bool full) { // a minimum at the end of a collection. If it is not, then // the heap is approaching full. GenCollectedHeap* gch = GenCollectedHeap::heap(); - clear_should_allocate_from_space(); - if (collection_attempt_is_safe()) { - gch->clear_incremental_collection_will_fail(); - } else { - gch->set_incremental_collection_will_fail(); - if (full) { // we seem to be running out of space - set_should_allocate_from_space(); + if (full) { + assert(!GC_locker::is_active(), "We should not be executing here"); + if (!collection_attempt_is_safe()) { + gch->set_incremental_collection_failed(); // Slight lie: a full gc left us in that state + set_should_allocate_from_space(); // we seem to be running out of space + } else { + gch->clear_incremental_collection_failed(); // We just did a full collection + clear_should_allocate_from_space(); // if set } + } else { + assert(!gch->incremental_collection_failed(), "Error"); } if (ZapUnusedHeapArea) { diff --git a/hotspot/src/share/vm/memory/defNewGeneration.hpp b/hotspot/src/share/vm/memory/defNewGeneration.hpp index 166510b0a38..6f9d9a7e68e 100644 --- a/hotspot/src/share/vm/memory/defNewGeneration.hpp +++ b/hotspot/src/share/vm/memory/defNewGeneration.hpp @@ -82,12 +82,6 @@ protected: Stack _objs_with_preserved_marks; Stack _preserved_marks_of_objs; - // Returns true if the collection can be safely attempted. - // If this method returns false, a collection is not - // guaranteed to fail but the system may not be able - // to recover from the failure. - bool collection_attempt_is_safe(); - // Promotion failure handling OopClosure *_promo_failure_scan_stack_closure; void set_promo_failure_scan_stack_closure(OopClosure *scan_stack_closure) { @@ -304,6 +298,14 @@ protected: // GC support virtual void compute_new_size(); + + // Returns true if the collection is likely to be safely + // completed. Even if this method returns true, a collection + // may not be guaranteed to succeed, and the system should be + // able to safely unwind and recover from that failure, albeit + // at some additional cost. Override superclass's implementation. + virtual bool collection_attempt_is_safe(); + virtual void collect(bool full, bool clear_all_soft_refs, size_t size, diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.cpp b/hotspot/src/share/vm/memory/genCollectedHeap.cpp index c2b8dcb3fab..432f64737fe 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp @@ -142,8 +142,7 @@ jint GenCollectedHeap::initialize() { } _perm_gen = perm_gen_spec->init(heap_rs, PermSize, rem_set()); - clear_incremental_collection_will_fail(); - clear_last_incremental_collection_failed(); + clear_incremental_collection_failed(); #ifndef SERIALGC // If we are running CMS, create the collector responsible @@ -1347,17 +1346,6 @@ class GenGCEpilogueClosure: public GenCollectedHeap::GenClosure { }; void GenCollectedHeap::gc_epilogue(bool full) { - // Remember if a partial collection of the heap failed, and - // we did a complete collection. - if (full && incremental_collection_will_fail()) { - set_last_incremental_collection_failed(); - } else { - clear_last_incremental_collection_failed(); - } - // Clear the flag, if set; the generation gc_epilogues will set the - // flag again if the condition persists despite the collection. - clear_incremental_collection_will_fail(); - #ifdef COMPILER2 assert(DerivedPointerTable::is_empty(), "derived pointer present"); size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr())); diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.hpp b/hotspot/src/share/vm/memory/genCollectedHeap.hpp index 75266a2d9a9..859f47936a7 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.hpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.hpp @@ -62,11 +62,10 @@ public: // The generational collector policy. GenCollectorPolicy* _gen_policy; - // If a generation would bail out of an incremental collection, - // it sets this flag. If the flag is set, satisfy_failed_allocation - // will attempt allocating in all generations before doing a full GC. - bool _incremental_collection_will_fail; - bool _last_incremental_collection_failed; + // Indicates that the most recent previous incremental collection failed. + // The flag is cleared when an action is taken that might clear the + // condition that caused that incremental collection to fail. + bool _incremental_collection_failed; // In support of ExplicitGCInvokesConcurrent functionality unsigned int _full_collections_completed; @@ -469,26 +468,26 @@ public: // call to "save_marks". bool no_allocs_since_save_marks(int level); - // If a generation bails out of an incremental collection, - // it sets this flag. + // Returns true if an incremental collection is likely to fail. bool incremental_collection_will_fail() { - return _incremental_collection_will_fail; - } - void set_incremental_collection_will_fail() { - _incremental_collection_will_fail = true; - } - void clear_incremental_collection_will_fail() { - _incremental_collection_will_fail = false; + // Assumes a 2-generation system; the first disjunct remembers if an + // incremental collection failed, even when we thought (second disjunct) + // that it would not. + assert(heap()->collector_policy()->is_two_generation_policy(), + "the following definition may not be suitable for an n(>2)-generation system"); + return incremental_collection_failed() || !get_gen(0)->collection_attempt_is_safe(); } - bool last_incremental_collection_failed() const { - return _last_incremental_collection_failed; + // If a generation bails out of an incremental collection, + // it sets this flag. + bool incremental_collection_failed() const { + return _incremental_collection_failed; } - void set_last_incremental_collection_failed() { - _last_incremental_collection_failed = true; + void set_incremental_collection_failed() { + _incremental_collection_failed = true; } - void clear_last_incremental_collection_failed() { - _last_incremental_collection_failed = false; + void clear_incremental_collection_failed() { + _incremental_collection_failed = false; } // Promotion of obj into gen failed. Try to promote obj to higher non-perm diff --git a/hotspot/src/share/vm/memory/generation.cpp b/hotspot/src/share/vm/memory/generation.cpp index 6d0d48596b3..c2f51593778 100644 --- a/hotspot/src/share/vm/memory/generation.cpp +++ b/hotspot/src/share/vm/memory/generation.cpp @@ -165,15 +165,16 @@ size_t Generation::max_contiguous_available() const { return max; } -bool Generation::promotion_attempt_is_safe(size_t promotion_in_bytes, - bool not_used) const { +bool Generation::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const { + size_t available = max_contiguous_available(); + bool res = (available >= max_promotion_in_bytes); if (PrintGC && Verbose) { - gclog_or_tty->print_cr("Generation::promotion_attempt_is_safe" - " contiguous_available: " SIZE_FORMAT - " promotion_in_bytes: " SIZE_FORMAT, - max_contiguous_available(), promotion_in_bytes); + gclog_or_tty->print_cr( + "Generation: promo attempt is%s safe: available("SIZE_FORMAT") %s max_promo("SIZE_FORMAT")", + res? "":" not", available, res? ">=":"<", + max_promotion_in_bytes); } - return max_contiguous_available() >= promotion_in_bytes; + return res; } // Ignores "ref" and calls allocate(). diff --git a/hotspot/src/share/vm/memory/generation.hpp b/hotspot/src/share/vm/memory/generation.hpp index af0bdf2b3f5..4398730a350 100644 --- a/hotspot/src/share/vm/memory/generation.hpp +++ b/hotspot/src/share/vm/memory/generation.hpp @@ -173,15 +173,11 @@ class Generation: public CHeapObj { // The largest number of contiguous free bytes in this or any higher generation. virtual size_t max_contiguous_available() const; - // Returns true if promotions of the specified amount can - // be attempted safely (without a vm failure). + // Returns true if promotions of the specified amount are + // likely to succeed without a promotion failure. // Promotion of the full amount is not guaranteed but - // can be attempted. - // younger_handles_promotion_failure - // is true if the younger generation handles a promotion - // failure. - virtual bool promotion_attempt_is_safe(size_t promotion_in_bytes, - bool younger_handles_promotion_failure) const; + // might be attempted in the worst case. + virtual bool promotion_attempt_is_safe(size_t max_promotion_in_bytes) const; // For a non-young generation, this interface can be used to inform a // generation that a promotion attempt into that generation failed. @@ -358,6 +354,16 @@ class Generation: public CHeapObj { return (full || should_allocate(word_size, is_tlab)); } + // Returns true if the collection is likely to be safely + // completed. Even if this method returns true, a collection + // may not be guaranteed to succeed, and the system should be + // able to safely unwind and recover from that failure, albeit + // at some additional cost. + virtual bool collection_attempt_is_safe() { + guarantee(false, "Are you sure you want to call this method?"); + return true; + } + // Perform a garbage collection. // If full is true attempt a full garbage collection of this generation. // Otherwise, attempting to (at least) free enough space to support an diff --git a/hotspot/src/share/vm/memory/tenuredGeneration.cpp b/hotspot/src/share/vm/memory/tenuredGeneration.cpp index 593cd6c025b..ea474825db0 100644 --- a/hotspot/src/share/vm/memory/tenuredGeneration.cpp +++ b/hotspot/src/share/vm/memory/tenuredGeneration.cpp @@ -419,29 +419,16 @@ void TenuredGeneration::retire_alloc_buffers_before_full_gc() {} void TenuredGeneration::verify_alloc_buffers_clean() {} #endif // SERIALGC -bool TenuredGeneration::promotion_attempt_is_safe( - size_t max_promotion_in_bytes, - bool younger_handles_promotion_failure) const { - - bool result = max_contiguous_available() >= max_promotion_in_bytes; - - if (younger_handles_promotion_failure && !result) { - result = max_contiguous_available() >= - (size_t) gc_stats()->avg_promoted()->padded_average(); - if (PrintGC && Verbose && result) { - gclog_or_tty->print_cr("TenuredGeneration::promotion_attempt_is_safe" - " contiguous_available: " SIZE_FORMAT - " avg_promoted: " SIZE_FORMAT, - max_contiguous_available(), - gc_stats()->avg_promoted()->padded_average()); - } - } else { - if (PrintGC && Verbose) { - gclog_or_tty->print_cr("TenuredGeneration::promotion_attempt_is_safe" - " contiguous_available: " SIZE_FORMAT - " promotion_in_bytes: " SIZE_FORMAT, - max_contiguous_available(), max_promotion_in_bytes); - } +bool TenuredGeneration::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const { + size_t available = max_contiguous_available(); + size_t av_promo = (size_t)gc_stats()->avg_promoted()->padded_average(); + bool res = (available >= av_promo) || (available >= max_promotion_in_bytes); + if (PrintGC && Verbose) { + gclog_or_tty->print_cr( + "Tenured: promo attempt is%s safe: available("SIZE_FORMAT") %s av_promo("SIZE_FORMAT")," + "max_promo("SIZE_FORMAT")", + res? "":" not", available, res? ">=":"<", + av_promo, max_promotion_in_bytes); } - return result; + return res; } diff --git a/hotspot/src/share/vm/memory/tenuredGeneration.hpp b/hotspot/src/share/vm/memory/tenuredGeneration.hpp index 82cc06fae44..3677867532f 100644 --- a/hotspot/src/share/vm/memory/tenuredGeneration.hpp +++ b/hotspot/src/share/vm/memory/tenuredGeneration.hpp @@ -101,8 +101,7 @@ class TenuredGeneration: public OneContigSpaceCardGeneration { virtual void update_gc_stats(int level, bool full); - virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes, - bool younger_handles_promotion_failure) const; + virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const; void verify_alloc_buffers_clean(); }; diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 4b6d69f0566..4ef33935e32 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -185,6 +185,10 @@ static ObsoleteFlag obsolete_jvm_flags[] = { JDK_Version::jdk_update(6,18), JDK_Version::jdk(7) }, { "UseDepthFirstScavengeOrder", JDK_Version::jdk_update(6,22), JDK_Version::jdk(7) }, + { "HandlePromotionFailure", + JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, + { "MaxLiveObjectEvacuationRatio", + JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, { NULL, JDK_Version(0), JDK_Version(0) } }; @@ -1722,8 +1726,6 @@ bool Arguments::check_vm_args_consistency() { status = false; } - status = status && verify_percentage(MaxLiveObjectEvacuationRatio, - "MaxLiveObjectEvacuationRatio"); status = status && verify_percentage(AdaptiveSizePolicyWeight, "AdaptiveSizePolicyWeight"); status = status && verify_percentage(AdaptivePermSizeWeight, "AdaptivePermSizeWeight"); diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 1fa26ce7fd6..00f16350436 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -1786,10 +1786,6 @@ class CommandLineFlags { notproduct(bool, GCALotAtAllSafepoints, false, \ "Enforce ScavengeALot/GCALot at all potential safepoints") \ \ - product(bool, HandlePromotionFailure, true, \ - "The youngest generation collection does not require " \ - "a guarantee of full promotion of all live objects.") \ - \ product(bool, PrintPromotionFailure, false, \ "Print additional diagnostic information following " \ " promotion failure") \ @@ -3003,9 +2999,6 @@ class CommandLineFlags { product(intx, NewRatio, 2, \ "Ratio of new/old generation sizes") \ \ - product(uintx, MaxLiveObjectEvacuationRatio, 100, \ - "Max percent of eden objects that will be live at scavenge") \ - \ product_pd(uintx, NewSizeThreadIncrease, \ "Additional size added to desired new generation size per " \ "non-daemon thread (in bytes)") \ From e5836e672178099ab33f84cf0ebc3698fa5bad50 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Mon, 25 Oct 2010 18:25:47 +0400 Subject: [PATCH 156/722] 6816582: WindowsFileChooserUI throws NullPointer when awt.useSystemAAFontSettings=false Reviewed-by: uta --- jdk/src/share/classes/java/awt/Toolkit.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/awt/Toolkit.java b/jdk/src/share/classes/java/awt/Toolkit.java index dd1ad7fb938..90319977f3d 100644 --- a/jdk/src/share/classes/java/awt/Toolkit.java +++ b/jdk/src/share/classes/java/awt/Toolkit.java @@ -1831,7 +1831,11 @@ public abstract class Toolkit { desktopProperties.put(name, newValue); } - desktopPropsSupport.firePropertyChange(name, oldValue, newValue); + // Don't fire change event if old and new values are null. + // It helps to avoid recursive resending of WM_THEMECHANGED + if (oldValue != null || newValue != null) { + desktopPropsSupport.firePropertyChange(name, oldValue, newValue); + } } /** From 00b0b853c8a651e9176ecf724e4ecbd8d9c43dda Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Mon, 25 Oct 2010 19:24:50 +0400 Subject: [PATCH 157/722] 6632810: javax.swing.plaf.basic.BasicScrollPaneUI.getBaseline(JComponent, int, int) doesn't throw NPE and IAE Reviewed-by: alexp --- .../swing/plaf/basic/BasicScrollPaneUI.java | 8 +++ .../basic/BasicScrollPaneUI/Test6632810.java | 72 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/Test6632810.java diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java index 410491b9913..44a512d5836 100644 --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java @@ -362,6 +362,14 @@ public class BasicScrollPaneUI * @since 1.6 */ public int getBaseline(JComponent c, int width, int height) { + if (c == null) { + throw new NullPointerException("Component must be non-null"); + } + + if (width < 0 || height < 0) { + throw new IllegalArgumentException("Width and height must be >= 0"); + } + JViewport viewport = scrollpane.getViewport(); Insets spInsets = scrollpane.getInsets(); int y = spInsets.top; diff --git a/jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/Test6632810.java b/jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/Test6632810.java new file mode 100644 index 00000000000..086b34d3759 --- /dev/null +++ b/jdk/test/javax/swing/plaf/basic/BasicScrollPaneUI/Test6632810.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6632810 + * @summary javax.swing.plaf.basic.BasicScrollPaneUI.getBaseline(JComponent, int, int) doesn't throw NPE and IAE + * @author Pavel Porvatov + */ + +import javax.swing.*; +import javax.swing.plaf.basic.BasicScrollPaneUI; + +public class Test6632810 { + public static void main(String[] args) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + BasicScrollPaneUI ui = new BasicScrollPaneUI(); + + ui.installUI(new JScrollPane()); + + try { + ui.getBaseline(null, 1, 1); + + throw new RuntimeException("getBaseline(null, 1, 1) does not throw NPE"); + } catch (NullPointerException e) { + // Ok + } + + int[][] illegelParams = new int[][]{ + {-1, 1,}, + {1, -1,}, + {-1, -1,}, + }; + + for (int[] illegelParam : illegelParams) { + try { + int width = illegelParam[0]; + int height = illegelParam[1]; + + ui.getBaseline(new JScrollPane(), width, height); + + throw new RuntimeException("getBaseline(new JScrollPane(), " + width + ", " + height + + ") does not throw IAE"); + } catch (IllegalArgumentException e) { + // Ok + } + } + } + }); + } +} From 38eb6ee5233317608681ef1bacac7685295831e2 Mon Sep 17 00:00:00 2001 From: Kumar Srinivasan Date: Mon, 25 Oct 2010 10:34:26 -0700 Subject: [PATCH 158/722] 6989469: (launcher) compiler warnings in jli native code Reviewed-by: darcy, ohair, sherman --- jdk/src/share/bin/java.c | 1 - jdk/src/share/bin/parse_manifest.c | 11 ++++------- jdk/src/share/bin/wildcard.c | 14 +++++++------- .../share/native/java/util/zip/zlib-1.2.3/zcrc32.c | 2 +- jdk/src/solaris/bin/java_md.c | 2 +- jdk/src/solaris/bin/jexec.c | 1 + jdk/src/windows/bin/java_md.c | 5 ++--- 7 files changed, 16 insertions(+), 20 deletions(-) diff --git a/jdk/src/share/bin/java.c b/jdk/src/share/bin/java.c index 4c61fb7c853..01eeb2a0547 100644 --- a/jdk/src/share/bin/java.c +++ b/jdk/src/share/bin/java.c @@ -355,7 +355,6 @@ JavaMain(void * _args) JavaVM *vm = 0; JNIEnv *env = 0; - jstring mainClassName; jclass mainClass; jmethodID mainID; jobjectArray mainArgs; diff --git a/jdk/src/share/bin/parse_manifest.c b/jdk/src/share/bin/parse_manifest.c index 2c916d87cb5..61b8bdb6b69 100644 --- a/jdk/src/share/bin/parse_manifest.c +++ b/jdk/src/share/bin/parse_manifest.c @@ -72,7 +72,7 @@ inflate_file(int fd, zentry *entry, int *size_out) if (entry->how == STORED) { *(char *)((size_t)in + entry->csize) = '\0'; if (size_out) { - *size_out = entry->csize; + *size_out = (int)entry->csize; } return (in); } else if (entry->how == DEFLATED) { @@ -103,7 +103,7 @@ inflate_file(int fd, zentry *entry, int *size_out) return (NULL); } if (size_out) { - *size_out = entry->isize; + *size_out = (int)entry->isize; } return (out); } else @@ -317,7 +317,7 @@ find_file(int fd, zentry *entry, const char *file_name) * manifest. If so, build the entry record from the data found in * the header located and return success. */ - if (CENNAM(p) == JLI_StrLen(file_name) && + if ((size_t)CENNAM(p) == JLI_StrLen(file_name) && memcmp((p + CENHDR), file_name, JLI_StrLen(file_name)) == 0) { if (lseek(fd, base_offset + CENOFF(p), SEEK_SET) < (off_t)0) { free(buffer); @@ -606,8 +606,5 @@ JLI_ManifestIterate(const char *jarfile, attribute_closure ac, void *user_data) } free(mp); close(fd); - if (rc == 0) - return (0); - else - return (-2); + return (rc == 0) ? 0 : -2; } diff --git a/jdk/src/share/bin/wildcard.c b/jdk/src/share/bin/wildcard.c index 3abcd18a97c..0d834e635b5 100644 --- a/jdk/src/share/bin/wildcard.c +++ b/jdk/src/share/bin/wildcard.c @@ -290,12 +290,12 @@ FileList_join(FileList fl, char sep) char *path; char *p; for (i = 0, size = 1; i < fl->size; i++) - size += JLI_StrLen(fl->files[i]) + 1; + size += (int)JLI_StrLen(fl->files[i]) + 1; path = JLI_MemAlloc(size); for (i = 0, p = path; i < fl->size; i++) { - int len = JLI_StrLen(fl->files[i]); + int len = (int)JLI_StrLen(fl->files[i]); if (i > 0) *p++ = sep; memcpy(p, fl->files[i], len); p += len; @@ -309,7 +309,7 @@ static FileList FileList_split(const char *path, char sep) { const char *p, *q; - int len = JLI_StrLen(path); + int len = (int)JLI_StrLen(path); int count; FileList fl; for (count = 1, p = path; p < path + len; p++) @@ -330,7 +330,7 @@ FileList_split(const char *path, char sep) static int isJarFileName(const char *filename) { - int len = JLI_StrLen(filename); + int len = (int)JLI_StrLen(filename); return (len >= 4) && (filename[len - 4] == '.') && (equal(filename + len - 3, "jar") || @@ -342,8 +342,8 @@ isJarFileName(const char *filename) static char * wildcardConcat(const char *wildcard, const char *basename) { - int wildlen = JLI_StrLen(wildcard); - int baselen = JLI_StrLen(basename); + int wildlen = (int)JLI_StrLen(wildcard); + int baselen = (int)JLI_StrLen(basename); char *filename = (char *) JLI_MemAlloc(wildlen + baselen); /* Replace the trailing '*' with basename */ memcpy(filename, wildcard, wildlen-1); @@ -369,7 +369,7 @@ wildcardFileList(const char *wildcard) static int isWildcard(const char *filename) { - int len = JLI_StrLen(filename); + int len = (int)JLI_StrLen(filename); return (len > 0) && (filename[len - 1] == '*') && (len == 1 || IS_FILE_SEPARATOR(filename[len - 2])) && diff --git a/jdk/src/share/native/java/util/zip/zlib-1.2.3/zcrc32.c b/jdk/src/share/native/java/util/zip/zlib-1.2.3/zcrc32.c index 580e26c83c4..0fd9a92c05e 100644 --- a/jdk/src/share/native/java/util/zip/zlib-1.2.3/zcrc32.c +++ b/jdk/src/share/native/java/util/zip/zlib-1.2.3/zcrc32.c @@ -406,7 +406,7 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2) return crc1; /* put operator for one zero bit in odd */ - odd[0] = 0xedb88320L; /* CRC-32 polynomial */ + odd[0] = 0xedb88320UL; /* CRC-32 polynomial */ row = 1; for (n = 1; n < GF2_DIM; n++) { odd[n] = row; diff --git a/jdk/src/solaris/bin/java_md.c b/jdk/src/solaris/bin/java_md.c index ca1ce5b9f0b..441d41efe25 100644 --- a/jdk/src/solaris/bin/java_md.c +++ b/jdk/src/solaris/bin/java_md.c @@ -868,7 +868,7 @@ LocateJRE(manifest_info* info) while (dp != NULL) { cp = JLI_StrChr(dp, (int)':'); if (cp != NULL) - *cp = (char)NULL; + *cp = '\0'; if ((target = ProcessDir(info, dp)) != NULL) break; dp = cp; diff --git a/jdk/src/solaris/bin/jexec.c b/jdk/src/solaris/bin/jexec.c index 24ba47ed94d..951b42bfe6a 100644 --- a/jdk/src/solaris/bin/jexec.c +++ b/jdk/src/solaris/bin/jexec.c @@ -221,6 +221,7 @@ int main(int argc, const char * argv[]) { * implies an error in the exec. */ free(nargv); errorExit(errno, BAD_EXEC_MSG); + return 0; // keep the compiler happy } diff --git a/jdk/src/windows/bin/java_md.c b/jdk/src/windows/bin/java_md.c index 06824ce319c..cef7db8c115 100644 --- a/jdk/src/windows/bin/java_md.c +++ b/jdk/src/windows/bin/java_md.c @@ -208,7 +208,7 @@ EnsureJreInstallation(const char* jrepath) struct stat s; /* Make sure the jrepath contains something */ - if (jrepath[0] == NULL) { + if ((void*)jrepath[0] == NULL) { return; } /* 32 bit windows only please */ @@ -540,7 +540,7 @@ JLI_ReportErrorMessageSys(const char *fmt, ...) /* get the length of the string we need */ int len = mlen = _vscprintf(fmt, vl) + 1; if (freeit) { - mlen += JLI_StrLen(errtext); + mlen += (int)JLI_StrLen(errtext); } message = (char *)JLI_MemAlloc(mlen); @@ -997,7 +997,6 @@ ExecJRE(char *jre, char **argv) { exit(exitCode); } - } /* From 3a8d7f818e61f09e19897dc8c11c91211efc1791 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Tue, 26 Oct 2010 12:35:14 +0400 Subject: [PATCH 159/722] 6735286: javax.swing.DefaultTableCellRender.getTableCellRendererComponent() doesn't allow passing null Tables Reviewed-by: alexp --- .../swing/table/DefaultTableCellRenderer.java | 3 ++ .../swing/JTable/6735286/bug6735286.java | 42 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 jdk/test/javax/swing/JTable/6735286/bug6735286.java diff --git a/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java b/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java index 83c689f5117..c87f865562c 100644 --- a/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java +++ b/jdk/src/share/classes/javax/swing/table/DefaultTableCellRenderer.java @@ -186,6 +186,9 @@ public class DefaultTableCellRenderer extends JLabel */ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { + if (table == null) { + return this; + } Color fg = null; Color bg = null; diff --git a/jdk/test/javax/swing/JTable/6735286/bug6735286.java b/jdk/test/javax/swing/JTable/6735286/bug6735286.java new file mode 100644 index 00000000000..0bb8bbff52d --- /dev/null +++ b/jdk/test/javax/swing/JTable/6735286/bug6735286.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 6735286 + @summary javax.swing.DefaultTableCellRender.getTableCellRendererComponent() doesn't allow passing null Tables + @author Pavel Porvatov +*/ + +import javax.swing.*; + +public class bug6735286 { + public static void main(String[] args) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + new JTable().getDefaultRenderer(Object.class).getTableCellRendererComponent(null, "a value", + true, true, 0, 0); + + } + }); + } +} From 37502d4f794a52f0ca7d8964ea9a4036fe2eec42 Mon Sep 17 00:00:00 2001 From: Denis Lila Date: Tue, 26 Oct 2010 10:39:23 -0400 Subject: [PATCH 160/722] 6967434: Round joins/caps of scaled up lines have poor quality Eliminated flattening from the rendering engine. Reviewed-by: flar --- .../classes/sun/java2d/pisces/Curve.java | 294 ++++ .../classes/sun/java2d/pisces/Dasher.java | 450 +++++- .../classes/sun/java2d/pisces/Helpers.java | 478 ++++++ .../classes/sun/java2d/pisces/LineSink.java | 93 -- .../sun/java2d/pisces/PiscesCache.java | 230 +-- .../java2d/pisces/PiscesRenderingEngine.java | 210 ++- .../java2d/pisces/PiscesTileGenerator.java | 151 +- .../classes/sun/java2d/pisces/Renderer.java | 886 +++++++---- .../classes/sun/java2d/pisces/Stroker.java | 1293 +++++++++++------ .../pisces/TransformingPathConsumer2D.java | 229 +++ 10 files changed, 3176 insertions(+), 1138 deletions(-) create mode 100644 jdk/src/share/classes/sun/java2d/pisces/Curve.java create mode 100644 jdk/src/share/classes/sun/java2d/pisces/Helpers.java delete mode 100644 jdk/src/share/classes/sun/java2d/pisces/LineSink.java create mode 100644 jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java diff --git a/jdk/src/share/classes/sun/java2d/pisces/Curve.java b/jdk/src/share/classes/sun/java2d/pisces/Curve.java new file mode 100644 index 00000000000..f8beae69fd3 --- /dev/null +++ b/jdk/src/share/classes/sun/java2d/pisces/Curve.java @@ -0,0 +1,294 @@ +/* + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.java2d.pisces; + +import java.util.Iterator; + +class Curve { + + float ax, ay, bx, by, cx, cy, dx, dy; + float dax, day, dbx, dby; + + Curve() { + } + + void set(float[] points, int type) { + switch(type) { + case 8: + set(points[0], points[1], + points[2], points[3], + points[4], points[5], + points[6], points[7]); + break; + case 6: + set(points[0], points[1], + points[2], points[3], + points[4], points[5]); + break; + default: + throw new InternalError("Curves can only be cubic or quadratic"); + } + } + + void set(float x1, float y1, + float x2, float y2, + float x3, float y3, + float x4, float y4) + { + ax = 3 * (x2 - x3) + x4 - x1; + ay = 3 * (y2 - y3) + y4 - y1; + bx = 3 * (x1 - 2 * x2 + x3); + by = 3 * (y1 - 2 * y2 + y3); + cx = 3 * (x2 - x1); + cy = 3 * (y2 - y1); + dx = x1; + dy = y1; + dax = 3 * ax; day = 3 * ay; + dbx = 2 * bx; dby = 2 * by; + } + + void set(float x1, float y1, + float x2, float y2, + float x3, float y3) + { + ax = ay = 0f; + + bx = x1 - 2 * x2 + x3; + by = y1 - 2 * y2 + y3; + cx = 2 * (x2 - x1); + cy = 2 * (y2 - y1); + dx = x1; + dy = y1; + dax = 0; day = 0; + dbx = 2 * bx; dby = 2 * by; + } + + float xat(float t) { + return t * (t * (t * ax + bx) + cx) + dx; + } + float yat(float t) { + return t * (t * (t * ay + by) + cy) + dy; + } + + float dxat(float t) { + return t * (t * dax + dbx) + cx; + } + + float dyat(float t) { + return t * (t * day + dby) + cy; + } + + private float ddxat(float t) { + return 2 * dax * t + dbx; + } + + private float ddyat(float t) { + return 2 * day * t + dby; + } + + int dxRoots(float[] roots, int off) { + return Helpers.quadraticRoots(dax, dbx, cx, roots, off); + } + + int dyRoots(float[] roots, int off) { + return Helpers.quadraticRoots(day, dby, cy, roots, off); + } + + int infPoints(float[] pts, int off) { + // inflection point at t if -f'(t)x*f''(t)y + f'(t)y*f''(t)x == 0 + // Fortunately, this turns out to be quadratic, so there are at + // most 2 inflection points. + final float a = dax * dby - dbx * day; + final float b = 2 * (cy * dax - day * cx); + final float c = cy * dbx - cx * dby; + + return Helpers.quadraticRoots(a, b, c, pts, off); + } + + // finds points where the first and second derivative are + // perpendicular. This happens when g(t) = f'(t)*f''(t) == 0 (where + // * is a dot product). Unfortunately, we have to solve a cubic. + private int perpendiculardfddf(float[] pts, int off, final float err) { + assert pts.length >= off + 4; + + // these are the coefficients of g(t): + final float a = 2*(dax*dax + day*day); + final float b = 3*(dax*dbx + day*dby); + final float c = 2*(dax*cx + day*cy) + dbx*dbx + dby*dby; + final float d = dbx*cx + dby*cy; + // TODO: We might want to divide the polynomial by a to make the + // coefficients smaller. This won't change the roots. + return Helpers.cubicRootsInAB(a, b, c, d, pts, off, err, 0f, 1f); + } + + // Tries to find the roots of the function ROC(t)-w in [0, 1). It uses + // a variant of the false position algorithm to find the roots. False + // position requires that 2 initial values x0,x1 be given, and that the + // function must have opposite signs at those values. To find such + // values, we need the local extrema of the ROC function, for which we + // need the roots of its derivative; however, it's harder to find the + // roots of the derivative in this case than it is to find the roots + // of the original function. So, we find all points where this curve's + // first and second derivative are perpendicular, and we pretend these + // are our local extrema. There are at most 3 of these, so we will check + // at most 4 sub-intervals of (0,1). ROC has asymptotes at inflection + // points, so roc-w can have at least 6 roots. This shouldn't be a + // problem for what we're trying to do (draw a nice looking curve). + int rootsOfROCMinusW(float[] roots, int off, final float w, final float err) { + // no OOB exception, because by now off<=6, and roots.length >= 10 + assert off <= 6 && roots.length >= 10; + int ret = off; + int numPerpdfddf = perpendiculardfddf(roots, off, err); + float t0 = 0, ft0 = ROCsq(t0) - w*w; + roots[off + numPerpdfddf] = 1f; // always check interval end points + numPerpdfddf++; + for (int i = off; i < off + numPerpdfddf; i++) { + float t1 = roots[i], ft1 = ROCsq(t1) - w*w; + if (ft0 == 0f) { + roots[ret++] = t0; + } else if (ft1 * ft0 < 0f) { // have opposite signs + // (ROC(t)^2 == w^2) == (ROC(t) == w) is true because + // ROC(t) >= 0 for all t. + roots[ret++] = falsePositionROCsqMinusX(t0, t1, w*w, err); + } + t0 = t1; + ft0 = ft1; + } + + return ret - off; + } + + private static float eliminateInf(float x) { + return (x == Float.POSITIVE_INFINITY ? Float.MAX_VALUE : + (x == Float.NEGATIVE_INFINITY ? Float.MIN_VALUE : x)); + } + + // A slight modification of the false position algorithm on wikipedia. + // This only works for the ROCsq-x functions. It might be nice to have + // the function as an argument, but that would be awkward in java6. + // It is something to consider for java7, depending on how closures + // and function objects turn out. Same goes for the newton's method + // algorithm in Helpers.java + private float falsePositionROCsqMinusX(float x0, float x1, + final float x, final float err) + { + final int iterLimit = 100; + int side = 0; + float t = x1, ft = eliminateInf(ROCsq(t) - x); + float s = x0, fs = eliminateInf(ROCsq(s) - x); + float r = s, fr; + for (int i = 0; i < iterLimit && Math.abs(t - s) > err * Math.abs(t + s); i++) { + r = (fs * t - ft * s) / (fs - ft); + fr = ROCsq(r) - x; + if (fr * ft > 0) {// have the same sign + ft = fr; t = r; + if (side < 0) { + fs /= (1 << (-side)); + side--; + } else { + side = -1; + } + } else if (fr * fs > 0) { + fs = fr; s = r; + if (side > 0) { + ft /= (1 << side); + side++; + } else { + side = 1; + } + } else { + break; + } + } + return r; + } + + // returns the radius of curvature squared at t of this curve + // see http://en.wikipedia.org/wiki/Radius_of_curvature_(applications) + private float ROCsq(final float t) { + final float dx = dxat(t); + final float dy = dyat(t); + final float ddx = ddxat(t); + final float ddy = ddyat(t); + final float dx2dy2 = dx*dx + dy*dy; + final float ddx2ddy2 = ddx*ddx + ddy*ddy; + final float ddxdxddydy = ddx*dx + ddy*dy; + float ret = ((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy))*dx2dy2; + return ret; + } + + // curve to be broken should be in pts[0] + // this will change the contents of both pts and Ts + // TODO: There's no reason for Ts to be an array. All we need is a sequence + // of t values at which to subdivide. An array statisfies this condition, + // but is unnecessarily restrictive. Ts should be an Iterator instead. + // Doing this will also make dashing easier, since we could easily make + // LengthIterator an Iterator and feed it to this function to simplify + // the loop in Dasher.somethingTo. + static Iterator breakPtsAtTs(final float[][] pts, final int type, + final float[] Ts, final int numTs) + { + assert pts.length >= 2 && pts[0].length >= 8 && numTs <= Ts.length; + return new Iterator() { + int nextIdx = 0; + int nextCurveIdx = 0; + float prevT = 0; + + @Override public boolean hasNext() { + return nextCurveIdx < numTs + 1; + } + + @Override public float[] next() { + float[] ret; + if (nextCurveIdx < numTs) { + float curT = Ts[nextCurveIdx]; + float splitT = (curT - prevT) / (1 - prevT); + Helpers.subdivideAt(splitT, + pts[nextIdx], 0, + pts[nextIdx], 0, + pts[1-nextIdx], 0, type); + updateTs(Ts, Ts[nextCurveIdx], nextCurveIdx + 1, numTs - nextCurveIdx - 1); + ret = pts[nextIdx]; + nextIdx = 1 - nextIdx; + } else { + ret = pts[nextIdx]; + } + nextCurveIdx++; + return ret; + } + + @Override public void remove() {} + }; + } + + // precondition: ts[off]...ts[off+len-1] must all be greater than t. + private static void updateTs(float[] ts, final float t, final int off, final int len) { + for (int i = off; i < off + len; i++) { + ts[i] = (ts[i] - t) / (1 - t); + } + } +} + diff --git a/jdk/src/share/classes/sun/java2d/pisces/Dasher.java b/jdk/src/share/classes/sun/java2d/pisces/Dasher.java index f5b5e049143..6a1616d30f3 100644 --- a/jdk/src/share/classes/sun/java2d/pisces/Dasher.java +++ b/jdk/src/share/classes/sun/java2d/pisces/Dasher.java @@ -25,6 +25,8 @@ package sun.java2d.pisces; +import sun.awt.geom.PathConsumer2D; + /** * The Dasher class takes a series of linear commands * (moveTo, lineTo, close and @@ -36,18 +38,16 @@ package sun.java2d.pisces; * semantics are unclear. * */ -public class Dasher implements LineSink { - private final LineSink output; +public class Dasher implements sun.awt.geom.PathConsumer2D { + + private final PathConsumer2D out; private final float[] dash; private final float startPhase; private final boolean startDashOn; private final int startIdx; - private final float m00, m10, m01, m11; - private final float det; - - private boolean firstDashOn; private boolean starting; + private boolean needsMoveTo; private int idx; private boolean dashOn; @@ -55,28 +55,23 @@ public class Dasher implements LineSink { private float sx, sy; private float x0, y0; - private float sx1, sy1; + // temporary storage for the current curve + private float[] curCurvepts; /** * Constructs a Dasher. * - * @param output an output LineSink. - * @param dash an array of ints containing the dash pattern - * @param phase an int containing the dash phase - * @param transform a Transform4 object indicating - * the transform that has been previously applied to all incoming - * coordinates. This is required in order to compute dash lengths - * properly. + * @param out an output PathConsumer2D. + * @param dash an array of floats containing the dash pattern + * @param phase a float containing the dash phase */ - public Dasher(LineSink output, - float[] dash, float phase, - float a00, float a01, float a10, float a11) { + public Dasher(PathConsumer2D out, float[] dash, float phase) { if (phase < 0) { throw new IllegalArgumentException("phase < 0 !"); } - this.output = output; + this.out = out; // Normalize so 0 <= phase < dash[0] int idx = 0; @@ -92,16 +87,19 @@ public class Dasher implements LineSink { this.startPhase = this.phase = phase; this.startDashOn = dashOn; this.startIdx = idx; + this.starting = true; - m00 = a00; - m01 = a01; - m10 = a10; - m11 = a11; - det = m00 * m11 - m01 * m10; + // we need curCurvepts to be able to contain 2 curves because when + // dashing curves, we need to subdivide it + curCurvepts = new float[8 * 2]; } public void moveTo(float x0, float y0) { - output.moveTo(x0, y0); + if (firstSegidx > 0) { + out.moveTo(sx, sy); + emitFirstSegments(); + } + needsMoveTo = true; this.idx = startIdx; this.dashOn = this.startDashOn; this.phase = this.startPhase; @@ -110,88 +108,108 @@ public class Dasher implements LineSink { this.starting = true; } - public void lineJoin() { - output.lineJoin(); + private void emitSeg(float[] buf, int off, int type) { + switch (type) { + case 8: + out.curveTo(buf[off+0], buf[off+1], + buf[off+2], buf[off+3], + buf[off+4], buf[off+5]); + break; + case 6: + out.quadTo(buf[off+0], buf[off+1], + buf[off+2], buf[off+3]); + break; + case 4: + out.lineTo(buf[off], buf[off+1]); + } } - private void goTo(float x1, float y1) { + private void emitFirstSegments() { + for (int i = 0; i < firstSegidx; ) { + emitSeg(firstSegmentsBuffer, i+1, (int)firstSegmentsBuffer[i]); + i += (((int)firstSegmentsBuffer[i]) - 1); + } + firstSegidx = 0; + } + + // We don't emit the first dash right away. If we did, caps would be + // drawn on it, but we need joins to be drawn if there's a closePath() + // So, we store the path elements that make up the first dash in the + // buffer below. + private float[] firstSegmentsBuffer = new float[7]; + private int firstSegidx = 0; + // precondition: pts must be in relative coordinates (relative to x0,y0) + // fullCurve is true iff the curve in pts has not been split. + private void goTo(float[] pts, int off, final int type) { + float x = pts[off + type - 4]; + float y = pts[off + type - 3]; if (dashOn) { if (starting) { - this.sx1 = x1; - this.sy1 = y1; - firstDashOn = true; - starting = false; + firstSegmentsBuffer = Helpers.widenArray(firstSegmentsBuffer, + firstSegidx, type - 2); + firstSegmentsBuffer[firstSegidx++] = type; + System.arraycopy(pts, off, firstSegmentsBuffer, firstSegidx, type - 2); + firstSegidx += type - 2; + } else { + if (needsMoveTo) { + out.moveTo(x0, y0); + needsMoveTo = false; + } + emitSeg(pts, off, type); } - output.lineTo(x1, y1); } else { - if (starting) { - firstDashOn = false; - starting = false; - } - output.moveTo(x1, y1); + starting = false; + needsMoveTo = true; } - this.x0 = x1; - this.y0 = y1; + this.x0 = x; + this.y0 = y; } public void lineTo(float x1, float y1) { - // The widened line is squished to a 0 width one, so no drawing is done - if (det == 0) { - goTo(x1, y1); - return; - } float dx = x1 - x0; float dy = y1 - y0; + float len = (float) Math.hypot(dx, dy); - // Compute segment length in the untransformed - // coordinate system - - float la = (dy*m00 - dx*m10)/det; - float lb = (dy*m01 - dx*m11)/det; - float origLen = (float) Math.hypot(la, lb); - - if (origLen == 0) { - // Let the output LineSink deal with cases where dx, dy are 0. - goTo(x1, y1); + if (len == 0) { return; } // The scaling factors needed to get the dx and dy of the // transformed dash segments. - float cx = dx / origLen; - float cy = dy / origLen; + float cx = dx / len; + float cy = dy / len; while (true) { float leftInThisDashSegment = dash[idx] - phase; - if (origLen < leftInThisDashSegment) { - goTo(x1, y1); + if (len <= leftInThisDashSegment) { + curCurvepts[0] = x1; + curCurvepts[1] = y1; + goTo(curCurvepts, 0, 4); // Advance phase within current dash segment - phase += origLen; - return; - } else if (origLen == leftInThisDashSegment) { - goTo(x1, y1); - phase = 0f; - idx = (idx + 1) % dash.length; - dashOn = !dashOn; + phase += len; + if (len == leftInThisDashSegment) { + phase = 0f; + idx = (idx + 1) % dash.length; + dashOn = !dashOn; + } return; } - float dashx, dashy; float dashdx = dash[idx] * cx; float dashdy = dash[idx] * cy; if (phase == 0) { - dashx = x0 + dashdx; - dashy = y0 + dashdy; + curCurvepts[0] = x0 + dashdx; + curCurvepts[1] = y0 + dashdy; } else { - float p = (leftInThisDashSegment) / dash[idx]; - dashx = x0 + p * dashdx; - dashy = y0 + p * dashdy; + float p = leftInThisDashSegment / dash[idx]; + curCurvepts[0] = x0 + p * dashdx; + curCurvepts[1] = y0 + p * dashdy; } - goTo(dashx, dashy); + goTo(curCurvepts, 0, 4); - origLen -= (dash[idx] - phase); + len -= leftInThisDashSegment; // Advance to next dash segment idx = (idx + 1) % dash.length; dashOn = !dashOn; @@ -199,15 +217,289 @@ public class Dasher implements LineSink { } } + private LengthIterator li = null; - public void close() { - lineTo(sx, sy); - if (firstDashOn) { - output.lineTo(sx1, sy1); + // preconditions: curCurvepts must be an array of length at least 2 * type, + // that contains the curve we want to dash in the first type elements + private void somethingTo(int type) { + if (pointCurve(curCurvepts, type)) { + return; + } + if (li == null) { + li = new LengthIterator(4, 0.0001f); + } + li.initializeIterationOnCurve(curCurvepts, type); + + int curCurveoff = 0; // initially the current curve is at curCurvepts[0...type] + float lastSplitT = 0; + float t = 0; + float leftInThisDashSegment = dash[idx] - phase; + while ((t = li.next(leftInThisDashSegment)) < 1) { + if (t != 0) { + Helpers.subdivideAt((t - lastSplitT) / (1 - lastSplitT), + curCurvepts, curCurveoff, + curCurvepts, 0, + curCurvepts, type, type); + lastSplitT = t; + goTo(curCurvepts, 2, type); + curCurveoff = type; + } + // Advance to next dash segment + idx = (idx + 1) % dash.length; + dashOn = !dashOn; + phase = 0; + leftInThisDashSegment = dash[idx]; + } + goTo(curCurvepts, curCurveoff+2, type); + phase += li.lastSegLen(); + if (phase >= dash[idx]) { + phase = 0f; + idx = (idx + 1) % dash.length; + dashOn = !dashOn; } } - public void end() { - output.end(); + private static boolean pointCurve(float[] curve, int type) { + for (int i = 2; i < type; i++) { + if (curve[i] != curve[i-2]) { + return false; + } + } + return true; + } + + // Objects of this class are used to iterate through curves. They return + // t values where the left side of the curve has a specified length. + // It does this by subdividing the input curve until a certain error + // condition has been met. A recursive subdivision procedure would + // return as many as 1< 0) { + this.sides[0] = Side.LEFT; + this.done = false; + } else { + // the root of the tree is a leaf so we're done. + this.sides[0] = Side.RIGHT; + this.done = true; + } + this.lastSegLen = 0; + } + + // returns the t value where the remaining curve should be split in + // order for the left subdivided curve to have length len. If len + // is >= than the length of the uniterated curve, it returns 1. + public float next(float len) { + float targetLength = lenAtLastSplit + len; + while(lenAtNextT < targetLength) { + if (done) { + lastSegLen = lenAtNextT - lenAtLastSplit; + return 1; + } + goToNextLeaf(); + } + lenAtLastSplit = targetLength; + float t = binSearchForLen(lenAtLastSplit - lenAtLastT, + recCurveStack[recLevel], curveType, lenAtNextT - lenAtLastT, ERR); + // t is relative to the current leaf, so we must make it a valid parameter + // of the original curve. + t = t * (nextT - lastT) + lastT; + if (t >= 1) { + t = 1; + done = true; + } + // even if done = true, if we're here, that means targetLength + // is equal to, or very, very close to the total length of the + // curve, so lastSegLen won't be too high. In cases where len + // overshoots the curve, this method will exit in the while + // loop, and lastSegLen will still be set to the right value. + lastSegLen = len; + return t; + } + + public float lastSegLen() { + return lastSegLen; + } + + // Returns t such that if leaf is subdivided at t the left + // curve will have length len. leafLen must be the length of leaf. + private static Curve bsc = new Curve(); + private static float binSearchForLen(float len, float[] leaf, int type, + float leafLen, float err) + { + assert len <= leafLen; + bsc.set(leaf, type); + float errBound = err*len; + float left = 0, right = 1; + while (left < right) { + float m = (left + right) / 2; + if (m == left || m == right) { + return m; + } + float x = bsc.xat(m); + float y = bsc.yat(m); + float leftLen = Helpers.linelen(leaf[0], leaf[1], x, y); + if (Math.abs(leftLen - len) < errBound) { + return m; + } + if (leftLen < len) { + left = m; + } else { + right = m; + } + } + return left; + } + + // go to the next leaf (in an inorder traversal) in the recursion tree + // preconditions: must be on a leaf, and that leaf must not be the root. + private void goToNextLeaf() { + // We must go to the first ancestor node that has an unvisited + // right child. + recLevel--; + while(sides[recLevel] == Side.RIGHT) { + if (recLevel == 0) { + done = true; + return; + } + recLevel--; + } + + sides[recLevel] = Side.RIGHT; + System.arraycopy(recCurveStack[recLevel], 0, recCurveStack[recLevel+1], 0, curveType); + recLevel++; + goLeft(); + } + + // go to the leftmost node from the current node. Return its length. + private void goLeft() { + float len = onLeaf(); + if (len >= 0) { + lastT = nextT; + lenAtLastT = lenAtNextT; + nextT += (1 << (limit - recLevel)) * minTincrement; + lenAtNextT += len; + } else { + Helpers.subdivide(recCurveStack[recLevel], 0, + recCurveStack[recLevel+1], 0, + recCurveStack[recLevel], 0, curveType); + sides[recLevel] = Side.LEFT; + recLevel++; + goLeft(); + } + } + + // this is a bit of a hack. It returns -1 if we're not on a leaf, and + // the length of the leaf if we are on a leaf. + private float onLeaf() { + float polylen = Helpers.polyLineLength(recCurveStack[recLevel], 0, curveType); + float linelen = Helpers.linelen(recCurveStack[recLevel][0], recCurveStack[recLevel][1], + recCurveStack[recLevel][curveType - 2], recCurveStack[recLevel][curveType - 1]); + return (polylen - linelen < ERR || recLevel == limit) ? + (polylen + linelen)/2 : -1; + } + } + + @Override + public void curveTo(float x1, float y1, + float x2, float y2, + float x3, float y3) + { + curCurvepts[0] = x0; curCurvepts[1] = y0; + curCurvepts[2] = x1; curCurvepts[3] = y1; + curCurvepts[4] = x2; curCurvepts[5] = y2; + curCurvepts[6] = x3; curCurvepts[7] = y3; + somethingTo(8); + } + + @Override + public void quadTo(float x1, float y1, float x2, float y2) { + curCurvepts[0] = x0; curCurvepts[1] = y0; + curCurvepts[2] = x1; curCurvepts[3] = y1; + curCurvepts[4] = x2; curCurvepts[5] = y2; + somethingTo(6); + } + + public void closePath() { + lineTo(sx, sy); + if (firstSegidx > 0) { + if (!dashOn || needsMoveTo) { + out.moveTo(sx, sy); + } + emitFirstSegments(); + } + moveTo(sx, sy); + } + + public void pathDone() { + if (firstSegidx > 0) { + out.moveTo(sx, sy); + emitFirstSegments(); + } + out.pathDone(); + } + + @Override + public long getNativeConsumer() { + throw new InternalError("Dasher does not use a native consumer"); } } + diff --git a/jdk/src/share/classes/sun/java2d/pisces/Helpers.java b/jdk/src/share/classes/sun/java2d/pisces/Helpers.java new file mode 100644 index 00000000000..d3f238a91e0 --- /dev/null +++ b/jdk/src/share/classes/sun/java2d/pisces/Helpers.java @@ -0,0 +1,478 @@ +/* + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.java2d.pisces; + +import java.util.Arrays; + +final class Helpers { + private Helpers() { + throw new Error("This is a non instantiable class"); + } + + static boolean within(final float x, final float y, final float err) { + final float d = y - x; + return (d <= err && d >= -err); + } + + static boolean within(final double x, final double y, final double err) { + final double d = y - x; + return (d <= err && d >= -err); + } + + static int quadraticRoots(final float a, final float b, + final float c, float[] zeroes, final int off) + { + int ret = off; + float t; + if (a != 0f) { + final float dis = b*b - 4*a*c; + if (dis > 0) { + final float sqrtDis = (float)Math.sqrt(dis); + // depending on the sign of b we use a slightly different + // algorithm than the traditional one to find one of the roots + // so we can avoid adding numbers of different signs (which + // might result in loss of precision). + if (b >= 0) { + zeroes[ret++] = (2 * c) / (-b - sqrtDis); + zeroes[ret++] = (-b - sqrtDis) / (2 * a); + } else { + zeroes[ret++] = (-b + sqrtDis) / (2 * a); + zeroes[ret++] = (2 * c) / (-b + sqrtDis); + } + } else if (dis == 0f) { + t = (-b) / (2 * a); + zeroes[ret++] = t; + } + } else { + if (b != 0f) { + t = (-c) / b; + zeroes[ret++] = t; + } + } + return ret - off; + } + + // find the roots of g(t) = a*t^3 + b*t^2 + c*t + d in [A,B) + // We will not use Cardano's method, since it is complicated and + // involves too many square and cubic roots. We will use Newton's method. + // TODO: this should probably return ALL roots. Then the user can do + // his own filtering of roots outside [A,B). + static int cubicRootsInAB(final float a, final float b, + final float c, final float d, + float[] pts, final int off, final float E, + final float A, final float B) + { + if (a == 0) { + return quadraticRoots(b, c, d, pts, off); + } + // the coefficients of g'(t). no dc variable because dc=c + // we use these to get the critical points of g(t), which + // we then use to chose starting points for Newton's method. These + // should be very close to the actual roots. + final float da = 3 * a; + final float db = 2 * b; + int numCritPts = quadraticRoots(da, db, c, pts, off+1); + numCritPts = filterOutNotInAB(pts, off+1, numCritPts, A, B) - off - 1; + // need them sorted. + if (numCritPts == 2 && pts[off+1] > pts[off+2]) { + float tmp = pts[off+1]; + pts[off+1] = pts[off+2]; + pts[off+2] = tmp; + } + + int ret = off; + + // we don't actually care much about the extrema themselves. We + // only use them to ensure that g(t) is monotonic in each + // interval [pts[i],pts[i+1] (for i in off...off+numCritPts+1). + // This will allow us to determine intervals containing exactly + // one root. + // The end points of the interval are always local extrema. + pts[off] = A; + pts[off + numCritPts + 1] = B; + numCritPts += 2; + + float x0 = pts[off], fx0 = evalCubic(a, b, c, d, x0); + for (int i = off; i < off + numCritPts - 1; i++) { + float x1 = pts[i+1], fx1 = evalCubic(a, b, c, d, x1); + if (fx0 == 0f) { + pts[ret++] = x0; + } else if (fx1 * fx0 < 0f) { // have opposite signs + pts[ret++] = CubicNewton(a, b, c, d, + x0 + fx0 * (x1 - x0) / (fx0 - fx1), E); + } + x0 = x1; + fx0 = fx1; + } + return ret - off; + } + + // precondition: the polynomial to be evaluated must not be 0 at x0. + static float CubicNewton(final float a, final float b, + final float c, final float d, + float x0, final float err) + { + // considering how this function is used, 10 should be more than enough + final int itlimit = 10; + float fx0 = evalCubic(a, b, c, d, x0); + float x1; + int count = 0; + while(true) { + x1 = x0 - (fx0 / evalCubic(0, 3 * a, 2 * b, c, x0)); + if (Math.abs(x1 - x0) < err * Math.abs(x1 + x0) || count == itlimit) { + break; + } + x0 = x1; + fx0 = evalCubic(a, b, c, d, x0); + count++; + } + return x1; + } + + // fills the input array with numbers 0, INC, 2*INC, ... + static void fillWithIdxes(final float[] data, final int[] idxes) { + if (idxes.length > 0) { + idxes[0] = 0; + for (int i = 1; i < idxes.length; i++) { + idxes[i] = idxes[i-1] + (int)data[idxes[i-1]]; + } + } + } + + static void fillWithIdxes(final int[] idxes, final int inc) { + if (idxes.length > 0) { + idxes[0] = 0; + for (int i = 1; i < idxes.length; i++) { + idxes[i] = idxes[i-1] + inc; + } + } + } + + // These use a hardcoded factor of 2 for increasing sizes. Perhaps this + // should be provided as an argument. + static float[] widenArray(float[] in, final int cursize, final int numToAdd) { + if (in == null) { + return new float[5 * numToAdd]; + } + if (in.length >= cursize + numToAdd) { + return in; + } + return Arrays.copyOf(in, 2 * (cursize + numToAdd)); + } + static int[] widenArray(int[] in, final int cursize, final int numToAdd) { + if (in.length >= cursize + numToAdd) { + return in; + } + return Arrays.copyOf(in, 2 * (cursize + numToAdd)); + } + + static float evalCubic(final float a, final float b, + final float c, final float d, + final float t) + { + return t * (t * (t * a + b) + c) + d; + } + + static float evalQuad(final float a, final float b, + final float c, final float t) + { + return t * (t * a + b) + c; + } + + // returns the index 1 past the last valid element remaining after filtering + static int filterOutNotInAB(float[] nums, final int off, final int len, + final float a, final float b) + { + int ret = off; + for (int i = off; i < off + len; i++) { + if (nums[i] > a && nums[i] < b) { + nums[ret++] = nums[i]; + } + } + return ret; + } + + static float polyLineLength(float[] poly, final int off, final int nCoords) { + assert nCoords % 2 == 0 && poly.length >= off + nCoords : ""; + float acc = 0; + for (int i = off + 2; i < off + nCoords; i += 2) { + acc += linelen(poly[i], poly[i+1], poly[i-2], poly[i-1]); + } + return acc; + } + + static float linelen(float x1, float y1, float x2, float y2) { + return (float)Math.hypot(x2 - x1, y2 - y1); + } + + static void subdivide(float[] src, int srcoff, float[] left, int leftoff, + float[] right, int rightoff, int type) + { + switch(type) { + case 6: + Helpers.subdivideQuad(src, srcoff, left, leftoff, right, rightoff); + break; + case 8: + Helpers.subdivideCubic(src, srcoff, left, leftoff, right, rightoff); + break; + default: + throw new InternalError("Unsupported curve type"); + } + } + + static void isort(float[] a, int off, int len) { + for (int i = off + 1; i < off + len; i++) { + float ai = a[i]; + int j = i - 1; + for (; j >= off && a[j] > ai; j--) { + a[j+1] = a[j]; + } + a[j+1] = ai; + } + } + + // Most of these are copied from classes in java.awt.geom because we need + // float versions of these functions, and Line2D, CubicCurve2D, + // QuadCurve2D don't provide them. + /** + * Subdivides the cubic curve specified by the coordinates + * stored in the src array at indices srcoff + * through (srcoff + 7) and stores the + * resulting two subdivided curves into the two result arrays at the + * corresponding indices. + * Either or both of the left and right + * arrays may be null or a reference to the same array + * as the src array. + * Note that the last point in the first subdivided curve is the + * same as the first point in the second subdivided curve. Thus, + * it is possible to pass the same array for left + * and right and to use offsets, such as rightoff + * equals (leftoff + 6), in order + * to avoid allocating extra storage for this common point. + * @param src the array holding the coordinates for the source curve + * @param srcoff the offset into the array of the beginning of the + * the 6 source coordinates + * @param left the array for storing the coordinates for the first + * half of the subdivided curve + * @param leftoff the offset into the array of the beginning of the + * the 6 left coordinates + * @param right the array for storing the coordinates for the second + * half of the subdivided curve + * @param rightoff the offset into the array of the beginning of the + * the 6 right coordinates + * @since 1.7 + */ + static void subdivideCubic(float src[], int srcoff, + float left[], int leftoff, + float right[], int rightoff) + { + float x1 = src[srcoff + 0]; + float y1 = src[srcoff + 1]; + float ctrlx1 = src[srcoff + 2]; + float ctrly1 = src[srcoff + 3]; + float ctrlx2 = src[srcoff + 4]; + float ctrly2 = src[srcoff + 5]; + float x2 = src[srcoff + 6]; + float y2 = src[srcoff + 7]; + if (left != null) { + left[leftoff + 0] = x1; + left[leftoff + 1] = y1; + } + if (right != null) { + right[rightoff + 6] = x2; + right[rightoff + 7] = y2; + } + x1 = (x1 + ctrlx1) / 2.0f; + y1 = (y1 + ctrly1) / 2.0f; + x2 = (x2 + ctrlx2) / 2.0f; + y2 = (y2 + ctrly2) / 2.0f; + float centerx = (ctrlx1 + ctrlx2) / 2.0f; + float centery = (ctrly1 + ctrly2) / 2.0f; + ctrlx1 = (x1 + centerx) / 2.0f; + ctrly1 = (y1 + centery) / 2.0f; + ctrlx2 = (x2 + centerx) / 2.0f; + ctrly2 = (y2 + centery) / 2.0f; + centerx = (ctrlx1 + ctrlx2) / 2.0f; + centery = (ctrly1 + ctrly2) / 2.0f; + if (left != null) { + left[leftoff + 2] = x1; + left[leftoff + 3] = y1; + left[leftoff + 4] = ctrlx1; + left[leftoff + 5] = ctrly1; + left[leftoff + 6] = centerx; + left[leftoff + 7] = centery; + } + if (right != null) { + right[rightoff + 0] = centerx; + right[rightoff + 1] = centery; + right[rightoff + 2] = ctrlx2; + right[rightoff + 3] = ctrly2; + right[rightoff + 4] = x2; + right[rightoff + 5] = y2; + } + } + + + static void subdivideCubicAt(float t, float src[], int srcoff, + float left[], int leftoff, + float right[], int rightoff) + { + float x1 = src[srcoff + 0]; + float y1 = src[srcoff + 1]; + float ctrlx1 = src[srcoff + 2]; + float ctrly1 = src[srcoff + 3]; + float ctrlx2 = src[srcoff + 4]; + float ctrly2 = src[srcoff + 5]; + float x2 = src[srcoff + 6]; + float y2 = src[srcoff + 7]; + if (left != null) { + left[leftoff + 0] = x1; + left[leftoff + 1] = y1; + } + if (right != null) { + right[rightoff + 6] = x2; + right[rightoff + 7] = y2; + } + x1 = x1 + t * (ctrlx1 - x1); + y1 = y1 + t * (ctrly1 - y1); + x2 = ctrlx2 + t * (x2 - ctrlx2); + y2 = ctrly2 + t * (y2 - ctrly2); + float centerx = ctrlx1 + t * (ctrlx2 - ctrlx1); + float centery = ctrly1 + t * (ctrly2 - ctrly1); + ctrlx1 = x1 + t * (centerx - x1); + ctrly1 = y1 + t * (centery - y1); + ctrlx2 = centerx + t * (x2 - centerx); + ctrly2 = centery + t * (y2 - centery); + centerx = ctrlx1 + t * (ctrlx2 - ctrlx1); + centery = ctrly1 + t * (ctrly2 - ctrly1); + if (left != null) { + left[leftoff + 2] = x1; + left[leftoff + 3] = y1; + left[leftoff + 4] = ctrlx1; + left[leftoff + 5] = ctrly1; + left[leftoff + 6] = centerx; + left[leftoff + 7] = centery; + } + if (right != null) { + right[rightoff + 0] = centerx; + right[rightoff + 1] = centery; + right[rightoff + 2] = ctrlx2; + right[rightoff + 3] = ctrly2; + right[rightoff + 4] = x2; + right[rightoff + 5] = y2; + } + } + + static void subdivideQuad(float src[], int srcoff, + float left[], int leftoff, + float right[], int rightoff) + { + float x1 = src[srcoff + 0]; + float y1 = src[srcoff + 1]; + float ctrlx = src[srcoff + 2]; + float ctrly = src[srcoff + 3]; + float x2 = src[srcoff + 4]; + float y2 = src[srcoff + 5]; + if (left != null) { + left[leftoff + 0] = x1; + left[leftoff + 1] = y1; + } + if (right != null) { + right[rightoff + 4] = x2; + right[rightoff + 5] = y2; + } + x1 = (x1 + ctrlx) / 2.0f; + y1 = (y1 + ctrly) / 2.0f; + x2 = (x2 + ctrlx) / 2.0f; + y2 = (y2 + ctrly) / 2.0f; + ctrlx = (x1 + x2) / 2.0f; + ctrly = (y1 + y2) / 2.0f; + if (left != null) { + left[leftoff + 2] = x1; + left[leftoff + 3] = y1; + left[leftoff + 4] = ctrlx; + left[leftoff + 5] = ctrly; + } + if (right != null) { + right[rightoff + 0] = ctrlx; + right[rightoff + 1] = ctrly; + right[rightoff + 2] = x2; + right[rightoff + 3] = y2; + } + } + + static void subdivideQuadAt(float t, float src[], int srcoff, + float left[], int leftoff, + float right[], int rightoff) + { + float x1 = src[srcoff + 0]; + float y1 = src[srcoff + 1]; + float ctrlx = src[srcoff + 2]; + float ctrly = src[srcoff + 3]; + float x2 = src[srcoff + 4]; + float y2 = src[srcoff + 5]; + if (left != null) { + left[leftoff + 0] = x1; + left[leftoff + 1] = y1; + } + if (right != null) { + right[rightoff + 4] = x2; + right[rightoff + 5] = y2; + } + x1 = x1 + t * (ctrlx - x1); + y1 = y1 + t * (ctrly - y1); + x2 = ctrlx + t * (x2 - ctrlx); + y2 = ctrly + t * (y2 - ctrly); + ctrlx = x1 + t * (x2 - x1); + ctrly = y1 + t * (y2 - y1); + if (left != null) { + left[leftoff + 2] = x1; + left[leftoff + 3] = y1; + left[leftoff + 4] = ctrlx; + left[leftoff + 5] = ctrly; + } + if (right != null) { + right[rightoff + 0] = ctrlx; + right[rightoff + 1] = ctrly; + right[rightoff + 2] = x2; + right[rightoff + 3] = y2; + } + } + + static void subdivideAt(float t, float src[], int srcoff, + float left[], int leftoff, + float right[], int rightoff, int size) + { + switch(size) { + case 8: + subdivideCubicAt(t, src, srcoff, left, leftoff, right, rightoff); + break; + case 6: + subdivideQuadAt(t, src, srcoff, left, leftoff, right, rightoff); + break; + } + } +} diff --git a/jdk/src/share/classes/sun/java2d/pisces/LineSink.java b/jdk/src/share/classes/sun/java2d/pisces/LineSink.java deleted file mode 100644 index 81300a25fa0..00000000000 --- a/jdk/src/share/classes/sun/java2d/pisces/LineSink.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package sun.java2d.pisces; - -/** - * The LineSink interface accepts a series of line - * drawing commands: moveTo, lineTo, - * close (equivalent to a lineTo command - * with an argument equal to the argument of the last - * moveTo command), and end. - * - *

    A Flattener may be used to connect a general path - * source to a LineSink. - * - *

    The Renderer class implements the - * LineSink interface. - * - */ -public interface LineSink { - - /** - * Moves the current drawing position to the point (x0, - * y0). - * - * @param x0 the X coordinate - * @param y0 the Y coordinate - */ - public void moveTo(float x0, float y0); - - /** - * Provides a hint that the current segment should be joined to - * the following segment using an explicit miter or round join if - * required. - * - *

    An application-generated path will generally have no need - * to contain calls to this method; they are typically introduced - * by a Flattener to mark segment divisions that - * appear in its input, and consumed by a Stroker - * that is responsible for emitting the miter or round join - * segments. - * - *

    Other LineSink classes should simply pass this - * hint to their output sink as needed. - */ - public void lineJoin(); - - /** - * Draws a line from the current drawing position to the point - * (x1, y1) and sets the current drawing position to - * (x1, y1). - * - * @param x1 the X coordinate - * @param y1 the Y coordinate - */ - public void lineTo(float x1, float y1); - - /** - * Closes the current path by drawing a line from the current - * drawing position to the point specified by the moset recent - * moveTo command. - */ - public void close(); - - /** - * Ends the current path. It may be necessary to end a path in - * order to allow end caps to be drawn. - */ - public void end(); - -} diff --git a/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java b/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java index 0ecc4209698..dcd595c48f6 100644 --- a/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java +++ b/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java @@ -25,6 +25,8 @@ package sun.java2d.pisces; +import java.util.Arrays; + /** * An object used to cache pre-rendered complex paths. * @@ -32,115 +34,153 @@ package sun.java2d.pisces; */ public final class PiscesCache { - int bboxX0, bboxY0, bboxX1, bboxY1; + final int bboxX0, bboxY0, bboxX1, bboxY1; - byte[] rowAARLE; - int alphaRLELength; + // rowAARLE[i] holds the encoding of the pixel row with y = bboxY0+i. + // The format of each of the inner arrays is: rowAARLE[i][0,1] = (x0, n) + // where x0 is the first x in row i with nonzero alpha, and n is the + // number of RLE entries in this row. rowAARLE[i][j,j+1] for j>1 is + // (val,runlen) + final int[][] rowAARLE; - int[] rowOffsetsRLE; - int[] minTouched; - int alphaRows; + // RLE encodings are added in increasing y rows and then in increasing + // x inside those rows. Therefore, at any one time there is a well + // defined position (x,y) where a run length is about to be added (or + // the row terminated). x0,y0 is this (x,y)-(bboxX0,bboxY0). They + // are used to get indices into the current tile. + private int x0 = Integer.MIN_VALUE, y0 = Integer.MIN_VALUE; - private PiscesCache() {} + // touchedTile[i][j] is the sum of all the alphas in the tile with + // y=i*TILE_SIZE+bboxY0 and x=j*TILE_SIZE+bboxX0. + private final int[][] touchedTile; - public static PiscesCache createInstance() { - return new PiscesCache(); + static final int TILE_SIZE_LG = 5; + static final int TILE_SIZE = 1 << TILE_SIZE_LG; // 32 + private static final int INIT_ROW_SIZE = 8; // enough for 3 run lengths + + PiscesCache(int minx, int miny, int maxx, int maxy) { + assert maxy >= miny && maxx >= minx; + bboxX0 = minx; + bboxY0 = miny; + bboxX1 = maxx + 1; + bboxY1 = maxy + 1; + // we could just leave the inner arrays as null and allocate them + // lazily (which would be beneficial for shapes with gaps), but we + // assume there won't be too many of those so we allocate everything + // up front (which is better for other cases) + rowAARLE = new int[bboxY1 - bboxY0 + 1][INIT_ROW_SIZE]; + x0 = 0; + y0 = -1; // -1 makes the first assert in startRow succeed + // the ceiling of (maxy - miny + 1) / TILE_SIZE; + int nyTiles = (maxy - miny + TILE_SIZE) >> TILE_SIZE_LG; + int nxTiles = (maxx - minx + TILE_SIZE) >> TILE_SIZE_LG; + + touchedTile = new int[nyTiles][nxTiles]; } - private static final float ROWAA_RLE_FACTOR = 1.5f; - private static final float TOUCHED_FACTOR = 1.5f; - private static final int MIN_TOUCHED_LEN = 64; - - private void reallocRowAARLE(int newLength) { - if (rowAARLE == null) { - rowAARLE = new byte[newLength]; - } else if (rowAARLE.length < newLength) { - int len = Math.max(newLength, - (int)(rowAARLE.length*ROWAA_RLE_FACTOR)); - byte[] newRowAARLE = new byte[len]; - System.arraycopy(rowAARLE, 0, newRowAARLE, 0, rowAARLE.length); - rowAARLE = newRowAARLE; + void addRLERun(int val, int runLen) { + if (runLen > 0) { + addTupleToRow(y0, val, runLen); + if (val != 0) { + // the x and y of the current row, minus bboxX0, bboxY0 + int tx = x0 >> TILE_SIZE_LG; + int ty = y0 >> TILE_SIZE_LG; + int tx1 = (x0 + runLen - 1) >> TILE_SIZE_LG; + // while we forbid rows from starting before bboxx0, our users + // can still store rows that go beyond bboxx1 (although this + // shouldn't happen), so it's a good idea to check that i + // is not going out of bounds in touchedTile[ty] + if (tx1 >= touchedTile[ty].length) { + tx1 = touchedTile[ty].length - 1; + } + if (tx <= tx1) { + int nextTileXCoord = (tx + 1) << TILE_SIZE_LG; + if (nextTileXCoord > x0+runLen) { + touchedTile[ty][tx] += val * runLen; + } else { + touchedTile[ty][tx] += val * (nextTileXCoord - x0); + } + tx++; + } + // don't go all the way to tx1 - we need to handle the last + // tile as a special case (just like we did with the first + for (; tx < tx1; tx++) { +// try { + touchedTile[ty][tx] += (val << TILE_SIZE_LG); +// } catch (RuntimeException e) { +// System.out.println("x0, y0: " + x0 + ", " + y0); +// System.out.printf("tx, ty, tx1: %d, %d, %d %n", tx, ty, tx1); +// System.out.printf("bboxX/Y0/1: %d, %d, %d, %d %n", +// bboxX0, bboxY0, bboxX1, bboxY1); +// throw e; +// } + } + // they will be equal unless x0>>TILE_SIZE_LG == tx1 + if (tx == tx1) { + int lastXCoord = Math.min(x0 + runLen, (tx + 1) << TILE_SIZE_LG); + int txXCoord = tx << TILE_SIZE_LG; + touchedTile[ty][tx] += val * (lastXCoord - txXCoord); + } + } + x0 += runLen; } } - private void reallocRowInfo(int newHeight) { - if (minTouched == null) { - int len = Math.max(newHeight, MIN_TOUCHED_LEN); - minTouched = new int[len]; - rowOffsetsRLE = new int[len]; - } else if (minTouched.length < newHeight) { - int len = Math.max(newHeight, - (int)(minTouched.length*TOUCHED_FACTOR)); - int[] newMinTouched = new int[len]; - int[] newRowOffsetsRLE = new int[len]; - System.arraycopy(minTouched, 0, newMinTouched, 0, - alphaRows); - System.arraycopy(rowOffsetsRLE, 0, newRowOffsetsRLE, 0, - alphaRows); - minTouched = newMinTouched; - rowOffsetsRLE = newRowOffsetsRLE; - } + void startRow(int y, int x) { + // rows are supposed to be added by increasing y. + assert y - bboxY0 > y0; + assert y <= bboxY1; // perhaps this should be < instead of <= + + y0 = y - bboxY0; + // this should be a new, uninitialized row. + assert rowAARLE[y0][1] == 0; + + x0 = x - bboxX0; + assert x0 >= 0 : "Input must not be to the left of bbox bounds"; + + // the way addTupleToRow is implemented it would work for this but it's + // not a good idea to use it because it is meant for adding + // RLE tuples, not the first tuple (which is special). + rowAARLE[y0][0] = x; + rowAARLE[y0][1] = 2; } - void addRLERun(byte val, int runLen) { - reallocRowAARLE(alphaRLELength + 2); - rowAARLE[alphaRLELength++] = val; - rowAARLE[alphaRLELength++] = (byte)runLen; + int alphaSumInTile(int x, int y) { + x -= bboxX0; + y -= bboxY0; + return touchedTile[y>>TILE_SIZE_LG][x>>TILE_SIZE_LG]; } - void startRow(int y, int x0, int x1) { - if (alphaRows == 0) { - bboxY0 = y; - bboxY1 = y+1; - bboxX0 = x0; - bboxX1 = x1+1; - } else { - if (bboxX0 > x0) bboxX0 = x0; - if (bboxX1 < x1 + 1) bboxX1 = x1 + 1; - while (bboxY1++ < y) { - reallocRowInfo(alphaRows+1); - minTouched[alphaRows] = 0; - // Assuming last 2 entries in rowAARLE are 0,0 - rowOffsetsRLE[alphaRows] = alphaRLELength-2; - alphaRows++; + int minTouched(int rowidx) { + return rowAARLE[rowidx][0]; + } + + int rowLength(int rowidx) { + return rowAARLE[rowidx][1]; + } + + private void addTupleToRow(int row, int a, int b) { + int end = rowAARLE[row][1]; + rowAARLE[row] = Helpers.widenArray(rowAARLE[row], end, 2); + rowAARLE[row][end++] = a; + rowAARLE[row][end++] = b; + rowAARLE[row][1] = end; + } + + @Override + public String toString() { + String ret = "bbox = ["+ + bboxX0+", "+bboxY0+" => "+ + bboxX1+", "+bboxY1+"]\n"; + for (int[] row : rowAARLE) { + if (row != null) { + ret += ("minTouchedX=" + row[0] + + "\tRLE Entries: " + Arrays.toString( + Arrays.copyOfRange(row, 2, row[1])) + "\n"); + } else { + ret += "[]\n"; } } - reallocRowInfo(alphaRows+1); - minTouched[alphaRows] = x0; - rowOffsetsRLE[alphaRows] = alphaRLELength; - alphaRows++; - } - - public synchronized void dispose() { - rowAARLE = null; - alphaRLELength = 0; - - minTouched = null; - rowOffsetsRLE = null; - alphaRows = 0; - - bboxX0 = bboxY0 = bboxX1 = bboxY1 = 0; - } - - public void print(java.io.PrintStream out) { - synchronized (out) { - out.println("bbox = ["+ - bboxX0+", "+bboxY0+" => "+ - bboxX1+", "+bboxY1+"]"); - - out.println("alphRLELength = "+alphaRLELength); - - for (int y = bboxY0; y < bboxY1; y++) { - int i = y-bboxY0; - out.println("row["+i+"] == {"+ - "minX = "+minTouched[i]+ - ", off = "+rowOffsetsRLE[i]+"}"); - } - - for (int i = 0; i < alphaRLELength; i += 2) { - out.println("rle["+i+"] = "+ - (rowAARLE[i+1]&0xff)+" of "+(rowAARLE[i]&0xff)); - } - } + return ret; } } diff --git a/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java b/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java index ee2b35e6809..ed6524ceb1b 100644 --- a/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java +++ b/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java @@ -27,7 +27,7 @@ package sun.java2d.pisces; import java.awt.Shape; import java.awt.BasicStroke; -import java.awt.geom.FlatteningPathIterator; +import java.awt.geom.NoninvertibleTransformException; import java.awt.geom.Path2D; import java.awt.geom.AffineTransform; import java.awt.geom.PathIterator; @@ -38,8 +38,6 @@ import sun.java2d.pipe.RenderingEngine; import sun.java2d.pipe.AATileGenerator; public class PiscesRenderingEngine extends RenderingEngine { - public static double defaultFlat = 0.1; - private static enum NormMode {OFF, ON_NO_AA, ON_WITH_AA} /** @@ -78,20 +76,29 @@ public class PiscesRenderingEngine extends RenderingEngine { miterlimit, dashes, dashphase, - new LineSink() { + new PathConsumer2D() { public void moveTo(float x0, float y0) { p2d.moveTo(x0, y0); } - public void lineJoin() {} public void lineTo(float x1, float y1) { p2d.lineTo(x1, y1); } - public void close() { + public void closePath() { p2d.closePath(); } - public void end() {} + public void pathDone() {} + public void curveTo(float x1, float y1, + float x2, float y2, + float x3, float y3) { + p2d.curveTo(x1, y1, x2, y2, x3, y3); + } + public void quadTo(float x1, float y1, float x2, float y2) { + p2d.quadTo(x1, y1, x2, y2); + } + public long getNativeConsumer() { + throw new InternalError("Not using a native peer"); + } }); - return p2d; } @@ -133,22 +140,7 @@ public class PiscesRenderingEngine extends RenderingEngine { NormMode norm = (normalize) ? ((antialias) ? NormMode.ON_WITH_AA : NormMode.ON_NO_AA) : NormMode.OFF; - strokeTo(src, at, bs, thin, norm, antialias, - new LineSink() { - public void moveTo(float x0, float y0) { - consumer.moveTo(x0, y0); - } - public void lineJoin() {} - public void lineTo(float x1, float y1) { - consumer.lineTo(x1, y1); - } - public void close() { - consumer.closePath(); - } - public void end() { - consumer.pathDone(); - } - }); + strokeTo(src, at, bs, thin, norm, antialias, consumer); } void strokeTo(Shape src, @@ -157,7 +149,7 @@ public class PiscesRenderingEngine extends RenderingEngine { boolean thin, NormMode normalize, boolean antialias, - LineSink lsink) + PathConsumer2D pc2d) { float lw; if (thin) { @@ -178,7 +170,7 @@ public class PiscesRenderingEngine extends RenderingEngine { bs.getMiterLimit(), bs.getDashArray(), bs.getDashPhase(), - lsink); + pc2d); } private float userSpaceLineWidth(AffineTransform at, float lw) { @@ -256,28 +248,113 @@ public class PiscesRenderingEngine extends RenderingEngine { float miterlimit, float dashes[], float dashphase, - LineSink lsink) + PathConsumer2D pc2d) { - float a00 = 1f, a01 = 0f, a10 = 0f, a11 = 1f; + // We use inat and outat so that in Stroker and Dasher we can work only + // with the pre-transformation coordinates. This will repeat a lot of + // computations done in the path iterator, but the alternative is to + // work with transformed paths and compute untransformed coordinates + // as needed. This would be faster but I do not think the complexity + // of working with both untransformed and transformed coordinates in + // the same code is worth it. + // However, if a path's width is constant after a transformation, + // we can skip all this untransforming. + + // If normalization is off we save some transformations by not + // transforming the input to pisces. Instead, we apply the + // transformation after the path processing has been done. + // We can't do this if normalization is on, because it isn't a good + // idea to normalize before the transformation is applied. + AffineTransform inat = null; + AffineTransform outat = null; + + PathIterator pi = null; + if (at != null && !at.isIdentity()) { - a00 = (float)at.getScaleX(); - a01 = (float)at.getShearX(); - a10 = (float)at.getShearY(); - a11 = (float)at.getScaleY(); - } - lsink = new Stroker(lsink, width, caps, join, miterlimit, a00, a01, a10, a11); - if (dashes != null) { - lsink = new Dasher(lsink, dashes, dashphase, a00, a01, a10, a11); - } - PathIterator pi; - if (normalize != NormMode.OFF) { - pi = new FlatteningPathIterator( - new NormalizingPathIterator(src.getPathIterator(at), normalize), - defaultFlat); + final double a = at.getScaleX(); + final double b = at.getShearX(); + final double c = at.getShearY(); + final double d = at.getScaleY(); + final double det = a * d - c * b; + if (Math.abs(det) <= 2 * Float.MIN_VALUE) { + // this rendering engine takes one dimensional curves and turns + // them into 2D shapes by giving them width. + // However, if everything is to be passed through a singular + // transformation, these 2D shapes will be squashed down to 1D + // again so, nothing can be drawn. + + // Every path needs an initial moveTo and a pathDone. If these + // aren't there this causes a SIGSEV in libawt.so (at the time + // of writing of this comment (September 16, 2010)). Actually, + // I'm not sure if the moveTo is necessary to avoid the SIGSEV + // but the pathDone is definitely needed. + pc2d.moveTo(0, 0); + pc2d.pathDone(); + return; + } + + // If the transform is a constant multiple of an orthogonal transformation + // then every length is just multiplied by a constant, so we just + // need to transform input paths to stroker and tell stroker + // the scaled width. This condition is satisfied if + // a*b == -c*d && a*a+c*c == b*b+d*d. In the actual check below, we + // leave a bit of room for error. + if (nearZero(a*b + c*d, 2) && nearZero(a*a+c*c - (b*b+d*d), 2)) { + double scale = Math.sqrt(a*a + c*c); + if (dashes != null) { + dashes = java.util.Arrays.copyOf(dashes, dashes.length); + for (int i = 0; i < dashes.length; i++) { + dashes[i] = (float)(scale * dashes[i]); + } + dashphase = (float)(scale * dashphase); + } + width = (float)(scale * width); + pi = src.getPathIterator(at); + if (normalize != NormMode.OFF) { + pi = new NormalizingPathIterator(pi, normalize); + } + // leave inat and outat null. + } else { + // We only need the inverse if normalization is on. Otherwise + // we just don't transform the input paths, do all the stroking + // and then transform out output (instead of making PathIterator + // apply the transformation, us applying the inverse, and then + // us applying the transform again to our output). + outat = at; + if (normalize != NormMode.OFF) { + try { + inat = outat.createInverse(); + } catch (NoninvertibleTransformException e) { + // we made sure this can't happen + e.printStackTrace(); + } + pi = src.getPathIterator(at); + pi = new NormalizingPathIterator(pi, normalize); + } else { + pi = src.getPathIterator(null); + } + } } else { - pi = src.getPathIterator(at, defaultFlat); + // either at is null or it's the identity. In either case + // we don't transform the path. + pi = src.getPathIterator(null); + if (normalize != NormMode.OFF) { + pi = new NormalizingPathIterator(pi, normalize); + } } - pathTo(pi, lsink); + + pc2d = TransformingPathConsumer2D.transformConsumer(pc2d, outat); + pc2d = new Stroker(pc2d, width, caps, join, miterlimit); + if (dashes != null) { + pc2d = new Dasher(pc2d, dashes, dashphase); + } + pc2d = TransformingPathConsumer2D.transformConsumer(pc2d, inat); + + pathTo(pi, pc2d); + } + + private static boolean nearZero(double num, int nulps) { + return Math.abs(num) < nulps * Math.ulp(num); } private static class NormalizingPathIterator implements PathIterator { @@ -337,10 +414,10 @@ public class PiscesRenderingEngine extends RenderingEngine { } // normalize endpoint - float x_adjust = (float)Math.floor(coords[lastCoord] + lval) + rval - - coords[lastCoord]; - float y_adjust = (float)Math.floor(coords[lastCoord+1] + lval) + rval - - coords[lastCoord + 1]; + float x_adjust = (float)Math.floor(coords[lastCoord] + lval) + + rval - coords[lastCoord]; + float y_adjust = (float)Math.floor(coords[lastCoord+1] + lval) + + rval - coords[lastCoord + 1]; coords[lastCoord ] += x_adjust; coords[lastCoord + 1] += y_adjust; @@ -393,27 +470,9 @@ public class PiscesRenderingEngine extends RenderingEngine { } } - void pathTo(PathIterator pi, LineSink lsink) { - float coords[] = new float[2]; - while (!pi.isDone()) { - switch (pi.currentSegment(coords)) { - case PathIterator.SEG_MOVETO: - lsink.moveTo(coords[0], coords[1]); - break; - case PathIterator.SEG_LINETO: - lsink.lineJoin(); - lsink.lineTo(coords[0], coords[1]); - break; - case PathIterator.SEG_CLOSE: - lsink.lineJoin(); - lsink.close(); - break; - default: - throw new InternalError("unknown flattened segment type"); - } - pi.next(); - } - lsink.end(); + static void pathTo(PathIterator pi, PathConsumer2D pc2d) { + RenderingEngine.feedConsumer(pi, pc2d); + pc2d.pathDone(); } /** @@ -471,32 +530,29 @@ public class PiscesRenderingEngine extends RenderingEngine { boolean normalize, int bbox[]) { - PiscesCache pc = PiscesCache.createInstance(); Renderer r; NormMode norm = (normalize) ? NormMode.ON_WITH_AA : NormMode.OFF; if (bs == null) { PathIterator pi; if (normalize) { - pi = new FlatteningPathIterator( - new NormalizingPathIterator(s.getPathIterator(at), norm), - defaultFlat); + pi = new NormalizingPathIterator(s.getPathIterator(at), norm); } else { - pi = s.getPathIterator(at, defaultFlat); + pi = s.getPathIterator(at); } r = new Renderer(3, 3, clip.getLoX(), clip.getLoY(), clip.getWidth(), clip.getHeight(), - pi.getWindingRule(), pc); + pi.getWindingRule()); pathTo(pi, r); } else { r = new Renderer(3, 3, clip.getLoX(), clip.getLoY(), clip.getWidth(), clip.getHeight(), - PathIterator.WIND_NON_ZERO, pc); + PathIterator.WIND_NON_ZERO); strokeTo(s, at, bs, thin, norm, true, r); } r.endRendering(); - PiscesTileGenerator ptg = new PiscesTileGenerator(pc, r.MAX_AA_ALPHA); + PiscesTileGenerator ptg = new PiscesTileGenerator(r, r.MAX_AA_ALPHA); ptg.getBbox(bbox); return ptg; } diff --git a/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java b/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java index 93ff5315d9f..e2779b8fe03 100644 --- a/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java +++ b/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java @@ -25,40 +25,54 @@ package sun.java2d.pisces; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + import sun.java2d.pipe.AATileGenerator; -public class PiscesTileGenerator implements AATileGenerator { - public static final int TILE_SIZE = 32; +public final class PiscesTileGenerator implements AATileGenerator { + public static final int TILE_SIZE = PiscesCache.TILE_SIZE; + + // perhaps we should be using weak references here, but right now + // that's not necessary. The way the renderer is, this map will + // never contain more than one element - the one with key 64, since + // we only do 8x8 supersampling. + private static final Map alphaMapsCache = new + ConcurrentHashMap(); PiscesCache cache; int x, y; - int maxalpha; + final int maxalpha; + private final int maxTileAlphaSum; + + // The alpha map used by this object (taken out of our map cache) to convert + // pixel coverage counts gotten from PiscesCache (which are in the range + // [0, maxalpha]) into alpha values, which are in [0,256). byte alphaMap[]; - public PiscesTileGenerator(PiscesCache cache, int maxalpha) { - this.cache = cache; + public PiscesTileGenerator(Renderer r, int maxalpha) { + this.cache = r.getCache(); this.x = cache.bboxX0; this.y = cache.bboxY0; this.alphaMap = getAlphaMap(maxalpha); this.maxalpha = maxalpha; + this.maxTileAlphaSum = TILE_SIZE*TILE_SIZE*maxalpha; } - static int prevMaxAlpha; - static byte prevAlphaMap[]; - - public synchronized static byte[] getAlphaMap(int maxalpha) { - if (maxalpha != prevMaxAlpha) { - prevAlphaMap = new byte[maxalpha+300]; - int halfmaxalpha = maxalpha>>2; - for (int i = 0; i <= maxalpha; i++) { - prevAlphaMap[i] = (byte) ((i * 255 + halfmaxalpha) / maxalpha); - } - for (int i = maxalpha; i < prevAlphaMap.length; i++) { - prevAlphaMap[i] = (byte) 255; - } - prevMaxAlpha = maxalpha; + private static byte[] buildAlphaMap(int maxalpha) { + byte[] alMap = new byte[maxalpha+1]; + int halfmaxalpha = maxalpha>>2; + for (int i = 0; i <= maxalpha; i++) { + alMap[i] = (byte) ((i * 255 + halfmaxalpha) / maxalpha); } - return prevAlphaMap; + return alMap; + } + + public static byte[] getAlphaMap(int maxalpha) { + if (!alphaMapsCache.containsKey(maxalpha)) { + alphaMapsCache.put(maxalpha, buildAlphaMap(maxalpha)); + } + return alphaMapsCache.get(maxalpha); } public void getBbox(int bbox[]) { @@ -96,53 +110,24 @@ public class PiscesTileGenerator implements AATileGenerator { * value for partial coverage of the tile */ public int getTypicalAlpha() { - if (true) return 0x80; - // Decode run-length encoded alpha mask data - // The data for row j begins at cache.rowOffsetsRLE[j] - // and is encoded as a set of 2-byte pairs (val, runLen) - // terminated by a (0, 0) pair. - - int x0 = this.x; - int x1 = x0 + TILE_SIZE; - int y0 = this.y; - int y1 = y0 + TILE_SIZE; - if (x1 > cache.bboxX1) x1 = cache.bboxX1; - if (y1 > cache.bboxY1) y1 = cache.bboxY1; - y0 -= cache.bboxY0; - y1 -= cache.bboxY0; - - int ret = -1; - for (int cy = y0; cy < y1; cy++) { - int pos = cache.rowOffsetsRLE[cy]; - int cx = cache.minTouched[cy]; - - if (cx > x0) { - if (ret > 0) return 0x80; - ret = 0x00; - } - while (cx < x1) { - int runLen = cache.rowAARLE[pos + 1] & 0xff; - if (runLen == 0) { - if (ret > 0) return 0x80; - ret = 0x00; - break; - } - cx += runLen; - if (cx > x0) { - int val = cache.rowAARLE[pos] & 0xff; - if (ret != val) { - if (ret < 0) { - if (val != 0x00 && val != maxalpha) return 0x80; - ret = val; - } else { - return 0x80; - } - } - } - pos += 2; - } - } - return ret; + int al = cache.alphaSumInTile(x, y); + // Note: if we have a filled rectangle that doesn't end on a tile + // border, we could still return 0xff, even though al!=maxTileAlphaSum + // This is because if we return 0xff, our users will fill a rectangle + // starting at x,y that has width = Math.min(TILE_SIZE, bboxX1-x), + // and height min(TILE_SIZE,bboxY1-y), which is what should happen. + // However, to support this, we would have to use 2 Math.min's + // and 2 multiplications per tile, instead of just 2 multiplications + // to compute maxTileAlphaSum. The savings offered would probably + // not be worth it, considering how rare this case is. + // Note: I have not tested this, so in the future if it is determined + // that it is worth it, it should be implemented. Perhaps this method's + // interface should be changed to take arguments the width and height + // of the current tile. This would eliminate the 2 Math.min calls that + // would be needed here, since our caller needs to compute these 2 + // values anyway. + return (al == 0x00 ? 0x00 : + (al == maxTileAlphaSum ? 0xff : 0x80)); } /** @@ -179,22 +164,24 @@ public class PiscesTileGenerator implements AATileGenerator { int idx = offset; for (int cy = y0; cy < y1; cy++) { - int pos = cache.rowOffsetsRLE[cy]; - int cx = cache.minTouched[cy]; + int[] row = cache.rowAARLE[cy]; + assert row != null; + int cx = cache.minTouched(cy); if (cx > x1) cx = x1; - if (cx > x0) { - //System.out.println("L["+(cx-x0)+"]"); - for (int i = x0; i < cx; i++) { - tile[idx++] = 0x00; - } + for (int i = x0; i < cx; i++) { + tile[idx++] = 0x00; } - while (cx < x1) { + + int pos = 2; + while (cx < x1 && pos < row[1]) { byte val; int runLen = 0; + assert row[1] > 2; try { - val = alphaMap[cache.rowAARLE[pos] & 0xff]; - runLen = cache.rowAARLE[pos + 1] & 0xff; + val = alphaMap[row[pos]]; + runLen = row[pos + 1]; + assert runLen > 0; } catch (RuntimeException e0) { System.out.println("maxalpha = "+maxalpha); System.out.println("tile["+x0+", "+y0+ @@ -202,14 +189,12 @@ public class PiscesTileGenerator implements AATileGenerator { System.out.println("cx = "+cx+", cy = "+cy); System.out.println("idx = "+idx+", pos = "+pos); System.out.println("len = "+runLen); - cache.print(System.out); + System.out.print(cache.toString()); e0.printStackTrace(); System.exit(1); return; } - if (runLen == 0) { - break; - } + int rx0 = cx; cx += runLen; int rx1 = cx; @@ -228,7 +213,7 @@ public class PiscesTileGenerator implements AATileGenerator { System.out.println("idx = "+idx+", pos = "+pos); System.out.println("rx0 = "+rx0+", rx1 = "+rx1); System.out.println("len = "+runLen); - cache.print(System.out); + System.out.print(cache.toString()); e.printStackTrace(); System.exit(1); return; @@ -265,4 +250,4 @@ public class PiscesTileGenerator implements AATileGenerator { * No further calls will be made on this instance. */ public void dispose() {} -} +} \ No newline at end of file diff --git a/jdk/src/share/classes/sun/java2d/pisces/Renderer.java b/jdk/src/share/classes/sun/java2d/pisces/Renderer.java index 9768e90a77b..4434e082517 100644 --- a/jdk/src/share/classes/sun/java2d/pisces/Renderer.java +++ b/jdk/src/share/classes/sun/java2d/pisces/Renderer.java @@ -26,250 +26,552 @@ package sun.java2d.pisces; import java.util.Arrays; +import java.util.Iterator; -public class Renderer implements LineSink { +import sun.awt.geom.PathConsumer2D; -/////////////////////////////////////////////////////////////////////////////// -// Scan line iterator and edge crossing data. -////////////////////////////////////////////////////////////////////////////// +public class Renderer implements PathConsumer2D { - private int[] crossings; + private class ScanlineIterator { - // This is an array of indices into the edge array. It is initialized to - // [i * SIZEOF_STRUCT_EDGE for i in range(0, edgesSize/SIZEOF_STRUCT_EDGE)] - // (where range(i, j) is i,i+1,...,j-1 -- just like in python). - // The reason for keeping this is because we need the edges array sorted - // by y0, but we don't want to move all that data around, so instead we - // sort the indices into the edge array, and use edgeIndices to access - // the edges array. This is meant to simulate a pointer array (hence the name) - private int[] edgePtrs; + private int[] crossings; - // crossing bounds. The bounds are not necessarily tight (the scan line - // at minY, for example, might have no crossings). The x bounds will - // be accumulated as crossings are computed. - private int minY, maxY; - private int minX, maxX; - private int nextY; + // crossing bounds. The bounds are not necessarily tight (the scan line + // at minY, for example, might have no crossings). The x bounds will + // be accumulated as crossings are computed. + private int minY, maxY; + private int nextY; - // indices into the edge pointer list. They indicate the "active" sublist in - // the edge list (the portion of the list that contains all the edges that - // cross the next scan line). - private int lo, hi; + // indices into the segment pointer lists. They indicate the "active" + // sublist in the segment lists (the portion of the list that contains + // all the segments that cross the next scan line). + private int elo, ehi; + private final int[] edgePtrs; + private int qlo, qhi; + private final int[] quadPtrs; + private int clo, chi; + private final int[] curvePtrs; - private static final int INIT_CROSSINGS_SIZE = 50; - private void ScanLineItInitialize() { - crossings = new int[INIT_CROSSINGS_SIZE]; - edgePtrs = new int[edgesSize / SIZEOF_STRUCT_EDGE]; - for (int i = 0; i < edgePtrs.length; i++) { - edgePtrs[i] = i * SIZEOF_STRUCT_EDGE; + private static final int INIT_CROSSINGS_SIZE = 10; + + private ScanlineIterator() { + crossings = new int[INIT_CROSSINGS_SIZE]; + + edgePtrs = new int[numEdges]; + Helpers.fillWithIdxes(edgePtrs, SIZEOF_EDGE); + qsort(edges, edgePtrs, YMIN, 0, numEdges - 1); + + quadPtrs = new int[numQuads]; + Helpers.fillWithIdxes(quadPtrs, SIZEOF_QUAD); + qsort(quads, quadPtrs, YMIN, 0, numQuads - 1); + + curvePtrs = new int[numCurves]; + Helpers.fillWithIdxes(curvePtrs, SIZEOF_CURVE); + qsort(curves, curvePtrs, YMIN, 0, numCurves - 1); + + // We don't care if we clip some of the line off with ceil, since + // no scan line crossings will be eliminated (in fact, the ceil is + // the y of the first scan line crossing). + nextY = minY = Math.max(boundsMinY, (int)Math.ceil(edgeMinY)); + maxY = Math.min(boundsMaxY, (int)Math.ceil(edgeMaxY)); + + for (elo = 0; elo < numEdges && edges[edgePtrs[elo]+YMAX] <= minY; elo++) + ; + // the active list is *edgePtrs[lo] (inclusive) *edgePtrs[hi] (exclusive) + for (ehi = elo; ehi < numEdges && edges[edgePtrs[ehi]+YMIN] <= minY; ehi++) + edgeSetCurY(edgePtrs[ehi], minY);// TODO: make minY a float to avoid casts + + for (qlo = 0; qlo < numQuads && quads[quadPtrs[qlo]+YMAX] <= minY; qlo++) + ; + for (qhi = qlo; qhi < numQuads && quads[quadPtrs[qhi]+YMIN] <= minY; qhi++) + quadSetCurY(quadPtrs[qhi], minY); + + for (clo = 0; clo < numCurves && curves[curvePtrs[clo]+YMAX] <= minY; clo++) + ; + for (chi = clo; chi < numCurves && curves[curvePtrs[chi]+YMIN] <= minY; chi++) + curveSetCurY(curvePtrs[chi], minY); } - qsort(0, edgePtrs.length - 1); - - // We don't care if we clip some of the line off with ceil, since - // no scan line crossings will be eliminated (in fact, the ceil is - // the y of the first scan line crossing). - nextY = minY = Math.max(boundsMinY, (int)Math.ceil(edgeMinY)); - maxY = Math.min(boundsMaxY, (int)Math.ceil(edgeMaxY)); - - for (lo = 0; lo < edgePtrs.length && edges[edgePtrs[lo]+Y1] <= nextY; lo++) - ; - for (hi = lo; hi < edgePtrs.length && edges[edgePtrs[hi]+CURY] <= nextY; hi++) - ; // the active list is *edgePtrs[lo] (inclusive) *edgePtrs[hi] (exclusive) - for (int i = lo; i < hi; i++) { - setCurY(edgePtrs[i], nextY); - } - - // We accumulate X in the iterator because accumulating it in addEdge - // like we do with Y does not do much good: if there's an edge - // (0,0)->(1000,10000), and if y gets clipped to 1000, then the x - // bound should be 100, but the accumulator from addEdge would say 1000, - // so we'd still have to accumulate the X bounds as we add crossings. - minX = boundsMinX; - maxX = boundsMaxX; - } - - private int ScanLineItCurrentY() { - return nextY - 1; - } - - private int ScanLineItGoToNextYAndComputeCrossings() { - // we go through the active list and remove the ones that don't cross - // the nextY scanline. - int crossingIdx = 0; - for (int i = lo; i < hi; i++) { - if (edges[edgePtrs[i]+Y1] <= nextY) { - edgePtrs[i] = edgePtrs[lo++]; + private int next() { + // we go through the active lists and remove segments that don't cross + // the nextY scanline. + int crossingIdx = 0; + for (int i = elo; i < ehi; i++) { + if (edges[edgePtrs[i]+YMAX] <= nextY) { + edgePtrs[i] = edgePtrs[elo++]; + } } - } - if (hi - lo > crossings.length) { - int newSize = Math.max(hi - lo, crossings.length * 2); - crossings = Arrays.copyOf(crossings, newSize); - } - // Now every edge between lo and hi crosses nextY. Compute it's - // crossing and put it in the crossings array. - for (int i = lo; i < hi; i++) { - addCrossing(nextY, getCurCrossing(edgePtrs[i]), (int)edges[edgePtrs[i]+OR], crossingIdx); - gotoNextY(edgePtrs[i]); - crossingIdx++; + for (int i = qlo; i < qhi; i++) { + if (quads[quadPtrs[i]+YMAX] <= nextY) { + quadPtrs[i] = quadPtrs[qlo++]; + } + } + for (int i = clo; i < chi; i++) { + if (curves[curvePtrs[i]+YMAX] <= nextY) { + curvePtrs[i] = curvePtrs[clo++]; + } + } + + crossings = Helpers.widenArray(crossings, 0, ehi-elo+qhi-qlo+chi-clo); + + // Now every edge between lo and hi crosses nextY. Compute it's + // crossing and put it in the crossings array. + for (int i = elo; i < ehi; i++) { + int ptr = edgePtrs[i]; + addCrossing(nextY, (int)edges[ptr+CURX], edges[ptr+OR], crossingIdx); + edgeGoToNextY(ptr); + crossingIdx++; + } + for (int i = qlo; i < qhi; i++) { + int ptr = quadPtrs[i]; + addCrossing(nextY, (int)quads[ptr+CURX], quads[ptr+OR], crossingIdx); + quadGoToNextY(ptr); + crossingIdx++; + } + for (int i = clo; i < chi; i++) { + int ptr = curvePtrs[i]; + addCrossing(nextY, (int)curves[ptr+CURX], curves[ptr+OR], crossingIdx); + curveGoToNextY(ptr); + crossingIdx++; + } + + nextY++; + // Expand active lists to include new edges. + for (; ehi < numEdges && edges[edgePtrs[ehi]+YMIN] <= nextY; ehi++) { + edgeSetCurY(edgePtrs[ehi], nextY); + } + for (; qhi < numQuads && quads[quadPtrs[qhi]+YMIN] <= nextY; qhi++) { + quadSetCurY(quadPtrs[qhi], nextY); + } + for (; chi < numCurves && curves[curvePtrs[chi]+YMIN] <= nextY; chi++) { + curveSetCurY(curvePtrs[chi], nextY); + } + Arrays.sort(crossings, 0, crossingIdx); + return crossingIdx; } - nextY++; - // Expand active list to include new edges. - for (; hi < edgePtrs.length && edges[edgePtrs[hi]+CURY] <= nextY; hi++) { - setCurY(edgePtrs[hi], nextY); + private boolean hasNext() { + return nextY < maxY; } - Arrays.sort(crossings, 0, crossingIdx); - return crossingIdx; + private int curY() { + return nextY - 1; + } + + private void addCrossing(int y, int x, float or, int idx) { + x <<= 1; + crossings[idx] = ((or > 0) ? (x | 0x1) : x); + } } - - private boolean ScanLineItHasNext() { - return nextY < maxY; - } - - private void addCrossing(int y, int x, int or, int idx) { - if (x < minX) { - minX = x; - } - if (x > maxX) { - maxX = x; - } - x <<= 1; - crossings[idx] = ((or == 1) ? (x | 0x1) : x); - } - - // quicksort implementation for sorting the edge indices ("pointers") // by increasing y0. first, last are indices into the "pointer" array // It sorts the pointer array from first (inclusive) to last (inclusive) - private void qsort(int first, int last) { + private static void qsort(final float[] data, final int[] ptrs, + final int fieldForCmp, int first, int last) + { if (last > first) { - int p = partition(first, last); + int p = partition(data, ptrs, fieldForCmp, first, last); if (first < p - 1) { - qsort(first, p - 1); + qsort(data, ptrs, fieldForCmp, first, p - 1); } if (p < last) { - qsort(p, last); + qsort(data, ptrs, fieldForCmp, p, last); } } } // i, j are indices into edgePtrs. - private int partition(int i, int j) { - int pivotVal = edgePtrs[i]; + private static int partition(final float[] data, final int[] ptrs, + final int fieldForCmp, int i, int j) + { + int pivotValFieldForCmp = ptrs[i]+fieldForCmp; while (i <= j) { // edges[edgePtrs[i]+1] is equivalent to (*(edgePtrs[i])).y0 in C - while (edges[edgePtrs[i]+CURY] < edges[pivotVal+CURY]) { i++; } - while (edges[edgePtrs[j]+CURY] > edges[pivotVal+CURY]) { j--; } + while (data[ptrs[i]+fieldForCmp] < data[pivotValFieldForCmp]) + i++; + while (data[ptrs[j]+fieldForCmp] > data[pivotValFieldForCmp]) + j--; if (i <= j) { - int tmp = edgePtrs[i]; - edgePtrs[i] = edgePtrs[j]; - edgePtrs[j] = tmp; + int tmp = ptrs[i]; + ptrs[i] = ptrs[j]; + ptrs[j] = tmp; i++; j--; } } return i; } - //============================================================================ ////////////////////////////////////////////////////////////////////////////// // EDGE LIST ////////////////////////////////////////////////////////////////////////////// +// TODO(maybe): very tempting to use fixed point here. A lot of opportunities +// for shifts and just removing certain operations altogether. +// TODO: it might be worth it to make an EdgeList class. It would probably +// clean things up a bit and not impact performance much. - private static final int INIT_NUM_EDGES = 1000; - private static final int SIZEOF_STRUCT_EDGE = 5; + // common to all types of input path segments. + private static final int YMIN = 0; + private static final int YMAX = 1; + private static final int CURX = 2; + // this and OR are meant to be indeces into "int" fields, but arrays must + // be homogenous, so every field is a float. However floats can represent + // exactly up to 26 bit ints, so we're ok. + private static final int CURY = 3; + private static final int OR = 4; - // The following array is a poor man's struct array: - // it simulates a struct array by having - // edges[SIZEOF_STRUCT_EDGE * i + j] be the jth field in the ith element - // of an array of edge structs. - private float[] edges; - private int edgesSize; // size of the edge list. - private static final int Y1 = 0; - private static final int SLOPE = 1; - private static final int OR = 2; // the orientation. This can be -1 or 1. - // -1 means up, 1 means down. - private static final int CURY = 3; // j = 5 corresponds to the "current Y". - // Each edge keeps track of the last scanline - // crossing it computed, and this is the y coord of - // that scanline. - private static final int CURX = 4; //the x coord of the current crossing. + // for straight lines only: + private static final int SLOPE = 5; - // Note that while the array is declared as a float[] not all of it's - // elements should be floats. currentY and Orientation should be ints (or int and - // byte respectively), but they all need to be the same type. This isn't - // really a problem because floats can represent exactly all 23 bit integers, - // which should be more than enough. - // Note, also, that we only need x1 for slope computation, so we don't need - // to store it. x0, y0 don't need to be stored either. They can be put into - // curx, cury, and it's ok if they're lost when curx and cury are changed. - // We take this undeniably ugly and error prone approach (instead of simply - // making an Edge class) for performance reasons. Also, it would probably be nicer - // to have one array for each field, but that would defeat the purpose because - // it would make poor use of the processor cache, since we tend to access - // all the fields for one edge at a time. + // for quads and cubics: + private static final int X0 = 5; + private static final int Y0 = 6; + private static final int XL = 7; + private static final int COUNT = 8; + private static final int CURSLOPE = 9; + private static final int DX = 10; + private static final int DY = 11; + private static final int DDX = 12; + private static final int DDY = 13; - private float edgeMinY; - private float edgeMaxY; + // for cubics only + private static final int DDDX = 14; + private static final int DDDY = 15; + + private float edgeMinY = Float.POSITIVE_INFINITY; + private float edgeMaxY = Float.NEGATIVE_INFINITY; + private float edgeMinX = Float.POSITIVE_INFINITY; + private float edgeMaxX = Float.NEGATIVE_INFINITY; + + private static final int SIZEOF_EDGE = 6; + private float[] edges = null; + private int numEdges; + // these are static because we need them to be usable from ScanlineIterator + private void edgeSetCurY(final int idx, int y) { + edges[idx+CURX] += (y - edges[idx+CURY]) * edges[idx+SLOPE]; + edges[idx+CURY] = y; + } + private void edgeGoToNextY(final int idx) { + edges[idx+CURY] += 1; + edges[idx+CURX] += edges[idx+SLOPE]; + } - private void addEdge(float x0, float y0, float x1, float y1) { - float or = (y0 < y1) ? 1f : -1f; // orientation: 1 = UP; -1 = DOWN - if (or == -1) { - float tmp = y0; - y0 = y1; - y1 = tmp; - tmp = x0; - x0 = x1; - x1 = tmp; + private static final int SIZEOF_QUAD = 14; + private float[] quads = null; + private int numQuads; + // This function should be called exactly once, to set the first scanline + // of the curve. Before it is called, the curve should think its first + // scanline is CEIL(YMIN). + private void quadSetCurY(final int idx, final int y) { + assert y < quads[idx+YMAX]; + assert (quads[idx+CURY] > y); + assert (quads[idx+CURY] == Math.ceil(quads[idx+CURY])); + + while (quads[idx+CURY] < ((float)y)) { + quadGoToNextY(idx); } - // skip edges that don't cross a scanline - if (Math.ceil(y0) >= Math.ceil(y1)) { + } + private void quadGoToNextY(final int idx) { + quads[idx+CURY] += 1; + // this will get overriden if the while executes. + quads[idx+CURX] += quads[idx+CURSLOPE]; + int count = (int)quads[idx+COUNT]; + // this loop should never execute more than once because our + // curve is monotonic in Y. Still we put it in because you can + // never be too sure when dealing with floating point. + while(quads[idx+CURY] >= quads[idx+Y0] && count > 0) { + float x0 = quads[idx+X0], y0 = quads[idx+Y0]; + count = executeQuadAFDIteration(idx); + float x1 = quads[idx+X0], y1 = quads[idx+Y0]; + // our quads are monotonic, so this shouldn't happen, but + // it is conceivable that for very flat quads with different + // y values at their endpoints AFD might give us a horizontal + // segment. + if (y1 == y0) { + continue; + } + quads[idx+CURSLOPE] = (x1 - x0) / (y1 - y0); + quads[idx+CURX] = x0 + (quads[idx+CURY] - y0) * quads[idx+CURSLOPE]; + } + } + + + private static final int SIZEOF_CURVE = 16; + private float[] curves = null; + private int numCurves; + private void curveSetCurY(final int idx, final int y) { + assert y < curves[idx+YMAX]; + assert (curves[idx+CURY] > y); + assert (curves[idx+CURY] == Math.ceil(curves[idx+CURY])); + + while (curves[idx+CURY] < ((float)y)) { + curveGoToNextY(idx); + } + } + private void curveGoToNextY(final int idx) { + curves[idx+CURY] += 1; + // this will get overriden if the while executes. + curves[idx+CURX] += curves[idx+CURSLOPE]; + int count = (int)curves[idx+COUNT]; + // this loop should never execute more than once because our + // curve is monotonic in Y. Still we put it in because you can + // never be too sure when dealing with floating point. + while(curves[idx+CURY] >= curves[idx+Y0] && count > 0) { + float x0 = curves[idx+X0], y0 = curves[idx+Y0]; + count = executeCurveAFDIteration(idx); + float x1 = curves[idx+X0], y1 = curves[idx+Y0]; + // our curves are monotonic, so this shouldn't happen, but + // it is conceivable that for very flat curves with different + // y values at their endpoints AFD might give us a horizontal + // segment. + if (y1 == y0) { + continue; + } + curves[idx+CURSLOPE] = (x1 - x0) / (y1 - y0); + curves[idx+CURX] = x0 + (curves[idx+CURY] - y0) * curves[idx+CURSLOPE]; + } + } + + + private static final float DEC_BND = 20f; + private static final float INC_BND = 8f; + // Flattens using adaptive forward differencing. This only carries out + // one iteration of the AFD loop. All it does is update AFD variables (i.e. + // X0, Y0, D*[X|Y], COUNT; not variables used for computing scanline crossings). + private int executeQuadAFDIteration(int idx) { + int count = (int)quads[idx+COUNT]; + float ddx = quads[idx+DDX]; + float ddy = quads[idx+DDY]; + float dx = quads[idx+DX]; + float dy = quads[idx+DY]; + + while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { + ddx = ddx / 4; + ddy = ddy / 4; + dx = (dx - ddx) / 2; + dy = (dy - ddy) / 2; + count <<= 1; + } + // can only do this on even "count" values, because we must divide count by 2 + while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { + dx = 2 * dx + ddx; + dy = 2 * dy + ddy; + ddx = 4 * ddx; + ddy = 4 * ddy; + count >>= 1; + } + count--; + if (count > 0) { + quads[idx+X0] += dx; + dx += ddx; + quads[idx+Y0] += dy; + dy += ddy; + } else { + quads[idx+X0] = quads[idx+XL]; + quads[idx+Y0] = quads[idx+YMAX]; + } + quads[idx+COUNT] = count; + quads[idx+DDX] = ddx; + quads[idx+DDY] = ddy; + quads[idx+DX] = dx; + quads[idx+DY] = dy; + return count; + } + private int executeCurveAFDIteration(int idx) { + int count = (int)curves[idx+COUNT]; + float ddx = curves[idx+DDX]; + float ddy = curves[idx+DDY]; + float dx = curves[idx+DX]; + float dy = curves[idx+DY]; + float dddx = curves[idx+DDDX]; + float dddy = curves[idx+DDDY]; + + while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { + dddx /= 8; + dddy /= 8; + ddx = ddx/4 - dddx; + ddy = ddy/4 - dddy; + dx = (dx - ddx) / 2; + dy = (dy - ddy) / 2; + count <<= 1; + } + // can only do this on even "count" values, because we must divide count by 2 + while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { + dx = 2 * dx + ddx; + dy = 2 * dy + ddy; + ddx = 4 * (ddx + dddx); + ddy = 4 * (ddy + dddy); + dddx = 8 * dddx; + dddy = 8 * dddy; + count >>= 1; + } + count--; + if (count > 0) { + curves[idx+X0] += dx; + dx += ddx; + ddx += dddx; + curves[idx+Y0] += dy; + dy += ddy; + ddy += dddy; + } else { + curves[idx+X0] = curves[idx+XL]; + curves[idx+Y0] = curves[idx+YMAX]; + } + curves[idx+COUNT] = count; + curves[idx+DDDX] = dddx; + curves[idx+DDDY] = dddy; + curves[idx+DDX] = ddx; + curves[idx+DDY] = ddy; + curves[idx+DX] = dx; + curves[idx+DY] = dy; + return count; + } + + + private void initLine(final int idx, float[] pts, int or) { + edges[idx+SLOPE] = (pts[2] - pts[0]) / (pts[3] - pts[1]); + edges[idx+CURX] = pts[0] + (edges[idx+CURY] - pts[1]) * edges[idx+SLOPE]; + } + + private void initQuad(final int idx, float[] points, int or) { + final int countlg = 3; + final int count = 1 << countlg; + + // the dx and dy refer to forward differencing variables, not the last + // coefficients of the "points" polynomial + final float ddx, ddy, dx, dy; + c.set(points, 6); + + ddx = c.dbx / (1 << (2 * countlg)); + ddy = c.dby / (1 << (2 * countlg)); + dx = c.bx / (1 << (2 * countlg)) + c.cx / (1 << countlg); + dy = c.by / (1 << (2 * countlg)) + c.cy / (1 << countlg); + + quads[idx+DDX] = ddx; + quads[idx+DDY] = ddy; + quads[idx+DX] = dx; + quads[idx+DY] = dy; + quads[idx+COUNT] = count; + quads[idx+XL] = points[4]; + quads[idx+X0] = points[0]; + quads[idx+Y0] = points[1]; + executeQuadAFDIteration(idx); + float x1 = quads[idx+X0], y1 = quads[idx+Y0]; + quads[idx+CURSLOPE] = (x1 - points[0]) / (y1 - points[1]); + quads[idx+CURX] = points[0] + (quads[idx+CURY] - points[1])*quads[idx+CURSLOPE]; + } + + private void initCurve(final int idx, float[] points, int or) { + final int countlg = 3; + final int count = 1 << countlg; + + // the dx and dy refer to forward differencing variables, not the last + // coefficients of the "points" polynomial + final float dddx, dddy, ddx, ddy, dx, dy; + c.set(points, 8); + dddx = 2f * c.dax / (1 << (3 * countlg)); + dddy = 2f * c.day / (1 << (3 * countlg)); + + ddx = dddx + c.dbx / (1 << (2 * countlg)); + ddy = dddy + c.dby / (1 << (2 * countlg)); + dx = c.ax / (1 << (3 * countlg)) + c.bx / (1 << (2 * countlg)) + c.cx / (1 << countlg); + dy = c.ay / (1 << (3 * countlg)) + c.by / (1 << (2 * countlg)) + c.cy / (1 << countlg); + + curves[idx+DDDX] = dddx; + curves[idx+DDDY] = dddy; + curves[idx+DDX] = ddx; + curves[idx+DDY] = ddy; + curves[idx+DX] = dx; + curves[idx+DY] = dy; + curves[idx+COUNT] = count; + curves[idx+XL] = points[6]; + curves[idx+X0] = points[0]; + curves[idx+Y0] = points[1]; + executeCurveAFDIteration(idx); + float x1 = curves[idx+X0], y1 = curves[idx+Y0]; + curves[idx+CURSLOPE] = (x1 - points[0]) / (y1 - points[1]); + curves[idx+CURX] = points[0] + (curves[idx+CURY] - points[1])*curves[idx+CURSLOPE]; + } + + private void addPathSegment(float[] pts, final int type, final int or) { + int idx; + float[] addTo; + switch (type) { + case 4: + idx = numEdges * SIZEOF_EDGE; + addTo = edges = Helpers.widenArray(edges, numEdges*SIZEOF_EDGE, SIZEOF_EDGE); + numEdges++; + break; + case 6: + idx = numQuads * SIZEOF_QUAD; + addTo = quads = Helpers.widenArray(quads, numQuads*SIZEOF_QUAD, SIZEOF_QUAD); + numQuads++; + break; + case 8: + idx = numCurves * SIZEOF_CURVE; + addTo = curves = Helpers.widenArray(curves, numCurves*SIZEOF_CURVE, SIZEOF_CURVE); + numCurves++; + break; + default: + throw new InternalError(); + } + // set the common fields, except CURX, for which we must know the kind + // of curve. NOTE: this must be done before the type specific fields + // are initialized, because those depend on the common ones. + addTo[idx+YMIN] = pts[1]; + addTo[idx+YMAX] = pts[type-1]; + addTo[idx+OR] = or; + addTo[idx+CURY] = (float)Math.ceil(pts[1]); + switch (type) { + case 4: + initLine(idx, pts, or); + break; + case 6: + initQuad(idx, pts, or); + break; + case 8: + initCurve(idx, pts, or); + break; + default: + throw new InternalError(); + } + } + + // precondition: the curve in pts must be monotonic and increasing in y. + private void somethingTo(float[] pts, final int type, final int or) { + // NOTE: it's very important that we check for or >= 0 below (as + // opposed to or == 1, or or > 0, or anything else). That's + // because if we check for or==1, when the curve being added + // is a horizontal line, or will be 0 so or==1 will be false and + // x0 and y0 will be updated to pts[0] and pts[1] instead of pts[type-2] + // and pts[type-1], which is the correct thing to do. + this.x0 = or >= 0 ? pts[type - 2] : pts[0]; + this.y0 = or >= 0 ? pts[type - 1] : pts[1]; + + float minY = pts[1], maxY = pts[type - 1]; + if (Math.ceil(minY) >= Math.ceil(maxY) || + Math.ceil(minY) >= boundsMaxY || maxY < boundsMinY) + { return; } - int newSize = edgesSize + SIZEOF_STRUCT_EDGE; - if (edges.length < newSize) { - edges = Arrays.copyOf(edges, newSize * 2); - } - edges[edgesSize+CURX] = x0; - edges[edgesSize+CURY] = y0; - edges[edgesSize+Y1] = y1; - edges[edgesSize+SLOPE] = (x1 - x0) / (y1 - y0); - edges[edgesSize+OR] = or; - // the crossing values can't be initialized meaningfully yet. This - // will have to wait until setCurY is called - edgesSize += SIZEOF_STRUCT_EDGE; + if (minY < edgeMinY) { edgeMinY = minY; } + if (maxY > edgeMaxY) { edgeMaxY = maxY; } - // Accumulate edgeMinY and edgeMaxY - if (y0 < edgeMinY) { edgeMinY = y0; } - if (y1 > edgeMaxY) { edgeMaxY = y1; } + int minXidx = (pts[0] < pts[type-2] ? 0 : type - 2); + float minX = pts[minXidx]; + float maxX = pts[type - 2 - minXidx]; + if (minX < edgeMinX) { edgeMinX = minX; } + if (maxX > edgeMaxX) { edgeMaxX = maxX; } + addPathSegment(pts, type, or); } - // As far as the following methods care, this edges extends to infinity. - // They can compute the x intersect of any horizontal line. - // precondition: idx is the index to the start of the desired edge. - // So, if the ith edge is wanted, idx should be SIZEOF_STRUCT_EDGE * i - private void setCurY(int idx, int y) { - // compute the x crossing of edge at idx and horizontal line y - // currentXCrossing = (y - y0)*slope + x0 - edges[idx + CURX] = (y - edges[idx + CURY]) * edges[idx + SLOPE] + edges[idx+CURX]; - edges[idx + CURY] = (float)y; - } +// END EDGE LIST +////////////////////////////////////////////////////////////////////////////// - private void gotoNextY(int idx) { - edges[idx + CURY] += 1f; // i.e. curY += 1 - edges[idx + CURX] += edges[idx + SLOPE]; // i.e. curXCrossing += slope - } - - private int getCurCrossing(int idx) { - return (int)edges[idx + CURX]; - } -//==================================================================================== public static final int WIND_EVEN_ODD = 0; public static final int WIND_NON_ZERO = 1; @@ -284,16 +586,13 @@ public class Renderer implements LineSink { final int MAX_AA_ALPHA; // Cache to store RLE-encoded coverage mask of the current primitive - final PiscesCache cache; + PiscesCache cache; // Bounds of the drawing region, at subpixel precision. - final private int boundsMinX, boundsMinY, boundsMaxX, boundsMaxY; - - // Pixel bounding box for current primitive - private int pix_bboxX0, pix_bboxY0, pix_bboxX1, pix_bboxY1; + private final int boundsMinX, boundsMinY, boundsMaxX, boundsMaxY; // Current winding rule - final private int windingRule; + private final int windingRule; // Current drawing position, i.e., final point of last segment private float x0, y0; @@ -304,8 +603,8 @@ public class Renderer implements LineSink { public Renderer(int subpixelLgPositionsX, int subpixelLgPositionsY, int pix_boundsX, int pix_boundsY, int pix_boundsWidth, int pix_boundsHeight, - int windingRule, - PiscesCache cache) { + int windingRule) + { this.SUBPIXEL_LG_POSITIONS_X = subpixelLgPositionsX; this.SUBPIXEL_LG_POSITIONS_Y = subpixelLgPositionsY; this.SUBPIXEL_MASK_X = (1 << (SUBPIXEL_LG_POSITIONS_X)) - 1; @@ -314,23 +613,12 @@ public class Renderer implements LineSink { this.SUBPIXEL_POSITIONS_Y = 1 << (SUBPIXEL_LG_POSITIONS_Y); this.MAX_AA_ALPHA = (SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_Y); - this.edges = new float[SIZEOF_STRUCT_EDGE * INIT_NUM_EDGES]; - edgeMinY = Float.POSITIVE_INFINITY; - edgeMaxY = Float.NEGATIVE_INFINITY; - edgesSize = 0; - this.windingRule = windingRule; - this.cache = cache; this.boundsMinX = pix_boundsX * SUBPIXEL_POSITIONS_X; this.boundsMinY = pix_boundsY * SUBPIXEL_POSITIONS_Y; this.boundsMaxX = (pix_boundsX + pix_boundsWidth) * SUBPIXEL_POSITIONS_X; this.boundsMaxY = (pix_boundsY + pix_boundsHeight) * SUBPIXEL_POSITIONS_Y; - - this.pix_bboxX0 = pix_boundsX; - this.pix_bboxY0 = pix_boundsY; - this.pix_bboxX1 = pix_boundsX + pix_boundsWidth; - this.pix_bboxY1 = pix_boundsY + pix_boundsHeight; } private float tosubpixx(float pix_x) { @@ -341,7 +629,7 @@ public class Renderer implements LineSink { } public void moveTo(float pix_x0, float pix_y0) { - close(); + closePath(); this.pix_sx0 = pix_x0; this.pix_sy0 = pix_y0; this.y0 = tosubpixy(pix_y0); @@ -350,39 +638,102 @@ public class Renderer implements LineSink { public void lineJoin() { /* do nothing */ } - public void lineTo(float pix_x1, float pix_y1) { - float x1 = tosubpixx(pix_x1); - float y1 = tosubpixy(pix_y1); + private final float[][] pts = new float[2][8]; + private final float[] ts = new float[4]; - // Ignore horizontal lines - if (y0 == y1) { - this.x0 = x1; - return; + private static void invertPolyPoints(float[] pts, int off, int type) { + for (int i = off, j = off + type - 2; i < j; i += 2, j -= 2) { + float tmp = pts[i]; + pts[i] = pts[j]; + pts[j] = tmp; + tmp = pts[i+1]; + pts[i+1] = pts[j+1]; + pts[j+1] = tmp; } - - addEdge(x0, y0, x1, y1); - - this.x0 = x1; - this.y0 = y1; } - public void close() { + // return orientation before making the curve upright. + private static int makeMonotonicCurveUpright(float[] pts, int off, int type) { + float y0 = pts[off + 1]; + float y1 = pts[off + type - 1]; + if (y0 > y1) { + invertPolyPoints(pts, off, type); + return -1; + } else if (y0 < y1) { + return 1; + } + return 0; + } + + public void lineTo(float pix_x1, float pix_y1) { + pts[0][0] = x0; pts[0][1] = y0; + pts[0][2] = tosubpixx(pix_x1); pts[0][3] = tosubpixy(pix_y1); + int or = makeMonotonicCurveUpright(pts[0], 0, 4); + somethingTo(pts[0], 4, or); + } + + Curve c = new Curve(); + private void curveOrQuadTo(int type) { + c.set(pts[0], type); + int numTs = c.dxRoots(ts, 0); + numTs += c.dyRoots(ts, numTs); + numTs = Helpers.filterOutNotInAB(ts, 0, numTs, 0, 1); + Helpers.isort(ts, 0, numTs); + + Iterator it = Curve.breakPtsAtTs(pts, type, ts, numTs); + while(it.hasNext()) { + float[] curCurve = it.next(); + int or = makeMonotonicCurveUpright(curCurve, 0, type); + somethingTo(curCurve, type, or); + } + } + + @Override public void curveTo(float x1, float y1, + float x2, float y2, + float x3, float y3) + { + pts[0][0] = x0; pts[0][1] = y0; + pts[0][2] = tosubpixx(x1); pts[0][3] = tosubpixy(y1); + pts[0][4] = tosubpixx(x2); pts[0][5] = tosubpixy(y2); + pts[0][6] = tosubpixx(x3); pts[0][7] = tosubpixy(y3); + curveOrQuadTo(8); + } + + @Override public void quadTo(float x1, float y1, float x2, float y2) { + pts[0][0] = x0; pts[0][1] = y0; + pts[0][2] = tosubpixx(x1); pts[0][3] = tosubpixy(y1); + pts[0][4] = tosubpixx(x2); pts[0][5] = tosubpixy(y2); + curveOrQuadTo(6); + } + + public void closePath() { // lineTo expects its input in pixel coordinates. lineTo(pix_sx0, pix_sy0); } - public void end() { - close(); + public void pathDone() { + closePath(); } - private void _endRendering() { + + @Override + public long getNativeConsumer() { + throw new InternalError("Renderer does not use a native consumer."); + } + + private void _endRendering(final int pix_bboxx0, final int pix_bboxy0, + final int pix_bboxx1, final int pix_bboxy1) + { // Mask to determine the relevant bit of the crossing sum // 0x1 if EVEN_ODD, all bits if NON_ZERO int mask = (windingRule == WIND_EVEN_ODD) ? 0x1 : ~0x0; // add 1 to better deal with the last pixel in a pixel row. - int width = ((boundsMaxX - boundsMinX) >> SUBPIXEL_LG_POSITIONS_X) + 1; - byte[] alpha = new byte[width+1]; + int width = pix_bboxx1 - pix_bboxx0 + 1; + int[] alpha = new int[width+1]; + + int bboxx0 = pix_bboxx0 << SUBPIXEL_LG_POSITIONS_X; + int bboxx1 = pix_bboxx1 << SUBPIXEL_LG_POSITIONS_X; // Now we iterate through the scanlines. We must tell emitRow the coord // of the first non-transparent pixel, so we must keep accumulators for @@ -394,33 +745,34 @@ public class Renderer implements LineSink { int pix_minX = Integer.MAX_VALUE; int y = boundsMinY; // needs to be declared here so we emit the last row properly. - ScanLineItInitialize(); - for ( ; ScanLineItHasNext(); ) { - int numCrossings = ScanLineItGoToNextYAndComputeCrossings(); - y = ScanLineItCurrentY(); + ScanlineIterator it = this.new ScanlineIterator(); + for ( ; it.hasNext(); ) { + int numCrossings = it.next(); + int[] crossings = it.crossings; + y = it.curY(); if (numCrossings > 0) { int lowx = crossings[0] >> 1; int highx = crossings[numCrossings - 1] >> 1; - int x0 = Math.max(lowx, boundsMinX); - int x1 = Math.min(highx, boundsMaxX); + int x0 = Math.max(lowx, bboxx0); + int x1 = Math.min(highx, bboxx1); pix_minX = Math.min(pix_minX, x0 >> SUBPIXEL_LG_POSITIONS_X); pix_maxX = Math.max(pix_maxX, x1 >> SUBPIXEL_LG_POSITIONS_X); } int sum = 0; - int prev = boundsMinX; + int prev = bboxx0; for (int i = 0; i < numCrossings; i++) { int curxo = crossings[i]; int curx = curxo >> 1; int crorientation = ((curxo & 0x1) == 0x1) ? 1 : -1; if ((sum & mask) != 0) { - int x0 = Math.max(prev, boundsMinX); - int x1 = Math.min(curx, boundsMaxX); + int x0 = Math.max(prev, bboxx0); + int x1 = Math.min(curx, bboxx1); if (x0 < x1) { - x0 -= boundsMinX; // turn x0, x1 from coords to indeces - x1 -= boundsMinX; // in the alpha array. + x0 -= bboxx0; // turn x0, x1 from coords to indeces + x1 -= bboxx0; // in the alpha array. int pix_x = x0 >> SUBPIXEL_LG_POSITIONS_X; int pix_xmaxm1 = (x1 - 1) >> SUBPIXEL_LG_POSITIONS_X; @@ -442,6 +794,9 @@ public class Renderer implements LineSink { prev = curx; } + // even if this last row had no crossings, alpha will be zeroed + // from the last emitRow call. But this doesn't matter because + // maxX < minX, so no row will be emitted to the cache. if ((y & SUBPIXEL_MASK_Y) == SUBPIXEL_MASK_Y) { emitRow(alpha, y >> SUBPIXEL_LG_POSITIONS_Y, pix_minX, pix_maxX); pix_minX = Integer.MAX_VALUE; @@ -453,47 +808,53 @@ public class Renderer implements LineSink { if (pix_maxX >= pix_minX) { emitRow(alpha, y >> SUBPIXEL_LG_POSITIONS_Y, pix_minX, pix_maxX); } - pix_bboxX0 = minX >> SUBPIXEL_LG_POSITIONS_X; - pix_bboxX1 = maxX >> SUBPIXEL_LG_POSITIONS_X; - pix_bboxY0 = minY >> SUBPIXEL_LG_POSITIONS_Y; - pix_bboxY1 = maxY >> SUBPIXEL_LG_POSITIONS_Y; } - public void endRendering() { - // Set up the cache to accumulate the bounding box - if (cache != null) { - cache.bboxX0 = Integer.MAX_VALUE; - cache.bboxY0 = Integer.MAX_VALUE; - cache.bboxX1 = Integer.MIN_VALUE; - cache.bboxY1 = Integer.MIN_VALUE; + final int bminx = boundsMinX >> SUBPIXEL_LG_POSITIONS_X; + final int bmaxx = boundsMaxX >> SUBPIXEL_LG_POSITIONS_X; + final int bminy = boundsMinY >> SUBPIXEL_LG_POSITIONS_Y; + final int bmaxy = boundsMaxY >> SUBPIXEL_LG_POSITIONS_Y; + final int eminx = ((int)Math.floor(edgeMinX)) >> SUBPIXEL_LG_POSITIONS_X; + final int emaxx = ((int)Math.ceil(edgeMaxX)) >> SUBPIXEL_LG_POSITIONS_X; + final int eminy = ((int)Math.floor(edgeMinY)) >> SUBPIXEL_LG_POSITIONS_Y; + final int emaxy = ((int)Math.ceil(edgeMaxY)) >> SUBPIXEL_LG_POSITIONS_Y; + + final int minX = Math.max(bminx, eminx); + final int maxX = Math.min(bmaxx, emaxx); + final int minY = Math.max(bminy, eminy); + final int maxY = Math.min(bmaxy, emaxy); + if (minX > maxX || minY > maxY) { + this.cache = new PiscesCache(bminx, bminy, bmaxx, bmaxy); + return; } - _endRendering(); + this.cache = new PiscesCache(minX, minY, maxX, maxY); + _endRendering(minX, minY, maxX, maxY); } - public void getBoundingBox(int[] pix_bbox) { - pix_bbox[0] = pix_bboxX0; - pix_bbox[1] = pix_bboxY0; - pix_bbox[2] = pix_bboxX1 - pix_bboxX0; - pix_bbox[3] = pix_bboxY1 - pix_bboxY0; + public PiscesCache getCache() { + if (cache == null) { + throw new InternalError("cache not yet initialized"); + } + return cache; } - private void emitRow(byte[] alphaRow, int pix_y, int pix_from, int pix_to) { + private void emitRow(int[] alphaRow, int pix_y, int pix_from, int pix_to) { // Copy rowAA data into the cache if one is present if (cache != null) { if (pix_to >= pix_from) { - cache.startRow(pix_y, pix_from, pix_to); + cache.startRow(pix_y, pix_from); // Perform run-length encoding and store results in the cache - int from = pix_from - (boundsMinX >> SUBPIXEL_LG_POSITIONS_X); - int to = pix_to - (boundsMinX >> SUBPIXEL_LG_POSITIONS_X); + int from = pix_from - cache.bboxX0; + int to = pix_to - cache.bboxX0; int runLen = 1; - byte startVal = alphaRow[from]; + int startVal = alphaRow[from]; for (int i = from + 1; i <= to; i++) { - byte nextVal = (byte)(startVal + alphaRow[i]); - if (nextVal == startVal && runLen < 255) { + int nextVal = startVal + alphaRow[i]; + if (nextVal == startVal) { runLen++; } else { cache.addRLERun(startVal, runLen); @@ -502,9 +863,8 @@ public class Renderer implements LineSink { } } cache.addRLERun(startVal, runLen); - cache.addRLERun((byte)0, 0); } } - java.util.Arrays.fill(alphaRow, (byte)0); + java.util.Arrays.fill(alphaRow, 0); } } diff --git a/jdk/src/share/classes/sun/java2d/pisces/Stroker.java b/jdk/src/share/classes/sun/java2d/pisces/Stroker.java index 574c460fea9..596fa756c31 100644 --- a/jdk/src/share/classes/sun/java2d/pisces/Stroker.java +++ b/jdk/src/share/classes/sun/java2d/pisces/Stroker.java @@ -25,10 +25,18 @@ package sun.java2d.pisces; -public class Stroker implements LineSink { +import java.util.Arrays; +import java.util.Iterator; + +import sun.awt.geom.PathConsumer2D; + +// TODO: some of the arithmetic here is too verbose and prone to hard to +// debug typos. We should consider making a small Point/Vector class that +// has methods like plus(Point), minus(Point), dot(Point), cross(Point)and such +public class Stroker implements PathConsumer2D { private static final int MOVE_TO = 0; - private static final int LINE_TO = 1; + private static final int DRAWING_OP_TO = 1; // ie. curve, line, or quad private static final int CLOSE = 2; /** @@ -61,57 +69,37 @@ public class Stroker implements LineSink { */ public static final int CAP_SQUARE = 2; - private final LineSink output; + private final PathConsumer2D out; private final int capStyle; private final int joinStyle; - private final float m00, m01, m10, m11, det; - private final float lineWidth2; - private final float scaledLineWidth2; - // For any pen offset (pen_dx, pen_dy) that does not depend on - // the line orientation, the pen should be transformed so that: - // - // pen_dx' = m00*pen_dx + m01*pen_dy - // pen_dy' = m10*pen_dx + m11*pen_dy - // - // For a round pen, this means: - // - // pen_dx(r, theta) = r*cos(theta) - // pen_dy(r, theta) = r*sin(theta) - // - // pen_dx'(r, theta) = r*(m00*cos(theta) + m01*sin(theta)) - // pen_dy'(r, theta) = r*(m10*cos(theta) + m11*sin(theta)) - private int numPenSegments; - private final float[] pen_dx; - private final float[] pen_dy; - private boolean[] penIncluded; - private final float[] join; - - private final float[] offset = new float[2]; - private float[] reverse = new float[100]; + private final float[][] offset = new float[3][2]; private final float[] miter = new float[2]; private final float miterLimitSq; private int prev; - private int rindex; - private boolean started; - private boolean lineToOrigin; - private boolean joinToOrigin; - private float sx0, sy0, sx1, sy1, x0, y0, px0, py0; - private float mx0, my0, omx, omy; + // The starting point of the path, and the slope there. + private float sx0, sy0, sdx, sdy; + // the current point and the slope there. + private float cx0, cy0, cdx, cdy; // c stands for current + // vectors that when added to (sx0,sy0) and (cx0,cy0) respectively yield the + // first and last points on the left parallel path. Since this path is + // parallel, it's slope at any point is parallel to the slope of the + // original path (thought they may have different directions), so these + // could be computed from sdx,sdy and cdx,cdy (and vice versa), but that + // would be error prone and hard to read, so we keep these anyway. + private float smx, smy, cmx, cmy; - private float m00_2_m01_2; - private float m10_2_m11_2; - private float m00_m10_m01_m11; + private final PolyStack reverse = new PolyStack(); /** * Constructs a Stroker. * - * @param output an output LineSink. + * @param pc2d an output PathConsumer2D. * @param lineWidth the desired line width in pixels * @param capStyle the desired end cap style, one of * CAP_BUTT, CAP_ROUND or @@ -120,183 +108,61 @@ public class Stroker implements LineSink { * JOIN_MITER, JOIN_ROUND or * JOIN_BEVEL. * @param miterLimit the desired miter limit - * @param transform a Transform4 object indicating - * the transform that has been previously applied to all incoming - * coordinates. This is required in order to produce consistently - * shaped end caps and joins. */ - public Stroker(LineSink output, + public Stroker(PathConsumer2D pc2d, float lineWidth, int capStyle, int joinStyle, - float miterLimit, - float m00, float m01, float m10, float m11) { - this.output = output; + float miterLimit) + { + this.out = pc2d; this.lineWidth2 = lineWidth / 2; - this.scaledLineWidth2 = m00 * lineWidth2; this.capStyle = capStyle; this.joinStyle = joinStyle; - m00_2_m01_2 = m00*m00 + m01*m01; - m10_2_m11_2 = m10*m10 + m11*m11; - m00_m10_m01_m11 = m00*m10 + m01*m11; - - this.m00 = m00; - this.m01 = m01; - this.m10 = m10; - this.m11 = m11; - det = m00*m11 - m01*m10; - - float limit = miterLimit * lineWidth2 * det; + float limit = miterLimit * lineWidth2; this.miterLimitSq = limit*limit; - this.numPenSegments = (int)(3.14159f * lineWidth); - this.pen_dx = new float[numPenSegments]; - this.pen_dy = new float[numPenSegments]; - this.penIncluded = new boolean[numPenSegments]; - this.join = new float[2*numPenSegments]; - - for (int i = 0; i < numPenSegments; i++) { - double theta = (i * 2.0 * Math.PI)/numPenSegments; - - double cos = Math.cos(theta); - double sin = Math.sin(theta); - pen_dx[i] = (float)(lineWidth2 * (m00*cos + m01*sin)); - pen_dy[i] = (float)(lineWidth2 * (m10*cos + m11*sin)); - } - - prev = CLOSE; - rindex = 0; - started = false; - lineToOrigin = false; + this.prev = CLOSE; } - private void computeOffset(float x0, float y0, - float x1, float y1, float[] m) { - float lx = x1 - x0; - float ly = y1 - y0; - - float dx, dy; - if (m00 > 0 && m00 == m11 && m01 == 0 & m10 == 0) { - float ilen = (float)Math.hypot(lx, ly); - if (ilen == 0) { - dx = dy = 0; - } else { - dx = (ly * scaledLineWidth2)/ilen; - dy = -(lx * scaledLineWidth2)/ilen; - } + private static void computeOffset(final float lx, final float ly, + final float w, final float[] m) + { + final float len = (float)Math.hypot(lx, ly); + if (len == 0) { + m[0] = m[1] = 0; } else { - int sdet = (det > 0) ? 1 : -1; - float a = ly * m00 - lx * m10; - float b = ly * m01 - lx * m11; - float dh = (float)Math.hypot(a, b); - float div = sdet * lineWidth2/dh; - - float ddx = ly * m00_2_m01_2 - lx * m00_m10_m01_m11; - float ddy = ly * m00_m10_m01_m11 - lx * m10_2_m11_2; - dx = ddx*div; - dy = ddy*div; - } - - m[0] = dx; - m[1] = dy; - } - - private void ensureCapacity(int newrindex) { - if (reverse.length < newrindex) { - reverse = java.util.Arrays.copyOf(reverse, 6*reverse.length/5); + m[0] = (ly * w)/len; + m[1] = -(lx * w)/len; } } - private boolean isCCW(float x0, float y0, - float x1, float y1, - float x2, float y2) { - return (x1 - x0) * (y2 - y1) < (y1 - y0) * (x2 - x1); - } - - private boolean side(float x, float y, - float x0, float y0, - float x1, float y1) { - return (y0 - y1)*x + (x1 - x0)*y + (x0*y1 - x1*y0) > 0; - } - - private int computeRoundJoin(float cx, float cy, - float xa, float ya, - float xb, float yb, - int side, - boolean flip, - float[] join) { - float px, py; - int ncoords = 0; - - boolean centerSide; - if (side == 0) { - centerSide = side(cx, cy, xa, ya, xb, yb); - } else { - centerSide = (side == 1); - } - for (int i = 0; i < numPenSegments; i++) { - px = cx + pen_dx[i]; - py = cy + pen_dy[i]; - - boolean penSide = side(px, py, xa, ya, xb, yb); - penIncluded[i] = (penSide != centerSide); - } - - int start = -1, end = -1; - for (int i = 0; i < numPenSegments; i++) { - if (penIncluded[i] && - !penIncluded[(i + numPenSegments - 1) % numPenSegments]) { - start = i; - } - if (penIncluded[i] && - !penIncluded[(i + 1) % numPenSegments]) { - end = i; - } - } - - if (end < start) { - end += numPenSegments; - } - - if (start != -1 && end != -1) { - float dxa = cx + pen_dx[start] - xa; - float dya = cy + pen_dy[start] - ya; - float dxb = cx + pen_dx[start] - xb; - float dyb = cy + pen_dy[start] - yb; - - boolean rev = (dxa*dxa + dya*dya > dxb*dxb + dyb*dyb); - int i = rev ? end : start; - int incr = rev ? -1 : 1; - while (true) { - int idx = i % numPenSegments; - px = cx + pen_dx[idx]; - py = cy + pen_dy[idx]; - join[ncoords++] = px; - join[ncoords++] = py; - if (i == (rev ? start : end)) { - break; - } - i += incr; - } - } - - return ncoords/2; + // Returns true if the vectors (dx1, dy1) and (dx2, dy2) are + // clockwise (if dx1,dy1 needs to be rotated clockwise to close + // the smallest angle between it and dx2,dy2). + // This is equivalent to detecting whether a point q is on the right side + // of a line passing through points p1, p2 where p2 = p1+(dx1,dy1) and + // q = p2+(dx2,dy2), which is the same as saying p1, p2, q are in a + // clockwise order. + // NOTE: "clockwise" here assumes coordinates with 0,0 at the bottom left. + private static boolean isCW(final float dx1, final float dy1, + final float dx2, final float dy2) + { + return dx1 * dy2 <= dy1 * dx2; } // pisces used to use fixed point arithmetic with 16 decimal digits. I - // didn't want to change the values of the constants below when I converted + // didn't want to change the values of the constant below when I converted // it to floating point, so that's why the divisions by 2^16 are there. private static final float ROUND_JOIN_THRESHOLD = 1000/65536f; - private static final float ROUND_JOIN_INTERNAL_THRESHOLD = 1000000000/65536f; private void drawRoundJoin(float x, float y, float omx, float omy, float mx, float my, - int side, - boolean flip, boolean rev, - float threshold) { + float threshold) + { if ((omx == 0 && omy == 0) || (mx == 0 && my == 0)) { return; } @@ -314,54 +180,148 @@ public class Stroker implements LineSink { mx = -mx; my = -my; } + drawRoundJoin(x, y, omx, omy, mx, my, rev); + } - float bx0 = x + omx; - float by0 = y + omy; - float bx1 = x + mx; - float by1 = y + my; + private void drawRoundJoin(float cx, float cy, + float omx, float omy, + float mx, float my, + boolean rev) + { + // The sign of the dot product of mx,my and omx,omy is equal to the + // the sign of the cosine of ext + // (ext is the angle between omx,omy and mx,my). + double cosext = omx * mx + omy * my; + // If it is >=0, we know that abs(ext) is <= 90 degrees, so we only + // need 1 curve to approximate the circle section that joins omx,omy + // and mx,my. + final int numCurves = cosext >= 0 ? 1 : 2; - int npoints = computeRoundJoin(x, y, - bx0, by0, bx1, by1, side, flip, - join); - for (int i = 0; i < npoints; i++) { - emitLineTo(join[2*i], join[2*i + 1], rev); + switch (numCurves) { + case 1: + drawBezApproxForArc(cx, cy, omx, omy, mx, my, rev); + break; + case 2: + // we need to split the arc into 2 arcs spanning the same angle. + // The point we want will be one of the 2 intersections of the + // perpendicular bisector of the chord (omx,omy)->(mx,my) and the + // circle. We could find this by scaling the vector + // (omx+mx, omy+my)/2 so that it has length=lineWidth2 (and thus lies + // on the circle), but that can have numerical problems when the angle + // between omx,omy and mx,my is close to 180 degrees. So we compute a + // normal of (omx,omy)-(mx,my). This will be the direction of the + // perpendicular bisector. To get one of the intersections, we just scale + // this vector that its length is lineWidth2 (this works because the + // perpendicular bisector goes through the origin). This scaling doesn't + // have numerical problems because we know that lineWidth2 divided by + // this normal's length is at least 0.5 and at most sqrt(2)/2 (because + // we know the angle of the arc is > 90 degrees). + float nx = my - omy, ny = omx - mx; + float nlen = (float)Math.sqrt(nx*nx + ny*ny); + float scale = lineWidth2/nlen; + float mmx = nx * scale, mmy = ny * scale; + + // if (isCW(omx, omy, mx, my) != isCW(mmx, mmy, mx, my)) then we've + // computed the wrong intersection so we get the other one. + // The test above is equivalent to if (rev). + if (rev) { + mmx = -mmx; + mmy = -mmy; + } + drawBezApproxForArc(cx, cy, omx, omy, mmx, mmy, rev); + drawBezApproxForArc(cx, cy, mmx, mmy, mx, my, rev); + break; } } - // Return the intersection point of the lines (ix0, iy0) -> (ix1, iy1) - // and (ix0p, iy0p) -> (ix1p, iy1p) in m[0] and m[1] - private void computeMiter(float x0, float y0, float x1, float y1, - float x0p, float y0p, float x1p, float y1p, - float[] m) { + // the input arc defined by omx,omy and mx,my must span <= 90 degrees. + private void drawBezApproxForArc(final float cx, final float cy, + final float omx, final float omy, + final float mx, final float my, + boolean rev) + { + float cosext2 = (omx * mx + omy * my) / (2 * lineWidth2 * lineWidth2); + // cv is the length of P1-P0 and P2-P3 divided by the radius of the arc + // (so, cv assumes the arc has radius 1). P0, P1, P2, P3 are the points that + // define the bezier curve we're computing. + // It is computed using the constraints that P1-P0 and P3-P2 are parallel + // to the arc tangents at the endpoints, and that |P1-P0|=|P3-P2|. + float cv = (float)((4.0 / 3.0) * Math.sqrt(0.5-cosext2) / + (1.0 + Math.sqrt(cosext2+0.5))); + // if clockwise, we need to negate cv. + if (rev) { // rev is equivalent to isCW(omx, omy, mx, my) + cv = -cv; + } + final float x1 = cx + omx; + final float y1 = cy + omy; + final float x2 = x1 - cv * omy; + final float y2 = y1 + cv * omx; + + final float x4 = cx + mx; + final float y4 = cy + my; + final float x3 = x4 + cv * my; + final float y3 = y4 - cv * mx; + + emitCurveTo(x1, y1, x2, y2, x3, y3, x4, y4, rev); + } + + private void drawRoundCap(float cx, float cy, float mx, float my) { + final float C = 0.5522847498307933f; + // the first and second arguments of the following two calls + // are really will be ignored by emitCurveTo (because of the false), + // but we put them in anyway, as opposed to just giving it 4 zeroes, + // because it's just 4 additions and it's not good to rely on this + // sort of assumption (right now it's true, but that may change). + emitCurveTo(cx+mx, cy+my, + cx+mx-C*my, cy+my+C*mx, + cx-my+C*mx, cy+mx+C*my, + cx-my, cy+mx, + false); + emitCurveTo(cx-my, cy+mx, + cx-my-C*mx, cy+mx-C*my, + cx-mx-C*my, cy-my+C*mx, + cx-mx, cy-my, + false); + } + + // Return the intersection point of the lines (x0, y0) -> (x1, y1) + // and (x0p, y0p) -> (x1p, y1p) in m[0] and m[1] + private void computeMiter(final float x0, final float y0, + final float x1, final float y1, + final float x0p, final float y0p, + final float x1p, final float y1p, + final float[] m, int off) + { float x10 = x1 - x0; float y10 = y1 - y0; float x10p = x1p - x0p; float y10p = y1p - y0p; + // if this is 0, the lines are parallel. If they go in the + // same direction, there is no intersection so m[off] and + // m[off+1] will contain infinity, so no miter will be drawn. + // If they go in the same direction that means that the start of the + // current segment and the end of the previous segment have the same + // tangent, in which case this method won't even be involved in + // miter drawing because it won't be called by drawMiter (because + // (mx == omx && my == omy) will be true, and drawMiter will return + // immediately). float den = x10*y10p - x10p*y10; - if (den == 0) { - m[0] = x0; - m[1] = y0; - return; - } - - float t = x1p*(y0 - y0p) - x0*y10p + x0p*(y1p - y0); - m[0] = x0 + (t*x10)/den; - m[1] = y0 + (t*y10)/den; + float t = x10p*(y0-y0p) - y10p*(x0-x0p); + t /= den; + m[off++] = x0 + t*x10; + m[off] = y0 + t*y10; } - private void drawMiter(float px0, float py0, - float x0, float y0, - float x1, float y1, + private void drawMiter(final float pdx, final float pdy, + final float x0, final float y0, + final float dx, final float dy, float omx, float omy, float mx, float my, - boolean rev) { - if (mx == omx && my == omy) { - return; - } - if (px0 == x0 && py0 == y0) { - return; - } - if (x0 == x1 && y0 == y1) { + boolean rev) + { + if ((mx == omx && my == omy) || + (pdx == 0 && pdy == 0) || + (dx == 0 && dy == 0)) { return; } @@ -372,297 +332,734 @@ public class Stroker implements LineSink { my = -my; } - computeMiter(px0 + omx, py0 + omy, x0 + omx, y0 + omy, - x0 + mx, y0 + my, x1 + mx, y1 + my, - miter); + computeMiter((x0 - pdx) + omx, (y0 - pdy) + omy, x0 + omx, y0 + omy, + (dx + x0) + mx, (dy + y0) + my, x0 + mx, y0 + my, + miter, 0); - // Compute miter length in untransformed coordinates - float dx = miter[0] - x0; - float dy = miter[1] - y0; - float a = dy*m00 - dx*m10; - float b = dy*m01 - dx*m11; - float lenSq = a*a + b*b; + float lenSq = (miter[0]-x0)*(miter[0]-x0) + (miter[1]-y0)*(miter[1]-y0); if (lenSq < miterLimitSq) { emitLineTo(miter[0], miter[1], rev); } } - public void moveTo(float x0, float y0) { - // System.out.println("Stroker.moveTo(" + x0/65536.0 + ", " + y0/65536.0 + ")"); - - if (lineToOrigin) { - // not closing the path, do the previous lineTo - lineToImpl(sx0, sy0, joinToOrigin); - lineToOrigin = false; - } - - if (prev == LINE_TO) { + if (prev == DRAWING_OP_TO) { finish(); } - - this.sx0 = this.x0 = x0; - this.sy0 = this.y0 = y0; - this.rindex = 0; - this.started = false; - this.joinSegment = false; + this.sx0 = this.cx0 = x0; + this.sy0 = this.cy0 = y0; + this.cdx = this.sdx = 1; + this.cdy = this.sdy = 0; this.prev = MOVE_TO; } - boolean joinSegment = false; - - public void lineJoin() { - // System.out.println("Stroker.lineJoin()"); - this.joinSegment = true; - } - public void lineTo(float x1, float y1) { - // System.out.println("Stroker.lineTo(" + x1/65536.0 + ", " + y1/65536.0 + ")"); - - if (lineToOrigin) { - if (x1 == sx0 && y1 == sy0) { - // staying in the starting point - return; - } - - // not closing the path, do the previous lineTo - lineToImpl(sx0, sy0, joinToOrigin); - lineToOrigin = false; - } else if (x1 == x0 && y1 == y0) { - return; - } else if (x1 == sx0 && y1 == sy0) { - lineToOrigin = true; - joinToOrigin = joinSegment; - joinSegment = false; - return; + float dx = x1 - cx0; + float dy = y1 - cy0; + if (dx == 0f && dy == 0f) { + dx = 1; } + computeOffset(dx, dy, lineWidth2, offset[0]); + float mx = offset[0][0]; + float my = offset[0][1]; - lineToImpl(x1, y1, joinSegment); - joinSegment = false; - } + drawJoin(cdx, cdy, cx0, cy0, dx, dy, cmx, cmy, mx, my); - private void lineToImpl(float x1, float y1, boolean joinSegment) { - computeOffset(x0, y0, x1, y1, offset); - float mx = offset[0]; - float my = offset[1]; + emitLineTo(cx0 + mx, cy0 + my); + emitLineTo(x1 + mx, y1 + my); - if (!started) { - emitMoveTo(x0 + mx, y0 + my); - this.sx1 = x1; - this.sy1 = y1; - this.mx0 = mx; - this.my0 = my; - started = true; - } else { - boolean ccw = isCCW(px0, py0, x0, y0, x1, y1); - if (joinSegment) { - if (joinStyle == JOIN_MITER) { - drawMiter(px0, py0, x0, y0, x1, y1, omx, omy, mx, my, - ccw); - } else if (joinStyle == JOIN_ROUND) { - drawRoundJoin(x0, y0, - omx, omy, - mx, my, 0, false, ccw, - ROUND_JOIN_THRESHOLD); - } - } else { - // Draw internal joins as round - drawRoundJoin(x0, y0, - omx, omy, - mx, my, 0, false, ccw, - ROUND_JOIN_INTERNAL_THRESHOLD); - } - - emitLineTo(x0, y0, !ccw); - } - - emitLineTo(x0 + mx, y0 + my, false); - emitLineTo(x1 + mx, y1 + my, false); - - emitLineTo(x0 - mx, y0 - my, true); + emitLineTo(cx0 - mx, cy0 - my, true); emitLineTo(x1 - mx, y1 - my, true); - this.omx = mx; - this.omy = my; - this.px0 = x0; - this.py0 = y0; - this.x0 = x1; - this.y0 = y1; - this.prev = LINE_TO; + this.cmx = mx; + this.cmy = my; + this.cdx = dx; + this.cdy = dy; + this.cx0 = x1; + this.cy0 = y1; + this.prev = DRAWING_OP_TO; } - public void close() { - // System.out.println("Stroker.close()"); - - if (lineToOrigin) { - // ignore the previous lineTo - lineToOrigin = false; - } - - if (!started) { + public void closePath() { + if (prev != DRAWING_OP_TO) { + if (prev == CLOSE) { + return; + } + emitMoveTo(cx0, cy0 - lineWidth2); + this.cmx = this.smx = 0; + this.cmy = this.smy = -lineWidth2; + this.cdx = this.sdx = 1; + this.cdy = this.sdy = 0; finish(); return; } - computeOffset(x0, y0, sx0, sy0, offset); - float mx = offset[0]; - float my = offset[1]; - - // Draw penultimate join - boolean ccw = isCCW(px0, py0, x0, y0, sx0, sy0); - if (joinSegment) { - if (joinStyle == JOIN_MITER) { - drawMiter(px0, py0, x0, y0, sx0, sy0, omx, omy, mx, my, ccw); - } else if (joinStyle == JOIN_ROUND) { - drawRoundJoin(x0, y0, omx, omy, mx, my, 0, false, ccw, - ROUND_JOIN_THRESHOLD); - } - } else { - // Draw internal joins as round - drawRoundJoin(x0, y0, - omx, omy, - mx, my, 0, false, ccw, - ROUND_JOIN_INTERNAL_THRESHOLD); + if (cx0 != sx0 || cy0 != sy0) { + lineTo(sx0, sy0); } - emitLineTo(x0 + mx, y0 + my); - emitLineTo(sx0 + mx, sy0 + my); + drawJoin(cdx, cdy, cx0, cy0, sdx, sdy, cmx, cmy, smx, smy); - ccw = isCCW(x0, y0, sx0, sy0, sx1, sy1); + emitLineTo(sx0 + smx, sy0 + smy); - // Draw final join on the outside - if (!ccw) { - if (joinStyle == JOIN_MITER) { - drawMiter(x0, y0, sx0, sy0, sx1, sy1, - mx, my, mx0, my0, false); - } else if (joinStyle == JOIN_ROUND) { - drawRoundJoin(sx0, sy0, mx, my, mx0, my0, 0, false, false, - ROUND_JOIN_THRESHOLD); - } - } + emitMoveTo(sx0 - smx, sy0 - smy); + emitReverse(); - emitLineTo(sx0 + mx0, sy0 + my0); - emitLineTo(sx0 - mx0, sy0 - my0); // same as reverse[0], reverse[1] - - // Draw final join on the inside - if (ccw) { - if (joinStyle == JOIN_MITER) { - drawMiter(x0, y0, sx0, sy0, sx1, sy1, - -mx, -my, -mx0, -my0, false); - } else if (joinStyle == JOIN_ROUND) { - drawRoundJoin(sx0, sy0, -mx, -my, -mx0, -my0, 0, - true, false, - ROUND_JOIN_THRESHOLD); - } - } - - emitLineTo(sx0 - mx, sy0 - my); - emitLineTo(x0 - mx, y0 - my); - for (int i = rindex - 2; i >= 0; i -= 2) { - emitLineTo(reverse[i], reverse[i + 1]); - } - - this.x0 = this.sx0; - this.y0 = this.sy0; - this.rindex = 0; - this.started = false; - this.joinSegment = false; this.prev = CLOSE; emitClose(); } - public void end() { - // System.out.println("Stroker.end()"); - - if (lineToOrigin) { - // not closing the path, do the previous lineTo - lineToImpl(sx0, sy0, joinToOrigin); - lineToOrigin = false; + private void emitReverse() { + while(!reverse.isEmpty()) { + reverse.pop(out); } + } - if (prev == LINE_TO) { + public void pathDone() { + if (prev == DRAWING_OP_TO) { finish(); } - output.end(); - this.joinSegment = false; - this.prev = MOVE_TO; - } - - double userSpaceLineLength(double dx, double dy) { - double a = (dy*m00 - dx*m10)/det; - double b = (dy*m01 - dx*m11)/det; - return Math.hypot(a, b); + out.pathDone(); + // this shouldn't matter since this object won't be used + // after the call to this method. + this.prev = CLOSE; } private void finish() { if (capStyle == CAP_ROUND) { - drawRoundJoin(x0, y0, - omx, omy, -omx, -omy, 1, false, false, - ROUND_JOIN_THRESHOLD); + drawRoundCap(cx0, cy0, cmx, cmy); } else if (capStyle == CAP_SQUARE) { - float dx = px0 - x0; - float dy = py0 - y0; - float len = (float)userSpaceLineLength(dx, dy); - float s = lineWidth2/len; - - float capx = x0 - dx*s; - float capy = y0 - dy*s; - - emitLineTo(capx + omx, capy + omy); - emitLineTo(capx - omx, capy - omy); + emitLineTo(cx0 - cmy + cmx, cy0 + cmx + cmy); + emitLineTo(cx0 - cmy - cmx, cy0 + cmx - cmy); } - for (int i = rindex - 2; i >= 0; i -= 2) { - emitLineTo(reverse[i], reverse[i + 1]); - } - this.rindex = 0; + emitReverse(); if (capStyle == CAP_ROUND) { - drawRoundJoin(sx0, sy0, - -mx0, -my0, mx0, my0, 1, false, false, - ROUND_JOIN_THRESHOLD); + drawRoundCap(sx0, sy0, -smx, -smy); } else if (capStyle == CAP_SQUARE) { - float dx = sx1 - sx0; - float dy = sy1 - sy0; - float len = (float)userSpaceLineLength(dx, dy); - float s = lineWidth2/len; - - float capx = sx0 - dx*s; - float capy = sy0 - dy*s; - - emitLineTo(capx - mx0, capy - my0); - emitLineTo(capx + mx0, capy + my0); + emitLineTo(sx0 + smy - smx, sy0 - smx - smy); + emitLineTo(sx0 + smy + smx, sy0 - smx + smy); } emitClose(); - this.joinSegment = false; } - private void emitMoveTo(float x0, float y0) { - // System.out.println("Stroker.emitMoveTo(" + x0/65536.0 + ", " + y0/65536.0 + ")"); - output.moveTo(x0, y0); + private void emitMoveTo(final float x0, final float y0) { + out.moveTo(x0, y0); } - private void emitLineTo(float x1, float y1) { - // System.out.println("Stroker.emitLineTo(" + x0/65536.0 + ", " + y0/65536.0 + ")"); - output.lineTo(x1, y1); + private void emitLineTo(final float x1, final float y1) { + out.lineTo(x1, y1); } - private void emitLineTo(float x1, float y1, boolean rev) { + private void emitLineTo(final float x1, final float y1, + final boolean rev) + { if (rev) { - ensureCapacity(rindex + 2); - reverse[rindex++] = x1; - reverse[rindex++] = y1; + reverse.pushLine(x1, y1); } else { emitLineTo(x1, y1); } } + private void emitQuadTo(final float x0, final float y0, + final float x1, final float y1, + final float x2, final float y2, final boolean rev) + { + if (rev) { + reverse.pushQuad(x0, y0, x1, y1); + } else { + out.quadTo(x1, y1, x2, y2); + } + } + + private void emitCurveTo(final float x0, final float y0, + final float x1, final float y1, + final float x2, final float y2, + final float x3, final float y3, final boolean rev) + { + if (rev) { + reverse.pushCubic(x0, y0, x1, y1, x2, y2); + } else { + out.curveTo(x1, y1, x2, y2, x3, y3); + } + } + private void emitClose() { - // System.out.println("Stroker.emitClose()"); - output.close(); + out.closePath(); + } + + private void drawJoin(float pdx, float pdy, + float x0, float y0, + float dx, float dy, + float omx, float omy, + float mx, float my) + { + if (prev != DRAWING_OP_TO) { + emitMoveTo(x0 + mx, y0 + my); + this.sdx = dx; + this.sdy = dy; + this.smx = mx; + this.smy = my; + } else { + boolean cw = isCW(pdx, pdy, dx, dy); + if (joinStyle == JOIN_MITER) { + drawMiter(pdx, pdy, x0, y0, dx, dy, omx, omy, mx, my, cw); + } else if (joinStyle == JOIN_ROUND) { + drawRoundJoin(x0, y0, + omx, omy, + mx, my, cw, + ROUND_JOIN_THRESHOLD); + } + emitLineTo(x0, y0, !cw); + } + prev = DRAWING_OP_TO; + } + + private static boolean within(final float x1, final float y1, + final float x2, final float y2, + final float ERR) + { + assert ERR > 0 : ""; + // compare taxicab distance. ERR will always be small, so using + // true distance won't give much benefit + return (Helpers.within(x1, x2, ERR) && // we want to avoid calling Math.abs + Helpers.within(y1, y2, ERR)); // this is just as good. + } + + private void getLineOffsets(float x1, float y1, + float x2, float y2, + float[] left, float[] right) { + computeOffset(x2 - x1, y2 - y1, lineWidth2, offset[0]); + left[0] = x1 + offset[0][0]; + left[1] = y1 + offset[0][1]; + left[2] = x2 + offset[0][0]; + left[3] = y2 + offset[0][1]; + right[0] = x1 - offset[0][0]; + right[1] = y1 - offset[0][1]; + right[2] = x2 - offset[0][0]; + right[3] = y2 - offset[0][1]; + } + + private int computeOffsetCubic(float[] pts, final int off, + float[] leftOff, float[] rightOff) + { + // if p1=p2 or p3=p4 it means that the derivative at the endpoint + // vanishes, which creates problems with computeOffset. Usually + // this happens when this stroker object is trying to winden + // a curve with a cusp. What happens is that curveTo splits + // the input curve at the cusp, and passes it to this function. + // because of inaccuracies in the splitting, we consider points + // equal if they're very close to each other. + final float x1 = pts[off + 0], y1 = pts[off + 1]; + final float x2 = pts[off + 2], y2 = pts[off + 3]; + final float x3 = pts[off + 4], y3 = pts[off + 5]; + final float x4 = pts[off + 6], y4 = pts[off + 7]; + + float dx4 = x4 - x3; + float dy4 = y4 - y3; + float dx1 = x2 - x1; + float dy1 = y2 - y1; + + // if p1 == p2 && p3 == p4: draw line from p1->p4, unless p1 == p4, + // in which case ignore if p1 == p2 + final boolean p1eqp2 = within(x1,y1,x2,y2, 6 * Math.ulp(y2)); + final boolean p3eqp4 = within(x3,y3,x4,y4, 6 * Math.ulp(y4)); + if (p1eqp2 && p3eqp4) { + getLineOffsets(x1, y1, x4, y4, leftOff, rightOff); + return 4; + } else if (p1eqp2) { + dx1 = x3 - x1; + dy1 = y3 - y1; + } else if (p3eqp4) { + dx4 = x4 - x2; + dy4 = y4 - y2; + } + + // if p2-p1 and p4-p3 are parallel, that must mean this curve is a line + float dotsq = (dx1 * dx4 + dy1 * dy4); + dotsq = dotsq * dotsq; + float l1sq = dx1 * dx1 + dy1 * dy1, l4sq = dx4 * dx4 + dy4 * dy4; + if (Helpers.within(dotsq, l1sq * l4sq, 4 * Math.ulp(dotsq))) { + getLineOffsets(x1, y1, x4, y4, leftOff, rightOff); + return 4; + } + +// What we're trying to do in this function is to approximate an ideal +// offset curve (call it I) of the input curve B using a bezier curve Bp. +// The constraints I use to get the equations are: +// +// 1. The computed curve Bp should go through I(0) and I(1). These are +// x1p, y1p, x4p, y4p, which are p1p and p4p. We still need to find +// 4 variables: the x and y components of p2p and p3p (i.e. x2p, y2p, x3p, y3p). +// +// 2. Bp should have slope equal in absolute value to I at the endpoints. So, +// (by the way, the operator || in the comments below means "aligned with". +// It is defined on vectors, so when we say I'(0) || Bp'(0) we mean that +// vectors I'(0) and Bp'(0) are aligned, which is the same as saying +// that the tangent lines of I and Bp at 0 are parallel. Mathematically +// this means (I'(t) || Bp'(t)) <==> (I'(t) = c * Bp'(t)) where c is some +// nonzero constant.) +// I'(0) || Bp'(0) and I'(1) || Bp'(1). Obviously, I'(0) || B'(0) and +// I'(1) || B'(1); therefore, Bp'(0) || B'(0) and Bp'(1) || B'(1). +// We know that Bp'(0) || (p2p-p1p) and Bp'(1) || (p4p-p3p) and the same +// is true for any bezier curve; therefore, we get the equations +// (1) p2p = c1 * (p2-p1) + p1p +// (2) p3p = c2 * (p4-p3) + p4p +// We know p1p, p4p, p2, p1, p3, and p4; therefore, this reduces the number +// of unknowns from 4 to 2 (i.e. just c1 and c2). +// To eliminate these 2 unknowns we use the following constraint: +// +// 3. Bp(0.5) == I(0.5). Bp(0.5)=(x,y) and I(0.5)=(xi,yi), and I should note +// that I(0.5) is *the only* reason for computing dxm,dym. This gives us +// (3) Bp(0.5) = (p1p + 3 * (p2p + p3p) + p4p)/8, which is equivalent to +// (4) p2p + p3p = (Bp(0.5)*8 - p1p - p4p) / 3 +// We can substitute (1) and (2) from above into (4) and we get: +// (5) c1*(p2-p1) + c2*(p4-p3) = (Bp(0.5)*8 - p1p - p4p)/3 - p1p - p4p +// which is equivalent to +// (6) c1*(p2-p1) + c2*(p4-p3) = (4/3) * (Bp(0.5) * 2 - p1p - p4p) +// +// The right side of this is a 2D vector, and we know I(0.5), which gives us +// Bp(0.5), which gives us the value of the right side. +// The left side is just a matrix vector multiplication in disguise. It is +// +// [x2-x1, x4-x3][c1] +// [y2-y1, y4-y3][c2] +// which, is equal to +// [dx1, dx4][c1] +// [dy1, dy4][c2] +// At this point we are left with a simple linear system and we solve it by +// getting the inverse of the matrix above. Then we use [c1,c2] to compute +// p2p and p3p. + + float x = 0.125f * (x1 + 3 * (x2 + x3) + x4); + float y = 0.125f * (y1 + 3 * (y2 + y3) + y4); + // (dxm,dym) is some tangent of B at t=0.5. This means it's equal to + // c*B'(0.5) for some constant c. + float dxm = x3 + x4 - x1 - x2, dym = y3 + y4 - y1 - y2; + + // this computes the offsets at t=0, 0.5, 1, using the property that + // for any bezier curve the vectors p2-p1 and p4-p3 are parallel to + // the (dx/dt, dy/dt) vectors at the endpoints. + computeOffset(dx1, dy1, lineWidth2, offset[0]); + computeOffset(dxm, dym, lineWidth2, offset[1]); + computeOffset(dx4, dy4, lineWidth2, offset[2]); + float x1p = x1 + offset[0][0]; // start + float y1p = y1 + offset[0][1]; // point + float xi = x + offset[1][0]; // interpolation + float yi = y + offset[1][1]; // point + float x4p = x4 + offset[2][0]; // end + float y4p = y4 + offset[2][1]; // point + + float invdet43 = 4f / (3f * (dx1 * dy4 - dy1 * dx4)); + + float two_pi_m_p1_m_p4x = 2*xi - x1p - x4p; + float two_pi_m_p1_m_p4y = 2*yi - y1p - y4p; + float c1 = invdet43 * (dy4 * two_pi_m_p1_m_p4x - dx4 * two_pi_m_p1_m_p4y); + float c2 = invdet43 * (dx1 * two_pi_m_p1_m_p4y - dy1 * two_pi_m_p1_m_p4x); + + float x2p, y2p, x3p, y3p; + x2p = x1p + c1*dx1; + y2p = y1p + c1*dy1; + x3p = x4p + c2*dx4; + y3p = y4p + c2*dy4; + + leftOff[0] = x1p; leftOff[1] = y1p; + leftOff[2] = x2p; leftOff[3] = y2p; + leftOff[4] = x3p; leftOff[5] = y3p; + leftOff[6] = x4p; leftOff[7] = y4p; + + x1p = x1 - offset[0][0]; y1p = y1 - offset[0][1]; + xi = xi - 2 * offset[1][0]; yi = yi - 2 * offset[1][1]; + x4p = x4 - offset[2][0]; y4p = y4 - offset[2][1]; + + two_pi_m_p1_m_p4x = 2*xi - x1p - x4p; + two_pi_m_p1_m_p4y = 2*yi - y1p - y4p; + c1 = invdet43 * (dy4 * two_pi_m_p1_m_p4x - dx4 * two_pi_m_p1_m_p4y); + c2 = invdet43 * (dx1 * two_pi_m_p1_m_p4y - dy1 * two_pi_m_p1_m_p4x); + + x2p = x1p + c1*dx1; + y2p = y1p + c1*dy1; + x3p = x4p + c2*dx4; + y3p = y4p + c2*dy4; + + rightOff[0] = x1p; rightOff[1] = y1p; + rightOff[2] = x2p; rightOff[3] = y2p; + rightOff[4] = x3p; rightOff[5] = y3p; + rightOff[6] = x4p; rightOff[7] = y4p; + return 8; + } + + // compute offset curves using bezier spline through t=0.5 (i.e. + // ComputedCurve(0.5) == IdealParallelCurve(0.5)) + // return the kind of curve in the right and left arrays. + private int computeOffsetQuad(float[] pts, final int off, + float[] leftOff, float[] rightOff) + { + final float x1 = pts[off + 0], y1 = pts[off + 1]; + final float x2 = pts[off + 2], y2 = pts[off + 3]; + final float x3 = pts[off + 4], y3 = pts[off + 5]; + + float dx3 = x3 - x2; + float dy3 = y3 - y2; + float dx1 = x2 - x1; + float dy1 = y2 - y1; + + // if p1=p2 or p3=p4 it means that the derivative at the endpoint + // vanishes, which creates problems with computeOffset. Usually + // this happens when this stroker object is trying to winden + // a curve with a cusp. What happens is that curveTo splits + // the input curve at the cusp, and passes it to this function. + // because of inaccuracies in the splitting, we consider points + // equal if they're very close to each other. + + // if p1 == p2 && p3 == p4: draw line from p1->p4, unless p1 == p4, + // in which case ignore. + final boolean p1eqp2 = within(x1,y1,x2,y2, 6 * Math.ulp(y2)); + final boolean p2eqp3 = within(x2,y2,x3,y3, 6 * Math.ulp(y3)); + if (p1eqp2 || p2eqp3) { + getLineOffsets(x1, y1, x3, y3, leftOff, rightOff); + return 4; + } + + // if p2-p1 and p4-p3 are parallel, that must mean this curve is a line + float dotsq = (dx1 * dx3 + dy1 * dy3); + dotsq = dotsq * dotsq; + float l1sq = dx1 * dx1 + dy1 * dy1, l3sq = dx3 * dx3 + dy3 * dy3; + if (Helpers.within(dotsq, l1sq * l3sq, 4 * Math.ulp(dotsq))) { + getLineOffsets(x1, y1, x3, y3, leftOff, rightOff); + return 4; + } + + // this computes the offsets at t=0, 0.5, 1, using the property that + // for any bezier curve the vectors p2-p1 and p4-p3 are parallel to + // the (dx/dt, dy/dt) vectors at the endpoints. + computeOffset(dx1, dy1, lineWidth2, offset[0]); + computeOffset(dx3, dy3, lineWidth2, offset[1]); + float x1p = x1 + offset[0][0]; // start + float y1p = y1 + offset[0][1]; // point + float x3p = x3 + offset[1][0]; // end + float y3p = y3 + offset[1][1]; // point + + computeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, leftOff, 2); + leftOff[0] = x1p; leftOff[1] = y1p; + leftOff[4] = x3p; leftOff[5] = y3p; + x1p = x1 - offset[0][0]; y1p = y1 - offset[0][1]; + x3p = x3 - offset[1][0]; y3p = y3 - offset[1][1]; + computeMiter(x1p, y1p, x1p+dx1, y1p+dy1, x3p, y3p, x3p-dx3, y3p-dy3, rightOff, 2); + rightOff[0] = x1p; rightOff[1] = y1p; + rightOff[4] = x3p; rightOff[5] = y3p; + return 6; + } + + // This is where the curve to be processed is put. We give it + // enough room to store 2 curves: one for the current subdivision, the + // other for the rest of the curve. + private float[][] middle = new float[2][8]; + private float[] lp = new float[8]; + private float[] rp = new float[8]; + private static final int MAX_N_CURVES = 11; + private float[] subdivTs = new float[MAX_N_CURVES - 1]; + + private void somethingTo(final int type) { + // need these so we can update the state at the end of this method + final float xf = middle[0][type-2], yf = middle[0][type-1]; + float dxs = middle[0][2] - middle[0][0]; + float dys = middle[0][3] - middle[0][1]; + float dxf = middle[0][type - 2] - middle[0][type - 4]; + float dyf = middle[0][type - 1] - middle[0][type - 3]; + switch(type) { + case 6: + if ((dxs == 0f && dys == 0f) || + (dxf == 0f && dyf == 0f)) { + dxs = dxf = middle[0][4] - middle[0][0]; + dys = dyf = middle[0][5] - middle[0][1]; + } + break; + case 8: + boolean p1eqp2 = (dxs == 0f && dys == 0f); + boolean p3eqp4 = (dxf == 0f && dyf == 0f); + if (p1eqp2) { + dxs = middle[0][4] - middle[0][0]; + dys = middle[0][5] - middle[0][1]; + if (dxs == 0f && dys == 0f) { + dxs = middle[0][6] - middle[0][0]; + dys = middle[0][7] - middle[0][1]; + } + } + if (p3eqp4) { + dxf = middle[0][6] - middle[0][2]; + dyf = middle[0][7] - middle[0][3]; + if (dxf == 0f && dyf == 0f) { + dxf = middle[0][6] - middle[0][0]; + dyf = middle[0][7] - middle[0][1]; + } + } + } + if (dxs == 0f && dys == 0f) { + // this happens iff the "curve" is just a point + lineTo(middle[0][0], middle[0][1]); + return; + } + // if these vectors are too small, normalize them, to avoid future + // precision problems. + if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) { + double len = Math.hypot(dxs, dys); + dxs = (float)(dxs / len); + dys = (float)(dys / len); + } + if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) { + double len = Math.hypot(dxf, dyf); + dxf = (float)(dxf / len); + dyf = (float)(dyf / len); + } + + computeOffset(dxs, dys, lineWidth2, offset[0]); + final float mx = offset[0][0]; + final float my = offset[0][1]; + drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, mx, my); + + int nSplits = findSubdivPoints(middle[0], subdivTs, type,lineWidth2); + + int kind = 0; + Iterator it = Curve.breakPtsAtTs(middle, type, subdivTs, nSplits); + while(it.hasNext()) { + float[] curCurve = it.next(); + + kind = 0; + switch (type) { + case 8: + kind = computeOffsetCubic(curCurve, 0, lp, rp); + break; + case 6: + kind = computeOffsetQuad(curCurve, 0, lp, rp); + break; + } + if (kind != 0) { + emitLineTo(lp[0], lp[1]); + switch(kind) { + case 8: + emitCurveTo(lp[0], lp[1], lp[2], lp[3], lp[4], lp[5], lp[6], lp[7], false); + emitCurveTo(rp[0], rp[1], rp[2], rp[3], rp[4], rp[5], rp[6], rp[7], true); + break; + case 6: + emitQuadTo(lp[0], lp[1], lp[2], lp[3], lp[4], lp[5], false); + emitQuadTo(rp[0], rp[1], rp[2], rp[3], rp[4], rp[5], true); + break; + case 4: + emitLineTo(lp[2], lp[3]); + emitLineTo(rp[0], rp[1], true); + break; + } + emitLineTo(rp[kind - 2], rp[kind - 1], true); + } + } + + this.cmx = (lp[kind - 2] - rp[kind - 2]) / 2; + this.cmy = (lp[kind - 1] - rp[kind - 1]) / 2; + this.cdx = dxf; + this.cdy = dyf; + this.cx0 = xf; + this.cy0 = yf; + this.prev = DRAWING_OP_TO; + } + + // finds values of t where the curve in pts should be subdivided in order + // to get good offset curves a distance of w away from the middle curve. + // Stores the points in ts, and returns how many of them there were. + private static Curve c = new Curve(); + private static int findSubdivPoints(float[] pts, float[] ts, + final int type, final float w) + { + final float x12 = pts[2] - pts[0]; + final float y12 = pts[3] - pts[1]; + // if the curve is already parallel to either axis we gain nothing + // from rotating it. + if (y12 != 0f && x12 != 0f) { + // we rotate it so that the first vector in the control polygon is + // parallel to the x-axis. This will ensure that rotated quarter + // circles won't be subdivided. + final float hypot = (float)Math.sqrt(x12 * x12 + y12 * y12); + final float cos = x12 / hypot; + final float sin = y12 / hypot; + final float x1 = cos * pts[0] + sin * pts[1]; + final float y1 = cos * pts[1] - sin * pts[0]; + final float x2 = cos * pts[2] + sin * pts[3]; + final float y2 = cos * pts[3] - sin * pts[2]; + final float x3 = cos * pts[4] + sin * pts[5]; + final float y3 = cos * pts[5] - sin * pts[4]; + switch(type) { + case 8: + final float x4 = cos * pts[6] + sin * pts[7]; + final float y4 = cos * pts[7] - sin * pts[6]; + c.set(x1, y1, x2, y2, x3, y3, x4, y4); + break; + case 6: + c.set(x1, y1, x2, y2, x3, y3); + break; + } + } else { + c.set(pts, type); + } + + int ret = 0; + // we subdivide at values of t such that the remaining rotated + // curves are monotonic in x and y. + ret += c.dxRoots(ts, ret); + ret += c.dyRoots(ts, ret); + // subdivide at inflection points. + if (type == 8) { + // quadratic curves can't have inflection points + ret += c.infPoints(ts, ret); + } + + // now we must subdivide at points where one of the offset curves will have + // a cusp. This happens at ts where the radius of curvature is equal to w. + ret += c.rootsOfROCMinusW(ts, ret, w, 0.0001f); + ret = Helpers.filterOutNotInAB(ts, 0, ret, 0.0001f, 0.9999f); + Helpers.isort(ts, 0, ret); + return ret; + } + + @Override public void curveTo(float x1, float y1, + float x2, float y2, + float x3, float y3) + { + middle[0][0] = cx0; middle[0][1] = cy0; + middle[0][2] = x1; middle[0][3] = y1; + middle[0][4] = x2; middle[0][5] = y2; + middle[0][6] = x3; middle[0][7] = y3; + somethingTo(8); + } + + @Override public long getNativeConsumer() { + throw new InternalError("Stroker doesn't use a native consumer"); + } + + @Override public void quadTo(float x1, float y1, float x2, float y2) { + middle[0][0] = cx0; middle[0][1] = cy0; + middle[0][2] = x1; middle[0][3] = y1; + middle[0][4] = x2; middle[0][5] = y2; + somethingTo(6); + } + + // a stack of polynomial curves where each curve shares endpoints with + // adjacent ones. + private static final class PolyStack { + float[] curves; + int end; + int[] curveTypes; + int numCurves; + + private static final int INIT_SIZE = 50; + + PolyStack() { + curves = new float[8 * INIT_SIZE]; + curveTypes = new int[INIT_SIZE]; + end = 0; + numCurves = 0; + } + + public boolean isEmpty() { + return numCurves == 0; + } + + private void ensureSpace(int n) { + if (end + n >= curves.length) { + int newSize = (end + n) * 2; + curves = Arrays.copyOf(curves, newSize); + } + if (numCurves >= curveTypes.length) { + int newSize = numCurves * 2; + curveTypes = Arrays.copyOf(curveTypes, newSize); + } + } + + public void pushCubic(float x0, float y0, + float x1, float y1, + float x2, float y2) + { + ensureSpace(6); + curveTypes[numCurves++] = 8; + // assert(x0 == lastX && y0 == lastY) + + // we reverse the coordinate order to make popping easier + curves[end++] = x2; curves[end++] = y2; + curves[end++] = x1; curves[end++] = y1; + curves[end++] = x0; curves[end++] = y0; + } + + public void pushQuad(float x0, float y0, + float x1, float y1) + { + ensureSpace(4); + curveTypes[numCurves++] = 6; + // assert(x0 == lastX && y0 == lastY) + curves[end++] = x1; curves[end++] = y1; + curves[end++] = x0; curves[end++] = y0; + } + + public void pushLine(float x, float y) { + ensureSpace(2); + curveTypes[numCurves++] = 4; + // assert(x0 == lastX && y0 == lastY) + curves[end++] = x; curves[end++] = y; + } + + @SuppressWarnings("unused") + public int pop(float[] pts) { + int ret = curveTypes[numCurves - 1]; + numCurves--; + end -= (ret - 2); + System.arraycopy(curves, end, pts, 0, ret - 2); + return ret; + } + + public void pop(PathConsumer2D io) { + numCurves--; + int type = curveTypes[numCurves]; + end -= (type - 2); + switch(type) { + case 8: + io.curveTo(curves[end+0], curves[end+1], + curves[end+2], curves[end+3], + curves[end+4], curves[end+5]); + break; + case 6: + io.quadTo(curves[end+0], curves[end+1], + curves[end+2], curves[end+3]); + break; + case 4: + io.lineTo(curves[end], curves[end+1]); + } + } + + @Override + public String toString() { + String ret = ""; + int nc = numCurves; + int end = this.end; + while (nc > 0) { + nc--; + int type = curveTypes[numCurves]; + end -= (type - 2); + switch(type) { + case 8: + ret += "cubic: "; + break; + case 6: + ret += "quad: "; + break; + case 4: + ret += "line: "; + break; + } + ret += Arrays.toString(Arrays.copyOfRange(curves, end, end+type-2)) + "\n"; + } + return ret; + } } } - diff --git a/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java b/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java new file mode 100644 index 00000000000..59e502cb725 --- /dev/null +++ b/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.java2d.pisces; + +import sun.awt.geom.PathConsumer2D; +import java.awt.geom.AffineTransform; + +public class TransformingPathConsumer2D { + public static PathConsumer2D + transformConsumer(PathConsumer2D out, + AffineTransform at) + { + if (at == null) { + return out; + } + float Mxx = (float) at.getScaleX(); + float Mxy = (float) at.getShearX(); + float Mxt = (float) at.getTranslateX(); + float Myx = (float) at.getShearY(); + float Myy = (float) at.getScaleY(); + float Myt = (float) at.getTranslateY(); + if (Mxy == 0f && Myx == 0f) { + if (Mxx == 1f && Myy == 1f) { + if (Mxt == 0f && Myt == 0f) { + return out; + } else { + return new TranslateFilter(out, Mxt, Myt); + } + } else { + return new ScaleFilter(out, Mxx, Myy, Mxt, Myt); + } + } else { + return new TransformFilter(out, Mxx, Mxy, Mxt, Myx, Myy, Myt); + } + } + + static class TranslateFilter implements PathConsumer2D { + PathConsumer2D out; + float tx; + float ty; + + TranslateFilter(PathConsumer2D out, + float tx, float ty) + { + this.out = out; + this.tx = tx; + this.ty = ty; + } + + public void moveTo(float x0, float y0) { + out.moveTo(x0 + tx, y0 + ty); + } + + public void lineTo(float x1, float y1) { + out.lineTo(x1 + tx, y1 + ty); + } + + public void quadTo(float x1, float y1, + float x2, float y2) + { + out.quadTo(x1 + tx, y1 + ty, + x2 + tx, y2 + ty); + } + + public void curveTo(float x1, float y1, + float x2, float y2, + float x3, float y3) + { + out.curveTo(x1 + tx, y1 + ty, + x2 + tx, y2 + ty, + x3 + tx, y3 + ty); + } + + public void closePath() { + out.closePath(); + } + + public void pathDone() { + out.pathDone(); + } + + public long getNativeConsumer() { + return 0; + } + } + + static class ScaleFilter implements PathConsumer2D { + PathConsumer2D out; + float sx; + float sy; + float tx; + float ty; + + ScaleFilter(PathConsumer2D out, + float sx, float sy, float tx, float ty) + { + this.out = out; + this.sx = sx; + this.sy = sy; + this.tx = tx; + this.ty = ty; + } + + public void moveTo(float x0, float y0) { + out.moveTo(x0 * sx + tx, y0 * sy + ty); + } + + public void lineTo(float x1, float y1) { + out.lineTo(x1 * sx + tx, y1 * sy + ty); + } + + public void quadTo(float x1, float y1, + float x2, float y2) + { + out.quadTo(x1 * sx + tx, y1 * sy + ty, + x2 * sx + tx, y2 * sy + ty); + } + + public void curveTo(float x1, float y1, + float x2, float y2, + float x3, float y3) + { + out.curveTo(x1 * sx + tx, y1 * sy + ty, + x2 * sx + tx, y2 * sy + ty, + x3 * sx + tx, y3 * sy + ty); + } + + public void closePath() { + out.closePath(); + } + + public void pathDone() { + out.pathDone(); + } + + public long getNativeConsumer() { + return 0; + } + } + + static class TransformFilter implements PathConsumer2D { + PathConsumer2D out; + float Mxx; + float Mxy; + float Mxt; + float Myx; + float Myy; + float Myt; + + TransformFilter(PathConsumer2D out, + float Mxx, float Mxy, float Mxt, + float Myx, float Myy, float Myt) + { + this.out = out; + this.Mxx = Mxx; + this.Mxy = Mxy; + this.Mxt = Mxt; + this.Myx = Myx; + this.Myy = Myy; + this.Myt = Myt; + } + + public void moveTo(float x0, float y0) { + out.moveTo(x0 * Mxx + y0 * Mxy + Mxt, + x0 * Myx + y0 * Myy + Myt); + } + + public void lineTo(float x1, float y1) { + out.lineTo(x1 * Mxx + y1 * Mxy + Mxt, + x1 * Myx + y1 * Myy + Myt); + } + + public void quadTo(float x1, float y1, + float x2, float y2) + { + out.quadTo(x1 * Mxx + y1 * Mxy + Mxt, + x1 * Myx + y1 * Myy + Myt, + x2 * Mxx + y2 * Mxy + Mxt, + x2 * Myx + y2 * Myy + Myt); + } + + public void curveTo(float x1, float y1, + float x2, float y2, + float x3, float y3) + { + out.curveTo(x1 * Mxx + y1 * Mxy + Mxt, + x1 * Myx + y1 * Myy + Myt, + x2 * Mxx + y2 * Mxy + Mxt, + x2 * Myx + y2 * Myy + Myt, + x3 * Mxx + y3 * Mxy + Mxt, + x3 * Myx + y3 * Myy + Myt); + } + + public void closePath() { + out.closePath(); + } + + public void pathDone() { + out.pathDone(); + } + + public long getNativeConsumer() { + return 0; + } + } +} From e36f1e36ebc0ca50f7b9125a22d8bd6eb4eb2c71 Mon Sep 17 00:00:00 2001 From: Keith McGuigan Date: Tue, 26 Oct 2010 14:08:49 -0400 Subject: [PATCH 161/722] 6891959: HotSpot should not throw ClassFormatError if a class has a field with '>' and/or '<' in its name Class file parser needs to look for and disallow '[' in names. Reviewed-by: coleenp, never --- .../src/share/vm/classfile/classFileParser.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index a8de5afc5b1..b86e9fa892d 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -4309,20 +4309,21 @@ int ClassFileParser::verify_legal_method_signature(symbolHandle name, symbolHand } -// Unqualified names may not contain the characters '.', ';', or '/'. -// Method names also may not contain the characters '<' or '>', unless or . -// Note that method names may not be or in this method. -// Because these names have been checked as special cases before calling this method -// in verify_legal_method_name. -bool ClassFileParser::verify_unqualified_name(char* name, unsigned int length, int type) { +// Unqualified names may not contain the characters '.', ';', '[', or '/'. +// Method names also may not contain the characters '<' or '>', unless +// or . Note that method names may not be or in this +// method. Because these names have been checked as special cases before +// calling this method in verify_legal_method_name. +bool ClassFileParser::verify_unqualified_name( + char* name, unsigned int length, int type) { jchar ch; for (char* p = name; p != name + length; ) { ch = *p; if (ch < 128) { p++; - if (ch == '.' || ch == ';') { - return false; // do not permit '.' or ';' + if (ch == '.' || ch == ';' || ch == '[' ) { + return false; // do not permit '.', ';', or '[' } if (type != LegalClass && ch == '/') { return false; // do not permit '/' unless it's class name From efaaa59c32f72e13af65be5dd62eac548f24ed04 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Tue, 26 Oct 2010 14:29:48 -0700 Subject: [PATCH 162/722] 6949587: rename "DisjointType" to "DisjunctType" Reviewed-by: mcimadamore --- ...TypeTree.java => DisjunctiveTypeTree.java} | 6 ++-- .../classes/com/sun/source/tree/Tree.java | 4 +-- .../com/sun/source/tree/TreeVisitor.java | 2 +- .../sun/source/util/SimpleTreeVisitor.java | 2 +- .../com/sun/source/util/TreeScanner.java | 4 +-- .../com/sun/tools/javac/code/Flags.java | 4 +-- .../com/sun/tools/javac/comp/Attr.java | 8 ++--- .../com/sun/tools/javac/comp/Flow.java | 6 ++-- .../classes/com/sun/tools/javac/jvm/Gen.java | 2 +- .../sun/tools/javac/parser/JavacParser.java | 2 +- .../com/sun/tools/javac/tree/JCTree.java | 30 +++++++++---------- .../com/sun/tools/javac/tree/Pretty.java | 4 +-- .../com/sun/tools/javac/tree/TreeCopier.java | 8 ++--- .../com/sun/tools/javac/tree/TreeInfo.java | 2 +- .../com/sun/tools/javac/tree/TreeMaker.java | 4 +-- .../com/sun/tools/javac/tree/TreeScanner.java | 4 +-- .../sun/tools/javac/tree/TreeTranslator.java | 4 +-- 17 files changed, 48 insertions(+), 48 deletions(-) rename langtools/src/share/classes/com/sun/source/tree/{DisjointTypeTree.java => DisjunctiveTypeTree.java} (87%) diff --git a/langtools/src/share/classes/com/sun/source/tree/DisjointTypeTree.java b/langtools/src/share/classes/com/sun/source/tree/DisjunctiveTypeTree.java similarity index 87% rename from langtools/src/share/classes/com/sun/source/tree/DisjointTypeTree.java rename to langtools/src/share/classes/com/sun/source/tree/DisjunctiveTypeTree.java index 6d122aaee48..ae8e5813845 100644 --- a/langtools/src/share/classes/com/sun/source/tree/DisjointTypeTree.java +++ b/langtools/src/share/classes/com/sun/source/tree/DisjunctiveTypeTree.java @@ -28,13 +28,13 @@ package com.sun.source.tree; import java.util.List; /** - * A tree node for a disjoint type expression in a multicatch var declaration. + * A tree node for a disjunctive type expression in a multicatch var declaration. * * * @author Maurizio Cimadamore * * @since 1.7 */ -public interface DisjointTypeTree extends Tree { - List getTypeComponents(); +public interface DisjunctiveTypeTree extends Tree { + List getTypeAlternatives(); } diff --git a/langtools/src/share/classes/com/sun/source/tree/Tree.java b/langtools/src/share/classes/com/sun/source/tree/Tree.java index 95b2d85c9e6..dd51f976e8c 100644 --- a/langtools/src/share/classes/com/sun/source/tree/Tree.java +++ b/langtools/src/share/classes/com/sun/source/tree/Tree.java @@ -234,9 +234,9 @@ public interface Tree { PARAMETERIZED_TYPE(ParameterizedTypeTree.class), /** - * Used for instances of {@link DisjointTypeTree}. + * Used for instances of {@link DisjunctiveTypeTree}. */ - DISJOINT_TYPE(DisjointTypeTree.class), + DISJUNCTIVE_TYPE(DisjunctiveTypeTree.class), /** * Used for instances of {@link TypeCastTree}. diff --git a/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java b/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java index 6aba5d310e4..ef95a9ff78e 100644 --- a/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java +++ b/langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java @@ -96,7 +96,7 @@ public interface TreeVisitor { R visitCompilationUnit(CompilationUnitTree node, P p); R visitTry(TryTree node, P p); R visitParameterizedType(ParameterizedTypeTree node, P p); - R visitDisjointType(DisjointTypeTree node, P p); + R visitDisjunctiveType(DisjunctiveTypeTree node, P p); R visitArrayType(ArrayTypeTree node, P p); R visitTypeCast(TypeCastTree node, P p); R visitPrimitiveType(PrimitiveTypeTree node, P p); diff --git a/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java b/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java index 70b3435f9c8..c2554b77985 100644 --- a/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java +++ b/langtools/src/share/classes/com/sun/source/util/SimpleTreeVisitor.java @@ -228,7 +228,7 @@ public class SimpleTreeVisitor implements TreeVisitor { return defaultAction(node, p); } - public R visitDisjointType(DisjointTypeTree node, P p) { + public R visitDisjunctiveType(DisjunctiveTypeTree node, P p) { return defaultAction(node, p); } diff --git a/langtools/src/share/classes/com/sun/source/util/TreeScanner.java b/langtools/src/share/classes/com/sun/source/util/TreeScanner.java index 4b537ed4614..ccbce17cca5 100644 --- a/langtools/src/share/classes/com/sun/source/util/TreeScanner.java +++ b/langtools/src/share/classes/com/sun/source/util/TreeScanner.java @@ -356,8 +356,8 @@ public class TreeScanner implements TreeVisitor { return r; } - public R visitDisjointType(DisjointTypeTree node, P p) { - return scan(node.getTypeComponents(), p); + public R visitDisjunctiveType(DisjunctiveTypeTree node, P p) { + return scan(node.getTypeAlternatives(), p); } public R visitTypeParameter(TypeParameterTree node, P p) { diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java index 48e6a86f29d..5b0b8bad260 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java @@ -231,9 +231,9 @@ public class Flags { public static final long PROPRIETARY = 1L<<38; /** - * Flag that marks a disjoint var in a multi-catch clause + * Flag that marks a disjunction var in a multi-catch clause */ - public static final long DISJOINT = 1L<<39; + public static final long DISJUNCTION = 1L<<39; /** * Flag that marks a signature-polymorphic invoke method. diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java index 3319b7f7ba1..e0ba0061537 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java @@ -1053,7 +1053,7 @@ public class Attr extends JCTree.Visitor { if ((c.param.sym.flags() & FINAL) == 0) { log.error(c.param.pos(), "multicatch.param.must.be.final", c.param.sym); } - c.param.sym.flags_field = c.param.sym.flags() | DISJOINT; + c.param.sym.flags_field = c.param.sym.flags() | DISJUNCTION; } if (c.param.sym.kind == Kinds.VAR) { c.param.sym.setData(ElementKind.EXCEPTION_PARAMETER); @@ -2839,9 +2839,9 @@ public class Attr extends JCTree.Visitor { result = check(tree, owntype, TYP, pkind, pt); } - public void visitTypeDisjoint(JCTypeDisjoint tree) { - List componentTypes = attribTypes(tree.components, env); - tree.type = result = check(tree, types.lub(componentTypes), TYP, pkind, pt); + public void visitTypeDisjunction(JCTypeDisjunction tree) { + List alternatives = attribTypes(tree.alternatives, env); + tree.type = result = check(tree, types.lub(alternatives), TYP, pkind, pt); } public void visitTypeParameter(JCTypeParameter tree) { diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java index ea97cac9dbc..fad6dad34af 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java @@ -371,7 +371,7 @@ public class Flow extends TreeScanner { if (sym.adr >= firstadr && trackable(sym)) { if ((sym.flags() & FINAL) != 0) { if ((sym.flags() & PARAMETER) != 0) { - if ((sym.flags() & DISJOINT) != 0) { //multi-catch parameter + if ((sym.flags() & DISJUNCTION) != 0) { //multi-catch parameter log.error(pos, "multicatch.parameter.may.not.be.assigned", sym); } @@ -983,7 +983,7 @@ public class Flow extends TreeScanner { thrown = List.nil(); for (List l = tree.catchers; l.nonEmpty(); l = l.tail) { List subClauses = TreeInfo.isMultiCatch(l.head) ? - ((JCTypeDisjoint)l.head.param.vartype).components : + ((JCTypeDisjunction)l.head.param.vartype).alternatives : List.of(l.head.param.vartype); for (JCExpression ct : subClauses) { caught = chk.incl(ct.type, caught); @@ -1049,7 +1049,7 @@ public class Flow extends TreeScanner { alive = true; JCVariableDecl param = l.head.param; List subClauses = TreeInfo.isMultiCatch(l.head) ? - ((JCTypeDisjoint)l.head.param.vartype).components : + ((JCTypeDisjunction)l.head.param.vartype).alternatives : List.of(l.head.param.vartype); List ctypes = List.nil(); List rethrownTypes = chk.diff(thrownInTry, caughtInTry); diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java index 572380a49e1..f676edd6a69 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java +++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java @@ -1456,7 +1456,7 @@ public class Gen extends JCTree.Visitor { List gaps) { if (startpc != endpc) { List subClauses = TreeInfo.isMultiCatch(tree) ? - ((JCTypeDisjoint)tree.param.vartype).components : + ((JCTypeDisjunction)tree.param.vartype).alternatives : List.of(tree.param.vartype); while (gaps.nonEmpty()) { for (JCExpression subCatch : subClauses) { diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java index ab123e1fae5..30fcbe3d0b6 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -1827,7 +1827,7 @@ public class JavacParser implements Parser { JCModifiers mods = optFinal(Flags.PARAMETER); List catchTypes = catchTypes(); JCExpression paramType = catchTypes.size() > 1 ? - toP(F.at(catchTypes.head.getStartPosition()).TypeDisjoint(catchTypes)) : + toP(F.at(catchTypes.head.getStartPosition()).TypeDisjunction(catchTypes)) : catchTypes.head; JCVariableDecl formal = variableDeclaratorId(mods, paramType); accept(RPAREN); diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java index 96ef9ebfd1e..114fe76293c 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java @@ -236,13 +236,13 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition { */ public static final int TYPEAPPLY = TYPEARRAY + 1; - /** Disjunctive types, of type TypeDisjoint. + /** Disjunction types, of type TypeDisjunction */ - public static final int TYPEDISJOINT = TYPEAPPLY + 1; + public static final int TYPEDISJUNCTION = TYPEAPPLY + 1; /** Formal type parameters, of type TypeParameter. */ - public static final int TYPEPARAMETER = TYPEDISJOINT + 1; + public static final int TYPEPARAMETER = TYPEDISJUNCTION + 1; /** Type argument. */ @@ -1888,30 +1888,30 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition { } /** - * A disjoint type, T1 | T2 | ... Tn (used in multicatch statements) + * A disjunction type, T1 | T2 | ... Tn (used in multicatch statements) */ - public static class JCTypeDisjoint extends JCExpression implements DisjointTypeTree { + public static class JCTypeDisjunction extends JCExpression implements DisjunctiveTypeTree { - public List components; + public List alternatives; - protected JCTypeDisjoint(List components) { - this.components = components; + protected JCTypeDisjunction(List components) { + this.alternatives = components; } @Override - public void accept(Visitor v) { v.visitTypeDisjoint(this); } + public void accept(Visitor v) { v.visitTypeDisjunction(this); } - public Kind getKind() { return Kind.DISJOINT_TYPE; } + public Kind getKind() { return Kind.DISJUNCTIVE_TYPE; } - public List getTypeComponents() { - return components; + public List getTypeAlternatives() { + return alternatives; } @Override public R accept(TreeVisitor v, D d) { - return v.visitDisjointType(this, d); + return v.visitDisjunctiveType(this, d); } @Override public int getTag() { - return TYPEDISJOINT; + return TYPEDISJUNCTION; } } @@ -2284,7 +2284,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition { public void visitTypeIdent(JCPrimitiveTypeTree that) { visitTree(that); } public void visitTypeArray(JCArrayTypeTree that) { visitTree(that); } public void visitTypeApply(JCTypeApply that) { visitTree(that); } - public void visitTypeDisjoint(JCTypeDisjoint that) { visitTree(that); } + public void visitTypeDisjunction(JCTypeDisjunction that) { visitTree(that); } public void visitTypeParameter(JCTypeParameter that) { visitTree(that); } public void visitWildcard(JCWildcard that) { visitTree(that); } public void visitTypeBoundKind(TypeBoundKind that) { visitTree(that); } diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java index 66f6e56104d..2f2d9ba30f2 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java @@ -1195,9 +1195,9 @@ public class Pretty extends JCTree.Visitor { } } - public void visitTypeDisjoint(JCTypeDisjoint tree) { + public void visitTypeDisjunction(JCTypeDisjunction tree) { try { - printExprs(tree.components, " | "); + printExprs(tree.alternatives, " | "); } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java index 63b9ae06130..077e3fec390 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java @@ -346,10 +346,10 @@ public class TreeCopier

    implements TreeVisitor { return M.at(t.pos).TypeApply(clazz, arguments); } - public JCTree visitDisjointType(DisjointTypeTree node, P p) { - JCTypeDisjoint t = (JCTypeDisjoint) node; - List components = copy(t.components, p); - return M.at(t.pos).TypeDisjoint(components); + public JCTree visitDisjunctiveType(DisjunctiveTypeTree node, P p) { + JCTypeDisjunction t = (JCTypeDisjunction) node; + List components = copy(t.alternatives, p); + return M.at(t.pos).TypeDisjunction(components); } public JCTree visitArrayType(ArrayTypeTree node, P p) { diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java index d522dc8f256..eda05d58379 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java @@ -119,7 +119,7 @@ public class TreeInfo { } public static boolean isMultiCatch(JCCatch catchClause) { - return catchClause.param.vartype.getTag() == JCTree.TYPEDISJOINT; + return catchClause.param.vartype.getTag() == JCTree.TYPEDISJUNCTION; } /** Is statement an initializer for a synthetic field? diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java index 6ca4e0d41d0..b5b7c220cff 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java @@ -451,8 +451,8 @@ public class TreeMaker implements JCTree.Factory { return tree; } - public JCTypeDisjoint TypeDisjoint(List components) { - JCTypeDisjoint tree = new JCTypeDisjoint(components); + public JCTypeDisjunction TypeDisjunction(List components) { + JCTypeDisjunction tree = new JCTypeDisjunction(components); tree.pos = pos; return tree; } diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java index 53eb5118fb3..0d6e8e3bbc0 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java @@ -276,8 +276,8 @@ public class TreeScanner extends Visitor { scan(tree.arguments); } - public void visitTypeDisjoint(JCTypeDisjoint tree) { - scan(tree.components); + public void visitTypeDisjunction(JCTypeDisjunction tree) { + scan(tree.alternatives); } public void visitTypeParameter(JCTypeParameter tree) { diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java index ffb219b6a63..115ac06a4eb 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java +++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java @@ -368,8 +368,8 @@ public class TreeTranslator extends JCTree.Visitor { result = tree; } - public void visitTypeDisjoint(JCTypeDisjoint tree) { - tree.components = translate(tree.components); + public void visitTypeDisjunction(JCTypeDisjunction tree) { + tree.alternatives = translate(tree.alternatives); result = tree; } From 39ed27a831fdba5539b7f24015811236d1a80abc Mon Sep 17 00:00:00 2001 From: Keith McGuigan Date: Tue, 26 Oct 2010 18:41:02 -0400 Subject: [PATCH 163/722] 6541462: outdated specification for CCC 6339875 Add documentation to java.lang.ClassLoader.defineClass() Reviewed-by: dcubed, darcy --- jdk/src/share/classes/java/lang/ClassLoader.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jdk/src/share/classes/java/lang/ClassLoader.java b/jdk/src/share/classes/java/lang/ClassLoader.java index ce7f0e655e8..d0cfb072846 100644 --- a/jdk/src/share/classes/java/lang/ClassLoader.java +++ b/jdk/src/share/classes/java/lang/ClassLoader.java @@ -553,6 +553,13 @@ public abstract class ClassLoader { * If either off or len is negative, or if * off+len is greater than b.length. * + * @throws SecurityException + * If an attempt is made to add this class to a package that + * contains classes that were signed by a different set of + * certificates than this class, or if an attempt is made + * to define a class in a package with a fully-qualified name + * that starts with "{@code java.}". + * * @see #loadClass(String, boolean) * @see #resolveClass(Class) * From 596507e5d3ebcc64b5b0260050b24e6c0e3437dc Mon Sep 17 00:00:00 2001 From: Keith McGuigan Date: Wed, 27 Oct 2010 12:53:36 -0400 Subject: [PATCH 164/722] 6865028: Illegal instructions passing verification prior to 'invokespecial Object.' Update verifier to conform to spec re: reference vs. 'Object' types Reviewed-by: dholmes, coleenp --- hotspot/src/share/vm/classfile/verifier.cpp | 17 ++++++++--------- hotspot/src/share/vm/classfile/verifier.hpp | 2 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hotspot/src/share/vm/classfile/verifier.cpp b/hotspot/src/share/vm/classfile/verifier.cpp index 6f2fd206381..108793b2cc6 100644 --- a/hotspot/src/share/vm/classfile/verifier.cpp +++ b/hotspot/src/share/vm/classfile/verifier.cpp @@ -247,6 +247,10 @@ ClassVerifier::ClassVerifier( ClassVerifier::~ClassVerifier() { } +VerificationType ClassVerifier::object_type() const { + return VerificationType::reference_type(vmSymbols::java_lang_Object()); +} + void ClassVerifier::verify_class(TRAPS) { if (_verify_verbose) { tty->print_cr("Verifying class %s with new format", @@ -726,8 +730,7 @@ void ClassVerifier::verify_method(methodHandle m, TRAPS) { } no_control_flow = false; break; case Bytecodes::_aastore : - type = current_frame.pop_stack( - VerificationType::reference_check(), CHECK_VERIFY(this)); + type = current_frame.pop_stack(object_type(), CHECK_VERIFY(this)); type2 = current_frame.pop_stack( VerificationType::integer_type(), CHECK_VERIFY(this)); atype = current_frame.pop_stack( @@ -1232,8 +1235,7 @@ void ClassVerifier::verify_method(methodHandle m, TRAPS) { { index = bcs.get_index_u2(); verify_cp_class_type(index, cp, CHECK_VERIFY(this)); - current_frame.pop_stack( - VerificationType::reference_check(), CHECK_VERIFY(this)); + current_frame.pop_stack(object_type(), CHECK_VERIFY(this)); VerificationType klass_type = cp_index_to_type( index, cp, CHECK_VERIFY(this)); current_frame.push_stack(klass_type, CHECK_VERIFY(this)); @@ -1242,8 +1244,7 @@ void ClassVerifier::verify_method(methodHandle m, TRAPS) { case Bytecodes::_instanceof : { index = bcs.get_index_u2(); verify_cp_class_type(index, cp, CHECK_VERIFY(this)); - current_frame.pop_stack( - VerificationType::reference_check(), CHECK_VERIFY(this)); + current_frame.pop_stack(object_type(), CHECK_VERIFY(this)); current_frame.push_stack( VerificationType::integer_type(), CHECK_VERIFY(this)); no_control_flow = false; break; @@ -1610,9 +1611,7 @@ void ClassVerifier::verify_ldc( verify_cp_type(index, cp, types, CHECK_VERIFY(this)); } if (tag.is_string() && cp->is_pseudo_string_at(index)) { - current_frame->push_stack( - VerificationType::reference_type( - vmSymbols::java_lang_Object()), CHECK_VERIFY(this)); + current_frame->push_stack(object_type(), CHECK_VERIFY(this)); } else if (tag.is_string() || tag.is_unresolved_string()) { current_frame->push_stack( VerificationType::reference_type( diff --git a/hotspot/src/share/vm/classfile/verifier.hpp b/hotspot/src/share/vm/classfile/verifier.hpp index de6487ffc08..7ffe669ce97 100644 --- a/hotspot/src/share/vm/classfile/verifier.hpp +++ b/hotspot/src/share/vm/classfile/verifier.hpp @@ -157,6 +157,8 @@ class ClassVerifier : public StackObj { bool name_in_supers(symbolOop ref_name, instanceKlassHandle current); + VerificationType object_type() const; + instanceKlassHandle _klass; // the class being verified methodHandle _method; // current method being verified VerificationType _this_type; // the verification type of the current class From 2c65efd85ce5c7a12e072fa0c9363a07b87cf8cd Mon Sep 17 00:00:00 2001 From: Abhijit Saha Date: Wed, 27 Oct 2010 13:44:29 -0700 Subject: [PATCH 165/722] 6993206: Removing non-functional tests Reviewed-by: mchung --- jdk/test/java/io/Serializable/6559775/README | 29 ------- .../io/Serializable/6559775/SerialRace.java | 86 ------------------- .../io/Serializable/6559775/SerialVictim.java | 31 ------- .../io/Serializable/6559775/Test6559775.sh | 79 ----------------- .../java/io/Serializable/6966692/Attack.java | 34 -------- jdk/test/java/io/Serializable/6966692/README | 23 ----- .../io/Serializable/6966692/Test6966692.sh | 79 ----------------- .../java/io/Serializable/6966692/Victim.java | 35 -------- 8 files changed, 396 deletions(-) delete mode 100644 jdk/test/java/io/Serializable/6559775/README delete mode 100644 jdk/test/java/io/Serializable/6559775/SerialRace.java delete mode 100644 jdk/test/java/io/Serializable/6559775/SerialVictim.java delete mode 100644 jdk/test/java/io/Serializable/6559775/Test6559775.sh delete mode 100644 jdk/test/java/io/Serializable/6966692/Attack.java delete mode 100644 jdk/test/java/io/Serializable/6966692/README delete mode 100644 jdk/test/java/io/Serializable/6966692/Test6966692.sh delete mode 100644 jdk/test/java/io/Serializable/6966692/Victim.java diff --git a/jdk/test/java/io/Serializable/6559775/README b/jdk/test/java/io/Serializable/6559775/README deleted file mode 100644 index c7a4a9ffe25..00000000000 --- a/jdk/test/java/io/Serializable/6559775/README +++ /dev/null @@ -1,29 +0,0 @@ -The testcase works well on dual core machines. -The below output indicates a successful fix: - -Exception in thread "Thread-0" java.lang.NullPointerException - at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:476) - at SerialRace$1.run(SerialRace.java:33) - at java.lang.Thread.run(Thread.java:595) - - -When the vulnerability exists, the output of the tescase is something like this: -Available processors: 2 -Iteration 1 -java.io.NotActiveException: not in readObject invocation or fields already read - at java.io.ObjectInputStream$CallbackContext.checkAndSetUsed(ObjectInputStream.java:3437) - at java.io.ObjectInputStream$CallbackContext.getObj(ObjectInputStream.java:3427) - at java.io.ObjectInputStream.readFields(ObjectInputStream.java:514) - at SerialVictim.readObject(SerialVictim.java:19) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) - at java.lang.reflect.Method.invoke(Method.java:585) - at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) - at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) - at SerialRace.main(SerialRace.java:65) -Victim: ? -Victim: $ diff --git a/jdk/test/java/io/Serializable/6559775/SerialRace.java b/jdk/test/java/io/Serializable/6559775/SerialRace.java deleted file mode 100644 index 2d4df6a0218..00000000000 --- a/jdk/test/java/io/Serializable/6559775/SerialRace.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * @test %W% %E% - * @bug 6559775 - * @summary Race allows defaultReadObject to be invoked instead of readFields during deserialization - * @run shell Test6559775.sh -*/ - -import java.io.*; - -public class SerialRace { - public static void main(String[] args) throws Exception { - System.err.println( - "Available processors: "+ - Runtime.getRuntime().availableProcessors() - ); - - final int perStream = 10000; - - // Construct attack data. - ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); - { - ObjectOutputStream out = new ObjectOutputStream(byteOut); - char[] value = new char[] { '?' }; - out.writeObject(value); - for (int i=0; i test.out 2>&1 - -cat test.out - -STATUS=0 - -egrep "java.io.NotActiveException|not in readObject invocation or fields already read|^Victim" test.out - -if [ $? = 0 ] -then - STATUS=1 -else - grep "java.lang.NullPointerException" test.out - - if [ $? != 0 ]; then - STATUS=1 - fi -fi - -exit $STATUS diff --git a/jdk/test/java/io/Serializable/6966692/Attack.java b/jdk/test/java/io/Serializable/6966692/Attack.java deleted file mode 100644 index 9a408b20d4e..00000000000 --- a/jdk/test/java/io/Serializable/6966692/Attack.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * @test - * @bug 6966692 - * @summary defaultReadObject can set a field multiple times - * @run shell Test6966692.sh -*/ - -import java.io.*; - -public class Attack { - public static void main(String[] args) throws Exception { - attack(setup()); - } - /** Returned data has Victim with two aaaa fields. */ - private static byte[] setup() throws Exception { - Victim victim = new Victim(); - ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(byteOut); - out.writeObject(victim); - out.close(); - byte[] data = byteOut.toByteArray(); - String str = new String(data, 0); // hibyte is 0 - str = str.replaceAll("bbbb", "aaaa"); - str.getBytes(0, data.length, data, 0); // ignore hibyte - return data; - } - private static void attack(byte[] data) throws Exception { - ObjectInputStream in = new ObjectInputStream( - new ByteArrayInputStream(data) - ); - Victim victim = (Victim)in.readObject(); - System.out.println(victim+" "+victim.aaaa); - } -} diff --git a/jdk/test/java/io/Serializable/6966692/README b/jdk/test/java/io/Serializable/6966692/README deleted file mode 100644 index f4448688391..00000000000 --- a/jdk/test/java/io/Serializable/6966692/README +++ /dev/null @@ -1,23 +0,0 @@ -Testcase shows default deserialisation of the Victim having two values for the same field. - -Probably requires dual core to run successfully. - -Reading thread is warmed up so that it can easily win the race for the demonstration, but this means we need to make the field volatile. - -Typical output: - -Victim@1551f60 BBBB -Victim@1551f60 AAAA - -The output when its fixed is, -Victim@1975b59 AAAA -Victim@1975b59 AAAA - The value is retained - -and when it is not fixed, it shows something like -Victim@173a10f AAAA -Victim@173a10f BBBB - the value of the object gets set again and hence is different. This is a bug - -Look at the -AAAA AAAA -and -AAAA BBBB diff --git a/jdk/test/java/io/Serializable/6966692/Test6966692.sh b/jdk/test/java/io/Serializable/6966692/Test6966692.sh deleted file mode 100644 index 326f24684ed..00000000000 --- a/jdk/test/java/io/Serializable/6966692/Test6966692.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -if [ "${TESTSRC}" = "" ] -then TESTSRC=. -fi - -if [ "${TESTJAVA}" = "" ] -then - PARENT=`dirname \`which java\`` - TESTJAVA=`dirname ${PARENT}` - echo "TESTJAVA not set, selecting " ${TESTJAVA} - echo "If this is incorrect, try setting the variable manually." -fi - -if [ "${TESTCLASSES}" = "" ] -then - echo "TESTCLASSES not set. Test cannot execute. Failed." - exit 1 -fi - -BIT_FLAG="" - -# set platform-dependent variables -OS=`uname -s` -case "$OS" in - SunOS | Linux ) - NULL=/dev/null - PS=":" - FS="/" - ## for solaris, linux it's HOME - FILE_LOCATION=$HOME - if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] - then - BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` - fi - ;; - Windows_* ) - NULL=NUL - PS=";" - FS="\\" - ;; - * ) - echo "Unrecognized system!" - exit 1; - ;; -esac - -JEMMYPATH=${CPAPPEND} -CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH - -THIS_DIR=`pwd` - -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version - -cp ${TESTSRC}${FS}*.java . -chmod 777 *.java - -${TESTJAVA}${FS}bin${FS}javac *.java - -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} Attack > test.out 2>&1 - -cat test.out - -STATUS=0 - -egrep "^Victim.*BBBB.*AAAA|^Victim.*AAAA.*BBBB" test.out - -if [ $? = 0 ] -then - STATUS=1 -else - egrep "^Victim.*BBBB.*BBBB|^Victim.*AAAA.*AAAA" test.out - - if [ $? != 0 ]; then - STATUS=1 - fi -fi - -exit $STATUS diff --git a/jdk/test/java/io/Serializable/6966692/Victim.java b/jdk/test/java/io/Serializable/6966692/Victim.java deleted file mode 100644 index f26276e3a66..00000000000 --- a/jdk/test/java/io/Serializable/6966692/Victim.java +++ /dev/null @@ -1,35 +0,0 @@ -import java.io.*; - -public class Victim implements Serializable { - public volatile Object aaaa = "AAAA"; // must be volatile... - private final Object aabb = new Show(this); - public Object bbbb = "BBBB"; -} -class Show implements Serializable { - private final Victim victim; - public Show(Victim victim) { - this.victim = victim; - } - private void readObject(java.io.ObjectInputStream in) - throws IOException, ClassNotFoundException - { - in.defaultReadObject(); - Thread thread = new Thread(new Runnable() { public void run() { - for (;;) { - Object a = victim.aaaa; - if (a != null) { - System.err.println(victim+" "+a); - break; - } - } - }}); - thread.start(); - - // Make sure we are running compiled whilst serialisation is done interpreted. - try { - Thread.sleep(1000); - } catch (java.lang.InterruptedException exc) { - Thread.currentThread().interrupt(); - } - } -} From 336fbd6d7fc847f114b0ef4537af3f8cdd4456db Mon Sep 17 00:00:00 2001 From: Christian Thalinger Date: Thu, 28 Oct 2010 00:48:18 -0700 Subject: [PATCH 166/722] 6994630: java/lang/instrument/IsModifiableClassAgent.java fails with -XX:+EnableInvokeDynamic The logic of ClassFileParser::java_dyn_MethodHandle_fix_pre needs to take care of an already changed vmentry signature. Reviewed-by: never, jrose --- .../share/vm/classfile/classFileParser.cpp | 68 ++++++++----------- .../share/vm/classfile/classFileParser.hpp | 4 +- 2 files changed, 32 insertions(+), 40 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index a8de5afc5b1..7a754861778 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2505,18 +2505,6 @@ void ClassFileParser::java_lang_ref_Reference_fix_pre(typeArrayHandle* fields_pt // the check for the "discovered" field should issue a warning if // the field is not found. For 1.6 this code should be issue a // fatal error if the "discovered" field is not found. - // - // Increment fac.nonstatic_oop_count so that the start of the - // next type of non-static oops leaves room for the fake oop. - // Do not increment next_nonstatic_oop_offset so that the - // fake oop is place after the java.lang.ref.Reference oop - // fields. - // - // Check the fields in java.lang.ref.Reference for the "discovered" - // field. If it is not present, artifically create a field for it. - // This allows this VM to run on early JDK where the field is not - // present. - // // Increment fac.nonstatic_oop_count so that the start of the // next type of non-static oops leaves room for the fake oop. @@ -2663,7 +2651,7 @@ void ClassFileParser::java_lang_Class_fix_post(int* next_nonstatic_oop_offset_pt // Force MethodHandle.vmentry to be an unmanaged pointer. // There is no way for a classfile to express this, so we must help it. void ClassFileParser::java_dyn_MethodHandle_fix_pre(constantPoolHandle cp, - typeArrayHandle* fields_ptr, + typeArrayHandle fields, FieldAllocationCount *fac_ptr, TRAPS) { // Add fake fields for java.dyn.MethodHandle instances @@ -2687,41 +2675,45 @@ void ClassFileParser::java_dyn_MethodHandle_fix_pre(constantPoolHandle cp, THROW_MSG(vmSymbols::java_lang_VirtualMachineError(), "missing I or J signature (for vmentry) in java.dyn.MethodHandle"); + // Find vmentry field and change the signature. bool found_vmentry = false; - - const int n = (*fields_ptr)()->length(); - for (int i = 0; i < n; i += instanceKlass::next_offset) { - int name_index = (*fields_ptr)->ushort_at(i + instanceKlass::name_index_offset); - int sig_index = (*fields_ptr)->ushort_at(i + instanceKlass::signature_index_offset); - int acc_flags = (*fields_ptr)->ushort_at(i + instanceKlass::access_flags_offset); + for (int i = 0; i < fields->length(); i += instanceKlass::next_offset) { + int name_index = fields->ushort_at(i + instanceKlass::name_index_offset); + int sig_index = fields->ushort_at(i + instanceKlass::signature_index_offset); + int acc_flags = fields->ushort_at(i + instanceKlass::access_flags_offset); symbolOop f_name = cp->symbol_at(name_index); symbolOop f_sig = cp->symbol_at(sig_index); - if (f_sig == vmSymbols::byte_signature() && - f_name == vmSymbols::vmentry_name() && - (acc_flags & JVM_ACC_STATIC) == 0) { - // Adjust the field type from byte to an unmanaged pointer. - assert(fac_ptr->nonstatic_byte_count > 0, ""); - fac_ptr->nonstatic_byte_count -= 1; - (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, word_sig_index); - assert(wordSize == longSize || wordSize == jintSize, "ILP32 or LP64"); - if (wordSize == longSize) fac_ptr->nonstatic_double_count += 1; - else fac_ptr->nonstatic_word_count += 1; + if (f_name == vmSymbols::vmentry_name() && (acc_flags & JVM_ACC_STATIC) == 0) { + if (f_sig == vmSymbols::machine_word_signature()) { + // If the signature of vmentry is already changed, we're done. + found_vmentry = true; + break; + } + else if (f_sig == vmSymbols::byte_signature()) { + // Adjust the field type from byte to an unmanaged pointer. + assert(fac_ptr->nonstatic_byte_count > 0, ""); + fac_ptr->nonstatic_byte_count -= 1; - FieldAllocationType atype = (FieldAllocationType) (*fields_ptr)->ushort_at(i + instanceKlass::low_offset); - assert(atype == NONSTATIC_BYTE, ""); - FieldAllocationType new_atype = (wordSize == longSize) ? NONSTATIC_DOUBLE : NONSTATIC_WORD; - (*fields_ptr)->ushort_at_put(i + instanceKlass::low_offset, new_atype); + fields->ushort_at_put(i + instanceKlass::signature_index_offset, word_sig_index); + assert(wordSize == longSize || wordSize == jintSize, "ILP32 or LP64"); + if (wordSize == longSize) fac_ptr->nonstatic_double_count += 1; + else fac_ptr->nonstatic_word_count += 1; - found_vmentry = true; - break; + FieldAllocationType atype = (FieldAllocationType) fields->ushort_at(i + instanceKlass::low_offset); + assert(atype == NONSTATIC_BYTE, ""); + FieldAllocationType new_atype = (wordSize == longSize) ? NONSTATIC_DOUBLE : NONSTATIC_WORD; + fields->ushort_at_put(i + instanceKlass::low_offset, new_atype); + + found_vmentry = true; + break; + } } } if (!found_vmentry) THROW_MSG(vmSymbols::java_lang_VirtualMachineError(), "missing vmentry byte field in java.dyn.MethodHandle"); - } @@ -3082,7 +3074,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name, // adjust the vmentry field declaration in java.dyn.MethodHandle if (EnableMethodHandles && class_name() == vmSymbols::sun_dyn_MethodHandleImpl() && class_loader.is_null()) { - java_dyn_MethodHandle_fix_pre(cp, &fields, &fac, CHECK_(nullHandle)); + java_dyn_MethodHandle_fix_pre(cp, fields, &fac, CHECK_(nullHandle)); } // Add a fake "discovered" field if it is not present diff --git a/hotspot/src/share/vm/classfile/classFileParser.hpp b/hotspot/src/share/vm/classfile/classFileParser.hpp index 6bb45809303..40a0a8de2df 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.hpp +++ b/hotspot/src/share/vm/classfile/classFileParser.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -151,7 +151,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC { // Adjust the field allocation counts for java.dyn.MethodHandle to add // a fake address (void*) field. void java_dyn_MethodHandle_fix_pre(constantPoolHandle cp, - typeArrayHandle* fields_ptr, + typeArrayHandle fields, FieldAllocationCount *fac_ptr, TRAPS); // Format checker methods From d2ef113186a0d946e9caf3e025b094fe9e856b07 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Thu, 28 Oct 2010 21:14:44 +0800 Subject: [PATCH 167/722] 6950546: "ktab -d name etype" to "ktab -d name [-e etype] [kvno | all | old]" 6984764: kerberos fails if service side keytab is generated using JDK ktab Reviewed-by: valeriep --- .../security/krb5/internal/ktab/KeyTab.java | 224 ++++++------- .../security/krb5/internal/tools/Ktab.java | 303 +++++++++++------- jdk/test/sun/security/krb5/auto/KDC.java | 2 +- .../sun/security/krb5/tools/KtabCheck.java | 59 ++++ jdk/test/sun/security/krb5/tools/ktcheck.sh | 94 ++++++ .../sun/security/krb5/tools/onlythree.conf | 9 + 6 files changed, 450 insertions(+), 241 deletions(-) create mode 100644 jdk/test/sun/security/krb5/tools/KtabCheck.java create mode 100644 jdk/test/sun/security/krb5/tools/ktcheck.sh create mode 100644 jdk/test/sun/security/krb5/tools/onlythree.conf diff --git a/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java b/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java index 623d6252bcf..e0624e4db03 100644 --- a/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java +++ b/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java @@ -34,7 +34,6 @@ package sun.security.krb5.internal.ktab; import sun.security.krb5.*; import sun.security.krb5.internal.*; import sun.security.krb5.internal.crypto.*; -import java.util.Vector; import java.util.ArrayList; import java.util.Arrays; import java.io.IOException; @@ -42,7 +41,10 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.File; import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; import java.util.StringTokenizer; +import java.util.Vector; /** * This class represents key table. The key table functions deal with storing @@ -239,23 +241,22 @@ public class KeyTab implements KeyTabConstants { EncryptionKey key; int size = entries.size(); ArrayList keys = new ArrayList (size); - if (entries != null) { - for (int i = size-1; i >= 0; i--) { - entry = entries.elementAt(i); - if (entry.service.match(service)) { - if (EType.isSupported(entry.keyType)) { - key = new EncryptionKey(entry.keyblock, - entry.keyType, - new Integer(entry.keyVersion)); - keys.add(key); - if (DEBUG) { - System.out.println("Added key: " + entry.keyType + - "version: " + entry.keyVersion); - } - } else if (DEBUG) { - System.out.println("Found unsupported keytype (" + - entry.keyType + ") for " + service); + + for (int i = size-1; i >= 0; i--) { + entry = entries.elementAt(i); + if (entry.service.match(service)) { + if (EType.isSupported(entry.keyType)) { + key = new EncryptionKey(entry.keyblock, + entry.keyType, + new Integer(entry.keyVersion)); + keys.add(key); + if (DEBUG) { + System.out.println("Added key: " + entry.keyType + + "version: " + entry.keyVersion); } + } else if (DEBUG) { + System.out.println("Found unsupported keytype (" + + entry.keyType + ") for " + service); } } } @@ -313,16 +314,14 @@ public class KeyTab implements KeyTabConstants { */ public boolean findServiceEntry(PrincipalName service) { KeyTabEntry entry; - if (entries != null) { - for (int i = 0; i < entries.size(); i++) { - entry = entries.elementAt(i); - if (entry.service.match(service)) { - if (EType.isSupported(entry.keyType)) { - return true; - } else if (DEBUG) { - System.out.println("Found unsupported keytype (" + - entry.keyType + ") for " + service); - } + for (int i = 0; i < entries.size(); i++) { + entry = entries.elementAt(i); + if (entry.service.match(service)) { + if (EType.isSupported(entry.keyType)) { + return true; + } else if (DEBUG) { + System.out.println("Found unsupported keytype (" + + entry.keyType + ") for " + service); } } } @@ -337,78 +336,45 @@ public class KeyTab implements KeyTabConstants { * Adds a new entry in the key table. * @param service the service which will have a new entry in the key table. * @param psswd the password which generates the key. + * @param kvno the kvno to use, -1 means automatic increasing + * @param append false if entries with old kvno would be removed. + * Note: if kvno is not -1, entries with the same kvno are always removed */ - public void addEntry(PrincipalName service, char[] psswd) - throws KrbException { + public void addEntry(PrincipalName service, char[] psswd, + int kvno, boolean append) throws KrbException { EncryptionKey[] encKeys = EncryptionKey.acquireSecretKeys( psswd, service.getSalt()); - for (int i = 0; encKeys != null && i < encKeys.length; i++) { - int keyType = encKeys[i].getEType(); - byte[] keyValue = encKeys[i].getBytes(); - int result = retrieveEntry(service, keyType); - int kvno = 1; - if (result != -1) { - KeyTabEntry oldEntry = entries.elementAt(result); - kvno = oldEntry.keyVersion; - entries.removeElementAt(result); - kvno += 1; - } else - kvno = 1; + // There should be only one maximum KVNO value for all etypes, so that + // all added keys can have the same KVNO. - KeyTabEntry newEntry = new KeyTabEntry(service, - service.getRealm(), - new KerberosTime(System.currentTimeMillis()), - kvno, keyType, keyValue); - if (entries == null) - entries = new Vector (); - entries.addElement(newEntry); - } - } - - /** - * Only used by KDC test. This method can specify kvno and does not - * remove any old keys. - */ - public void addEntry(PrincipalName service, char[] psswd, int kvno) - throws KrbException { - - EncryptionKey[] encKeys = EncryptionKey.acquireSecretKeys( - psswd, service.getSalt()); - - for (int i = 0; encKeys != null && i < encKeys.length; i++) { - int keyType = encKeys[i].getEType(); - byte[] keyValue = encKeys[i].getBytes(); - KeyTabEntry newEntry = new KeyTabEntry(service, - service.getRealm(), - new KerberosTime(System.currentTimeMillis()), - kvno, keyType, keyValue); - if (entries == null) - entries = new Vector (); - entries.addElement(newEntry); - } - } - - /** - * Retrieves the key table entry with the specified service name. - * @param service the service which may have an entry in the key table. - * @param keyType the etype to match, returns the 1st one if -1 provided - * @return -1 if the entry is not found, else return the entry index - * in the list. - */ - private int retrieveEntry(PrincipalName service, int keyType) { - KeyTabEntry e; - if (entries != null) { - for (int i = 0; i < entries.size(); i++) { - e = entries.elementAt(i); - if (service.match(e.getService()) && - (keyType == -1 || e.keyType == keyType)) { - return i; + int maxKvno = 0; // only useful when kvno == -1 + for (int i = entries.size()-1; i >= 0; i--) { + KeyTabEntry e = entries.get(i); + if (e.service.match(service)) { + if (e.keyVersion > maxKvno) { + maxKvno = e.keyVersion; + } + if (!append || e.keyVersion == kvno) { + entries.removeElementAt(i); } } } - return -1; + if (kvno == -1) { + kvno = maxKvno + 1; + } + + for (int i = 0; encKeys != null && i < encKeys.length; i++) { + int keyType = encKeys[i].getEType(); + byte[] keyValue = encKeys[i].getBytes(); + + KeyTabEntry newEntry = new KeyTabEntry(service, + service.getRealm(), + new KerberosTime(System.currentTimeMillis()), + kvno, keyType, keyValue); + entries.addElement(newEntry); + } } /** @@ -416,15 +382,11 @@ public class KeyTab implements KeyTabConstants { * @return array of KeyTabEntry. */ public KeyTabEntry[] getEntries() { - if (entries != null) { - KeyTabEntry[] kentries = new KeyTabEntry[entries.size()]; - for (int i = 0; i < kentries.length; i++) { - kentries[i] = entries.elementAt(i); - } - return kentries; - } else { - return null; + KeyTabEntry[] kentries = new KeyTabEntry[entries.size()]; + for (int i = 0; i < kentries.length; i++) { + kentries[i] = entries.elementAt(i); } + return kentries; } /** @@ -464,29 +426,55 @@ public class KeyTab implements KeyTabConstants { } /** - * Removes an entry from the key table. + * Removes entries from the key table. * @param service the service PrincipalName. - * @param etype the etype to match, first one if -1 provided - * @return 1 if removed successfully, 0 otherwise + * @param etype the etype to match, remove all if -1 + * @param kvno what kvno to remove, -1 for all, -2 for old + * @return the number of entries deleted */ - public int deleteEntry(PrincipalName service, int etype) { - int result = retrieveEntry(service, etype); - if (result != -1) { - entries.removeElementAt(result); - return 1; - } - return 0; - } - - /** - * Removes an entry from the key table. - * @param service the service PrincipalName. - * @return number of entries removed - */ - public int deleteEntry(PrincipalName service) { + public int deleteEntries(PrincipalName service, int etype, int kvno) { int count = 0; - while (deleteEntry(service, -1) > 0) { - count++; + + // Remember the highest KVNO for each etype. Used for kvno == -2 + Map highest = new HashMap<>(); + + for (int i = entries.size()-1; i >= 0; i--) { + KeyTabEntry e = entries.get(i); + if (service.match(e.getService())) { + if (etype == -1 || e.keyType == etype) { + if (kvno == -2) { + // Two rounds for kvno == -2. In the first round (here), + // only find out highest KVNO for each etype + if (highest.containsKey(e.keyType)) { + int n = highest.get(e.keyType); + if (e.keyVersion > n) { + highest.put(e.keyType, e.keyVersion); + } + } else { + highest.put(e.keyType, e.keyVersion); + } + } else if (kvno == -1 || e.keyVersion == kvno) { + entries.removeElementAt(i); + count++; + } + } + } + } + + // Second round for kvno == -2, remove old entries + if (kvno == -2) { + for (int i = entries.size()-1; i >= 0; i--) { + KeyTabEntry e = entries.get(i); + if (service.match(e.getService())) { + if (etype == -1 || e.keyType == etype) { + int n = highest.get(e.keyType); + if (e.keyVersion != n) { + entries.removeElementAt(i); + count++; + } + } + } + } } return count; } diff --git a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java index a92cb1b0e43..9bcc935a1ca 100644 --- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java +++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,10 +39,11 @@ import java.io.File; import java.text.DateFormat; import java.util.Arrays; import java.util.Date; +import java.util.Locale; import sun.security.krb5.internal.crypto.EType; /** * This class can execute as a command-line tool to help the user manage - * entires in the key table. + * entries in the key table. * Available functions include list/add/update/delete service key(s). * * @author Yanni Zhang @@ -60,30 +61,20 @@ public class Ktab { int etype = -1; char[] password = null; + boolean forced = false; // true if delete without prompt. Default false + boolean append = false; // true if new keys are appended. Default false + int vDel = -1; // kvno to delete, -1 all, -2 old. Default -1 + int vAdd = -1; // kvno to add. Default -1, means auto incremented + /** * The main program that can be invoked at command line. - *
    Usage: ktab - *
    available options to Ktab: - *