Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/sweeper.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 | a9becfeecd1b |
children | 52b4284cb496 ce8f6bb717c9 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 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. |
38 #include "runtime/vm_operations.hpp" | 38 #include "runtime/vm_operations.hpp" |
39 #include "trace/tracing.hpp" | 39 #include "trace/tracing.hpp" |
40 #include "utilities/events.hpp" | 40 #include "utilities/events.hpp" |
41 #include "utilities/ticks.inline.hpp" | 41 #include "utilities/ticks.inline.hpp" |
42 #include "utilities/xmlstream.hpp" | 42 #include "utilities/xmlstream.hpp" |
43 | |
44 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC | |
43 | 45 |
44 #ifdef ASSERT | 46 #ifdef ASSERT |
45 | 47 |
46 #define SWEEP(nm) record_sweep(nm, __LINE__) | 48 #define SWEEP(nm) record_sweep(nm, __LINE__) |
47 // Sweeper logging code | 49 // Sweeper logging code |
623 va_list ap; | 625 va_list ap; |
624 va_start(ap, format); | 626 va_start(ap, format); |
625 tty->vprint(format, ap); | 627 tty->vprint(format, ap); |
626 va_end(ap); | 628 va_end(ap); |
627 } | 629 } |
628 tty->print_cr(s.as_string()); | 630 tty->print_cr("%s", s.as_string()); |
629 } | 631 } |
630 | 632 |
631 if (LogCompilation && (xtty != NULL)) { | 633 if (LogCompilation && (xtty != NULL)) { |
632 stringStream s; | 634 stringStream s; |
633 // Dump code cache state into a buffer before locking the tty, | 635 // Dump code cache state into a buffer before locking the tty, |
640 va_list ap; | 642 va_list ap; |
641 va_start(ap, format); | 643 va_start(ap, format); |
642 xtty->vprint(format, ap); | 644 xtty->vprint(format, ap); |
643 va_end(ap); | 645 va_end(ap); |
644 } | 646 } |
645 xtty->print(s.as_string()); | 647 xtty->print("%s", s.as_string()); |
646 xtty->stamp(); | 648 xtty->stamp(); |
647 xtty->end_elem(); | 649 xtty->end_elem(); |
648 } | 650 } |
649 } | 651 } |
650 | 652 |