8026851: Remove unnecessary code in GenRemSet
authorjwilhelm
Mon, 21 Oct 2013 18:51:37 +0200
changeset 21558 8dcd5451cdca
parent 21196 538177a5209a
child 21559 c5421f5c6ffd
8026851: Remove unnecessary code in GenRemSet Summary: Removed the GenRemSet::rem_set_name() since we only have one remset. Reviewed-by: stefank, mgerdin, tschatzl
hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
hotspot/src/share/vm/memory/collectorPolicy.cpp
hotspot/src/share/vm/memory/collectorPolicy.hpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Mon Oct 28 13:27:57 2013 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Mon Oct 21 18:51:37 2013 +0200
@@ -320,7 +320,7 @@
 
 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) {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Mon Oct 28 13:27:57 2013 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Mon Oct 21 18:51:37 2013 +0200
@@ -665,8 +665,6 @@
 
   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.
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp	Mon Oct 28 13:27:57 2013 +0100
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp	Mon Oct 21 18:51:37 2013 +0200
@@ -105,7 +105,6 @@
 
 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);
 }
 
--- a/hotspot/src/share/vm/memory/collectorPolicy.hpp	Mon Oct 28 13:27:57 2013 +0100
+++ b/hotspot/src/share/vm/memory/collectorPolicy.hpp	Mon Oct 21 18:51:37 2013 +0200
@@ -151,7 +151,6 @@
 
 
   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 @@
 
   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;