comparison src/share/vm/runtime/safepoint.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 d2a62e0f25eb
children 52b4284cb496
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17937:78bbf4d43a14
1 /* 1 /*
2 * Copyright (c) 1997, 2012, 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.
172 static bool is_cleanup_needed(); 172 static bool is_cleanup_needed();
173 static void do_cleanup_tasks(); 173 static void do_cleanup_tasks();
174 174
175 // debugging 175 // debugging
176 static void print_state() PRODUCT_RETURN; 176 static void print_state() PRODUCT_RETURN;
177 static void safepoint_msg(const char* format, ...) PRODUCT_RETURN; 177 static void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(1, 2) PRODUCT_RETURN;
178 178
179 static void deferred_initialize_stat(); 179 static void deferred_initialize_stat();
180 static void print_stat_on_exit(); 180 static void print_stat_on_exit();
181 inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; } 181 inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; }
182 182
238 238
239 // Initialize 239 // Initialize
240 static void create(JavaThread *thread); 240 static void create(JavaThread *thread);
241 static void destroy(JavaThread *thread); 241 static void destroy(JavaThread *thread);
242 242
243 void safepoint_msg(const char* format, ...) { 243 void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) {
244 if (ShowSafepointMsgs) { 244 if (ShowSafepointMsgs) {
245 va_list ap; 245 va_list ap;
246 va_start(ap, format); 246 va_start(ap, format);
247 tty->vprint_cr(format, ap); 247 tty->vprint_cr(format, ap);
248 va_end(ap); 248 va_end(ap);