--- old/src/share/vm/code/codeCache.cpp 2019-08-12 15:02:50.560394720 +0800 +++ new/src/share/vm/code/codeCache.cpp 2019-08-12 15:02:50.395399495 +0800 @@ -189,6 +189,12 @@ 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) { @@ -758,6 +764,7 @@ _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());