src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp

changeset 4037
da91efe96a93
parent 3711
b632e80fc9dc
child 4904
7b835924c31c
     1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -28,7 +28,6 @@
     1.4  #include "gc_implementation/parallelScavenge/objectStartArray.hpp"
     1.5  #include "gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp"
     1.6  #include "gc_implementation/parallelScavenge/psOldGen.hpp"
     1.7 -#include "gc_implementation/parallelScavenge/psPermGen.hpp"
     1.8  #include "gc_implementation/parallelScavenge/psYoungGen.hpp"
     1.9  #include "gc_implementation/shared/gcPolicyCounters.hpp"
    1.10  #include "gc_interface/collectedHeap.inline.hpp"
    1.11 @@ -45,7 +44,6 @@
    1.12   private:
    1.13    static PSYoungGen* _young_gen;
    1.14    static PSOldGen*   _old_gen;
    1.15 -  static PSPermGen*  _perm_gen;
    1.16  
    1.17    // Sizing policy for entire heap
    1.18    static PSAdaptiveSizePolicy* _size_policy;
    1.19 @@ -53,7 +51,6 @@
    1.20  
    1.21    static ParallelScavengeHeap* _psh;
    1.22  
    1.23 -  size_t _perm_gen_alignment;
    1.24    size_t _young_gen_alignment;
    1.25    size_t _old_gen_alignment;
    1.26  
    1.27 @@ -79,7 +76,6 @@
    1.28   public:
    1.29    ParallelScavengeHeap() : CollectedHeap() {
    1.30      _death_march_count = 0;
    1.31 -    set_alignment(_perm_gen_alignment, intra_heap_alignment());
    1.32      set_alignment(_young_gen_alignment, intra_heap_alignment());
    1.33      set_alignment(_old_gen_alignment, intra_heap_alignment());
    1.34    }
    1.35 @@ -94,12 +90,10 @@
    1.36      return CollectedHeap::ParallelScavengeHeap;
    1.37    }
    1.38  
    1.39 -CollectorPolicy* collector_policy() const { return (CollectorPolicy*) _collector_policy; }
    1.40 -  // GenerationSizer* collector_policy() const { return _collector_policy; }
    1.41 +  virtual CollectorPolicy* collector_policy() const { return (CollectorPolicy*) _collector_policy; }
    1.42  
    1.43    static PSYoungGen* young_gen()     { return _young_gen; }
    1.44    static PSOldGen* old_gen()         { return _old_gen; }
    1.45 -  static PSPermGen* perm_gen()       { return _perm_gen; }
    1.46  
    1.47    virtual PSAdaptiveSizePolicy* size_policy() { return _size_policy; }
    1.48  
    1.49 @@ -117,7 +111,6 @@
    1.50    void post_initialize();
    1.51    void update_counters();
    1.52    // The alignment used for the various generations.
    1.53 -  size_t perm_gen_alignment()  const { return _perm_gen_alignment; }
    1.54    size_t young_gen_alignment() const { return _young_gen_alignment; }
    1.55    size_t old_gen_alignment()  const { return _old_gen_alignment; }
    1.56  
    1.57 @@ -128,7 +121,7 @@
    1.58    size_t capacity() const;
    1.59    size_t used() const;
    1.60  
    1.61 -  // Return "true" if all generations (but perm) have reached the
    1.62 +  // Return "true" if all generations have reached the
    1.63    // maximal committed limit that they can reach, without a garbage
    1.64    // collection.
    1.65    virtual bool is_maximal_no_gc() const;
    1.66 @@ -142,29 +135,19 @@
    1.67    // Does this heap support heap inspection? (+PrintClassHistogram)
    1.68    bool supports_heap_inspection() const { return true; }
    1.69  
    1.70 -  size_t permanent_capacity() const;
    1.71 -  size_t permanent_used() const;
    1.72 -
    1.73    size_t max_capacity() const;
    1.74  
    1.75    // Whether p is in the allocated part of the heap
    1.76    bool is_in(const void* p) const;
    1.77  
    1.78    bool is_in_reserved(const void* p) const;
    1.79 -  bool is_in_permanent(const void *p) const {    // reserved part
    1.80 -    return perm_gen()->reserved().contains(p);
    1.81 -  }
    1.82  
    1.83  #ifdef ASSERT
    1.84    virtual bool is_in_partial_collection(const void *p);
    1.85  #endif
    1.86  
    1.87 -  bool is_permanent(const void *p) const {    // committed part
    1.88 -    return perm_gen()->is_in(p);
    1.89 -  }
    1.90 -
    1.91 -  inline bool is_in_young(oop p);        // reserved part
    1.92 -  inline bool is_in_old_or_perm(oop p);  // reserved part
    1.93 +  bool is_in_young(oop p);        // reserved part
    1.94 +  bool is_in_old(oop p);          // reserved part
    1.95  
    1.96    // Memory allocation.   "gc_time_limit_was_exceeded" will
    1.97    // be set to true if the adaptive size policy determine that
    1.98 @@ -179,18 +162,9 @@
    1.99    // of the old generation.
   1.100    HeapWord* failed_mem_allocate(size_t size);
   1.101  
   1.102 -  HeapWord* permanent_mem_allocate(size_t size);
   1.103 -  HeapWord* failed_permanent_mem_allocate(size_t size);
   1.104 -
   1.105    // Support for System.gc()
   1.106    void collect(GCCause::Cause cause);
   1.107  
   1.108 -  // This interface assumes that it's being called by the
   1.109 -  // vm thread. It collects the heap assuming that the
   1.110 -  // heap lock is already held and that we are executing in
   1.111 -  // the context of the vm thread.
   1.112 -  void collect_as_vm_thread(GCCause::Cause cause);
   1.113 -
   1.114    // These also should be called by the vm thread at a safepoint (e.g., from a
   1.115    // VM operation).
   1.116    //
   1.117 @@ -199,7 +173,9 @@
   1.118    // maximum_compaction is true, it will compact everything and clear all soft
   1.119    // references.
   1.120    inline void invoke_scavenge();
   1.121 -  inline void invoke_full_gc(bool maximum_compaction);
   1.122 +
   1.123 +  // Perform a full collection
   1.124 +  virtual void do_full_collection(bool clear_all_soft_refs);
   1.125  
   1.126    bool supports_inline_contig_alloc() const { return !UseNUMA; }
   1.127  
   1.128 @@ -232,18 +208,9 @@
   1.129    // initializing stores to an object at this address.
   1.130    virtual bool can_elide_initializing_store_barrier(oop new_obj);
   1.131  
   1.132 -  // Can a compiler elide a store barrier when it writes
   1.133 -  // a permanent oop into the heap?  Applies when the compiler
   1.134 -  // is storing x to the heap, where x->is_perm() is true.
   1.135 -  virtual bool can_elide_permanent_oop_store_barriers() const {
   1.136 -    return true;
   1.137 -  }
   1.138 -
   1.139 -  void oop_iterate(OopClosure* cl);
   1.140 +  void oop_iterate(ExtendedOopClosure* cl);
   1.141    void object_iterate(ObjectClosure* cl);
   1.142    void safe_object_iterate(ObjectClosure* cl) { object_iterate(cl); }
   1.143 -  void permanent_oop_iterate(OopClosure* cl);
   1.144 -  void permanent_object_iterate(ObjectClosure* cl);
   1.145  
   1.146    HeapWord* block_start(const void* addr) const;
   1.147    size_t block_size(const HeapWord* addr) const;

mercurial