36
36
#include " gc/g1/g1FullGCScope.hpp"
37
37
#include " gc/g1/g1OopClosures.hpp"
38
38
#include " gc/g1/g1Policy.hpp"
39
+ #include " gc/g1/g1RegionMarkStatsCache.inline.hpp"
39
40
#include " gc/g1/g1StringDedup.hpp"
40
41
#include " gc/shared/gcTraceTime.inline.hpp"
41
42
#include " gc/shared/preservedMarks.hpp"
@@ -122,8 +123,14 @@ G1FullCollector::G1FullCollector(G1CollectedHeap* heap, bool explicit_gc, bool c
122
123
_preserved_marks_set.init (_num_workers);
123
124
_markers = NEW_C_HEAP_ARRAY (G1FullGCMarker*, _num_workers, mtGC);
124
125
_compaction_points = NEW_C_HEAP_ARRAY (G1FullGCCompactionPoint*, _num_workers, mtGC);
126
+
127
+ _live_stats = NEW_C_HEAP_ARRAY (G1RegionMarkStats, _heap->max_regions (), mtGC);
128
+ for (uint j = 0 ; j < heap->max_regions (); j++) {
129
+ _live_stats[j].clear ();
130
+ }
131
+
125
132
for (uint i = 0 ; i < _num_workers; i++) {
126
- _markers[i] = new G1FullGCMarker (this , i, _preserved_marks_set.get (i));
133
+ _markers[i] = new G1FullGCMarker (this , i, _preserved_marks_set.get (i), _live_stats );
127
134
_compaction_points[i] = new G1FullGCCompactionPoint ();
128
135
_oop_queue_set.register_queue (i, marker (i)->oop_stack ());
129
136
_array_queue_set.register_queue (i, marker (i)->objarray_stack ());
@@ -138,6 +145,7 @@ G1FullCollector::~G1FullCollector() {
138
145
}
139
146
FREE_C_HEAP_ARRAY (G1FullGCMarker*, _markers);
140
147
FREE_C_HEAP_ARRAY (G1FullGCCompactionPoint*, _compaction_points);
148
+ FREE_C_HEAP_ARRAY (G1RegionMarkStats, _live_stats);
141
149
}
142
150
143
151
class PrepareRegionsClosure : public HeapRegionClosure {
0 commit comments