1 /* |
1 /* |
2 * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
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 #ifndef PRODUCT |
80 #ifndef PRODUCT |
81 if (_g->to()->is_in_reserved(obj)) { |
81 if (_g->to()->is_in_reserved(obj)) { |
82 tty->print_cr("Scanning field (" PTR_FORMAT ") twice?", p); |
82 tty->print_cr("Scanning field (" PTR_FORMAT ") twice?", p2i(p)); |
83 GenCollectedHeap* gch = (GenCollectedHeap*)Universe::heap(); |
83 GenCollectedHeap* gch = (GenCollectedHeap*)Universe::heap(); |
84 Space* sp = gch->space_containing(p); |
84 Space* sp = gch->space_containing(p); |
85 oop obj = oop(sp->block_start(p)); |
85 oop obj = oop(sp->block_start(p)); |
86 assert((HeapWord*)obj < (HeapWord*)p, "Error"); |
86 assert((HeapWord*)obj < (HeapWord*)p, "Error"); |
87 tty->print_cr("Object: " PTR_FORMAT, (void *)obj); |
87 tty->print_cr("Object: " PTR_FORMAT, p2i((void *)obj)); |
88 tty->print_cr("-------"); |
88 tty->print_cr("-------"); |
89 obj->print(); |
89 obj->print(); |
90 tty->print_cr("-----"); |
90 tty->print_cr("-----"); |
91 tty->print_cr("Heap:"); |
91 tty->print_cr("Heap:"); |
92 tty->print_cr("-----"); |
92 tty->print_cr("-----"); |
108 oopDesc::encode_store_heap_oop_not_null(p, new_obj); |
108 oopDesc::encode_store_heap_oop_not_null(p, new_obj); |
109 #ifndef PRODUCT |
109 #ifndef PRODUCT |
110 if (TraceScavenge) { |
110 if (TraceScavenge) { |
111 gclog_or_tty->print_cr("{%s %s ( " PTR_FORMAT " ) " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", |
111 gclog_or_tty->print_cr("{%s %s ( " PTR_FORMAT " ) " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", |
112 "forwarded ", |
112 "forwarded ", |
113 new_obj->klass()->internal_name(), p, (void *)obj, (void *)new_obj, new_obj->size()); |
113 new_obj->klass()->internal_name(), p2i(p), p2i((void *)obj), p2i((void *)new_obj), new_obj->size()); |
114 } |
114 } |
115 #endif |
115 #endif |
116 |
116 |
117 } else { |
117 } else { |
118 size_t obj_sz = obj->size_given_klass(objK); |
118 size_t obj_sz = obj->size_given_klass(objK); |