< prev index next >

src/share/vm/code/codeCache.cpp

Print this page

        

*** 30,39 **** --- 30,40 ---- #include "code/icBuffer.hpp" #include "code/nmethod.hpp" #include "code/pcDesc.hpp" #include "compiler/compileBroker.hpp" #include "gc_implementation/shared/markSweep.hpp" + #include "jfr/jfrEvents.hpp" #include "memory/allocation.inline.hpp" #include "memory/gcLocker.hpp" #include "memory/iterator.hpp" #include "memory/resourceArea.hpp" #include "oops/method.hpp"
*** 44,56 **** #include "runtime/deoptimization.hpp" #include "runtime/icache.hpp" #include "runtime/java.hpp" #include "runtime/mutexLocker.hpp" #include "services/memoryService.hpp" - #include "trace/tracing.hpp" #include "utilities/xmlstream.hpp" // Helper class for printing in CodeCache class CodeBlob_sizes { private: int count; --- 45,57 ---- #include "runtime/deoptimization.hpp" #include "runtime/icache.hpp" #include "runtime/java.hpp" #include "runtime/mutexLocker.hpp" #include "services/memoryService.hpp" #include "utilities/xmlstream.hpp" + // Helper class for printing in CodeCache class CodeBlob_sizes { private: int count;
*** 186,195 **** --- 187,202 ---- while (true) { cb = (CodeBlob*)_heap->allocate(size, is_critical); if (cb != NULL) break; if (!_heap->expand_by(CodeCacheExpansionSize)) { // Expansion failed + if (CodeCache_lock->owned_by_self()) { + MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); + report_codemem_full(); + } else { + report_codemem_full(); + } return NULL; } if (PrintCodeCacheExtension) { ResourceMark rm; tty->print_cr("code cache extended to [" INTPTR_FORMAT ", " INTPTR_FORMAT "] (" SSIZE_FORMAT " bytes)",
*** 777,786 **** --- 784,794 ---- void CodeCache::report_codemem_full() { _codemem_full_count++; EventCodeCacheFull event; if (event.should_commit()) { + event.set_codeBlobType((u1)CodeBlobType::All); event.set_startAddress((u8)low_bound()); event.set_commitedTopAddress((u8)high()); event.set_reservedTopAddress((u8)high_bound()); event.set_entryCount(nof_blobs()); event.set_methodCount(nof_nmethods());
< prev index next >