comparison src/share/vm/gc/cms/parOopClosures.inline.hpp @ 10585:d5e9c320ac68

8151603: Use error stream instead of tty for logging before ShouldNotReachHere() Reviewed-by: mgerdin, sjohanss
author brutisso
date Fri, 11 Mar 2016 10:27:45 +0100
parents f944761a3ce3
children 4a0121d1e772
comparison
equal deleted inserted replaced
3:7f2e5c967d27 4:822a8d4655d0
80 if (!oopDesc::is_null(heap_oop)) { 80 if (!oopDesc::is_null(heap_oop)) {
81 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); 81 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
82 if ((HeapWord*)obj < _boundary) { 82 if ((HeapWord*)obj < _boundary) {
83 #ifndef PRODUCT 83 #ifndef PRODUCT
84 if (_g->to()->is_in_reserved(obj)) { 84 if (_g->to()->is_in_reserved(obj)) {
85 tty->print_cr("Scanning field (" PTR_FORMAT ") twice?", p2i(p)); 85 LogHandle(gc) log;
86 log.error("Scanning field (" PTR_FORMAT ") twice?", p2i(p));
86 GenCollectedHeap* gch = GenCollectedHeap::heap(); 87 GenCollectedHeap* gch = GenCollectedHeap::heap();
87 Space* sp = gch->space_containing(p); 88 Space* sp = gch->space_containing(p);
88 oop obj = oop(sp->block_start(p)); 89 oop obj = oop(sp->block_start(p));
89 assert((HeapWord*)obj < (HeapWord*)p, "Error"); 90 assert((HeapWord*)obj < (HeapWord*)p, "Error");
90 tty->print_cr("Object: " PTR_FORMAT, p2i((void *)obj)); 91 log.error("Object: " PTR_FORMAT, p2i((void *)obj));
91 tty->print_cr("-------"); 92 log.error("-------");
92 obj->print(); 93 obj->print_on(log.error_stream());
93 tty->print_cr("-----"); 94 log.error("-----");
94 tty->print_cr("Heap:"); 95 log.error("Heap:");
95 tty->print_cr("-----"); 96 log.error("-----");
96 gch->print(); 97 gch->print_on(log.error_stream());
97 ShouldNotReachHere(); 98 ShouldNotReachHere();
98 } 99 }
99 #endif 100 #endif
100 // OK, we need to ensure that it is copied. 101 // OK, we need to ensure that it is copied.
101 // We read the klass and mark in this order, so that we can reliably 102 // We read the klass and mark in this order, so that we can reliably