36 class ParGCAllocBufferWithBOT;
37
38 class TenuredGeneration: public OneContigSpaceCardGeneration {
39 friend class VMStructs;
40 protected:
41
42 #if INCLUDE_ALL_GCS
43 // To support parallel promotion: an array of parallel allocation
44 // buffers, one per thread, initially NULL.
45 ParGCAllocBufferWithBOT** _alloc_buffers;
46 #endif // INCLUDE_ALL_GCS
47
48 // Retire all alloc buffers before a full GC, so that they will be
49 // re-allocated at the start of the next young GC.
50 void retire_alloc_buffers_before_full_gc();
51
52 GenerationCounters* _gen_counters;
53 CSpaceCounters* _space_counters;
54
55 public:
56 TenuredGeneration(ReservedSpace rs, size_t initial_byte_size, int level,
57 GenRemSet* remset);
58
59 Generation::Name kind() { return Generation::MarkSweepCompact; }
60
61 // Printing
62 const char* name() const;
63 const char* short_name() const { return "Tenured"; }
64 bool must_be_youngest() const { return false; }
65 bool must_be_oldest() const { return true; }
66
67 // Does a "full" (forced) collection invoked on this generation collect
68 // all younger generations as well? Note that this is a
69 // hack to allow the collection of the younger gen first if the flag is
70 // set.
71 virtual bool full_collects_younger_generations() const {
72 return !ScavengeBeforeFullGC;
73 }
74
75 virtual void gc_prologue(bool full);
76 virtual void gc_epilogue(bool full);
81 virtual void collect(bool full,
82 bool clear_all_soft_refs,
83 size_t size,
84 bool is_tlab);
85 virtual void compute_new_size();
86
87 #if INCLUDE_ALL_GCS
88 // Overrides.
89 virtual oop par_promote(int thread_num,
90 oop obj, markOop m, size_t word_sz);
91 virtual void par_promote_alloc_undo(int thread_num,
92 HeapWord* obj, size_t word_sz);
93 virtual void par_promote_alloc_done(int thread_num);
94 #endif // INCLUDE_ALL_GCS
95
96 // Performance Counter support
97 void update_counters();
98
99 // Statistics
100
101 virtual void update_gc_stats(int level, bool full);
102
103 virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const;
104
105 void verify_alloc_buffers_clean();
106 };
107
108 #endif // SHARE_VM_MEMORY_TENUREDGENERATION_HPP
|
36 class ParGCAllocBufferWithBOT;
37
38 class TenuredGeneration: public OneContigSpaceCardGeneration {
39 friend class VMStructs;
40 protected:
41
42 #if INCLUDE_ALL_GCS
43 // To support parallel promotion: an array of parallel allocation
44 // buffers, one per thread, initially NULL.
45 ParGCAllocBufferWithBOT** _alloc_buffers;
46 #endif // INCLUDE_ALL_GCS
47
48 // Retire all alloc buffers before a full GC, so that they will be
49 // re-allocated at the start of the next young GC.
50 void retire_alloc_buffers_before_full_gc();
51
52 GenerationCounters* _gen_counters;
53 CSpaceCounters* _space_counters;
54
55 public:
56 TenuredGeneration(ReservedSpace rs, size_t initial_byte_size,
57 GenRemSet* remset);
58
59 Generation::Name kind() { return Generation::MarkSweepCompact; }
60
61 // Printing
62 const char* name() const;
63 const char* short_name() const { return "Tenured"; }
64 bool must_be_youngest() const { return false; }
65 bool must_be_oldest() const { return true; }
66
67 // Does a "full" (forced) collection invoked on this generation collect
68 // all younger generations as well? Note that this is a
69 // hack to allow the collection of the younger gen first if the flag is
70 // set.
71 virtual bool full_collects_younger_generations() const {
72 return !ScavengeBeforeFullGC;
73 }
74
75 virtual void gc_prologue(bool full);
76 virtual void gc_epilogue(bool full);
81 virtual void collect(bool full,
82 bool clear_all_soft_refs,
83 size_t size,
84 bool is_tlab);
85 virtual void compute_new_size();
86
87 #if INCLUDE_ALL_GCS
88 // Overrides.
89 virtual oop par_promote(int thread_num,
90 oop obj, markOop m, size_t word_sz);
91 virtual void par_promote_alloc_undo(int thread_num,
92 HeapWord* obj, size_t word_sz);
93 virtual void par_promote_alloc_done(int thread_num);
94 #endif // INCLUDE_ALL_GCS
95
96 // Performance Counter support
97 void update_counters();
98
99 // Statistics
100
101 virtual void update_gc_stats(Generation* current_generation, bool full);
102
103 virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const;
104
105 void verify_alloc_buffers_clean();
106 };
107
108 #endif // SHARE_VM_MEMORY_TENUREDGENERATION_HPP
|