< prev index next >
src/share/vm/code/codeCache.cpp
Print this page
rev 8910 : full patch for jfr
*** 1,7 ****
/*
! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 186,195 ****
--- 186,203 ----
while (true) {
cb = (CodeBlob*)_heap->allocate(size, is_critical);
if (cb != NULL) break;
if (!_heap->expand_by(CodeCacheExpansionSize)) {
// Expansion failed
+ if (EnableJFR) {
+ 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)",
*** 755,764 ****
--- 763,773 ----
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 >