comparison src/share/vm/runtime/fprofiler.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 491de79915eb
children 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/stubCodeGenerator.hpp" 38 #include "runtime/stubCodeGenerator.hpp"
39 #include "runtime/stubRoutines.hpp" 39 #include "runtime/stubRoutines.hpp"
40 #include "runtime/task.hpp" 40 #include "runtime/task.hpp"
41 #include "runtime/vframe.hpp" 41 #include "runtime/vframe.hpp"
42 #include "utilities/macros.hpp" 42 #include "utilities/macros.hpp"
43
44 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
43 45
44 // Static fields of FlatProfiler 46 // Static fields of FlatProfiler
45 int FlatProfiler::received_gc_ticks = 0; 47 int FlatProfiler::received_gc_ticks = 0;
46 int FlatProfiler::vm_operation_ticks = 0; 48 int FlatProfiler::vm_operation_ticks = 0;
47 int FlatProfiler::threads_lock_ticks = 0; 49 int FlatProfiler::threads_lock_ticks = 0;
306 static void print_total(outputStream* st, tick_counter* t, int total, const char* msg) { 308 static void print_total(outputStream* st, tick_counter* t, int total, const char* msg) {
307 t->print_code(st, total); 309 t->print_code(st, total);
308 st->fill_to(col2); 310 st->fill_to(col2);
309 t->print_native(st); 311 t->print_native(st);
310 st->fill_to(col3); 312 st->fill_to(col3);
311 st->print(msg); 313 st->print("%s", msg);
312 st->cr(); 314 st->cr();
313 } 315 }
314 316
315 virtual Method* method() = 0; 317 virtual Method* method() = 0;
316 318