comparison src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp @ 3357:fc2b798ab316

6883834: ParNew: assert(!_g->to()->is_in_reserved(obj),"Scanning field twice?") with LargeObjects tests Summary: Fixed process_chunk_boundaries(), used for parallel card scanning when using ParNew/CMS, so as to prevent double-scanning, or worse, non-scanning of imprecisely marked objects exceeding parallel chunk size. Made some sizing parameters for parallel card scanning diagnostic, disabled ParallelGCRetainPLAB, and elaborated and clarified some comments. Reviewed-by: stefank, johnc
author ysr
date Tue, 10 May 2011 00:33:21 -0700
parents f95d63e2154a
children da91efe96a93
comparison
equal deleted inserted replaced
3325:54a56bbaf95b 3357:fc2b798ab316
75 "in older generations."); 75 "in older generations.");
76 T heap_oop = oopDesc::load_heap_oop(p); 76 T heap_oop = oopDesc::load_heap_oop(p);
77 if (!oopDesc::is_null(heap_oop)) { 77 if (!oopDesc::is_null(heap_oop)) {
78 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); 78 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
79 if ((HeapWord*)obj < _boundary) { 79 if ((HeapWord*)obj < _boundary) {
80 assert(!_g->to()->is_in_reserved(obj), "Scanning field twice?"); 80 #ifndef PRODUCT
81 if (_g->to()->is_in_reserved(obj)) {
82 tty->print_cr("Scanning field (" PTR_FORMAT ") twice?", p);
83 GenCollectedHeap* gch = (GenCollectedHeap*)Universe::heap();
84 Space* sp = gch->space_containing(p);
85 oop obj = oop(sp->block_start(p));
86 assert((HeapWord*)obj < (HeapWord*)p, "Error");
87 tty->print_cr("Object: " PTR_FORMAT, obj);
88 tty->print_cr("-------");
89 obj->print();
90 tty->print_cr("-----");
91 tty->print_cr("Heap:");
92 tty->print_cr("-----");
93 gch->print();
94 ShouldNotReachHere();
95 }
96 #endif
81 // OK, we need to ensure that it is copied. 97 // OK, we need to ensure that it is copied.
82 // We read the klass and mark in this order, so that we can reliably 98 // We read the klass and mark in this order, so that we can reliably
83 // get the size of the object: if the mark we read is not a 99 // get the size of the object: if the mark we read is not a
84 // forwarding pointer, then the klass is valid: the klass is only 100 // forwarding pointer, then the klass is valid: the klass is only
85 // overwritten with an overflow next pointer after the object is 101 // overwritten with an overflow next pointer after the object is