116 for (T* e = beg; e < chunk_end; e++) {
117 cm->mark_and_push<T>(e);
118 }
119 }
120
121 inline void ParCompactionManager::follow_array(objArrayOop obj, size_t start, size_t end) {
122 if (UseCompressedOops) {
123 follow_array_specialized<narrowOop>(obj, start, end, this);
124 } else {
125 follow_array_specialized<oop>(obj, start, end, this);
126 }
127 }
128
129 inline void ParCompactionManager::follow_contents(const ScannerTask& task, bool stolen) {
130 if (task.is_partial_array_state()) {
131 assert(PSParallelCompact::mark_bitmap()->is_marked(task.to_partial_array_state()->source()), "should be marked");
132 process_array_chunk(task.to_partial_array_state(), stolen);
133 } else {
134 oop obj = task.to_oop();
135 assert(PSParallelCompact::mark_bitmap()->is_marked(obj), "should be marked");
136 if (obj->is_objArray()) {
137 push_objArray(obj);
138 } else {
139 obj->oop_iterate(&_mark_and_push_closure);
140 }
141 }
142 }
143
144 inline void ParCompactionManager::MarkingStatsCache::push(size_t region_id, size_t live_words) {
145 size_t index = (region_id & entry_mask);
146 if (entries[index].region_id == region_id) {
147 // Hit
148 entries[index].live_words += live_words;
149 return;
150 }
151 // Miss
152 if (entries[index].live_words != 0) {
153 evict(index);
154 }
155 entries[index].region_id = region_id;
156 entries[index].live_words = live_words;
|
116 for (T* e = beg; e < chunk_end; e++) {
117 cm->mark_and_push<T>(e);
118 }
119 }
120
121 inline void ParCompactionManager::follow_array(objArrayOop obj, size_t start, size_t end) {
122 if (UseCompressedOops) {
123 follow_array_specialized<narrowOop>(obj, start, end, this);
124 } else {
125 follow_array_specialized<oop>(obj, start, end, this);
126 }
127 }
128
129 inline void ParCompactionManager::follow_contents(const ScannerTask& task, bool stolen) {
130 if (task.is_partial_array_state()) {
131 assert(PSParallelCompact::mark_bitmap()->is_marked(task.to_partial_array_state()->source()), "should be marked");
132 process_array_chunk(task.to_partial_array_state(), stolen);
133 } else {
134 oop obj = task.to_oop();
135 assert(PSParallelCompact::mark_bitmap()->is_marked(obj), "should be marked");
136 if (obj->is_refArray()) {
137 push_objArray(obj);
138 } else {
139 obj->oop_iterate(&_mark_and_push_closure);
140 }
141 }
142 }
143
144 inline void ParCompactionManager::MarkingStatsCache::push(size_t region_id, size_t live_words) {
145 size_t index = (region_id & entry_mask);
146 if (entries[index].region_id == region_id) {
147 // Hit
148 entries[index].live_words += live_words;
149 return;
150 }
151 // Miss
152 if (entries[index].live_words != 0) {
153 evict(index);
154 }
155 entries[index].region_id = region_id;
156 entries[index].live_words = live_words;
|