8076294: Cleanup of CollectedHeap::kind()
authorpliden
Wed, 01 Apr 2015 10:49:08 +0200
changeset 29808 9bbc65318fdd
parent 29807 c6217428f47f
child 29809 c59a5f161524
8076294: Cleanup of CollectedHeap::kind() Reviewed-by: stefank, ecaspole
hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
hotspot/src/share/vm/gc_interface/collectedHeap.hpp
hotspot/src/share/vm/memory/genCollectedHeap.hpp
hotspot/src/share/vm/runtime/vmStructs.cpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Mon Mar 30 10:24:00 2015 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Wed Apr 01 10:49:08 2015 +0200
@@ -1008,7 +1008,7 @@
   // Set _n_par_threads according to a policy TBD.
   void set_par_threads();
 
-  virtual CollectedHeap::Name kind() const {
+  virtual Name kind() const {
     return CollectedHeap::G1CollectedHeap;
   }
 
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Mon Mar 30 10:24:00 2015 -0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Wed Apr 01 10:49:08 2015 +0200
@@ -83,7 +83,7 @@
     MarkSweep
   };
 
-  ParallelScavengeHeap::Name kind() const {
+  virtual Name kind() const {
     return CollectedHeap::ParallelScavengeHeap;
   }
 
--- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp	Mon Mar 30 10:24:00 2015 -0400
+++ b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp	Wed Apr 01 10:49:08 2015 +0200
@@ -185,8 +185,6 @@
 
  public:
   enum Name {
-    Abstract,
-    SharedHeap,
     GenCollectedHeap,
     ParallelScavengeHeap,
     G1CollectedHeap
@@ -196,7 +194,7 @@
     return _filler_array_max_size;
   }
 
-  virtual CollectedHeap::Name kind() const { return CollectedHeap::Abstract; }
+  virtual Name kind() const = 0;
 
   /**
    * Returns JNI error code JNI_ENOMEM if memory could not be allocated,
--- a/hotspot/src/share/vm/memory/genCollectedHeap.hpp	Mon Mar 30 10:24:00 2015 -0400
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.hpp	Wed Apr 01 10:49:08 2015 +0200
@@ -139,7 +139,7 @@
   // Initialize ("weak") refs processing support
   virtual void ref_processing_init();
 
-  virtual CollectedHeap::Name kind() const {
+  virtual Name kind() const {
     return CollectedHeap::GenCollectedHeap;
   }
 
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Mon Mar 30 10:24:00 2015 -0400
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Apr 01 10:49:08 2015 +0200
@@ -2253,9 +2253,9 @@
                                                                           \
   declare_constant(CardTableRS::youngergen_card)                          \
                                                                           \
-  declare_constant(CollectedHeap::Abstract)                               \
-  declare_constant(CollectedHeap::SharedHeap)                             \
   declare_constant(CollectedHeap::GenCollectedHeap)                       \
+  declare_constant(CollectedHeap::ParallelScavengeHeap)                   \
+  declare_constant(CollectedHeap::G1CollectedHeap)                        \
                                                                           \
   declare_constant(GenCollectedHeap::max_gens)                            \
                                                                           \