src/share/vm/memory/collectorPolicy.hpp

changeset 777
37f87013dfd8
parent 448
183f41cf8bfe
child 791
1ee8caae33af
     1.1 --- a/src/share/vm/memory/collectorPolicy.hpp	Wed Jun 04 13:51:09 2008 -0700
     1.2 +++ b/src/share/vm/memory/collectorPolicy.hpp	Thu Jun 05 15:57:56 2008 -0700
     1.3 @@ -39,10 +39,12 @@
     1.4  // Forward declarations.
     1.5  class GenCollectorPolicy;
     1.6  class TwoGenerationCollectorPolicy;
     1.7 +class AdaptiveSizePolicy;
     1.8  #ifndef SERIALGC
     1.9  class ConcurrentMarkSweepPolicy;
    1.10 +class G1CollectorPolicy;
    1.11  #endif // SERIALGC
    1.12 -class AdaptiveSizePolicy;
    1.13 +
    1.14  class GCPolicyCounters;
    1.15  class PermanentGenerationSpec;
    1.16  class MarkSweepPolicy;
    1.17 @@ -55,7 +57,7 @@
    1.18    // Requires that the concrete subclass sets the alignment constraints
    1.19    // before calling.
    1.20    virtual void initialize_flags();
    1.21 -  virtual void initialize_size_info() = 0;
    1.22 +  virtual void initialize_size_info();
    1.23    // Initialize "_permanent_generation" to a spec for the given kind of
    1.24    // Perm Gen.
    1.25    void initialize_perm_generation(PermGen::Name pgnm);
    1.26 @@ -91,17 +93,18 @@
    1.27    enum Name {
    1.28      CollectorPolicyKind,
    1.29      TwoGenerationCollectorPolicyKind,
    1.30 -    TrainPolicyKind,
    1.31      ConcurrentMarkSweepPolicyKind,
    1.32 -    ASConcurrentMarkSweepPolicyKind
    1.33 +    ASConcurrentMarkSweepPolicyKind,
    1.34 +    G1CollectorPolicyKind
    1.35    };
    1.36  
    1.37    // Identification methods.
    1.38 -  virtual GenCollectorPolicy*           as_generation_policy()          { return NULL; }
    1.39 +  virtual GenCollectorPolicy*           as_generation_policy()            { return NULL; }
    1.40    virtual TwoGenerationCollectorPolicy* as_two_generation_policy()        { return NULL; }
    1.41    virtual MarkSweepPolicy*              as_mark_sweep_policy()            { return NULL; }
    1.42  #ifndef SERIALGC
    1.43    virtual ConcurrentMarkSweepPolicy*    as_concurrent_mark_sweep_policy() { return NULL; }
    1.44 +  virtual G1CollectorPolicy*            as_g1_policy()                    { return NULL; }
    1.45  #endif // SERIALGC
    1.46    // Note that these are not virtual.
    1.47    bool is_generation_policy()            { return as_generation_policy() != NULL; }
    1.48 @@ -109,10 +112,13 @@
    1.49    bool is_mark_sweep_policy()            { return as_mark_sweep_policy() != NULL; }
    1.50  #ifndef SERIALGC
    1.51    bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
    1.52 +  bool is_g1_policy()                    { return as_g1_policy() != NULL; }
    1.53  #else  // SERIALGC
    1.54    bool is_concurrent_mark_sweep_policy() { return false; }
    1.55 +  bool is_g1_policy()                    { return false; }
    1.56  #endif // SERIALGC
    1.57  
    1.58 +
    1.59    virtual PermanentGenerationSpec *permanent_generation() {
    1.60      assert(_permanent_generation != NULL, "Sanity check");
    1.61      return _permanent_generation;

mercurial