36 class ParGCAllocBufferWithBOT; |
36 class ParGCAllocBufferWithBOT; |
37 |
37 |
38 class TenuredGeneration: public OneContigSpaceCardGeneration { |
38 class TenuredGeneration: public OneContigSpaceCardGeneration { |
39 friend class VMStructs; |
39 friend class VMStructs; |
40 protected: |
40 protected: |
41 // current shrinking effect: this damps shrinking when the heap gets empty. |
|
42 size_t _shrink_factor; |
|
43 // Some statistics from before gc started. |
|
44 // These are gathered in the gc_prologue (and should_collect) |
|
45 // to control growing/shrinking policy in spite of promotions. |
|
46 size_t _capacity_at_prologue; |
|
47 size_t _used_at_prologue; |
|
48 |
41 |
49 #if INCLUDE_ALL_GCS |
42 #if INCLUDE_ALL_GCS |
50 // To support parallel promotion: an array of parallel allocation |
43 // To support parallel promotion: an array of parallel allocation |
51 // buffers, one per thread, initially NULL. |
44 // buffers, one per thread, initially NULL. |
52 ParGCAllocBufferWithBOT** _alloc_buffers; |
45 ParGCAllocBufferWithBOT** _alloc_buffers; |
78 // since that causes us to do an extra unnecessary pair of restart-&-stop-world. |
71 // since that causes us to do an extra unnecessary pair of restart-&-stop-world. |
79 virtual bool full_collects_younger_generations() const { |
72 virtual bool full_collects_younger_generations() const { |
80 return !CollectGen0First; |
73 return !CollectGen0First; |
81 } |
74 } |
82 |
75 |
83 // Mark sweep support |
|
84 void compute_new_size(); |
|
85 |
|
86 virtual void gc_prologue(bool full); |
76 virtual void gc_prologue(bool full); |
87 virtual void gc_epilogue(bool full); |
77 virtual void gc_epilogue(bool full); |
88 bool should_collect(bool full, |
78 bool should_collect(bool full, |
89 size_t word_size, |
79 size_t word_size, |
90 bool is_tlab); |
80 bool is_tlab); |
91 |
81 |
92 virtual void collect(bool full, |
82 virtual void collect(bool full, |
93 bool clear_all_soft_refs, |
83 bool clear_all_soft_refs, |
94 size_t size, |
84 size_t size, |
95 bool is_tlab); |
85 bool is_tlab); |
|
86 virtual void compute_new_size(); |
96 |
87 |
97 #if INCLUDE_ALL_GCS |
88 #if INCLUDE_ALL_GCS |
98 // Overrides. |
89 // Overrides. |
99 virtual oop par_promote(int thread_num, |
90 virtual oop par_promote(int thread_num, |
100 oop obj, markOop m, size_t word_sz); |
91 oop obj, markOop m, size_t word_sz); |