8336685: Shenandoah: Remove experimental incremental update mode
Reviewed-by: shade
This commit is contained in:
parent
8c28f25e13
commit
0584af2325
@ -41,8 +41,6 @@ void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
|
||||
Register tmp2 = _tmp2->as_register();
|
||||
Register result = result_opr()->as_register();
|
||||
|
||||
ShenandoahBarrierSet::assembler()->iu_barrier(masm->masm(), newval, rscratch2);
|
||||
|
||||
if (UseCompressedOops) {
|
||||
__ encode_heap_oop(tmp1, cmpval);
|
||||
cmpval = tmp1;
|
||||
@ -102,10 +100,6 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
value.load_item();
|
||||
LIR_Opr value_opr = value.result();
|
||||
|
||||
if (access.is_oop()) {
|
||||
value_opr = iu_barrier(access.gen(), value_opr, access.access_emit_info(), access.decorators());
|
||||
}
|
||||
|
||||
assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
LIR_Opr tmp = gen->new_register(T_INT);
|
||||
__ xchg(access.resolved_addr(), value_opr, result, tmp);
|
||||
|
@ -47,7 +47,7 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec
|
||||
Register src, Register dst, Register count, RegSet saved_regs) {
|
||||
if (is_oop) {
|
||||
bool dest_uninitialized = (decorators & IS_DEST_UNINITIALIZED) != 0;
|
||||
if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahIUBarrier || ShenandoahLoadRefBarrier) {
|
||||
if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahLoadRefBarrier) {
|
||||
|
||||
Label done;
|
||||
|
||||
@ -300,14 +300,6 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
|
||||
__ leave();
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler* masm, Register dst, Register tmp) {
|
||||
if (ShenandoahIUBarrier) {
|
||||
__ push_call_clobbered_registers();
|
||||
satb_write_barrier_pre(masm, noreg, dst, rthread, tmp, rscratch1, true, false);
|
||||
__ pop_call_clobbered_registers();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
@ -398,8 +390,7 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
|
||||
if (val == noreg) {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), noreg, noreg, noreg, noreg);
|
||||
} else {
|
||||
iu_barrier(masm, val, tmp1);
|
||||
// G1 barrier needs uncompressed oop for region cross check.
|
||||
// Barrier needs uncompressed oop for region cross check.
|
||||
Register new_val = val;
|
||||
if (UseCompressedOops) {
|
||||
new_val = rscratch2;
|
||||
|
@ -60,9 +60,6 @@ private:
|
||||
void load_reference_barrier(MacroAssembler* masm, Register dst, Address load_addr, DecoratorSet decorators);
|
||||
|
||||
public:
|
||||
|
||||
void iu_barrier(MacroAssembler* masm, Register dst, Register tmp);
|
||||
|
||||
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
|
||||
|
||||
#ifdef COMPILER1
|
||||
|
@ -43,11 +43,6 @@ void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler *masm) {
|
||||
Register tmp2 = _tmp2->as_register();
|
||||
Register result = result_opr()->as_register();
|
||||
|
||||
if (ShenandoahIUBarrier) {
|
||||
ShenandoahBarrierSet::assembler()->iu_barrier(masm->masm(), new_val, tmp1, tmp2,
|
||||
MacroAssembler::PRESERVATION_FRAME_LR_GP_FP_REGS);
|
||||
}
|
||||
|
||||
if (UseCompressedOops) {
|
||||
__ encode_heap_oop(cmp_val, cmp_val);
|
||||
__ encode_heap_oop(new_val, new_val);
|
||||
@ -122,10 +117,6 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess &access, LIRIt
|
||||
value.load_item();
|
||||
LIR_Opr value_opr = value.result();
|
||||
|
||||
if (access.is_oop()) {
|
||||
value_opr = iu_barrier(access.gen(), value_opr, access.access_emit_info(), access.decorators());
|
||||
}
|
||||
|
||||
assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
LIR_Opr tmp_xchg = gen->new_register(T_INT);
|
||||
__ xchg(access.resolved_addr(), value_opr, result, tmp_xchg);
|
||||
|
@ -61,20 +61,6 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier(MacroAssembler *masm,
|
||||
}
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler *masm,
|
||||
Register val,
|
||||
Register tmp1, Register tmp2,
|
||||
MacroAssembler::PreservationLevel preservation_level,
|
||||
DecoratorSet decorators) {
|
||||
// IU barriers are also employed to avoid resurrection of weak references,
|
||||
// even if Shenandoah does not operate in incremental update mode.
|
||||
if (ShenandoahIUBarrier || ShenandoahSATBBarrier) {
|
||||
__ block_comment("iu_barrier (shenandoahgc) {");
|
||||
satb_write_barrier_impl(masm, decorators, noreg, noreg, val, tmp1, tmp2, preservation_level);
|
||||
__ block_comment("} iu_barrier (shenandoahgc)");
|
||||
}
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler *masm, DecoratorSet decorators,
|
||||
Register base, RegisterOrConstant ind_or_offs,
|
||||
Register dst,
|
||||
@ -110,7 +96,7 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler *masm, Dec
|
||||
|
||||
// Fast path: No barrier required if for every barrier type, it is either disabled or would not store
|
||||
// any useful information.
|
||||
if ((!ShenandoahSATBBarrier || dest_uninitialized) && !ShenandoahIUBarrier && !ShenandoahLoadRefBarrier) {
|
||||
if ((!ShenandoahSATBBarrier || dest_uninitialized) && !ShenandoahLoadRefBarrier) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -582,7 +568,11 @@ void ShenandoahBarrierSetAssembler::load_at(
|
||||
|
||||
/* ==== Apply keep-alive barrier, if required (e.g., to inhibit weak reference resurrection) ==== */
|
||||
if (ShenandoahBarrierSet::need_keep_alive_barrier(decorators, type)) {
|
||||
iu_barrier(masm, dst, tmp1, tmp2, preservation_level);
|
||||
if (ShenandoahSATBBarrier) {
|
||||
__ block_comment("keep_alive_barrier (shenandoahgc) {");
|
||||
satb_write_barrier_impl(masm, 0, noreg, noreg, dst, tmp1, tmp2, preservation_level);
|
||||
__ block_comment("} keep_alive_barrier (shenandoahgc)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -597,10 +587,6 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler *masm, DecoratorSet
|
||||
if (ShenandoahSATBBarrier) {
|
||||
satb_write_barrier(masm, base, ind_or_offs, tmp1, tmp2, tmp3, preservation_level);
|
||||
}
|
||||
|
||||
if (ShenandoahIUBarrier && val != noreg) {
|
||||
iu_barrier(masm, val, tmp1, tmp2, preservation_level, decorators);
|
||||
}
|
||||
}
|
||||
|
||||
BarrierSetAssembler::store_at(masm, decorators, type,
|
||||
|
@ -82,11 +82,6 @@ public:
|
||||
Register tmp1, Register tmp2, Register tmp3,
|
||||
MacroAssembler::PreservationLevel preservation_level);
|
||||
|
||||
void iu_barrier(MacroAssembler* masm,
|
||||
Register val,
|
||||
Register tmp1, Register tmp2,
|
||||
MacroAssembler::PreservationLevel preservation_level, DecoratorSet decorators = 0);
|
||||
|
||||
void load_reference_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register base, RegisterOrConstant ind_or_offs,
|
||||
Register dst,
|
||||
|
@ -41,8 +41,6 @@ void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
|
||||
Register tmp2 = _tmp2->as_register();
|
||||
Register result = result_opr()->as_register();
|
||||
|
||||
ShenandoahBarrierSet::assembler()->iu_barrier(masm->masm(), newval, t1);
|
||||
|
||||
if (UseCompressedOops) {
|
||||
__ encode_heap_oop(tmp1, cmpval);
|
||||
cmpval = tmp1;
|
||||
@ -94,10 +92,6 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
value.load_item();
|
||||
LIR_Opr value_opr = value.result();
|
||||
|
||||
if (access.is_oop()) {
|
||||
value_opr = iu_barrier(access.gen(), value_opr, access.access_emit_info(), access.decorators());
|
||||
}
|
||||
|
||||
assert(type == T_INT || is_reference_type(type) LP64_ONLY( || type == T_LONG ), "unexpected type");
|
||||
LIR_Opr tmp = gen->new_register(T_INT);
|
||||
__ xchg(access.resolved_addr(), value_opr, result, tmp);
|
||||
|
@ -48,7 +48,7 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec
|
||||
Register src, Register dst, Register count, RegSet saved_regs) {
|
||||
if (is_oop) {
|
||||
bool dest_uninitialized = (decorators & IS_DEST_UNINITIALIZED) != 0;
|
||||
if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahIUBarrier || ShenandoahLoadRefBarrier) {
|
||||
if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahLoadRefBarrier) {
|
||||
|
||||
Label done;
|
||||
|
||||
@ -308,16 +308,6 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
|
||||
__ leave();
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler* masm, Register dst, Register tmp) {
|
||||
if (ShenandoahIUBarrier) {
|
||||
__ push_call_clobbered_registers();
|
||||
|
||||
satb_write_barrier_pre(masm, noreg, dst, xthread, tmp, t0, true, false);
|
||||
|
||||
__ pop_call_clobbered_registers();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
@ -420,8 +410,7 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
|
||||
if (val == noreg) {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), noreg, noreg, noreg, noreg);
|
||||
} else {
|
||||
iu_barrier(masm, val, tmp1);
|
||||
// G1 barrier needs uncompressed oop for region cross check.
|
||||
// Barrier needs uncompressed oop for region cross check.
|
||||
Register new_val = val;
|
||||
if (UseCompressedOops) {
|
||||
new_val = t1;
|
||||
|
@ -63,8 +63,6 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
void iu_barrier(MacroAssembler* masm, Register dst, Register tmp);
|
||||
|
||||
virtual NMethodPatchingType nmethod_patching_type() { return NMethodPatchingType::conc_data_patch; }
|
||||
|
||||
#ifdef COMPILER1
|
||||
|
@ -46,9 +46,6 @@ void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
|
||||
assert(cmpval != addr, "cmp and addr must be in different registers");
|
||||
assert(newval != addr, "new value and addr must be in different registers");
|
||||
|
||||
// Apply IU barrier to newval.
|
||||
ShenandoahBarrierSet::assembler()->iu_barrier(masm->masm(), newval, tmp1);
|
||||
|
||||
#ifdef _LP64
|
||||
if (UseCompressedOops) {
|
||||
__ encode_heap_oop(cmpval);
|
||||
@ -101,10 +98,6 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
value.load_item();
|
||||
LIR_Opr value_opr = value.result();
|
||||
|
||||
if (access.is_oop()) {
|
||||
value_opr = iu_barrier(access.gen(), value_opr, access.access_emit_info(), access.decorators());
|
||||
}
|
||||
|
||||
// Because we want a 2-arg form of xchg and xadd
|
||||
__ move(value_opr, result);
|
||||
|
||||
|
@ -121,7 +121,7 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec
|
||||
|
||||
if (is_reference_type(type)) {
|
||||
|
||||
if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahIUBarrier || ShenandoahLoadRefBarrier) {
|
||||
if ((ShenandoahSATBBarrier && !dest_uninitialized) || ShenandoahLoadRefBarrier) {
|
||||
#ifdef _LP64
|
||||
Register thread = r15_thread;
|
||||
#else
|
||||
@ -472,40 +472,6 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
|
||||
#endif
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler* masm, Register dst, Register tmp) {
|
||||
if (ShenandoahIUBarrier) {
|
||||
iu_barrier_impl(masm, dst, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::iu_barrier_impl(MacroAssembler* masm, Register dst, Register tmp) {
|
||||
assert(ShenandoahIUBarrier, "should be enabled");
|
||||
|
||||
if (dst == noreg) return;
|
||||
|
||||
if (ShenandoahIUBarrier) {
|
||||
save_machine_state(masm, /* handle_gpr = */ true, /* handle_fp = */ true);
|
||||
|
||||
#ifdef _LP64
|
||||
Register thread = r15_thread;
|
||||
#else
|
||||
Register thread = rcx;
|
||||
if (thread == dst || thread == tmp) {
|
||||
thread = rdi;
|
||||
}
|
||||
if (thread == dst || thread == tmp) {
|
||||
thread = rbx;
|
||||
}
|
||||
__ get_thread(thread);
|
||||
#endif
|
||||
assert_different_registers(dst, tmp, thread);
|
||||
|
||||
satb_write_barrier_pre(masm, noreg, dst, thread, tmp, true, false);
|
||||
|
||||
restore_machine_state(masm, /* handle_gpr = */ true, /* handle_fp = */ true);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
@ -626,12 +592,7 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
|
||||
val != noreg /* tosca_live */,
|
||||
false /* expand_call */);
|
||||
}
|
||||
if (val == noreg) {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg);
|
||||
} else {
|
||||
iu_barrier(masm, val, tmp3);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg);
|
||||
}
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp1, 0), val, noreg, noreg, noreg);
|
||||
NOT_LP64(imasm->restore_bcp());
|
||||
} else {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
|
||||
|
@ -56,10 +56,7 @@ private:
|
||||
bool tosca_live,
|
||||
bool expand_call);
|
||||
|
||||
void iu_barrier_impl(MacroAssembler* masm, Register dst, Register tmp);
|
||||
|
||||
public:
|
||||
void iu_barrier(MacroAssembler* masm, Register dst, Register tmp);
|
||||
#ifdef COMPILER1
|
||||
void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
|
||||
void gen_load_reference_barrier_stub(LIR_Assembler* ce, ShenandoahLoadReferenceBarrierStub* stub);
|
||||
|
@ -183,20 +183,11 @@ LIR_Opr ShenandoahBarrierSetC1::ensure_in_register(LIRGenerator* gen, LIR_Opr ob
|
||||
return obj;
|
||||
}
|
||||
|
||||
LIR_Opr ShenandoahBarrierSetC1::iu_barrier(LIRGenerator* gen, LIR_Opr obj, CodeEmitInfo* info, DecoratorSet decorators) {
|
||||
if (ShenandoahIUBarrier) {
|
||||
obj = ensure_in_register(gen, obj, T_OBJECT);
|
||||
pre_barrier(gen, info, decorators, LIR_OprFact::illegalOpr, obj);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) {
|
||||
if (access.is_oop()) {
|
||||
if (ShenandoahSATBBarrier) {
|
||||
pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), access.resolved_addr(), LIR_OprFact::illegalOpr /* pre_val */);
|
||||
}
|
||||
value = iu_barrier(access.gen(), value, access.access_emit_info(), access.decorators());
|
||||
}
|
||||
BarrierSetC1::store_at_resolved(access, value);
|
||||
}
|
||||
|
@ -200,7 +200,6 @@ private:
|
||||
void pre_barrier(LIRGenerator* gen, CodeEmitInfo* info, DecoratorSet decorators, LIR_Opr addr_opr, LIR_Opr pre_val);
|
||||
|
||||
LIR_Opr load_reference_barrier(LIRGenerator* gen, LIR_Opr obj, LIR_Opr addr, DecoratorSet decorators);
|
||||
LIR_Opr iu_barrier(LIRGenerator* gen, LIR_Opr obj, CodeEmitInfo* info, DecoratorSet decorators);
|
||||
|
||||
LIR_Opr load_reference_barrier_impl(LIRGenerator* gen, LIR_Opr obj, LIR_Opr addr, DecoratorSet decorators);
|
||||
|
||||
|
@ -48,25 +48,7 @@ ShenandoahBarrierSetC2* ShenandoahBarrierSetC2::bsc2() {
|
||||
}
|
||||
|
||||
ShenandoahBarrierSetC2State::ShenandoahBarrierSetC2State(Arena* comp_arena)
|
||||
: _iu_barriers(new (comp_arena) GrowableArray<ShenandoahIUBarrierNode*>(comp_arena, 8, 0, nullptr)),
|
||||
_load_reference_barriers(new (comp_arena) GrowableArray<ShenandoahLoadReferenceBarrierNode*>(comp_arena, 8, 0, nullptr)) {
|
||||
}
|
||||
|
||||
int ShenandoahBarrierSetC2State::iu_barriers_count() const {
|
||||
return _iu_barriers->length();
|
||||
}
|
||||
|
||||
ShenandoahIUBarrierNode* ShenandoahBarrierSetC2State::iu_barrier(int idx) const {
|
||||
return _iu_barriers->at(idx);
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetC2State::add_iu_barrier(ShenandoahIUBarrierNode* n) {
|
||||
assert(!_iu_barriers->contains(n), "duplicate entry in barrier list");
|
||||
_iu_barriers->append(n);
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetC2State::remove_iu_barrier(ShenandoahIUBarrierNode* n) {
|
||||
_iu_barriers->remove_if_existing(n);
|
||||
: _load_reference_barriers(new (comp_arena) GrowableArray<ShenandoahLoadReferenceBarrierNode*>(comp_arena, 8, 0, nullptr)) {
|
||||
}
|
||||
|
||||
int ShenandoahBarrierSetC2State::load_reference_barriers_count() const {
|
||||
@ -88,13 +70,6 @@ void ShenandoahBarrierSetC2State::remove_load_reference_barrier(ShenandoahLoadRe
|
||||
}
|
||||
}
|
||||
|
||||
Node* ShenandoahBarrierSetC2::shenandoah_iu_barrier(GraphKit* kit, Node* obj) const {
|
||||
if (ShenandoahIUBarrier) {
|
||||
return kit->gvn().transform(new ShenandoahIUBarrierNode(obj));
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
#define __ kit->
|
||||
|
||||
bool ShenandoahBarrierSetC2::satb_can_remove_pre_barrier(GraphKit* kit, PhaseValues* phase, Node* adr,
|
||||
@ -508,21 +483,8 @@ Node* ShenandoahBarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue&
|
||||
|
||||
uint adr_idx = kit->C->get_alias_index(adr_type);
|
||||
assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
|
||||
Node* value = val.node();
|
||||
value = shenandoah_iu_barrier(kit, value);
|
||||
val.set_node(value);
|
||||
shenandoah_write_barrier_pre(kit, true /* do_load */, /*kit->control(),*/ access.base(), adr, adr_idx, val.node(),
|
||||
static_cast<const TypeOopPtr*>(val.type()), nullptr /* pre_val */, access.type());
|
||||
} else {
|
||||
assert(access.is_opt_access(), "only for optimization passes");
|
||||
assert(((decorators & C2_TIGHTLY_COUPLED_ALLOC) != 0 || !ShenandoahSATBBarrier) && (decorators & C2_ARRAY_COPY) != 0, "unexpected caller of this code");
|
||||
C2OptAccess& opt_access = static_cast<C2OptAccess&>(access);
|
||||
PhaseGVN& gvn = opt_access.gvn();
|
||||
|
||||
if (ShenandoahIUBarrier) {
|
||||
Node* enqueue = gvn.transform(new ShenandoahIUBarrierNode(val.node()));
|
||||
val.set_node(enqueue);
|
||||
}
|
||||
}
|
||||
return BarrierSetC2::store_at_resolved(access, val);
|
||||
}
|
||||
@ -598,7 +560,6 @@ Node* ShenandoahBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess
|
||||
Node* new_val, const Type* value_type) const {
|
||||
GraphKit* kit = access.kit();
|
||||
if (access.is_oop()) {
|
||||
new_val = shenandoah_iu_barrier(kit, new_val);
|
||||
shenandoah_write_barrier_pre(kit, false /* do_load */,
|
||||
nullptr, nullptr, max_juint, nullptr, nullptr,
|
||||
expected_val /* pre_val */, T_OBJECT);
|
||||
@ -646,7 +607,6 @@ Node* ShenandoahBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicParseAcces
|
||||
Node* new_val, const Type* value_type) const {
|
||||
GraphKit* kit = access.kit();
|
||||
if (access.is_oop()) {
|
||||
new_val = shenandoah_iu_barrier(kit, new_val);
|
||||
shenandoah_write_barrier_pre(kit, false /* do_load */,
|
||||
nullptr, nullptr, max_juint, nullptr, nullptr,
|
||||
expected_val /* pre_val */, T_OBJECT);
|
||||
@ -699,9 +659,6 @@ Node* ShenandoahBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicParseAcces
|
||||
|
||||
Node* ShenandoahBarrierSetC2::atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* val, const Type* value_type) const {
|
||||
GraphKit* kit = access.kit();
|
||||
if (access.is_oop()) {
|
||||
val = shenandoah_iu_barrier(kit, val);
|
||||
}
|
||||
Node* result = BarrierSetC2::atomic_xchg_at_resolved(access, val, value_type);
|
||||
if (access.is_oop()) {
|
||||
result = kit->gvn().transform(new ShenandoahLoadReferenceBarrierNode(nullptr, result, access.decorators()));
|
||||
@ -719,7 +676,7 @@ bool ShenandoahBarrierSetC2::is_gc_pre_barrier_node(Node* node) const {
|
||||
|
||||
// Support for GC barriers emitted during parsing
|
||||
bool ShenandoahBarrierSetC2::is_gc_barrier_node(Node* node) const {
|
||||
if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier || node->Opcode() == Op_ShenandoahIUBarrier) return true;
|
||||
if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) return true;
|
||||
if (node->Opcode() != Op_CallLeaf && node->Opcode() != Op_CallLeafNoFP) {
|
||||
return false;
|
||||
}
|
||||
@ -740,9 +697,6 @@ Node* ShenandoahBarrierSetC2::step_over_gc_barrier(Node* c) const {
|
||||
if (c->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
|
||||
return c->in(ShenandoahLoadReferenceBarrierNode::ValueIn);
|
||||
}
|
||||
if (c->Opcode() == Op_ShenandoahIUBarrier) {
|
||||
c = c->in(1);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
@ -775,9 +729,6 @@ bool ShenandoahBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_couple
|
||||
}
|
||||
return !is_clone;
|
||||
}
|
||||
if (phase == Optimization) {
|
||||
return !ShenandoahIUBarrier;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -836,11 +787,7 @@ void ShenandoahBarrierSetC2::clone_at_expansion(PhaseMacroExpand* phase, ArrayCo
|
||||
debug_only(gc_state_adr_type = phase->C->get_adr_type(gc_state_idx));
|
||||
|
||||
Node* gc_state = phase->transform_later(new LoadBNode(ctrl, mem, gc_state_addr, gc_state_adr_type, TypeInt::BYTE, MemNode::unordered));
|
||||
int flags = ShenandoahHeap::HAS_FORWARDED;
|
||||
if (ShenandoahIUBarrier) {
|
||||
flags |= ShenandoahHeap::MARKING;
|
||||
}
|
||||
Node* stable_and = phase->transform_later(new AndINode(gc_state, phase->igvn().intcon(flags)));
|
||||
Node* stable_and = phase->transform_later(new AndINode(gc_state, phase->igvn().intcon(ShenandoahHeap::HAS_FORWARDED)));
|
||||
Node* stable_cmp = phase->transform_later(new CmpINode(stable_and, phase->igvn().zerocon(T_INT)));
|
||||
Node* stable_test = phase->transform_later(new BoolNode(stable_cmp, BoolTest::ne));
|
||||
|
||||
@ -889,18 +836,12 @@ void ShenandoahBarrierSetC2::clone_at_expansion(PhaseMacroExpand* phase, ArrayCo
|
||||
|
||||
// Support for macro expanded GC barriers
|
||||
void ShenandoahBarrierSetC2::register_potential_barrier_node(Node* node) const {
|
||||
if (node->Opcode() == Op_ShenandoahIUBarrier) {
|
||||
state()->add_iu_barrier((ShenandoahIUBarrierNode*) node);
|
||||
}
|
||||
if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
|
||||
state()->add_load_reference_barrier((ShenandoahLoadReferenceBarrierNode*) node);
|
||||
}
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetC2::unregister_potential_barrier_node(Node* node) const {
|
||||
if (node->Opcode() == Op_ShenandoahIUBarrier) {
|
||||
state()->remove_iu_barrier((ShenandoahIUBarrierNode*) node);
|
||||
}
|
||||
if (node->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
|
||||
state()->remove_load_reference_barrier((ShenandoahLoadReferenceBarrierNode*) node);
|
||||
}
|
||||
@ -948,12 +889,7 @@ void ShenandoahBarrierSetC2::eliminate_useless_gc_barriers(Unique_Node_List &use
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = state()->iu_barriers_count() - 1; i >= 0; i--) {
|
||||
ShenandoahIUBarrierNode* n = state()->iu_barrier(i);
|
||||
if (!useful.member(n)) {
|
||||
state()->remove_iu_barrier(n);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = state()->load_reference_barriers_count() - 1; i >= 0; i--) {
|
||||
ShenandoahLoadReferenceBarrierNode* n = state()->load_reference_barrier(i);
|
||||
if (!useful.member(n)) {
|
||||
@ -1190,9 +1126,6 @@ bool ShenandoahBarrierSetC2::escape_add_to_con_graph(ConnectionGraph* conn_graph
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case Op_ShenandoahIUBarrier:
|
||||
conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(1), delayed_worklist);
|
||||
break;
|
||||
case Op_ShenandoahLoadReferenceBarrier:
|
||||
conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(ShenandoahLoadReferenceBarrierNode::ValueIn), delayed_worklist);
|
||||
return true;
|
||||
@ -1216,9 +1149,6 @@ bool ShenandoahBarrierSetC2::escape_add_final_edges(ConnectionGraph* conn_graph,
|
||||
case Op_ShenandoahWeakCompareAndSwapP:
|
||||
case Op_ShenandoahWeakCompareAndSwapN:
|
||||
return conn_graph->add_final_edges_unsafe_access(n, opcode);
|
||||
case Op_ShenandoahIUBarrier:
|
||||
conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(1), nullptr);
|
||||
return true;
|
||||
case Op_ShenandoahLoadReferenceBarrier:
|
||||
conn_graph->add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(ShenandoahLoadReferenceBarrierNode::ValueIn), nullptr);
|
||||
return true;
|
||||
|
@ -31,17 +31,11 @@
|
||||
|
||||
class ShenandoahBarrierSetC2State : public ArenaObj {
|
||||
private:
|
||||
GrowableArray<ShenandoahIUBarrierNode*>* _iu_barriers;
|
||||
GrowableArray<ShenandoahLoadReferenceBarrierNode*>* _load_reference_barriers;
|
||||
|
||||
public:
|
||||
ShenandoahBarrierSetC2State(Arena* comp_arena);
|
||||
|
||||
int iu_barriers_count() const;
|
||||
ShenandoahIUBarrierNode* iu_barrier(int idx) const;
|
||||
void add_iu_barrier(ShenandoahIUBarrierNode* n);
|
||||
void remove_iu_barrier(ShenandoahIUBarrierNode * n);
|
||||
|
||||
int load_reference_barriers_count() const;
|
||||
ShenandoahLoadReferenceBarrierNode* load_reference_barrier(int idx) const;
|
||||
void add_load_reference_barrier(ShenandoahLoadReferenceBarrierNode* n);
|
||||
@ -73,8 +67,6 @@ private:
|
||||
Node* pre_val,
|
||||
BasicType bt) const;
|
||||
|
||||
Node* shenandoah_iu_barrier(GraphKit* kit, Node* obj) const;
|
||||
|
||||
void insert_pre_barrier(GraphKit* kit, Node* base_oop, Node* offset,
|
||||
Node* pre_val, bool need_mem_bar) const;
|
||||
|
||||
|
@ -46,8 +46,7 @@
|
||||
|
||||
bool ShenandoahBarrierC2Support::expand(Compile* C, PhaseIterGVN& igvn) {
|
||||
ShenandoahBarrierSetC2State* state = ShenandoahBarrierSetC2::bsc2()->state();
|
||||
if ((state->iu_barriers_count() +
|
||||
state->load_reference_barriers_count()) > 0) {
|
||||
if (state->load_reference_barriers_count() > 0) {
|
||||
assert(C->post_loop_opts_phase(), "no loop opts allowed");
|
||||
C->reset_post_loop_opts_phase(); // ... but we know what we are doing
|
||||
C->clear_major_progress();
|
||||
@ -186,28 +185,10 @@ bool ShenandoahBarrierC2Support::verify_helper(Node* in, Node_Stack& phis, Vecto
|
||||
}
|
||||
} else if (in->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
|
||||
if (t == ShenandoahOopStore) {
|
||||
uint i = 0;
|
||||
for (; i < phis.size(); i++) {
|
||||
Node* n = phis.node_at(i);
|
||||
if (n->Opcode() == Op_ShenandoahIUBarrier) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == phis.size()) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
barriers_used.push(in);
|
||||
if (trace) {tty->print("Found barrier"); in->dump();}
|
||||
} else if (in->Opcode() == Op_ShenandoahIUBarrier) {
|
||||
if (t != ShenandoahOopStore) {
|
||||
in = in->in(1);
|
||||
continue;
|
||||
}
|
||||
if (trace) {tty->print("Found enqueue barrier"); in->dump();}
|
||||
phis.push(in, in->req());
|
||||
in = in->in(1);
|
||||
continue;
|
||||
} else if (in->is_Proj() && in->in(0)->is_Allocate()) {
|
||||
if (trace) {
|
||||
tty->print("Found alloc");
|
||||
@ -326,7 +307,7 @@ void ShenandoahBarrierC2Support::verify(RootNode* root) {
|
||||
}
|
||||
}
|
||||
|
||||
if (verify && !verify_helper(n->in(MemNode::ValueIn), phis, visited, ShenandoahIUBarrier ? ShenandoahOopStore : ShenandoahValue, trace, barriers_used)) {
|
||||
if (verify && !verify_helper(n->in(MemNode::ValueIn), phis, visited, ShenandoahValue, trace, barriers_used)) {
|
||||
report_verify_failure("Shenandoah verification: Store should have barriers", n);
|
||||
}
|
||||
}
|
||||
@ -368,7 +349,7 @@ void ShenandoahBarrierC2Support::verify(RootNode* root) {
|
||||
}
|
||||
} else if (n->is_LoadStore()) {
|
||||
if (n->in(MemNode::ValueIn)->bottom_type()->make_ptr() &&
|
||||
!verify_helper(n->in(MemNode::ValueIn), phis, visited, ShenandoahIUBarrier ? ShenandoahOopStore : ShenandoahValue, trace, barriers_used)) {
|
||||
!verify_helper(n->in(MemNode::ValueIn), phis, visited, ShenandoahValue, trace, barriers_used)) {
|
||||
report_verify_failure("Shenandoah verification: LoadStore (value) should have barriers", n);
|
||||
}
|
||||
|
||||
@ -532,7 +513,7 @@ void ShenandoahBarrierC2Support::verify(RootNode* root) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (n->Opcode() == Op_ShenandoahIUBarrier || n->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
|
||||
} else if (n->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
|
||||
// skip
|
||||
} else if (n->is_AddP()
|
||||
|| n->is_Phi()
|
||||
@ -1113,20 +1094,6 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
|
||||
ShenandoahBarrierSetC2State* state = ShenandoahBarrierSetC2::bsc2()->state();
|
||||
|
||||
Unique_Node_List uses;
|
||||
for (int i = 0; i < state->iu_barriers_count(); i++) {
|
||||
Node* barrier = state->iu_barrier(i);
|
||||
Node* ctrl = phase->get_ctrl(barrier);
|
||||
IdealLoopTree* loop = phase->get_loop(ctrl);
|
||||
Node* head = loop->head();
|
||||
if (head->is_OuterStripMinedLoop()) {
|
||||
// Expanding a barrier here will break loop strip mining
|
||||
// verification. Transform the loop so the loop nest doesn't
|
||||
// appear as strip mined.
|
||||
OuterStripMinedLoopNode* outer = head->as_OuterStripMinedLoop();
|
||||
hide_strip_mined_loop(outer, outer->unique_ctrl_out()->as_CountedLoop(), phase);
|
||||
}
|
||||
}
|
||||
|
||||
Node_Stack stack(0);
|
||||
Node_List clones;
|
||||
for (int i = state->load_reference_barriers_count() - 1; i >= 0; i--) {
|
||||
@ -1459,157 +1426,6 @@ void ShenandoahBarrierC2Support::pin_and_expand(PhaseIdealLoop* phase) {
|
||||
}
|
||||
// Done expanding load-reference-barriers.
|
||||
assert(ShenandoahBarrierSetC2::bsc2()->state()->load_reference_barriers_count() == 0, "all load reference barrier nodes should have been replaced");
|
||||
|
||||
for (int i = state->iu_barriers_count() - 1; i >= 0; i--) {
|
||||
Node* barrier = state->iu_barrier(i);
|
||||
Node* pre_val = barrier->in(1);
|
||||
|
||||
if (phase->igvn().type(pre_val)->higher_equal(TypePtr::NULL_PTR)) {
|
||||
ShouldNotReachHere();
|
||||
continue;
|
||||
}
|
||||
|
||||
Node* ctrl = phase->get_ctrl(barrier);
|
||||
|
||||
if (ctrl->is_Proj() && ctrl->in(0)->is_CallJava()) {
|
||||
assert(is_dominator(phase->get_ctrl(pre_val), ctrl->in(0)->in(0), pre_val, ctrl->in(0), phase), "can't move");
|
||||
ctrl = ctrl->in(0)->in(0);
|
||||
phase->set_ctrl(barrier, ctrl);
|
||||
} else if (ctrl->is_CallRuntime()) {
|
||||
assert(is_dominator(phase->get_ctrl(pre_val), ctrl->in(0), pre_val, ctrl, phase), "can't move");
|
||||
ctrl = ctrl->in(0);
|
||||
phase->set_ctrl(barrier, ctrl);
|
||||
}
|
||||
|
||||
Node* init_ctrl = ctrl;
|
||||
IdealLoopTree* loop = phase->get_loop(ctrl);
|
||||
Node* raw_mem = fixer.find_mem(ctrl, barrier);
|
||||
Node* init_raw_mem = raw_mem;
|
||||
Node* raw_mem_for_ctrl = fixer.find_mem(ctrl, nullptr);
|
||||
Node* heap_stable_ctrl = nullptr;
|
||||
Node* null_ctrl = nullptr;
|
||||
uint last = phase->C->unique();
|
||||
|
||||
enum { _heap_stable = 1, _heap_unstable, PATH_LIMIT };
|
||||
Node* region = new RegionNode(PATH_LIMIT);
|
||||
Node* phi = PhiNode::make(region, raw_mem, Type::MEMORY, TypeRawPtr::BOTTOM);
|
||||
|
||||
enum { _fast_path = 1, _slow_path, _null_path, PATH_LIMIT2 };
|
||||
Node* region2 = new RegionNode(PATH_LIMIT2);
|
||||
Node* phi2 = PhiNode::make(region2, raw_mem, Type::MEMORY, TypeRawPtr::BOTTOM);
|
||||
|
||||
// Stable path.
|
||||
test_gc_state(ctrl, raw_mem, heap_stable_ctrl, phase, ShenandoahHeap::MARKING);
|
||||
region->init_req(_heap_stable, heap_stable_ctrl);
|
||||
phi->init_req(_heap_stable, raw_mem);
|
||||
|
||||
// Null path
|
||||
Node* reg2_ctrl = nullptr;
|
||||
test_null(ctrl, pre_val, null_ctrl, phase);
|
||||
if (null_ctrl != nullptr) {
|
||||
reg2_ctrl = null_ctrl->in(0);
|
||||
region2->init_req(_null_path, null_ctrl);
|
||||
phi2->init_req(_null_path, raw_mem);
|
||||
} else {
|
||||
region2->del_req(_null_path);
|
||||
phi2->del_req(_null_path);
|
||||
}
|
||||
|
||||
const int index_offset = in_bytes(ShenandoahThreadLocalData::satb_mark_queue_index_offset());
|
||||
const int buffer_offset = in_bytes(ShenandoahThreadLocalData::satb_mark_queue_buffer_offset());
|
||||
Node* thread = new ThreadLocalNode();
|
||||
phase->register_new_node(thread, ctrl);
|
||||
Node* buffer_adr = new AddPNode(phase->C->top(), thread, phase->igvn().MakeConX(buffer_offset));
|
||||
phase->register_new_node(buffer_adr, ctrl);
|
||||
Node* index_adr = new AddPNode(phase->C->top(), thread, phase->igvn().MakeConX(index_offset));
|
||||
phase->register_new_node(index_adr, ctrl);
|
||||
|
||||
BasicType index_bt = TypeX_X->basic_type();
|
||||
assert(sizeof(size_t) == type2aelembytes(index_bt), "Loading Shenandoah SATBMarkQueue::_index with wrong size.");
|
||||
const TypePtr* adr_type = TypeRawPtr::BOTTOM;
|
||||
Node* index = new LoadXNode(ctrl, raw_mem, index_adr, adr_type, TypeX_X, MemNode::unordered);
|
||||
phase->register_new_node(index, ctrl);
|
||||
Node* index_cmp = new CmpXNode(index, phase->igvn().MakeConX(0));
|
||||
phase->register_new_node(index_cmp, ctrl);
|
||||
Node* index_test = new BoolNode(index_cmp, BoolTest::ne);
|
||||
phase->register_new_node(index_test, ctrl);
|
||||
IfNode* queue_full_iff = new IfNode(ctrl, index_test, PROB_LIKELY(0.999), COUNT_UNKNOWN);
|
||||
if (reg2_ctrl == nullptr) reg2_ctrl = queue_full_iff;
|
||||
phase->register_control(queue_full_iff, loop, ctrl);
|
||||
Node* not_full = new IfTrueNode(queue_full_iff);
|
||||
phase->register_control(not_full, loop, queue_full_iff);
|
||||
Node* full = new IfFalseNode(queue_full_iff);
|
||||
phase->register_control(full, loop, queue_full_iff);
|
||||
|
||||
ctrl = not_full;
|
||||
|
||||
Node* next_index = new SubXNode(index, phase->igvn().MakeConX(sizeof(intptr_t)));
|
||||
phase->register_new_node(next_index, ctrl);
|
||||
|
||||
Node* buffer = new LoadPNode(ctrl, raw_mem, buffer_adr, adr_type, TypeRawPtr::NOTNULL, MemNode::unordered);
|
||||
phase->register_new_node(buffer, ctrl);
|
||||
Node *log_addr = new AddPNode(phase->C->top(), buffer, next_index);
|
||||
phase->register_new_node(log_addr, ctrl);
|
||||
Node* log_store = new StorePNode(ctrl, raw_mem, log_addr, adr_type, pre_val, MemNode::unordered);
|
||||
phase->register_new_node(log_store, ctrl);
|
||||
// update the index
|
||||
Node* index_update = new StoreXNode(ctrl, log_store, index_adr, adr_type, next_index, MemNode::unordered);
|
||||
phase->register_new_node(index_update, ctrl);
|
||||
|
||||
// Fast-path case
|
||||
region2->init_req(_fast_path, ctrl);
|
||||
phi2->init_req(_fast_path, index_update);
|
||||
|
||||
ctrl = full;
|
||||
|
||||
Node* base = find_bottom_mem(ctrl, phase);
|
||||
|
||||
MergeMemNode* mm = MergeMemNode::make(base);
|
||||
mm->set_memory_at(Compile::AliasIdxRaw, raw_mem);
|
||||
phase->register_new_node(mm, ctrl);
|
||||
|
||||
Node* call = new CallLeafNode(ShenandoahBarrierSetC2::write_ref_field_pre_entry_Type(), CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_field_pre_entry), "shenandoah_wb_pre", TypeRawPtr::BOTTOM);
|
||||
call->init_req(TypeFunc::Control, ctrl);
|
||||
call->init_req(TypeFunc::I_O, phase->C->top());
|
||||
call->init_req(TypeFunc::Memory, mm);
|
||||
call->init_req(TypeFunc::FramePtr, phase->C->top());
|
||||
call->init_req(TypeFunc::ReturnAdr, phase->C->top());
|
||||
call->init_req(TypeFunc::Parms, pre_val);
|
||||
call->init_req(TypeFunc::Parms+1, thread);
|
||||
phase->register_control(call, loop, ctrl);
|
||||
|
||||
Node* ctrl_proj = new ProjNode(call, TypeFunc::Control);
|
||||
phase->register_control(ctrl_proj, loop, call);
|
||||
Node* mem_proj = new ProjNode(call, TypeFunc::Memory);
|
||||
phase->register_new_node(mem_proj, call);
|
||||
|
||||
// Slow-path case
|
||||
region2->init_req(_slow_path, ctrl_proj);
|
||||
phi2->init_req(_slow_path, mem_proj);
|
||||
|
||||
phase->register_control(region2, loop, reg2_ctrl);
|
||||
phase->register_new_node(phi2, region2);
|
||||
|
||||
region->init_req(_heap_unstable, region2);
|
||||
phi->init_req(_heap_unstable, phi2);
|
||||
|
||||
phase->register_control(region, loop, heap_stable_ctrl->in(0));
|
||||
phase->register_new_node(phi, region);
|
||||
|
||||
fix_ctrl(barrier, region, fixer, uses, uses_to_ignore, last, phase);
|
||||
for(uint next = 0; next < uses.size(); next++ ) {
|
||||
Node *n = uses.at(next);
|
||||
assert(phase->get_ctrl(n) == init_ctrl, "bad control");
|
||||
assert(n != init_raw_mem, "should leave input raw mem above the barrier");
|
||||
phase->set_ctrl(n, region);
|
||||
follow_barrier_uses(n, init_ctrl, uses, phase);
|
||||
}
|
||||
fixer.fix_mem(init_ctrl, region, init_raw_mem, raw_mem_for_ctrl, phi, uses);
|
||||
|
||||
phase->igvn().replace_node(barrier, pre_val);
|
||||
}
|
||||
assert(state->iu_barriers_count() == 0, "all enqueue barrier nodes should have been replaced");
|
||||
|
||||
}
|
||||
|
||||
Node* ShenandoahBarrierC2Support::get_load_addr(PhaseIdealLoop* phase, VectorSet& visited, Node* in) {
|
||||
@ -1662,8 +1478,6 @@ Node* ShenandoahBarrierC2Support::get_load_addr(PhaseIdealLoop* phase, VectorSet
|
||||
}
|
||||
case Op_ShenandoahLoadReferenceBarrier:
|
||||
return get_load_addr(phase, visited, in->in(ShenandoahLoadReferenceBarrierNode::ValueIn));
|
||||
case Op_ShenandoahIUBarrier:
|
||||
return get_load_addr(phase, visited, in->in(1));
|
||||
case Op_CallDynamicJava:
|
||||
case Op_CallLeaf:
|
||||
case Op_CallStaticJava:
|
||||
@ -1911,126 +1725,6 @@ void ShenandoahBarrierC2Support::optimize_after_expansion(VectorSet &visited, No
|
||||
}
|
||||
}
|
||||
|
||||
ShenandoahIUBarrierNode::ShenandoahIUBarrierNode(Node* val) : Node(nullptr, val) {
|
||||
ShenandoahBarrierSetC2::bsc2()->state()->add_iu_barrier(this);
|
||||
}
|
||||
|
||||
const Type* ShenandoahIUBarrierNode::bottom_type() const {
|
||||
if (in(1) == nullptr || in(1)->is_top()) {
|
||||
return Type::TOP;
|
||||
}
|
||||
const Type* t = in(1)->bottom_type();
|
||||
if (t == TypePtr::NULL_PTR) {
|
||||
return t;
|
||||
}
|
||||
return t->is_oopptr();
|
||||
}
|
||||
|
||||
const Type* ShenandoahIUBarrierNode::Value(PhaseGVN* phase) const {
|
||||
if (in(1) == nullptr) {
|
||||
return Type::TOP;
|
||||
}
|
||||
const Type* t = phase->type(in(1));
|
||||
if (t == Type::TOP) {
|
||||
return Type::TOP;
|
||||
}
|
||||
if (t == TypePtr::NULL_PTR) {
|
||||
return t;
|
||||
}
|
||||
return t->is_oopptr();
|
||||
}
|
||||
|
||||
int ShenandoahIUBarrierNode::needed(Node* n) {
|
||||
if (n == nullptr ||
|
||||
n->is_Allocate() ||
|
||||
n->Opcode() == Op_ShenandoahIUBarrier ||
|
||||
n->bottom_type() == TypePtr::NULL_PTR ||
|
||||
(n->bottom_type()->make_oopptr() != nullptr && n->bottom_type()->make_oopptr()->const_oop() != nullptr)) {
|
||||
return NotNeeded;
|
||||
}
|
||||
if (n->is_Phi() ||
|
||||
n->is_CMove()) {
|
||||
return MaybeNeeded;
|
||||
}
|
||||
return Needed;
|
||||
}
|
||||
|
||||
Node* ShenandoahIUBarrierNode::next(Node* n) {
|
||||
for (;;) {
|
||||
if (n == nullptr) {
|
||||
return n;
|
||||
} else if (n->bottom_type() == TypePtr::NULL_PTR) {
|
||||
return n;
|
||||
} else if (n->bottom_type()->make_oopptr() != nullptr && n->bottom_type()->make_oopptr()->const_oop() != nullptr) {
|
||||
return n;
|
||||
} else if (n->is_ConstraintCast() ||
|
||||
n->Opcode() == Op_DecodeN ||
|
||||
n->Opcode() == Op_EncodeP) {
|
||||
n = n->in(1);
|
||||
} else if (n->is_Proj()) {
|
||||
n = n->in(0);
|
||||
} else {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Node* ShenandoahIUBarrierNode::Identity(PhaseGVN* phase) {
|
||||
PhaseIterGVN* igvn = phase->is_IterGVN();
|
||||
|
||||
Node* n = next(in(1));
|
||||
|
||||
int cont = needed(n);
|
||||
|
||||
if (cont == NotNeeded) {
|
||||
return in(1);
|
||||
} else if (cont == MaybeNeeded) {
|
||||
if (igvn == nullptr) {
|
||||
phase->record_for_igvn(this);
|
||||
return this;
|
||||
} else {
|
||||
ResourceMark rm;
|
||||
Unique_Node_List wq;
|
||||
uint wq_i = 0;
|
||||
|
||||
for (;;) {
|
||||
if (n->is_Phi()) {
|
||||
for (uint i = 1; i < n->req(); i++) {
|
||||
Node* m = n->in(i);
|
||||
if (m != nullptr) {
|
||||
wq.push(m);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
assert(n->is_CMove(), "nothing else here");
|
||||
Node* m = n->in(CMoveNode::IfFalse);
|
||||
wq.push(m);
|
||||
m = n->in(CMoveNode::IfTrue);
|
||||
wq.push(m);
|
||||
}
|
||||
Node* orig_n = nullptr;
|
||||
do {
|
||||
if (wq_i >= wq.size()) {
|
||||
return in(1);
|
||||
}
|
||||
n = wq.at(wq_i);
|
||||
wq_i++;
|
||||
orig_n = n;
|
||||
n = next(n);
|
||||
cont = needed(n);
|
||||
if (cont == Needed) {
|
||||
return this;
|
||||
}
|
||||
} while (cont != MaybeNeeded || (orig_n != n && wq.member(n)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
static bool has_never_branch(Node* root) {
|
||||
for (uint i = 1; i < root->req(); i++) {
|
||||
@ -3014,8 +2708,6 @@ bool ShenandoahLoadReferenceBarrierNode::needs_barrier_impl(PhaseGVN* phase, Nod
|
||||
case Op_CMoveP:
|
||||
return needs_barrier_impl(phase, n->in(2), visited) ||
|
||||
needs_barrier_impl(phase, n->in(3), visited);
|
||||
case Op_ShenandoahIUBarrier:
|
||||
return needs_barrier_impl(phase, n->in(1), visited);
|
||||
case Op_CreateEx:
|
||||
return false;
|
||||
default:
|
||||
|
@ -87,23 +87,6 @@ public:
|
||||
#endif
|
||||
};
|
||||
|
||||
class ShenandoahIUBarrierNode : public Node {
|
||||
public:
|
||||
ShenandoahIUBarrierNode(Node* val);
|
||||
|
||||
const Type *bottom_type() const;
|
||||
const Type* Value(PhaseGVN* phase) const;
|
||||
Node* Identity(PhaseGVN* phase);
|
||||
|
||||
int Opcode() const;
|
||||
|
||||
private:
|
||||
enum { Needed, NotNeeded, MaybeNeeded };
|
||||
|
||||
static int needed(Node* n);
|
||||
static Node* next(Node* n);
|
||||
};
|
||||
|
||||
class MemoryGraphFixer : public ResourceObj {
|
||||
private:
|
||||
Node_List _memory_nodes;
|
||||
|
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2022, Red Hat, 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.hpp"
|
||||
#include "gc/shenandoah/heuristics/shenandoahAggressiveHeuristics.hpp"
|
||||
#include "gc/shenandoah/heuristics/shenandoahCompactHeuristics.hpp"
|
||||
#include "gc/shenandoah/heuristics/shenandoahStaticHeuristics.hpp"
|
||||
#include "gc/shenandoah/mode/shenandoahIUMode.hpp"
|
||||
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logTag.hpp"
|
||||
#include "runtime/globals_extension.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
|
||||
void ShenandoahIUMode::initialize_flags() const {
|
||||
if (FLAG_IS_CMDLINE(ClassUnloadingWithConcurrentMark) && ClassUnloading) {
|
||||
log_warning(gc)("Shenandoah I-U mode sets -XX:-ClassUnloadingWithConcurrentMark; see JDK-8261341 for details");
|
||||
}
|
||||
FLAG_SET_DEFAULT(ClassUnloadingWithConcurrentMark, false);
|
||||
|
||||
if (ClassUnloading) {
|
||||
FLAG_SET_DEFAULT(VerifyBeforeExit, false);
|
||||
}
|
||||
|
||||
if (FLAG_IS_DEFAULT(ShenandoahIUBarrier)) {
|
||||
FLAG_SET_DEFAULT(ShenandoahIUBarrier, true);
|
||||
}
|
||||
if (FLAG_IS_DEFAULT(ShenandoahSATBBarrier)) {
|
||||
FLAG_SET_DEFAULT(ShenandoahSATBBarrier, false);
|
||||
}
|
||||
|
||||
SHENANDOAH_ERGO_ENABLE_FLAG(ExplicitGCInvokesConcurrent);
|
||||
SHENANDOAH_ERGO_ENABLE_FLAG(ShenandoahImplicitGCInvokesConcurrent);
|
||||
|
||||
// Final configuration checks
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahLoadRefBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_UNSET(ShenandoahSATBBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahIUBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCASBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahStackWatermarkBarrier);
|
||||
}
|
||||
|
||||
ShenandoahHeuristics* ShenandoahIUMode::initialize_heuristics() const {
|
||||
if (ShenandoahGCHeuristics == nullptr) {
|
||||
vm_exit_during_initialization("Unknown -XX:ShenandoahGCHeuristics option (null)");
|
||||
}
|
||||
ShenandoahHeap* heap = ShenandoahHeap::heap();
|
||||
if (strcmp(ShenandoahGCHeuristics, "aggressive") == 0) {
|
||||
return new ShenandoahAggressiveHeuristics(heap);
|
||||
} else if (strcmp(ShenandoahGCHeuristics, "static") == 0) {
|
||||
return new ShenandoahStaticHeuristics(heap);
|
||||
} else if (strcmp(ShenandoahGCHeuristics, "adaptive") == 0) {
|
||||
return new ShenandoahAdaptiveHeuristics(heap);
|
||||
} else if (strcmp(ShenandoahGCHeuristics, "compact") == 0) {
|
||||
return new ShenandoahCompactHeuristics(heap);
|
||||
}
|
||||
vm_exit_during_initialization("Unknown -XX:ShenandoahGCHeuristics option");
|
||||
return nullptr;
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Red Hat, 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SHARE_GC_SHENANDOAH_MODE_SHENANDOAHIUMODE_HPP
|
||||
#define SHARE_GC_SHENANDOAH_MODE_SHENANDOAHIUMODE_HPP
|
||||
|
||||
#include "gc/shenandoah/mode/shenandoahMode.hpp"
|
||||
|
||||
class ShenandoahHeuristics;
|
||||
|
||||
class ShenandoahIUMode : public ShenandoahMode {
|
||||
public:
|
||||
virtual void initialize_flags() const;
|
||||
virtual ShenandoahHeuristics* initialize_heuristics() const;
|
||||
|
||||
virtual const char* name() { return "Incremental-Update (IU)"; }
|
||||
virtual bool is_diagnostic() { return false; }
|
||||
virtual bool is_experimental() { return true; }
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_SHENANDOAH_MODE_SHENANDOAHIUMODE_HPP
|
@ -47,7 +47,6 @@ void ShenandoahPassiveMode::initialize_flags() const {
|
||||
// Disable known barriers by default.
|
||||
SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahLoadRefBarrier);
|
||||
SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahSATBBarrier);
|
||||
SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahIUBarrier);
|
||||
SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahCASBarrier);
|
||||
SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahCloneBarrier);
|
||||
SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahStackWatermarkBarrier);
|
||||
|
@ -44,7 +44,6 @@ void ShenandoahSATBMode::initialize_flags() const {
|
||||
|
||||
// Final configuration checks
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahLoadRefBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_UNSET(ShenandoahIUBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahSATBBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCASBarrier);
|
||||
SHENANDOAH_CHECK_FLAG_SET(ShenandoahCloneBarrier);
|
||||
|
@ -48,7 +48,6 @@ void ShenandoahArguments::initialize() {
|
||||
|
||||
FLAG_SET_DEFAULT(ShenandoahSATBBarrier, false);
|
||||
FLAG_SET_DEFAULT(ShenandoahLoadRefBarrier, false);
|
||||
FLAG_SET_DEFAULT(ShenandoahIUBarrier, false);
|
||||
FLAG_SET_DEFAULT(ShenandoahCASBarrier, false);
|
||||
FLAG_SET_DEFAULT(ShenandoahCloneBarrier, false);
|
||||
|
||||
@ -142,7 +141,6 @@ void ShenandoahArguments::initialize() {
|
||||
if (ShenandoahVerifyOptoBarriers &&
|
||||
(!FLAG_IS_DEFAULT(ShenandoahSATBBarrier) ||
|
||||
!FLAG_IS_DEFAULT(ShenandoahLoadRefBarrier) ||
|
||||
!FLAG_IS_DEFAULT(ShenandoahIUBarrier) ||
|
||||
!FLAG_IS_DEFAULT(ShenandoahCASBarrier) ||
|
||||
!FLAG_IS_DEFAULT(ShenandoahCloneBarrier)
|
||||
)) {
|
||||
|
@ -138,7 +138,7 @@ void ShenandoahBarrierSet::on_thread_detach(Thread *thread) {
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSet::clone_barrier_runtime(oop src) {
|
||||
if (_heap->has_forwarded_objects() || (ShenandoahIUBarrier && _heap->is_concurrent_mark_in_progress())) {
|
||||
if (_heap->has_forwarded_objects()) {
|
||||
clone_barrier(src);
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ public:
|
||||
template <DecoratorSet decorators, typename T>
|
||||
inline void satb_barrier(T* field);
|
||||
inline void satb_enqueue(oop value);
|
||||
inline void iu_barrier(oop obj);
|
||||
|
||||
inline void keep_alive_if_weak(DecoratorSet decorators, oop value);
|
||||
|
||||
@ -120,7 +119,6 @@ private:
|
||||
template <class T>
|
||||
inline void arraycopy_update(T* src, size_t count);
|
||||
|
||||
inline void clone_marking(oop src);
|
||||
inline void clone_evacuation(oop src);
|
||||
inline void clone_update(oop src);
|
||||
|
||||
|
@ -164,12 +164,6 @@ inline void ShenandoahBarrierSet::satb_enqueue(oop value) {
|
||||
}
|
||||
}
|
||||
|
||||
inline void ShenandoahBarrierSet::iu_barrier(oop obj) {
|
||||
if (ShenandoahIUBarrier && obj != nullptr && _heap->is_concurrent_mark_in_progress()) {
|
||||
enqueue(obj);
|
||||
}
|
||||
}
|
||||
|
||||
inline void ShenandoahBarrierSet::keep_alive_if_weak(DecoratorSet decorators, oop value) {
|
||||
assert((decorators & ON_UNKNOWN_OOP_REF) == 0, "Reference strength must be known");
|
||||
const bool on_strong_oop_ref = (decorators & ON_STRONG_OOP_REF) != 0;
|
||||
@ -189,7 +183,6 @@ inline oop ShenandoahBarrierSet::oop_load(DecoratorSet decorators, T* addr) {
|
||||
|
||||
template <typename T>
|
||||
inline oop ShenandoahBarrierSet::oop_cmpxchg(DecoratorSet decorators, T* addr, oop compare_value, oop new_value) {
|
||||
iu_barrier(new_value);
|
||||
oop res;
|
||||
oop expected = compare_value;
|
||||
do {
|
||||
@ -207,7 +200,6 @@ inline oop ShenandoahBarrierSet::oop_cmpxchg(DecoratorSet decorators, T* addr, o
|
||||
|
||||
template <typename T>
|
||||
inline oop ShenandoahBarrierSet::oop_xchg(DecoratorSet decorators, T* addr, oop new_value) {
|
||||
iu_barrier(new_value);
|
||||
oop previous = RawAccess<>::oop_atomic_xchg(addr, new_value);
|
||||
// Note: We don't need a keep-alive-barrier here. We already enqueue any loaded reference for SATB anyway,
|
||||
// because it must be the previous value.
|
||||
@ -245,7 +237,6 @@ inline void ShenandoahBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_st
|
||||
shenandoah_assert_marked_if(nullptr, value, !CompressedOops::is_null(value) && ShenandoahHeap::heap()->is_evacuation_in_progress());
|
||||
shenandoah_assert_not_in_cset_if(addr, value, value != nullptr && !ShenandoahHeap::heap()->cancelled_gc());
|
||||
ShenandoahBarrierSet* const bs = ShenandoahBarrierSet::barrier_set();
|
||||
bs->iu_barrier(value);
|
||||
bs->satb_barrier<decorators>(addr);
|
||||
Raw::oop_store(addr, value);
|
||||
}
|
||||
|
@ -74,15 +74,6 @@ public:
|
||||
virtual void do_oop(narrowOop* p) { do_oop_work(p); }
|
||||
};
|
||||
|
||||
void ShenandoahBarrierSet::clone_marking(oop obj) {
|
||||
assert(_heap->is_concurrent_mark_in_progress(), "only during marking");
|
||||
assert(ShenandoahIUBarrier, "only with incremental-update");
|
||||
if (!_heap->marking_context()->allocated_after_mark_start(obj)) {
|
||||
ShenandoahUpdateRefsForOopClosure</* has_fwd = */ false, /* evac = */ false, /* enqueue */ true> cl;
|
||||
obj->oop_iterate(&cl);
|
||||
}
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSet::clone_evacuation(oop obj) {
|
||||
assert(_heap->is_evacuation_in_progress(), "only during evacuation");
|
||||
if (need_bulk_update(cast_from_oop<HeapWord*>(obj))) {
|
||||
@ -105,9 +96,7 @@ void ShenandoahBarrierSet::clone_barrier(oop obj) {
|
||||
shenandoah_assert_correct(nullptr, obj);
|
||||
|
||||
int gc_state = _heap->gc_state();
|
||||
if ((gc_state & ShenandoahHeap::MARKING) != 0) {
|
||||
clone_marking(obj);
|
||||
} else if ((gc_state & ShenandoahHeap::EVACUATION) != 0) {
|
||||
if ((gc_state & ShenandoahHeap::EVACUATION) != 0) {
|
||||
clone_evacuation(obj);
|
||||
} else {
|
||||
clone_update(obj);
|
||||
|
@ -71,22 +71,14 @@ public:
|
||||
class ShenandoahSATBAndRemarkThreadsClosure : public ThreadClosure {
|
||||
private:
|
||||
SATBMarkQueueSet& _satb_qset;
|
||||
OopClosure* const _cl;
|
||||
|
||||
public:
|
||||
ShenandoahSATBAndRemarkThreadsClosure(SATBMarkQueueSet& satb_qset, OopClosure* cl) :
|
||||
_satb_qset(satb_qset),
|
||||
_cl(cl) {}
|
||||
explicit ShenandoahSATBAndRemarkThreadsClosure(SATBMarkQueueSet& satb_qset) :
|
||||
_satb_qset(satb_qset) {}
|
||||
|
||||
void do_thread(Thread* thread) {
|
||||
void do_thread(Thread* thread) override {
|
||||
// Transfer any partial buffer to the qset for completed buffer processing.
|
||||
_satb_qset.flush_queue(ShenandoahThreadLocalData::satb_mark_queue(thread));
|
||||
if (thread->is_Java_thread()) {
|
||||
if (_cl != nullptr) {
|
||||
ResourceMark rm;
|
||||
thread->oops_do(_cl, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -118,9 +110,7 @@ public:
|
||||
while (satb_mq_set.apply_closure_to_completed_buffer(&cl)) {}
|
||||
assert(!heap->has_forwarded_objects(), "Not expected");
|
||||
|
||||
ShenandoahMarkRefsClosure<GENERATION> mark_cl(q, rp);
|
||||
ShenandoahSATBAndRemarkThreadsClosure tc(satb_mq_set,
|
||||
ShenandoahIUBarrier ? &mark_cl : nullptr);
|
||||
ShenandoahSATBAndRemarkThreadsClosure tc(satb_mq_set);
|
||||
Threads::possibly_parallel_threads_do(true /* is_par */, &tc);
|
||||
}
|
||||
_cm->mark_loop(worker_id, _terminator, rp, GENERATION, false /*not cancellable*/,
|
||||
|
@ -66,7 +66,6 @@
|
||||
#include "gc/shenandoah/shenandoahVMOperations.hpp"
|
||||
#include "gc/shenandoah/shenandoahWorkGroup.hpp"
|
||||
#include "gc/shenandoah/shenandoahWorkerPolicy.hpp"
|
||||
#include "gc/shenandoah/mode/shenandoahIUMode.hpp"
|
||||
#include "gc/shenandoah/mode/shenandoahPassiveMode.hpp"
|
||||
#include "gc/shenandoah/mode/shenandoahSATBMode.hpp"
|
||||
#if INCLUDE_JFR
|
||||
@ -446,8 +445,6 @@ void ShenandoahHeap::initialize_mode() {
|
||||
if (ShenandoahGCMode != nullptr) {
|
||||
if (strcmp(ShenandoahGCMode, "satb") == 0) {
|
||||
_gc_mode = new ShenandoahSATBMode();
|
||||
} else if (strcmp(ShenandoahGCMode, "iu") == 0) {
|
||||
_gc_mode = new ShenandoahIUMode();
|
||||
} else if (strcmp(ShenandoahGCMode, "passive") == 0) {
|
||||
_gc_mode = new ShenandoahPassiveMode();
|
||||
} else {
|
||||
|
@ -334,9 +334,6 @@
|
||||
product(bool, ShenandoahSATBBarrier, true, DIAGNOSTIC, \
|
||||
"Turn on/off SATB barriers in Shenandoah") \
|
||||
\
|
||||
product(bool, ShenandoahIUBarrier, false, DIAGNOSTIC, \
|
||||
"Turn on/off I-U barriers barriers in Shenandoah") \
|
||||
\
|
||||
product(bool, ShenandoahCASBarrier, true, DIAGNOSTIC, \
|
||||
"Turn on/off CAS barriers in Shenandoah") \
|
||||
\
|
||||
|
@ -324,7 +324,6 @@ shmacro(ShenandoahCompareAndSwapN)
|
||||
shmacro(ShenandoahCompareAndSwapP)
|
||||
shmacro(ShenandoahWeakCompareAndSwapN)
|
||||
shmacro(ShenandoahWeakCompareAndSwapP)
|
||||
shmacro(ShenandoahIUBarrier)
|
||||
shmacro(ShenandoahLoadReferenceBarrier)
|
||||
macro(SCMemProj)
|
||||
macro(CopySignD)
|
||||
|
@ -39,8 +39,7 @@
|
||||
* and <testtype> in {G1,
|
||||
* Serial,
|
||||
* Parallel,
|
||||
* Shenandoah,
|
||||
* ShenandoahIU}
|
||||
* Shenandoah}
|
||||
*/
|
||||
|
||||
|
||||
@ -95,13 +94,6 @@ public class TestVolatiles {
|
||||
procArgs[argcount - 3] = "-XX:+UnlockExperimentalVMOptions";
|
||||
procArgs[argcount - 2] = "-XX:+UseShenandoahGC";
|
||||
break;
|
||||
case "ShenandoahIU":
|
||||
argcount = 11;
|
||||
procArgs = new String[argcount];
|
||||
procArgs[argcount - 4] = "-XX:+UnlockExperimentalVMOptions";
|
||||
procArgs[argcount - 3] = "-XX:+UseShenandoahGC";
|
||||
procArgs[argcount - 2] = "-XX:ShenandoahGCMode=iu";
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("unexpected test type " + testType);
|
||||
}
|
||||
@ -286,7 +278,6 @@ public class TestVolatiles {
|
||||
};
|
||||
break;
|
||||
case "Shenandoah":
|
||||
case "ShenandoahIU":
|
||||
// Shenandoah generates normal object graphs for
|
||||
// volatile stores
|
||||
matches = new String[] {
|
||||
@ -358,7 +349,6 @@ public class TestVolatiles {
|
||||
};
|
||||
break;
|
||||
case "Shenandoah":
|
||||
case "ShenandoahIU":
|
||||
// For volatile CAS, Shenanodoah generates normal
|
||||
// graphs with a shenandoah-specific cmpxchg
|
||||
matches = new String[] {
|
||||
@ -445,7 +435,6 @@ public class TestVolatiles {
|
||||
};
|
||||
break;
|
||||
case "Shenandoah":
|
||||
case "ShenandoahIU":
|
||||
// For volatile CAS, Shenanodoah generates normal
|
||||
// graphs with a shenandoah-specific cmpxchg
|
||||
matches = new String[] {
|
||||
@ -512,7 +501,6 @@ public class TestVolatiles {
|
||||
};
|
||||
break;
|
||||
case "Shenandoah":
|
||||
case "ShenandoahIU":
|
||||
matches = new String[] {
|
||||
"membar_release \\(elided\\)",
|
||||
useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq",
|
||||
|
@ -71,33 +71,6 @@
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileGAA Shenandoah
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestVolatileLoad ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestVolatileStore ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileLoad ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileStore ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileCAS ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileWeakCAS ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileCAE ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileGAS ShenandoahIU
|
||||
*
|
||||
* @run driver compiler.c2.aarch64.TestVolatilesShenandoah
|
||||
* TestUnsafeVolatileGAA ShenandoahIU
|
||||
*
|
||||
*/
|
||||
|
||||
package compiler.c2.aarch64;
|
||||
|
@ -120,51 +120,6 @@
|
||||
* TestAllocHumongousFragment
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @summary Make sure Shenandoah can recover from humongous allocation fragmentation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot -XX:+ShenandoahVerify
|
||||
* TestAllocHumongousFragment
|
||||
*
|
||||
* @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot -XX:+ShenandoahVerify
|
||||
* TestAllocHumongousFragment
|
||||
*
|
||||
* @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* TestAllocHumongousFragment
|
||||
*
|
||||
* @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* TestAllocHumongousFragment
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Make sure Shenandoah can recover from humongous allocation fragmentation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestAllocHumongousFragment
|
||||
*
|
||||
* @run main/othervm -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g -XX:ShenandoahTargetNumRegions=2048
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestAllocHumongousFragment
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=g1
|
||||
* @summary Make sure G1 can recover from humongous allocation fragmentation
|
||||
|
@ -135,56 +135,6 @@
|
||||
* -XX:-UseTLAB -XX:+ShenandoahVerify
|
||||
* TestAllocIntArrays
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @summary Acceptance tests: collector can withstand allocation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot -XX:+ShenandoahVerify
|
||||
* TestAllocIntArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot -XX:+ShenandoahVerify
|
||||
* TestAllocIntArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* TestAllocIntArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* TestAllocIntArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestAllocIntArrays
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Acceptance tests: collector can withstand allocation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestAllocIntArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestAllocIntArrays
|
||||
*/
|
||||
|
||||
import java.util.Random;
|
||||
import jdk.test.lib.Utils;
|
||||
|
||||
|
@ -135,56 +135,6 @@
|
||||
* -XX:-UseTLAB -XX:+ShenandoahVerify
|
||||
* TestAllocObjectArrays
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @summary Acceptance tests: collector can withstand allocation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot -XX:+ShenandoahVerify
|
||||
* TestAllocObjectArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot -XX:+ShenandoahVerify
|
||||
* TestAllocObjectArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* TestAllocObjectArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* TestAllocObjectArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestAllocObjectArrays
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Acceptance tests: collector can withstand allocation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestAllocObjectArrays
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestAllocObjectArrays
|
||||
*/
|
||||
|
||||
import java.util.Random;
|
||||
import jdk.test.lib.Utils;
|
||||
|
||||
|
@ -112,52 +112,6 @@
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact
|
||||
* TestAllocObjects
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @summary Acceptance tests: collector can withstand allocation
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot -XX:+ShenandoahVerify
|
||||
* TestAllocObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot -XX:+ShenandoahVerify
|
||||
* TestAllocObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* TestAllocObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* TestAllocObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestAllocObjects
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Acceptance tests: collector can withstand allocation
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestAllocObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestAllocObjects
|
||||
*/
|
||||
|
||||
public class TestAllocObjects {
|
||||
|
||||
static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation
|
||||
|
@ -84,28 +84,6 @@
|
||||
* TestDynamicSoftMaxHeapSize
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -Dtarget=1000
|
||||
* TestDynamicSoftMaxHeapSize
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xms16m -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -Dtarget=10000
|
||||
* TestDynamicSoftMaxHeapSize
|
||||
*/
|
||||
|
||||
import java.util.Random;
|
||||
import jdk.test.lib.Utils;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
@ -76,24 +76,6 @@
|
||||
* TestGCThreadGroups
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test id=iu
|
||||
* @summary Test Shenandoah GC uses concurrent/parallel threads correctly
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
|
||||
* -Dtarget=1000
|
||||
* TestGCThreadGroups
|
||||
*
|
||||
* @run main/othervm -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:ConcGCThreads=2 -XX:ParallelGCThreads=4
|
||||
* -Dtarget=1000
|
||||
* TestGCThreadGroups
|
||||
*/
|
||||
|
||||
public class TestGCThreadGroups {
|
||||
|
||||
static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation, around 1K cycles to handle
|
||||
|
@ -84,27 +84,6 @@
|
||||
* TestHeapUncommit
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Acceptance tests: collector can withstand allocation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahUncommit -XX:ShenandoahUncommitDelay=0
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestHeapUncommit
|
||||
*
|
||||
* @run main/othervm -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahUncommit -XX:ShenandoahUncommitDelay=0
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestHeapUncommit
|
||||
*
|
||||
* @run main/othervm -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahUncommit -XX:ShenandoahUncommitDelay=0
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestHeapUncommit
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=default-lp
|
||||
* @key randomness
|
||||
|
@ -94,38 +94,6 @@
|
||||
* TestJcmdHeapDump
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @library /test/lib
|
||||
* @modules jdk.attach/com.sun.tools.attach
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* TestJcmdHeapDump
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* TestJcmdHeapDump
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestJcmdHeapDump
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules jdk.attach/com.sun.tools.attach
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestJcmdHeapDump
|
||||
*/
|
||||
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
|
@ -91,38 +91,6 @@
|
||||
* TestLotsOfCycles
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* -Dtarget=1000
|
||||
* TestLotsOfCycles
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* -Dtarget=1000
|
||||
* TestLotsOfCycles
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -Dtarget=1000
|
||||
* TestLotsOfCycles
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm/timeout=480 -Xmx16m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -Dtarget=10000
|
||||
* TestLotsOfCycles
|
||||
*/
|
||||
|
||||
public class TestLotsOfCycles {
|
||||
|
||||
static final long TARGET_MB = Long.getLong("target", 10_000); // 10 Gb allocation, around 1K cycles to handle
|
||||
|
@ -56,7 +56,6 @@ public class TestObjItrWithHeapDump {
|
||||
|
||||
String[][][] modeHeuristics = new String[][][] {
|
||||
{{"satb"}, {"adaptive", "compact", "static", "aggressive"}},
|
||||
{{"iu"}, {"adaptive", "aggressive"}},
|
||||
{{"passive"}, {"passive"}}
|
||||
};
|
||||
|
||||
|
@ -97,36 +97,6 @@ public class TestPeriodicGC {
|
||||
);
|
||||
}
|
||||
|
||||
testWith("Zero interval with iu mode",
|
||||
false,
|
||||
"-Xlog:gc",
|
||||
"-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+UnlockExperimentalVMOptions",
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-XX:ShenandoahGCMode=iu",
|
||||
"-XX:ShenandoahGuaranteedGCInterval=0"
|
||||
);
|
||||
|
||||
testWith("Short interval with iu mode",
|
||||
true,
|
||||
"-Xlog:gc",
|
||||
"-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+UnlockExperimentalVMOptions",
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-XX:ShenandoahGCMode=iu",
|
||||
"-XX:ShenandoahGuaranteedGCInterval=1000"
|
||||
);
|
||||
|
||||
testWith("Long interval with iu mode",
|
||||
false,
|
||||
"-Xlog:gc",
|
||||
"-XX:+UnlockDiagnosticVMOptions",
|
||||
"-XX:+UnlockExperimentalVMOptions",
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-XX:ShenandoahGCMode=iu",
|
||||
"-XX:ShenandoahGuaranteedGCInterval=100000" // deliberately too long
|
||||
);
|
||||
|
||||
testWith("Short interval with aggressive",
|
||||
false,
|
||||
"-Xlog:gc",
|
||||
|
@ -35,18 +35,6 @@ package gc.shenandoah;
|
||||
* gc.shenandoah.TestReferenceRefersToShenandoah
|
||||
*/
|
||||
|
||||
/* @test id=iu
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run main/othervm
|
||||
* -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* gc.shenandoah.TestReferenceRefersToShenandoah
|
||||
*/
|
||||
|
||||
/* @test id=satb-100
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
@ -60,19 +48,6 @@ package gc.shenandoah;
|
||||
* gc.shenandoah.TestReferenceRefersToShenandoah
|
||||
*/
|
||||
|
||||
/* @test id=iu-100
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @modules java.base
|
||||
* @run main jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run main/othervm
|
||||
* -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGarbageThreshold=100 -Xmx100m
|
||||
* gc.shenandoah.TestReferenceRefersToShenandoah
|
||||
*/
|
||||
|
||||
import java.lang.ref.PhantomReference;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
@ -200,10 +175,6 @@ public class TestReferenceRefersToShenandoah {
|
||||
testObject4 = null;
|
||||
}
|
||||
|
||||
private static boolean isShenandoahIUMode() {
|
||||
return "iu".equals(WB.getStringVMFlag("ShenandoahGCMode"));
|
||||
}
|
||||
|
||||
private static void testConcurrentCollection() throws Exception {
|
||||
progress("setup concurrent collection test");
|
||||
setup();
|
||||
@ -239,14 +210,7 @@ public class TestReferenceRefersToShenandoah {
|
||||
expectCleared(testPhantom1, "testPhantom1");
|
||||
expectCleared(testWeak2, "testWeak2");
|
||||
expectValue(testWeak3, testObject3, "testWeak3");
|
||||
// This is true for all currently supported concurrent collectors,
|
||||
// except Shenandoah+IU, which allows clearing refs even when
|
||||
// accessed during concurrent marking.
|
||||
if (isShenandoahIUMode()) {
|
||||
expectCleared(testWeak4, "testWeak4");
|
||||
} else {
|
||||
expectNotCleared(testWeak4, "testWeak4");
|
||||
}
|
||||
expectNotCleared(testWeak4, "testWeak4");
|
||||
|
||||
progress("verify get returns expected values");
|
||||
if (testWeak2.get() != null) {
|
||||
@ -261,12 +225,10 @@ public class TestReferenceRefersToShenandoah {
|
||||
}
|
||||
|
||||
TestObject obj4 = testWeak4.get();
|
||||
if (!isShenandoahIUMode()) {
|
||||
if (obj4 == null) {
|
||||
fail("testWeak4.get() returned null");
|
||||
} else if (obj4.value != 4) {
|
||||
fail("testWeak4.get().value is " + obj4.value);
|
||||
}
|
||||
if (obj4 == null) {
|
||||
fail("testWeak4.get() returned null");
|
||||
} else if (obj4.value != 4) {
|
||||
fail("testWeak4.get().value is " + obj4.value);
|
||||
}
|
||||
|
||||
progress("verify queue entries");
|
||||
|
@ -36,19 +36,6 @@ package gc.shenandoah;
|
||||
* gc.shenandoah.TestReferenceShortcutCycle
|
||||
*/
|
||||
|
||||
/* @test id=iu-100
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
* @modules java.base
|
||||
* @run main jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||
* @run main/othervm
|
||||
* -Xbootclasspath/a:.
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGarbageThreshold=100 -Xmx100m
|
||||
* gc.shenandoah.TestReferenceShortcutCycle
|
||||
*/
|
||||
|
||||
import java.lang.ref.PhantomReference;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
|
@ -41,25 +41,6 @@
|
||||
* TestRefprocSanity
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Test that null references/referents work fine
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx128m -Xms128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestRefprocSanity
|
||||
*
|
||||
* @run main/othervm -Xmx128m -Xms128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestRefprocSanity
|
||||
*
|
||||
* @run main/othervm -Xmx128m -Xms128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestRefprocSanity
|
||||
*/
|
||||
|
||||
import java.lang.ref.*;
|
||||
|
||||
public class TestRefprocSanity {
|
||||
|
@ -73,25 +73,6 @@
|
||||
* TestRegionSampling
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestRegionSampling
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ShenandoahRegionSampling
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestRegionSampling
|
||||
*
|
||||
*/
|
||||
|
||||
public class TestRegionSampling {
|
||||
|
||||
static final long TARGET_MB = Long.getLong("target", 2_000); // 2 Gb allocation
|
||||
|
@ -138,46 +138,6 @@
|
||||
* TestResizeTLAB
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @key randomness
|
||||
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahVerify
|
||||
* -XX:+ResizeTLAB
|
||||
* TestResizeTLAB
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahVerify
|
||||
* -XX:-ResizeTLAB
|
||||
* TestResizeTLAB
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @key randomness
|
||||
* @summary Test that Shenandoah is able to work with(out) resizeable TLABs
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* -XX:+ResizeTLAB
|
||||
* TestResizeTLAB
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* -XX:-ResizeTLAB
|
||||
* TestResizeTLAB
|
||||
*/
|
||||
|
||||
import java.util.Random;
|
||||
import jdk.test.lib.Utils;
|
||||
|
||||
|
@ -114,41 +114,6 @@
|
||||
* TestRetainObjects
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @summary Acceptance tests: collector can deal with retained objects
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* TestRetainObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* TestRetainObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestRetainObjects
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Acceptance tests: collector can deal with retained objects
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestRetainObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestRetainObjects
|
||||
*/
|
||||
|
||||
public class TestRetainObjects {
|
||||
|
||||
static final int COUNT = 10_000_000;
|
||||
|
@ -127,45 +127,6 @@
|
||||
* TestSieveObjects
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @summary Acceptance tests: collector can deal with retained objects
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* TestSieveObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* TestSieveObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestSieveObjects
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Acceptance tests: collector can deal with retained objects
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestSieveObjects
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestSieveObjects
|
||||
*/
|
||||
|
||||
import java.util.Random;
|
||||
import jdk.test.lib.Utils;
|
||||
|
||||
|
@ -65,24 +65,6 @@
|
||||
* TestStringDedup
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Test Shenandoah string deduplication implementation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules java.base/java.lang:open
|
||||
* java.management
|
||||
*
|
||||
* @run main/othervm -Xmx256m -Xlog:gc+stats -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseStringDeduplication
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:StringDeduplicationAgeThreshold=3
|
||||
* TestStringDedup
|
||||
*
|
||||
* @run main/othervm -Xmx256m -Xlog:gc+stats -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseStringDeduplication
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive -XX:StringDeduplicationAgeThreshold=3
|
||||
* TestStringDedup
|
||||
*/
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
import jdk.test.lib.Utils;
|
||||
|
@ -72,37 +72,6 @@
|
||||
* TestStringDedupStress
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Test Shenandoah string deduplication implementation
|
||||
* @key randomness
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @modules java.base/java.lang:open
|
||||
* java.management
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xlog:gc+stats -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseStringDeduplication
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestStringDedupStress
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xlog:gc+stats -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseStringDeduplication
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -DtargetStrings=2000000
|
||||
* TestStringDedupStress
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xlog:gc+stats -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseStringDeduplication
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* -DtargetStrings=2000000
|
||||
* TestStringDedupStress
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xlog:gc+stats -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseStringDeduplication
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* -DtargetStrings=2000000
|
||||
* TestStringDedupStress
|
||||
*/
|
||||
|
||||
import java.lang.management.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
|
@ -75,26 +75,6 @@
|
||||
* TestStringInternCleanup
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Check that Shenandoah cleans up interned strings
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx64m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ClassUnloadingWithConcurrentMark
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestStringInternCleanup
|
||||
*
|
||||
* @run main/othervm -Xmx64m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ClassUnloadingWithConcurrentMark
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestStringInternCleanup
|
||||
*
|
||||
* @run main/othervm -Xmx64m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+ClassUnloadingWithConcurrentMark
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestStringInternCleanup
|
||||
*/
|
||||
|
||||
public class TestStringInternCleanup {
|
||||
|
||||
static final int COUNT = 1_000_000;
|
||||
|
@ -58,33 +58,6 @@
|
||||
* TestVerifyJCStress
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Tests that we pass at least one jcstress-like test with all verification turned on
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* TestVerifyJCStress
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-c1
|
||||
* @summary Tests that we pass at least one jcstress-like test with all verification turned on
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @modules java.base/jdk.internal.misc
|
||||
* java.management
|
||||
*
|
||||
* @run main/othervm -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify -XX:TieredStopAtLevel=1
|
||||
* TestVerifyJCStress
|
||||
*/
|
||||
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.locks.*;
|
||||
|
@ -26,8 +26,7 @@
|
||||
* @test
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestWrongArrayMember
|
||||
* @run main/othervm -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu TestWrongArrayMember
|
||||
* @run main/othervm -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC TestWrongArrayMember
|
||||
*/
|
||||
|
||||
public class TestWrongArrayMember {
|
||||
|
@ -30,8 +30,6 @@
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xcomp -XX:CompileOnly=BarrierInInfiniteLoop::test1
|
||||
* -XX:CompileOnly=BarrierInInfiniteLoop::test2 -XX:CompileOnly=BarrierInInfiniteLoop::test3 -XX:CompileCommand=quiet BarrierInInfiniteLoop
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -Xcomp -XX:CompileOnly=BarrierInInfiniteLoop::test1
|
||||
* -XX:CompileOnly=BarrierInInfiniteLoop::test2 -XX:CompileOnly=BarrierInInfiniteLoop::test3 -XX:CompileCommand=quiet BarrierInInfiniteLoop
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2022, Red Hat, 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 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 8280885
|
||||
* @summary Shenandoah: Some tests failed with "EA: missing allocation reference path"
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -XX:-BackgroundCompilation -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahGCMode=iu
|
||||
* -XX:CompileCommand=dontinline,TestUnexpectedIUBarrierEA::notInlined TestUnexpectedIUBarrierEA
|
||||
*/
|
||||
|
||||
public class TestUnexpectedIUBarrierEA {
|
||||
|
||||
private static Object field;
|
||||
|
||||
public static void main(String[] args) {
|
||||
for (int i = 0; i < 20_000; i++) {
|
||||
test(false);
|
||||
}
|
||||
}
|
||||
|
||||
private static void test(boolean flag) {
|
||||
A a = new A();
|
||||
B b = new B();
|
||||
b.field = a;
|
||||
notInlined();
|
||||
Object o = b.field;
|
||||
if (!(o instanceof A)) {
|
||||
|
||||
}
|
||||
C c = new C();
|
||||
c.field = o;
|
||||
if (flag) {
|
||||
field = c.field;
|
||||
}
|
||||
}
|
||||
|
||||
private static void notInlined() {
|
||||
|
||||
}
|
||||
|
||||
private static class A {
|
||||
}
|
||||
|
||||
private static class B {
|
||||
public Object field;
|
||||
}
|
||||
|
||||
private static class C {
|
||||
public Object field;
|
||||
}
|
||||
}
|
@ -87,23 +87,6 @@
|
||||
* TestChurnNotifications
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Check that MX notifications are reported for all cycles
|
||||
* @library /test/lib /
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -Dprecise=false
|
||||
* TestChurnNotifications
|
||||
*
|
||||
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -Dprecise=false
|
||||
* TestChurnNotifications
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.*;
|
||||
import javax.management.*;
|
||||
|
@ -83,21 +83,6 @@
|
||||
* TestPauseNotifications
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @summary Check that MX notifications are reported for all cycles
|
||||
* @library /test/lib /
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* TestPauseNotifications
|
||||
*
|
||||
* @run main/othervm -Xmx128m -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* TestPauseNotifications
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.*;
|
||||
import javax.management.*;
|
||||
|
@ -124,7 +124,6 @@ public class TestClassLoaderLeak {
|
||||
|
||||
String[][][] modeHeuristics = new String[][][] {
|
||||
{{"satb"}, {"adaptive", "compact", "static", "aggressive"}},
|
||||
{{"iu"}, {"adaptive", "aggressive"}},
|
||||
{{"passive"}, {"passive"}}
|
||||
};
|
||||
|
||||
|
@ -125,23 +125,5 @@ public class TestExplicitGC {
|
||||
output.shouldNotContain(p);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
OutputAnalyzer output = ProcessTools.executeLimitedTestJava(
|
||||
"-Xmx128m",
|
||||
"-XX:+UnlockExperimentalVMOptions",
|
||||
"-XX:+UseShenandoahGC",
|
||||
"-Xlog:gc",
|
||||
"-XX:+ExplicitGCInvokesConcurrent",
|
||||
"-XX:ShenandoahGCMode=iu",
|
||||
TestExplicitGC.class.getName(),
|
||||
"test");
|
||||
for (String p : full) {
|
||||
output.shouldNotContain(p);
|
||||
}
|
||||
for (String p : concNormal) {
|
||||
output.shouldContain(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ public class TestModeUnlock {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
testWith("-XX:ShenandoahGCMode=satb", Mode.PRODUCT);
|
||||
testWith("-XX:ShenandoahGCMode=iu", Mode.EXPERIMENTAL);
|
||||
testWith("-XX:ShenandoahGCMode=passive", Mode.DIAGNOSTIC);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class TestSelectiveBarrierFlags {
|
||||
public static void main(String[] args) throws Exception {
|
||||
String[][] opts = {
|
||||
new String[] { "ShenandoahLoadRefBarrier" },
|
||||
new String[] { "ShenandoahSATBBarrier", "ShenandoahIUBarrier" },
|
||||
new String[] { "ShenandoahSATBBarrier" },
|
||||
new String[] { "ShenandoahCASBarrier" },
|
||||
new String[] { "ShenandoahCloneBarrier" },
|
||||
new String[] { "ShenandoahStackWatermarkBarrier" }
|
||||
|
@ -44,21 +44,12 @@ public class TestWrongBarrierDisable {
|
||||
"ShenandoahCloneBarrier",
|
||||
"ShenandoahStackWatermarkBarrier",
|
||||
};
|
||||
String[] iu = {
|
||||
"ShenandoahLoadRefBarrier",
|
||||
"ShenandoahIUBarrier",
|
||||
"ShenandoahCASBarrier",
|
||||
"ShenandoahCloneBarrier",
|
||||
"ShenandoahStackWatermarkBarrier",
|
||||
};
|
||||
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=adaptive", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=static", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=compact", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=aggressive", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCMode=iu", iu);
|
||||
shouldPassAll("-XX:ShenandoahGCMode=passive", concurrent);
|
||||
shouldPassAll("-XX:ShenandoahGCMode=passive", iu);
|
||||
}
|
||||
|
||||
private static void shouldFailAll(String h, String[] barriers) throws Exception {
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/* @test
|
||||
* @summary Test that disabling wrong barriers fails early
|
||||
* @summary Test that SATB barrier may be enabled for all modes
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @run driver TestWrongBarrierEnable
|
||||
@ -38,19 +38,13 @@ public class TestWrongBarrierEnable {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String[] concurrent = {
|
||||
"ShenandoahIUBarrier",
|
||||
};
|
||||
String[] iu = {
|
||||
"ShenandoahSATBBarrier",
|
||||
};
|
||||
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=adaptive", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=static", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=compact", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCHeuristics=aggressive", concurrent);
|
||||
shouldFailAll("-XX:ShenandoahGCMode=iu", iu);
|
||||
shouldPassAll("-XX:ShenandoahGCHeuristics=adaptive", concurrent);
|
||||
shouldPassAll("-XX:ShenandoahGCHeuristics=static", concurrent);
|
||||
shouldPassAll("-XX:ShenandoahGCHeuristics=compact", concurrent);
|
||||
shouldPassAll("-XX:ShenandoahGCHeuristics=aggressive", concurrent);
|
||||
shouldPassAll("-XX:ShenandoahGCMode=passive", concurrent);
|
||||
shouldPassAll("-XX:ShenandoahGCMode=passive", iu);
|
||||
}
|
||||
|
||||
private static void shouldFailAll(String h, String[] barriers) throws Exception {
|
||||
|
@ -99,47 +99,6 @@ import java.io.IOException;
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @key stress
|
||||
* @library /
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @requires vm.flavor == "server" & !vm.emulatedClient
|
||||
* @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @key stress
|
||||
* @library /
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @requires vm.flavor == "server" & !vm.emulatedClient
|
||||
* @summary Stress the Shenandoah GC by trying to make old objects more likely to be garbage than young objects.
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=passive-deopt-nmethod
|
||||
* @key stress
|
||||
@ -221,53 +180,6 @@ import java.io.IOException;
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive-deopt-nmethod
|
||||
* @key stress
|
||||
* @library /
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false
|
||||
* @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-deopt-nmethod
|
||||
* @key stress
|
||||
* @library /
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @requires vm.flavor == "server" & !vm.emulatedClient & vm.opt.ClassUnloading != false
|
||||
* @summary Stress Shenandoah GC with nmethod barrier forced deoptimization enabled.
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
|
||||
* -XX:+ShenandoahVerify
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*
|
||||
* @run main/othervm/timeout=200 -Xlog:gc*=info,nmethod+barrier=trace -Xmx1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+DeoptimizeNMethodBarriersALot -XX:-Inline
|
||||
* gc.stress.gcbasher.TestGCBasherWithShenandoah 120000
|
||||
*/
|
||||
|
||||
|
||||
public class TestGCBasherWithShenandoah {
|
||||
public static void main(String[] args) throws IOException {
|
||||
TestGCBasher.main(args);
|
||||
|
@ -102,45 +102,6 @@ package gc.stress.gcold;
|
||||
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu-aggressive
|
||||
* @key stress randomness
|
||||
* @library / /test/lib
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
|
||||
*
|
||||
* @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahOOMDuringEvacALot
|
||||
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
|
||||
*
|
||||
* @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* -XX:+ShenandoahAllocFailureALot
|
||||
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
|
||||
*
|
||||
* @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGCHeuristics=aggressive
|
||||
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @key stress randomness
|
||||
* @library / /test/lib
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
|
||||
*
|
||||
* @run main/othervm/timeout=600 -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
|
||||
*
|
||||
* @run main/othervm -Xmx384M -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* gc.stress.gcold.TestGCOld 50 1 20 10 10000
|
||||
*/
|
||||
|
||||
public class TestGCOldWithShenandoah {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
@ -40,20 +40,6 @@ package gc.stress.systemgc;
|
||||
* -XX:+UseShenandoahGC
|
||||
* gc.stress.systemgc.TestSystemGCWithShenandoah 270
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test id=iu
|
||||
* @key stress
|
||||
* @library /
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @summary Stress the Shenandoah GC full GC by allocating objects of different lifetimes concurrently with System.gc().
|
||||
*
|
||||
* @run main/othervm/timeout=300 -Xlog:gc*=info -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu
|
||||
* -XX:+ShenandoahVerify
|
||||
* gc.stress.systemgc.TestSystemGCWithShenandoah 270
|
||||
*
|
||||
*/
|
||||
public class TestSystemGCWithShenandoah {
|
||||
public static void main(String[] args) throws Exception {
|
||||
TestSystemGC.main(args);
|
||||
|
Loading…
x
Reference in New Issue
Block a user