Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 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 | 7384f6a12fc1 |
children | 1772223a25a2 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | |
25 #if !defined(__clang_major__) && defined(__GNUC__) | |
26 #define ATTRIBUTE_PRINTF(x,y) // FIXME, formats are a mess. | |
27 #endif | |
24 | 28 |
25 #include "precompiled.hpp" | 29 #include "precompiled.hpp" |
26 #include "code/codeCache.hpp" | 30 #include "code/codeCache.hpp" |
27 #include "code/icBuffer.hpp" | 31 #include "code/icBuffer.hpp" |
28 #include "gc_implementation/g1/bufferingOopClosure.hpp" | 32 #include "gc_implementation/g1/bufferingOopClosure.hpp" |
370 curr->age_in_surv_rate_group_cond()); | 374 curr->age_in_surv_rate_group_cond()); |
371 curr = curr->get_next_young_region(); | 375 curr = curr->get_next_young_region(); |
372 } | 376 } |
373 } | 377 } |
374 | 378 |
375 gclog_or_tty->print_cr(""); | 379 gclog_or_tty->cr(); |
376 } | 380 } |
377 | 381 |
378 void G1CollectedHeap::push_dirty_cards_region(HeapRegion* hr) | 382 void G1CollectedHeap::push_dirty_cards_region(HeapRegion* hr) |
379 { | 383 { |
380 // Claim the right to put the region on the dirty cards region list | 384 // Claim the right to put the region on the dirty cards region list |
3486 gclog_or_tty->print_cr("Heap:"); | 3490 gclog_or_tty->print_cr("Heap:"); |
3487 // It helps to have the per-region information in the output to | 3491 // It helps to have the per-region information in the output to |
3488 // help us track down what went wrong. This is why we call | 3492 // help us track down what went wrong. This is why we call |
3489 // print_extended_on() instead of print_on(). | 3493 // print_extended_on() instead of print_on(). |
3490 print_extended_on(gclog_or_tty); | 3494 print_extended_on(gclog_or_tty); |
3491 gclog_or_tty->print_cr(""); | 3495 gclog_or_tty->cr(); |
3492 #ifndef PRODUCT | 3496 #ifndef PRODUCT |
3493 if (VerifyDuringGC && G1VerifyDuringGCPrintReachable) { | 3497 if (VerifyDuringGC && G1VerifyDuringGCPrintReachable) { |
3494 concurrent_mark()->print_reachable("at-verification-failure", | 3498 concurrent_mark()->print_reachable("at-verification-failure", |
3495 vo, false /* all */); | 3499 vo, false /* all */); |
3496 } | 3500 } |
3680 } | 3684 } |
3681 | 3685 |
3682 PrintRSetsClosure(const char* msg) : _msg(msg), _occupied_sum(0) { | 3686 PrintRSetsClosure(const char* msg) : _msg(msg), _occupied_sum(0) { |
3683 gclog_or_tty->cr(); | 3687 gclog_or_tty->cr(); |
3684 gclog_or_tty->print_cr("========================================"); | 3688 gclog_or_tty->print_cr("========================================"); |
3685 gclog_or_tty->print_cr(msg); | 3689 gclog_or_tty->print_cr("%s", msg); |
3686 gclog_or_tty->cr(); | 3690 gclog_or_tty->cr(); |
3687 } | 3691 } |
3688 | 3692 |
3689 ~PrintRSetsClosure() { | 3693 ~PrintRSetsClosure() { |
3690 gclog_or_tty->print_cr("Occupied Sum: "SIZE_FORMAT, _occupied_sum); | 3694 gclog_or_tty->print_cr("Occupied Sum: "SIZE_FORMAT, _occupied_sum); |