From 1d78780abd0d6743316fb8425287cda37c57cca8 Mon Sep 17 00:00:00 2001 From: jwilhelm Date: Mon, 21 Oct 2013 18:51:37 +0200 Subject: [PATCH] 8026851: Remove unnecessary code in GenRemSet Summary: Removed the GenRemSet::rem_set_name() since we only have one remset. Reviewed-by: stefank, mgerdin, tschatzl --- src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp | 2 +- src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp | 2 -- src/share/vm/memory/collectorPolicy.cpp | 1 - src/share/vm/memory/collectorPolicy.hpp | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp index 92eee2e8e..ad1dce175 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @@ -320,7 +320,7 @@ G1CollectorPolicy::G1CollectorPolicy() : void G1CollectorPolicy::initialize_flags() { _min_alignment = HeapRegion::GrainBytes; - size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name()); + size_t card_table_alignment = GenRemSet::max_alignment_constraint(GenRemSet::CardTable); size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size(); _max_alignment = MAX3(card_table_alignment, _min_alignment, page_size); if (SurvivorRatio < 1) { diff --git a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp index a497f2fa3..d5bdc0869 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @@ -665,8 +665,6 @@ public: BarrierSet::Name barrier_set_name() { return BarrierSet::G1SATBCTLogging; } - GenRemSet::Name rem_set_name() { return GenRemSet::CardTable; } - bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0); // Record the start and end of an evacuation pause. diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp index a3c466327..d6c4afe2f 100644 --- a/src/share/vm/memory/collectorPolicy.cpp +++ b/src/share/vm/memory/collectorPolicy.cpp @@ -105,7 +105,6 @@ bool CollectorPolicy::use_should_clear_all_soft_refs(bool v) { GenRemSet* CollectorPolicy::create_rem_set(MemRegion whole_heap, int max_covered_regions) { - assert(rem_set_name() == GenRemSet::CardTable, "unrecognized GenRemSet::Name"); return new CardTableRS(whole_heap, max_covered_regions); } diff --git a/src/share/vm/memory/collectorPolicy.hpp b/src/share/vm/memory/collectorPolicy.hpp index 42976b345..a86f45c54 100644 --- a/src/share/vm/memory/collectorPolicy.hpp +++ b/src/share/vm/memory/collectorPolicy.hpp @@ -151,7 +151,6 @@ class CollectorPolicy : public CHeapObj { virtual BarrierSet::Name barrier_set_name() = 0; - virtual GenRemSet::Name rem_set_name() = 0; // Create the remembered set (to cover the given reserved region, // allowing breaking up into at most "max_covered_regions"). @@ -303,7 +302,6 @@ class TwoGenerationCollectorPolicy : public GenCollectorPolicy { int number_of_generations() { return 2; } BarrierSet::Name barrier_set_name() { return BarrierSet::CardTableModRef; } - GenRemSet::Name rem_set_name() { return GenRemSet::CardTable; } virtual CollectorPolicy::Name kind() { return CollectorPolicy::TwoGenerationCollectorPolicyKind; -- GitLab