diff -r 7384f6a12fc1 -r 78bbf4d43a14 src/share/vm/runtime/compilationPolicy.cpp --- a/src/share/vm/runtime/compilationPolicy.cpp Thu May 15 18:23:26 2014 -0400 +++ b/src/share/vm/runtime/compilationPolicy.cpp Thu May 22 15:52:41 2014 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -170,7 +170,7 @@ void NonTieredCompPolicy::trace_osr_completion(nmethod* osr_nm) { if (TraceOnStackReplacement) { if (osr_nm == NULL) tty->print_cr("compilation failed"); - else tty->print_cr("nmethod " INTPTR_FORMAT, osr_nm); + else tty->print_cr("nmethod " INTPTR_FORMAT, p2i(osr_nm)); } } #endif // !PRODUCT @@ -417,6 +417,7 @@ } #ifndef PRODUCT +PRAGMA_FORMAT_NONLITERAL_IGNORED_EXTERNAL void NonTieredCompPolicy::trace_frequency_counter_overflow(methodHandle m, int branch_bci, int bci) { if (TraceInvocationCounterOverflow) { MethodCounters* mcs = m->method_counters(); @@ -428,7 +429,10 @@ bci == InvocationEntryBci ? "comp-policy cntr ovfl @ %d in entry of " : "comp-policy cntr ovfl @ %d in loop of "; +PRAGMA_DIAG_PUSH +PRAGMA_FORMAT_NONLITERAL_IGNORED_INTERNAL tty->print(msg, bci); +PRAGMA_DIAG_POP m->print_value(); tty->cr(); ic->print(); @@ -503,7 +507,7 @@ if (TraceCompilationPolicy) { tty->print("method invocation trigger: "); m->print_short_name(tty); - tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", (address)m(), m->code_size()); + tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", p2i((address)m()), m->code_size()); } RegisterMap reg_map(thread, false); javaVFrame* triggerVF = thread->last_java_vframe(®_map); @@ -512,7 +516,7 @@ if (first->top_method()->code() != NULL) { // called obsolete method/nmethod -- no need to recompile - if (TraceCompilationPolicy) tty->print_cr(" --> " INTPTR_FORMAT, first->top_method()->code()); + if (TraceCompilationPolicy) tty->print_cr(" --> " INTPTR_FORMAT, p2i(first->top_method()->code())); } else { if (TimeCompilationPolicy) accumulated_time()->start(); GrowableArray* stack = new GrowableArray(50); @@ -640,7 +644,7 @@ if (TraceCompilationPolicy && Verbose) { tty->print("\n\t check caller: "); next_m->print_short_name(tty); - tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", (address)next_m(), next_m->code_size()); + tty->print(" ( interpreted " INTPTR_FORMAT ", size=%d ) ", p2i((address)next_m()), next_m->code_size()); } current = next;