From 82a191a490c630092a1b78a891227cdf8079e362 Mon Sep 17 00:00:00 2001 From: Aleksandar Micic Date: Wed, 1 Nov 2023 10:38:21 -0400 Subject: [PATCH] Separate compact reason for rasdump The COMPACT_FORCED_GC reason was reused what indicated that an explicit command line option was specified confusing GCMV parser to incorrectly conclude there was an option while there was only a RAS dump. Now we use a dedicated reason with a different string issued by Verbose GC. Signed-off-by: Aleksandar Micic --- gc/base/gcutils.cpp | 2 ++ gc/base/standard/ParallelGlobalGC.cpp | 2 +- include_core/omrgcconsts.h | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gc/base/gcutils.cpp b/gc/base/gcutils.cpp index 7a95c1fca9..5ede2242d0 100644 --- a/gc/base/gcutils.cpp +++ b/gc/base/gcutils.cpp @@ -87,6 +87,8 @@ getCompactionReasonAsString(CompactReason reason) return "page granularity fragmentation"; case COMPACT_MICRO_FRAG: return "micro fragmentation"; + case COMPACT_RASDUMP: + return "rasdump"; default: return "unknown"; } diff --git a/gc/base/standard/ParallelGlobalGC.cpp b/gc/base/standard/ParallelGlobalGC.cpp index ca4768bfab..6ca7956e71 100644 --- a/gc/base/standard/ParallelGlobalGC.cpp +++ b/gc/base/standard/ParallelGlobalGC.cpp @@ -589,7 +589,7 @@ MM_ParallelGlobalGC::shouldCompactThisCycle(MM_EnvironmentBase *env, MM_Allocate * a compact we always honour it in order to produce optimal heap dumps */ if (J9MMCONSTANT_EXPLICIT_GC_RASDUMP_COMPACT == gcCode.getCode()) { - compactReason = COMPACT_FORCED_GC; + compactReason = COMPACT_RASDUMP; goto compactionReqd; } diff --git a/include_core/omrgcconsts.h b/include_core/omrgcconsts.h index 0b8662fc2c..2ef7b521e7 100644 --- a/include_core/omrgcconsts.h +++ b/include_core/omrgcconsts.h @@ -294,7 +294,8 @@ typedef enum { COMPACT_CONTRACT = 11, COMPACT_AGGRESSIVE= 12, COMPACT_PAGE = 13, - COMPACT_MICRO_FRAG = 14 + COMPACT_MICRO_FRAG = 14, + COMPACT_RASDUMP = 15 } CompactReason; typedef enum {