comparison src/share/vm/c1/c1_CFGPrinter.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 b9a9ed0f8eeb
children
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17937:78bbf4d43a14
1 /* 1 /*
2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 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.
48 48
49 outputStream* output() { assert(_output != NULL, ""); return _output; } 49 outputStream* output() { assert(_output != NULL, ""); return _output; }
50 50
51 void inc_indent(); 51 void inc_indent();
52 void dec_indent(); 52 void dec_indent();
53 void print(const char* format, ...); 53 void print(const char* format, ...) ATTRIBUTE_PRINTF(2, 3);
54 void print_begin(const char* tag); 54 void print_begin(const char* tag);
55 void print_end(const char* tag); 55 void print_end(const char* tag);
56 56
57 char* method_name(ciMethod* method, bool short_name = false); 57 char* method_name(ciMethod* method, bool short_name = false);
58 58
159 void CFGPrinterOutput::print_compilation() { 159 void CFGPrinterOutput::print_compilation() {
160 print_begin("compilation"); 160 print_begin("compilation");
161 161
162 print("name \"%s\"", method_name(_compilation->method(), true)); 162 print("name \"%s\"", method_name(_compilation->method(), true));
163 print("method \"%s\"", method_name(_compilation->method())); 163 print("method \"%s\"", method_name(_compilation->method()));
164 print("date "INT64_FORMAT, os::javaTimeMillis()); 164 print("date "INT64_FORMAT, (int64_t) os::javaTimeMillis());
165 165
166 print_end("compilation"); 166 print_end("compilation");
167 } 167 }
168 168
169 169