comparison src/share/vm/runtime/thread.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 9c3dc501b5eb
children e204777ac770
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.
109 #endif 109 #endif
110 #if INCLUDE_RTM_OPT 110 #if INCLUDE_RTM_OPT
111 #include "runtime/rtmLocking.hpp" 111 #include "runtime/rtmLocking.hpp"
112 #endif 112 #endif
113 113
114 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
115
114 #ifdef DTRACE_ENABLED 116 #ifdef DTRACE_ENABLED
115 117
116 // Only bother with this argument setup if dtrace is available 118 // Only bother with this argument setup if dtrace is available
117 119
118 #ifndef USDT2 120 #ifndef USDT2
4316 } 4318 }
4317 4319
4318 // Threads::print_on() is called at safepoint by VM_PrintThreads operation. 4320 // Threads::print_on() is called at safepoint by VM_PrintThreads operation.
4319 void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks) { 4321 void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks) {
4320 char buf[32]; 4322 char buf[32];
4321 st->print_cr(os::local_time_string(buf, sizeof(buf))); 4323 st->print_cr("%s", os::local_time_string(buf, sizeof(buf)));
4322 4324
4323 st->print_cr("Full thread dump %s (%s %s):", 4325 st->print_cr("Full thread dump %s (%s %s):",
4324 Abstract_VM_Version::vm_name(), 4326 Abstract_VM_Version::vm_name(),
4325 Abstract_VM_Version::vm_release(), 4327 Abstract_VM_Version::vm_release(),
4326 Abstract_VM_Version::vm_info_string() 4328 Abstract_VM_Version::vm_info_string()