comparison src/share/vm/gc_implementation/parallelScavenge/psMarkSweepDecorator.cpp @ 7448:b735136e0d82

8004132: SerialGC: ValidateMarkSweep broken when running GCOld Summary: Remove bit-rotten ValidateMarkSweep functionality and flag. Reviewed-by: johnc, jmasa Contributed-by: tamao <tao.mao@oracle.com>
author johnc
date Wed, 02 Jan 2013 11:32:41 -0800
parents da91efe96a93
children 12f651e29f6b
comparison
equal deleted inserted replaced
7447:1de1b145f6bc 7448:b735136e0d82
162 // Update object start array 162 // Update object start array
163 if (start_array) { 163 if (start_array) {
164 start_array->allocate_block(compact_top); 164 start_array->allocate_block(compact_top);
165 } 165 }
166 166
167 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::register_live_oop(oop(q), size));
168 compact_top += size; 167 compact_top += size;
169 assert(compact_top <= dest->space()->end(), 168 assert(compact_top <= dest->space()->end(),
170 "Exceeding space in destination"); 169 "Exceeding space in destination");
171 170
172 q += size; 171 q += size;
223 // Update object start array 222 // Update object start array
224 if (start_array) { 223 if (start_array) {
225 start_array->allocate_block(compact_top); 224 start_array->allocate_block(compact_top);
226 } 225 }
227 226
228 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::register_live_oop(oop(q), sz));
229 compact_top += sz; 227 compact_top += sz;
230 assert(compact_top <= dest->space()->end(), 228 assert(compact_top <= dest->space()->end(),
231 "Exceeding space in destination"); 229 "Exceeding space in destination");
232 230
233 q = end; 231 q = end;
302 // reinitialized the mark word during the previous pass, so we can't 300 // reinitialized the mark word during the previous pass, so we can't
303 // use is_gc_marked for the traversal. 301 // use is_gc_marked for the traversal.
304 HeapWord* end = _first_dead; 302 HeapWord* end = _first_dead;
305 303
306 while (q < end) { 304 while (q < end) {
307 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::track_interior_pointers(oop(q)));
308 // point all the oops to the new location 305 // point all the oops to the new location
309 size_t size = oop(q)->adjust_pointers(); 306 size_t size = oop(q)->adjust_pointers();
310 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::check_interior_pointers());
311 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::validate_live_oop(oop(q), size));
312 q += size; 307 q += size;
313 } 308 }
314 309
315 if (_first_dead == t) { 310 if (_first_dead == t) {
316 q = t; 311 q = t;
326 while (q < t) { 321 while (q < t) {
327 // prefetch beyond q 322 // prefetch beyond q
328 Prefetch::write(q, interval); 323 Prefetch::write(q, interval);
329 if (oop(q)->is_gc_marked()) { 324 if (oop(q)->is_gc_marked()) {
330 // q is alive 325 // q is alive
331 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::track_interior_pointers(oop(q)));
332 // point all the oops to the new location 326 // point all the oops to the new location
333 size_t size = oop(q)->adjust_pointers(); 327 size_t size = oop(q)->adjust_pointers();
334 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::check_interior_pointers());
335 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::validate_live_oop(oop(q), size));
336 debug_only(prev_q = q); 328 debug_only(prev_q = q);
337 q += size; 329 q += size;
338 } else { 330 } else {
339 // q is not a live object, so its mark should point at the next 331 // q is not a live object, so its mark should point at the next
340 // live object 332 // live object
364 HeapWord* const end = _first_dead; 356 HeapWord* const end = _first_dead;
365 357
366 while (q < end) { 358 while (q < end) {
367 size_t size = oop(q)->size(); 359 size_t size = oop(q)->size();
368 assert(!oop(q)->is_gc_marked(), "should be unmarked (special dense prefix handling)"); 360 assert(!oop(q)->is_gc_marked(), "should be unmarked (special dense prefix handling)");
369 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::live_oop_moved_to(q, size, q));
370 debug_only(prev_q = q); 361 debug_only(prev_q = q);
371 q += size; 362 q += size;
372 } 363 }
373 #endif 364 #endif
374 365
399 390
400 // prefetch beyond compaction_top 391 // prefetch beyond compaction_top
401 Prefetch::write(compaction_top, copy_interval); 392 Prefetch::write(compaction_top, copy_interval);
402 393
403 // copy object and reinit its mark 394 // copy object and reinit its mark
404 VALIDATE_MARK_SWEEP_ONLY(MarkSweep::live_oop_moved_to(q, size, compaction_top));
405 assert(q != compaction_top, "everything in this pass should be moving"); 395 assert(q != compaction_top, "everything in this pass should be moving");
406 Copy::aligned_conjoint_words(q, compaction_top, size); 396 Copy::aligned_conjoint_words(q, compaction_top, size);
407 oop(compaction_top)->init_mark(); 397 oop(compaction_top)->init_mark();
408 assert(oop(compaction_top)->klass() != NULL, "should have a class"); 398 assert(oop(compaction_top)->klass() != NULL, "should have a class");
409 399