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