diff src/share/vm/compiler/compileBroker.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 a9becfeecd1b
children f73af4455d7d
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp	Thu May 15 18:23:26 2014 -0400
+++ b/src/share/vm/compiler/compileBroker.cpp	Thu May 22 15:52:41 2014 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -206,7 +206,7 @@
   void log_nmethod(JavaThread* thread, nmethod* nm) {
     log(thread, "nmethod %d%s " INTPTR_FORMAT " code ["INTPTR_FORMAT ", " INTPTR_FORMAT "]",
         nm->compile_id(), nm->is_osr_method() ? "%" : "",
-        nm, nm->code_begin(), nm->code_end());
+        p2i(nm), p2i(nm->code_begin()), p2i(nm->code_end()));
   }
 
   void log_failure(JavaThread* thread, CompileTask* task, const char* reason, const char* retry_message) {
@@ -1791,7 +1791,7 @@
         if (xtty != NULL) {
           ttyLocker ttyl;
           // Record any per thread log files
-          xtty->elem("thread_logfile thread='%d' filename='%s'", thread_id, file_name);
+          xtty->elem("thread_logfile thread='" INTX_FORMAT "' filename='%s'", thread_id, file_name);
         }
         return;
       }
@@ -1822,7 +1822,7 @@
   if (_should_block) {
 #ifndef PRODUCT
     if (PrintCompilation && (Verbose || WizardMode))
-      tty->print_cr("compiler thread " INTPTR_FORMAT " poll detects block request", Thread::current());
+      tty->print_cr("compiler thread " INTPTR_FORMAT " poll detects block request", p2i(Thread::current()));
 #endif
     ThreadInVMfromNative tivfn(JavaThread::current());
   }
@@ -1839,7 +1839,7 @@
     CodeCache::print_summary(&s, detailed);
   }
   ttyLocker ttyl;
-  tty->print(s.as_string());
+  tty->print("%s", s.as_string());
 }
 
 // ------------------------------------------------------------------
@@ -2044,7 +2044,7 @@
       // Lock to prevent tearing
       ttyLocker ttyl;
       xtty->begin_elem("code_cache_full");
-      xtty->print(s.as_string());
+      xtty->print("%s", s.as_string());
       xtty->stamp();
       xtty->end_elem();
     }