Skip to content

Commit

Permalink
Separate compact reason for rasdump
Browse files Browse the repository at this point in the history
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 <Aleksandar_Micic@ca.ibm.com>
  • Loading branch information
Aleksandar Micic authored and Aleksandar Micic committed Nov 1, 2023
1 parent f8fecbe commit 82a191a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions gc/base/gcutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
2 changes: 1 addition & 1 deletion gc/base/standard/ParallelGlobalGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion include_core/omrgcconsts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 82a191a

Please sign in to comment.