From 94a5279d916fa7d943e9dabe267fd645e7bce979 Mon Sep 17 00:00:00 2001 From: Aleksandar Micic Date: Mon, 5 Feb 2024 15:37:22 -0500 Subject: [PATCH] Discarded bytes in Verbose GC Report existing cummulative discarded bytes in allocation stats section of VGC (reported as a part of GC-start increment). At the present they are only TLH discards, although in theory there could be small discards from non-TLH allocations when remainder is less then min free entry, but we don't gather those stats. It's not specifically reported as TLH ones, since in future we might add non-TLH ones, too. This is useful to report/check if TLH sizing is changed (via for example tlhMaximumSize paramter), to see if there is any negative sideeffect (increase of discards, which may potentially increase frequency of GCs). Signed-off-by: Aleksandar Micic --- gc/verbose/VerboseHandlerOutput.cpp | 2 +- gc/verbose/schema.xsd | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gc/verbose/VerboseHandlerOutput.cpp b/gc/verbose/VerboseHandlerOutput.cpp index a1ac03c58a4..3bb8fe480bc 100644 --- a/gc/verbose/VerboseHandlerOutput.cpp +++ b/gc/verbose/VerboseHandlerOutput.cpp @@ -887,7 +887,7 @@ MM_VerboseHandlerOutput::printAllocationStats(MM_EnvironmentBase* env) OMRPORT_ACCESS_FROM_OMRPORT(env->getPortLibrary()); enterAtomicReportingBlock(); - writer->formatAndOutput(env, 0, "", systemStats->bytesAllocated()); + writer->formatAndOutput(env, 0, "", systemStats->bytesAllocated(), systemStats->_tlhDiscardedBytes); if (_extensions->isVLHGC()) { #if defined(OMR_GC_VLHGC) diff --git a/gc/verbose/schema.xsd b/gc/verbose/schema.xsd index a65893956d2..adc60085e33 100644 --- a/gc/verbose/schema.xsd +++ b/gc/verbose/schema.xsd @@ -344,6 +344,7 @@ xmlns:vgc="http://www.ibm.com/j9/verbosegc"> +