@@ -1131,6 +1131,7 @@ redefineClassesCommon(jvmtiEnv* env,
1131
1131
J9HashTable * methodEquivalences = NULL ;
1132
1132
#if defined(J9VM_OPT_OPENJDK_METHODHANDLE )
1133
1133
j9object_t memberNamesToFix = NULL ;
1134
+ UDATA savedAllowUserHeapWalkFlag = 0 ;
1134
1135
#endif /* defined(J9VM_OPT_OPENJDK_METHODHANDLE) */
1135
1136
#ifdef J9VM_INTERP_NATIVE_SUPPORT
1136
1137
J9JVMTIHCRJitEventData jitEventData ;
@@ -1224,28 +1225,29 @@ redefineClassesCommon(jvmtiEnv* env,
1224
1225
}
1225
1226
}
1226
1227
1227
- /* Determine all ROM classes which need a new RAM class, and pair them with their current RAM class */
1228
-
1229
- rc = determineClassesToRecreate (currentThread , class_count , specifiedClasses , & classPairs ,
1230
- & methodPairs , jitEventDataPtr , !extensionsEnabled );
1231
- if (rc == JVMTI_ERROR_NONE ) {
1232
1228
#if defined(J9VM_OPT_OPENJDK_METHODHANDLE )
1233
- /* Eliminate dark matter so that none will be encountered in prepareToFixMemberNames(). */
1234
- UDATA savedAllowUserHeapWalkFlag = vm -> requiredDebugAttributes & J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK ;
1235
- vm -> requiredDebugAttributes |= J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK ;
1229
+ /* Eliminate dark matter so that none will be encountered in prepareToFixMemberNames(). */
1230
+ savedAllowUserHeapWalkFlag = vm -> requiredDebugAttributes & J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK ;
1231
+ vm -> requiredDebugAttributes |= J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK ;
1236
1232
1237
- /* This is to help with Metronome to avoid requesting Exclusive if we already have SafePoint, which may not look as Exclusive to the requester thread */
1238
- vm -> alreadyHaveExclusive = TRUE;
1233
+ /* This is to help with Metronome to avoid requesting Exclusive if we already have SafePoint, which may not look as Exclusive to the requester thread */
1234
+ vm -> alreadyHaveExclusive = TRUE;
1239
1235
1240
- vm -> memoryManagerFunctions -> j9gc_modron_global_collect_with_overrides (currentThread , J9MMCONSTANT_EXPLICIT_GC_EXCLUSIVE_VMACCESS_ALREADY_ACQUIRED );
1236
+ vm -> memoryManagerFunctions -> j9gc_modron_global_collect_with_overrides (currentThread , J9MMCONSTANT_EXPLICIT_GC_EXCLUSIVE_VMACCESS_ALREADY_ACQUIRED );
1241
1237
1242
- vm -> alreadyHaveExclusive = FALSE;
1238
+ vm -> alreadyHaveExclusive = FALSE;
1243
1239
1244
- if (0 == savedAllowUserHeapWalkFlag ) {
1245
- /* Clear the flag to restore its original value. */
1246
- vm -> requiredDebugAttributes &= ~J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK ;
1247
- }
1240
+ if (0 == savedAllowUserHeapWalkFlag ) {
1241
+ /* Clear the flag to restore its original value. */
1242
+ vm -> requiredDebugAttributes &= ~J9VM_DEBUG_ATTRIBUTE_ALLOW_USER_HEAP_WALK ;
1243
+ }
1244
+ #endif /* defined(J9VM_OPT_OPENJDK_METHODHANDLE) */
1248
1245
1246
+ /* Determine all ROM classes which need a new RAM class, and pair them with their current RAM class. */
1247
+ rc = determineClassesToRecreate (currentThread , class_count , specifiedClasses , & classPairs ,
1248
+ & methodPairs , jitEventDataPtr , !extensionsEnabled );
1249
+ if (rc == JVMTI_ERROR_NONE ) {
1250
+ #if defined(J9VM_OPT_OPENJDK_METHODHANDLE )
1249
1251
/* Identify the MemberNames needing fix-up based on classPairs. */
1250
1252
memberNamesToFix = prepareToFixMemberNames (currentThread , classPairs );
1251
1253
#endif /* defined(J9VM_OPT_OPENJDK_METHODHANDLE) */
0 commit comments