27 |
27 |
28 #include "gc_implementation/shared/cSpaceCounters.hpp" |
28 #include "gc_implementation/shared/cSpaceCounters.hpp" |
29 #include "gc_implementation/shared/gcStats.hpp" |
29 #include "gc_implementation/shared/gcStats.hpp" |
30 #include "gc_implementation/shared/generationCounters.hpp" |
30 #include "gc_implementation/shared/generationCounters.hpp" |
31 #include "memory/generation.hpp" |
31 #include "memory/generation.hpp" |
|
32 #include "utilities/macros.hpp" |
32 |
33 |
33 // TenuredGeneration models the heap containing old (promoted/tenured) objects. |
34 // TenuredGeneration models the heap containing old (promoted/tenured) objects. |
34 |
35 |
35 class ParGCAllocBufferWithBOT; |
36 class ParGCAllocBufferWithBOT; |
36 |
37 |
43 // These are gathered in the gc_prologue (and should_collect) |
44 // These are gathered in the gc_prologue (and should_collect) |
44 // to control growing/shrinking policy in spite of promotions. |
45 // to control growing/shrinking policy in spite of promotions. |
45 size_t _capacity_at_prologue; |
46 size_t _capacity_at_prologue; |
46 size_t _used_at_prologue; |
47 size_t _used_at_prologue; |
47 |
48 |
48 #ifndef SERIALGC |
49 #if INCLUDE_ALL_GCS |
49 // To support parallel promotion: an array of parallel allocation |
50 // To support parallel promotion: an array of parallel allocation |
50 // buffers, one per thread, initially NULL. |
51 // buffers, one per thread, initially NULL. |
51 ParGCAllocBufferWithBOT** _alloc_buffers; |
52 ParGCAllocBufferWithBOT** _alloc_buffers; |
52 #endif // SERIALGC |
53 #endif // INCLUDE_ALL_GCS |
53 |
54 |
54 // Retire all alloc buffers before a full GC, so that they will be |
55 // Retire all alloc buffers before a full GC, so that they will be |
55 // re-allocated at the start of the next young GC. |
56 // re-allocated at the start of the next young GC. |
56 void retire_alloc_buffers_before_full_gc(); |
57 void retire_alloc_buffers_before_full_gc(); |
57 |
58 |
91 virtual void collect(bool full, |
92 virtual void collect(bool full, |
92 bool clear_all_soft_refs, |
93 bool clear_all_soft_refs, |
93 size_t size, |
94 size_t size, |
94 bool is_tlab); |
95 bool is_tlab); |
95 |
96 |
96 #ifndef SERIALGC |
97 #if INCLUDE_ALL_GCS |
97 // Overrides. |
98 // Overrides. |
98 virtual oop par_promote(int thread_num, |
99 virtual oop par_promote(int thread_num, |
99 oop obj, markOop m, size_t word_sz); |
100 oop obj, markOop m, size_t word_sz); |
100 virtual void par_promote_alloc_undo(int thread_num, |
101 virtual void par_promote_alloc_undo(int thread_num, |
101 HeapWord* obj, size_t word_sz); |
102 HeapWord* obj, size_t word_sz); |
102 virtual void par_promote_alloc_done(int thread_num); |
103 virtual void par_promote_alloc_done(int thread_num); |
103 #endif // SERIALGC |
104 #endif // INCLUDE_ALL_GCS |
104 |
105 |
105 // Performance Counter support |
106 // Performance Counter support |
106 void update_counters(); |
107 void update_counters(); |
107 |
108 |
108 // Statistics |
109 // Statistics |