1361 msg2_stream.print("Try increasing the code heap size using -XX:%s=", |
1361 msg2_stream.print("Try increasing the code heap size using -XX:%s=", |
1362 get_code_heap_flag_name(code_blob_type)); |
1362 get_code_heap_flag_name(code_blob_type)); |
1363 const char *msg1 = msg1_stream.as_string(); |
1363 const char *msg1 = msg1_stream.as_string(); |
1364 const char *msg2 = msg2_stream.as_string(); |
1364 const char *msg2 = msg2_stream.as_string(); |
1365 |
1365 |
1366 log_warning(codecache)(msg1); |
1366 log_warning(codecache)("%s", msg1); |
1367 log_warning(codecache)(msg2); |
1367 log_warning(codecache)("%s", msg2); |
1368 warning(msg1); |
1368 warning("%s", msg1); |
1369 warning(msg2); |
1369 warning("%s", msg2); |
1370 } else { |
1370 } else { |
1371 const char *msg1 = "CodeCache is full. Compiler has been disabled."; |
1371 const char *msg1 = "CodeCache is full. Compiler has been disabled."; |
1372 const char *msg2 = "Try increasing the code cache size using -XX:ReservedCodeCacheSize="; |
1372 const char *msg2 = "Try increasing the code cache size using -XX:ReservedCodeCacheSize="; |
1373 |
1373 |
1374 log_warning(codecache)(msg1); |
1374 log_warning(codecache)("%s", msg1); |
1375 log_warning(codecache)(msg2); |
1375 log_warning(codecache)("%s", msg2); |
1376 warning(msg1); |
1376 warning("%s", msg1); |
1377 warning(msg2); |
1377 warning("%s", msg2); |
1378 } |
1378 } |
1379 ResourceMark rm; |
1379 ResourceMark rm; |
1380 stringStream s; |
1380 stringStream s; |
1381 // Dump code cache into a buffer before locking the tty, |
1381 // Dump code cache into a buffer before locking the tty. |
1382 { |
1382 { |
1383 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
1383 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
1384 print_summary(&s); |
1384 print_summary(&s); |
1385 } |
1385 } |
1386 { |
1386 { |