src/share/vm/code/codeCache.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/code

src/share/vm/code/codeCache.cpp

Print this page




 996     FOR_ALL_BLOBS(cb, *heap) {
 997       if (cb->is_alive()) {
 998         cb->verify();
 999       }
1000     }
1001   }
1002 }
1003 
1004 // A CodeHeap is full. Print out warning and report event.
1005 void CodeCache::report_codemem_full(int code_blob_type, bool print) {
1006   // Get nmethod heap for the given CodeBlobType and build CodeCacheFull event
1007   CodeHeap* heap = get_code_heap(code_blob_type);
1008   assert(heap != NULL, "heap is null");
1009 
1010   if (!heap->was_full() || print) {
1011     // Not yet reported for this heap, report
1012     heap->report_full();
1013     if (SegmentedCodeCache) {
1014       warning("%s is full. Compiler has been disabled.", CodeCache::get_code_heap_name(code_blob_type));
1015       warning("Try increasing the code heap size using -XX:%s=",
1016           (code_blob_type == CodeBlobType::MethodNonProfiled) ? "NonProfiledCodeHeapSize" : "ProfiledCodeHeapSize");
1017     } else {
1018       warning("CodeCache is full. Compiler has been disabled.");
1019       warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize=");
1020     }
1021     ResourceMark rm;
1022     stringStream s;
1023     // Dump code cache  into a buffer before locking the tty,
1024     {
1025       MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
1026       print_summary(&s);
1027     }
1028     ttyLocker ttyl;
1029     tty->print("%s", s.as_string());
1030   }
1031 
1032   _codemem_full_count++;
1033   EventCodeCacheFull event;
1034   if (event.should_commit()) {
1035     event.set_codeBlobType((u1)code_blob_type);
1036     event.set_startAddress((u8)heap->low_boundary());




 996     FOR_ALL_BLOBS(cb, *heap) {
 997       if (cb->is_alive()) {
 998         cb->verify();
 999       }
1000     }
1001   }
1002 }
1003 
1004 // A CodeHeap is full. Print out warning and report event.
1005 void CodeCache::report_codemem_full(int code_blob_type, bool print) {
1006   // Get nmethod heap for the given CodeBlobType and build CodeCacheFull event
1007   CodeHeap* heap = get_code_heap(code_blob_type);
1008   assert(heap != NULL, "heap is null");
1009 
1010   if (!heap->was_full() || print) {
1011     // Not yet reported for this heap, report
1012     heap->report_full();
1013     if (SegmentedCodeCache) {
1014       warning("%s is full. Compiler has been disabled.", CodeCache::get_code_heap_name(code_blob_type));
1015       warning("Try increasing the code heap size using -XX:%s=",
1016           (code_blob_type == CodeBlobType::MethodProfiled) ? "ProfiledCodeHeapSize" : "NonProfiledCodeHeapSize");
1017     } else {
1018       warning("CodeCache is full. Compiler has been disabled.");
1019       warning("Try increasing the code cache size using -XX:ReservedCodeCacheSize=");
1020     }
1021     ResourceMark rm;
1022     stringStream s;
1023     // Dump code cache  into a buffer before locking the tty,
1024     {
1025       MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
1026       print_summary(&s);
1027     }
1028     ttyLocker ttyl;
1029     tty->print("%s", s.as_string());
1030   }
1031 
1032   _codemem_full_count++;
1033   EventCodeCacheFull event;
1034   if (event.should_commit()) {
1035     event.set_codeBlobType((u1)code_blob_type);
1036     event.set_startAddress((u8)heap->low_boundary());


src/share/vm/code/codeCache.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File