8067499: G1SATBCardTableModRefBS should not inherit from CardTableModRefBSForCTRS
G1SATBCardTableModRefBS inherits from CardTableModRefBS Reviewed-by: mgerdin, brutisso, tschatzl
This commit is contained in:
parent
12797a11c0
commit
57198d2b63
@ -1886,13 +1886,12 @@ jint G1CollectedHeap::initialize() {
|
||||
|
||||
initialize_reserved_region((HeapWord*)heap_rs.base(), (HeapWord*)(heap_rs.base() + heap_rs.size()));
|
||||
|
||||
// Create the gen rem set (and barrier set) for the entire reserved region.
|
||||
_rem_set = collector_policy()->create_rem_set(reserved_region());
|
||||
set_barrier_set(rem_set()->bs());
|
||||
if (!barrier_set()->is_a(BarrierSet::G1SATBCTLogging)) {
|
||||
vm_exit_during_initialization("G1 requires a G1SATBLoggingCardTableModRefBS");
|
||||
return JNI_ENOMEM;
|
||||
}
|
||||
// Create the barrier set for the entire reserved region.
|
||||
G1SATBCardTableLoggingModRefBS* bs
|
||||
= new G1SATBCardTableLoggingModRefBS(reserved_region());
|
||||
bs->initialize();
|
||||
assert(bs->is_a(BarrierSet::G1SATBCTLogging), "sanity");
|
||||
set_barrier_set(bs);
|
||||
|
||||
// Also create a G1 rem set.
|
||||
_g1_rem_set = new G1RemSet(this, g1_barrier_set());
|
||||
@ -3153,8 +3152,6 @@ void G1CollectedHeap::verify(bool silent, VerifyOption vo) {
|
||||
failures = true;
|
||||
}
|
||||
}
|
||||
if (!silent) gclog_or_tty->print("RemSet ");
|
||||
rem_set()->verify();
|
||||
|
||||
if (G1StringDedup::is_enabled()) {
|
||||
if (!silent) gclog_or_tty->print("StrDedup ");
|
||||
@ -5588,8 +5585,6 @@ void G1CollectedHeap::evacuate_collection_set(EvacuationInfo& evacuation_info) {
|
||||
|
||||
init_for_evac_failure(NULL);
|
||||
|
||||
rem_set()->prepare_for_younger_refs_iterate(true);
|
||||
|
||||
assert(dirty_card_queue_set().completed_buffers_num() == 0, "Should be empty");
|
||||
double start_par_time_sec = os::elapsedTime();
|
||||
double end_par_time_sec;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,7 +33,7 @@
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap) :
|
||||
CardTableModRefBSForCTRS(whole_heap)
|
||||
CardTableModRefBS(whole_heap)
|
||||
{
|
||||
_kind = G1SATBCT;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -37,7 +37,7 @@ class G1SATBCardTableLoggingModRefBS;
|
||||
// This barrier is specialized to use a logging barrier to support
|
||||
// snapshot-at-the-beginning marking.
|
||||
|
||||
class G1SATBCardTableModRefBS: public CardTableModRefBSForCTRS {
|
||||
class G1SATBCardTableModRefBS: public CardTableModRefBS {
|
||||
protected:
|
||||
enum G1CardValues {
|
||||
g1_young_gen = CT_MR_BS_last_reserved << 1
|
||||
|
@ -33,24 +33,13 @@
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc_implementation/g1/concurrentMark.hpp"
|
||||
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
CardTableRS::CardTableRS(MemRegion whole_heap) :
|
||||
GenRemSet(),
|
||||
_cur_youngergen_card_val(youngergenP1_card)
|
||||
{
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseG1GC) {
|
||||
_ct_bs = new G1SATBCardTableLoggingModRefBS(whole_heap);
|
||||
} else {
|
||||
_ct_bs = new CardTableModRefBSForCTRS(whole_heap);
|
||||
}
|
||||
#else
|
||||
guarantee(Universe::heap()->kind() == CollectedHeap::GenCollectedHeap, "sanity");
|
||||
_ct_bs = new CardTableModRefBSForCTRS(whole_heap);
|
||||
#endif
|
||||
_ct_bs->initialize();
|
||||
set_bs(_ct_bs);
|
||||
_last_cur_val_in_gen = NEW_C_HEAP_ARRAY3(jbyte, GenCollectedHeap::max_gens + 1,
|
||||
|
@ -70,6 +70,7 @@ enum GCH_strong_roots_tasks {
|
||||
|
||||
GenCollectedHeap::GenCollectedHeap(GenCollectorPolicy *policy) :
|
||||
SharedHeap(policy),
|
||||
_rem_set(NULL),
|
||||
_gen_policy(policy),
|
||||
_gen_process_roots_tasks(new SubTasksDone(GCH_PS_NumElements)),
|
||||
_full_collections_completed(0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -66,6 +66,9 @@ public:
|
||||
Generation* _gens[max_gens];
|
||||
GenerationSpec** _gen_specs;
|
||||
|
||||
// The singleton Gen Remembered Set.
|
||||
GenRemSet* _rem_set;
|
||||
|
||||
// The generational collector policy.
|
||||
GenCollectorPolicy* _gen_policy;
|
||||
|
||||
@ -383,6 +386,10 @@ public:
|
||||
return _n_gens;
|
||||
}
|
||||
|
||||
// This function returns the "GenRemSet" object that allows us to scan
|
||||
// generations in a fully generational heap.
|
||||
GenRemSet* rem_set() { return _rem_set; }
|
||||
|
||||
// Convenience function to be used in situations where the heap type can be
|
||||
// asserted to be this type.
|
||||
static GenCollectedHeap* heap();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,7 +44,7 @@ inline void OopsInGenClosure::set_generation(Generation* gen) {
|
||||
_gen_boundary = _gen->reserved().start();
|
||||
// Barrier set for the heap, must be set after heap is initialized
|
||||
if (_rs == NULL) {
|
||||
GenRemSet* rs = SharedHeap::heap()->rem_set();
|
||||
GenRemSet* rs = GenCollectedHeap::heap()->rem_set();
|
||||
_rs = (CardTableRS*)rs;
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ void Generation::oop_iterate(ExtendedOopClosure* cl) {
|
||||
|
||||
void Generation::younger_refs_in_space_iterate(Space* sp,
|
||||
OopsInGenClosure* cl) {
|
||||
GenRemSet* rs = SharedHeap::heap()->rem_set();
|
||||
GenRemSet* rs = GenCollectedHeap::heap()->rem_set();
|
||||
rs->younger_refs_in_space_iterate(sp, cl);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,6 @@ enum SH_process_roots_tasks {
|
||||
SharedHeap::SharedHeap(CollectorPolicy* policy_) :
|
||||
CollectedHeap(),
|
||||
_collector_policy(policy_),
|
||||
_rem_set(NULL),
|
||||
_strong_roots_scope(NULL),
|
||||
_strong_roots_parity(0),
|
||||
_process_strong_tasks(new SubTasksDone(SH_PS_NumElements)),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -114,10 +114,6 @@ protected:
|
||||
// set the static pointer "_sh" to that instance.
|
||||
static SharedHeap* _sh;
|
||||
|
||||
// and the Gen Remembered Set, at least one good enough to scan the perm
|
||||
// gen.
|
||||
GenRemSet* _rem_set;
|
||||
|
||||
// A gc policy, controls global gc resource issues
|
||||
CollectorPolicy *_collector_policy;
|
||||
|
||||
@ -152,10 +148,6 @@ public:
|
||||
// Initialization of ("weak") reference processing support
|
||||
virtual void ref_processing_init();
|
||||
|
||||
// This function returns the "GenRemSet" object that allows us to scan
|
||||
// generations in a fully generational heap.
|
||||
GenRemSet* rem_set() { return _rem_set; }
|
||||
|
||||
// Iteration functions.
|
||||
void oop_iterate(ExtendedOopClosure* cl) = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user