src/hotspot/share/code/codeCache.cpp
changeset 51078 fc6cfe40e32a
parent 50676 8c0a5b51559b
child 52325 0451e0a2f1f5
--- a/src/hotspot/share/code/codeCache.cpp	Fri Jul 13 11:21:55 2018 +0800
+++ b/src/hotspot/share/code/codeCache.cpp	Thu Jul 12 16:31:28 2018 +0200
@@ -1363,22 +1363,22 @@
       const char *msg1 = msg1_stream.as_string();
       const char *msg2 = msg2_stream.as_string();
 
-      log_warning(codecache)(msg1);
-      log_warning(codecache)(msg2);
-      warning(msg1);
-      warning(msg2);
+      log_warning(codecache)("%s", msg1);
+      log_warning(codecache)("%s", msg2);
+      warning("%s", msg1);
+      warning("%s", msg2);
     } else {
       const char *msg1 = "CodeCache is full. Compiler has been disabled.";
       const char *msg2 = "Try increasing the code cache size using -XX:ReservedCodeCacheSize=";
 
-      log_warning(codecache)(msg1);
-      log_warning(codecache)(msg2);
-      warning(msg1);
-      warning(msg2);
+      log_warning(codecache)("%s", msg1);
+      log_warning(codecache)("%s", msg2);
+      warning("%s", msg1);
+      warning("%s", msg2);
     }
     ResourceMark rm;
     stringStream s;
-    // Dump code cache  into a buffer before locking the tty,
+    // Dump code cache into a buffer before locking the tty.
     {
       MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
       print_summary(&s);