comparison src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp @ 17937:78bbf4d43a14

8037816: Fix for 8036122 breaks build with Xcode5/clang 8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas 8043164: Format warning in traceStream.hpp Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings Reviewed-by: kvn, coleenp, iveresov, twisti
author drchase
date Thu, 22 May 2014 15:52:41 -0400
parents 190899198332
children
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17937:78bbf4d43a14
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);