8276036: The value of full_count in the message of insufficient codecache is wrong

Reviewed-by: kvn, dlong, thartmann, chagedorn
This commit is contained in:
Tobias Holenstein 2021-11-03 15:31:50 +00:00 committed by Christian Hagedorn
parent 8731846001
commit 61cb4bc6b0

View File

@ -1226,7 +1226,9 @@ void CodeCache::report_codemem_full(int code_blob_type, bool print) {
CodeHeap* heap = get_code_heap(code_blob_type);
assert(heap != NULL, "heap is null");
if ((heap->full_count() == 0) || print) {
heap->report_full();
if ((heap->full_count() == 1) || print) {
// Not yet reported for this heap, report
if (SegmentedCodeCache) {
ResourceMark rm;
@ -1263,15 +1265,13 @@ void CodeCache::report_codemem_full(int code_blob_type, bool print) {
tty->print("%s", s.as_string());
}
if (heap->full_count() == 0) {
if (heap->full_count() == 1) {
if (PrintCodeHeapAnalytics) {
CompileBroker::print_heapinfo(tty, "all", 4096); // details, may be a lot!
}
}
}
heap->report_full();
EventCodeCacheFull event;
if (event.should_commit()) {
event.set_codeBlobType((u1)code_blob_type);