Skip to content

Commit

Permalink
Merge pull request #18547 from pshipton/rasflag0.43
Browse files Browse the repository at this point in the history
(0.43) Use correct GC flag in HCR dark matter cleanup
  • Loading branch information
amicic authored Dec 1, 2023
2 parents 2b0e11e + 80c3a23 commit 9b2a42f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime/jvmti/jvmtiClass.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,10 @@ redefineClassesCommon(jvmtiEnv* env,
/* Eliminate dark matter so that none will be encountered in prepareToFixMemberNames(). */
UDATA savedAllowUserHeapWalkFlag = vm->requiredDebugAttributes & J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK;
vm->requiredDebugAttributes |= J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK;
vm->memoryManagerFunctions->j9gc_modron_global_collect_with_overrides(currentThread, J9MMCONSTANT_EXPLICIT_GC_EXCLUSIVE_VMACCESS_ALREADY_ACQUIRED);
/* J9MMCONSTANT_EXPLICIT_GC_RASDUMP_COMPACT allows the GC to run while the current thread is holding
* exclusive VM access.
*/
vm->memoryManagerFunctions->j9gc_modron_global_collect_with_overrides(currentThread, J9MMCONSTANT_EXPLICIT_GC_RASDUMP_COMPACT);
if (0 == savedAllowUserHeapWalkFlag) {
/* Clear the flag to restore its original value. */
vm->requiredDebugAttributes &= ~J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK;
Expand Down

0 comments on commit 9b2a42f

Please sign in to comment.