< prev index next >

src/hotspot/share/code/codeCache.cpp

Print this page
rev 54096 : 8214526: Change CodeHeap State Analytics control from UL to Print*
Reviewed-by: coleenp, kvn, stuefe, thartmann


1376       const char *msg2 = "Try increasing the code cache size using -XX:ReservedCodeCacheSize=";
1377 
1378       log_warning(codecache)("%s", msg1);
1379       log_warning(codecache)("%s", msg2);
1380       warning("%s", msg1);
1381       warning("%s", msg2);
1382     }
1383     ResourceMark rm;
1384     stringStream s;
1385     // Dump code cache into a buffer before locking the tty.
1386     {
1387       MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
1388       print_summary(&s);
1389     }
1390     {
1391       ttyLocker ttyl;
1392       tty->print("%s", s.as_string());
1393     }
1394 
1395     if (heap->full_count() == 0) {
1396       LogTarget(Debug, codecache) lt;
1397       if (lt.is_enabled()) {
1398         CompileBroker::print_heapinfo(tty, "all", 4096); // details, may be a lot!
1399       }
1400     }
1401   }
1402 
1403   heap->report_full();
1404 
1405   EventCodeCacheFull event;
1406   if (event.should_commit()) {
1407     event.set_codeBlobType((u1)code_blob_type);
1408     event.set_startAddress((u8)heap->low_boundary());
1409     event.set_commitedTopAddress((u8)heap->high());
1410     event.set_reservedTopAddress((u8)heap->high_boundary());
1411     event.set_entryCount(heap->blob_count());
1412     event.set_methodCount(heap->nmethod_count());
1413     event.set_adaptorCount(heap->adapter_count());
1414     event.set_unallocatedCapacity(heap->unallocated_capacity());
1415     event.set_fullCount(heap->full_count());
1416     event.commit();
1417   }




1376       const char *msg2 = "Try increasing the code cache size using -XX:ReservedCodeCacheSize=";
1377 
1378       log_warning(codecache)("%s", msg1);
1379       log_warning(codecache)("%s", msg2);
1380       warning("%s", msg1);
1381       warning("%s", msg2);
1382     }
1383     ResourceMark rm;
1384     stringStream s;
1385     // Dump code cache into a buffer before locking the tty.
1386     {
1387       MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
1388       print_summary(&s);
1389     }
1390     {
1391       ttyLocker ttyl;
1392       tty->print("%s", s.as_string());
1393     }
1394 
1395     if (heap->full_count() == 0) {
1396       if (PrintCodeHeapAnalytics) {

1397         CompileBroker::print_heapinfo(tty, "all", 4096); // details, may be a lot!
1398       }
1399     }
1400   }
1401 
1402   heap->report_full();
1403 
1404   EventCodeCacheFull event;
1405   if (event.should_commit()) {
1406     event.set_codeBlobType((u1)code_blob_type);
1407     event.set_startAddress((u8)heap->low_boundary());
1408     event.set_commitedTopAddress((u8)heap->high());
1409     event.set_reservedTopAddress((u8)heap->high_boundary());
1410     event.set_entryCount(heap->blob_count());
1411     event.set_methodCount(heap->nmethod_count());
1412     event.set_adaptorCount(heap->adapter_count());
1413     event.set_unallocatedCapacity(heap->unallocated_capacity());
1414     event.set_fullCount(heap->full_count());
1415     event.commit();
1416   }


< prev index next >