comparison src/share/vm/runtime/java.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 606acabe7b5c
children 1772223a25a2
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.
111 if (m->invocation_count() + m->compiled_invocation_count() >= 1 ) { 111 if (m->invocation_count() + m->compiled_invocation_count() >= 1 ) {
112 collected_invoked_methods->push(m); 112 collected_invoked_methods->push(m);
113 } 113 }
114 } 114 }
115 115
116 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
116 117
117 GrowableArray<Method*>* collected_profiled_methods; 118 GrowableArray<Method*>* collected_profiled_methods;
118 119
119 void collect_profiled_methods(Method* m) { 120 void collect_profiled_methods(Method* m) {
120 Thread* thread = Thread::current(); 121 Thread* thread = Thread::current();
365 if (PrintNMTStatistics) { 366 if (PrintNMTStatistics) {
366 if (MemTracker::is_on()) { 367 if (MemTracker::is_on()) {
367 BaselineTTYOutputer outputer(tty); 368 BaselineTTYOutputer outputer(tty);
368 MemTracker::print_memory_usage(outputer, K, false); 369 MemTracker::print_memory_usage(outputer, K, false);
369 } else { 370 } else {
370 tty->print_cr(MemTracker::reason()); 371 tty->print_cr("%s", MemTracker::reason());
371 } 372 }
372 } 373 }
373 } 374 }
374 375
375 #else // PRODUCT MODE STATISTICS 376 #else // PRODUCT MODE STATISTICS
402 if (PrintNMTStatistics) { 403 if (PrintNMTStatistics) {
403 if (MemTracker::is_on()) { 404 if (MemTracker::is_on()) {
404 BaselineTTYOutputer outputer(tty); 405 BaselineTTYOutputer outputer(tty);
405 MemTracker::print_memory_usage(outputer, K, false); 406 MemTracker::print_memory_usage(outputer, K, false);
406 } else { 407 } else {
407 tty->print_cr(MemTracker::reason()); 408 tty->print_cr("%s", MemTracker::reason());
408 } 409 }
409 } 410 }
410 } 411 }
411 412
412 #endif 413 #endif