< prev index next >

src/hotspot/share/code/codeCache.cpp

Print this page
rev 49260 : [mq]: 8198691.patch

*** 1,7 **** /* ! * Copyright (c) 1997, 2017, 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, 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.
*** 24,40 **** --- 24,43 ---- #include "precompiled.hpp" #include "aot/aotLoader.hpp" #include "code/codeBlob.hpp" #include "code/codeCache.hpp" + #include "code/codeHeapState.hpp" #include "code/compiledIC.hpp" #include "code/dependencies.hpp" #include "code/icBuffer.hpp" #include "code/nmethod.hpp" #include "code/pcDesc.hpp" #include "compiler/compileBroker.hpp" #include "gc/shared/gcLocker.hpp" + #include "logging/log.hpp" + #include "logging/logStream.hpp" #include "memory/allocation.inline.hpp" #include "memory/iterator.hpp" #include "memory/resourceArea.hpp" #include "oops/method.inline.hpp" #include "oops/objArrayOop.hpp"
*** 1363,1372 **** --- 1366,1384 ---- MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); print_summary(&s); } ttyLocker ttyl; tty->print("%s", s.as_string()); + + if (heap->full_count() == 0) { + LogTarget(Debug, codecache) lt; + if (lt.is_enabled()) { + // LogStream ls(lt); + // CompileBroker::print_heapinfo(&ls, "all", "4096"); // details, may be a lot! + CompileBroker::print_heapinfo(tty, "all", "4096"); // details, may be a lot! + } + } } heap->report_full(); EventCodeCacheFull event;
*** 1637,1641 **** --- 1649,1704 ---- st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'" " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'", blob_count(), nmethod_count(), adapter_count(), unallocated_capacity()); } + + //---< BEGIN >--- CodeHeap State Analytics. + + void CodeCache::aggregate(outputStream *out, const char* granularity) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::aggregate(out, (*heap), granularity); + } + } + + void CodeCache::discard(outputStream *out) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::discard(out, (*heap)); + } + } + + void CodeCache::print_usedSpace(outputStream *out) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::print_usedSpace(out, (*heap)); + } + } + + void CodeCache::print_freeSpace(outputStream *out) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::print_freeSpace(out, (*heap)); + } + } + + void CodeCache::print_count(outputStream *out) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::print_count(out, (*heap)); + } + } + + void CodeCache::print_space(outputStream *out) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::print_space(out, (*heap)); + } + } + + void CodeCache::print_age(outputStream *out) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::print_age(out, (*heap)); + } + } + + void CodeCache::print_names(outputStream *out) { + FOR_ALL_ALLOCABLE_HEAPS(heap) { + CodeHeapState::print_names(out, (*heap)); + } + } + //---< END >--- CodeHeap State Analytics.
< prev index next >