Skip to content

Commit ce89fed

Browse files
Merge pull request #21144 from amicic/WOC_adjacency_check
Don't use adjacancy check for arraylets in WOC fixup
2 parents e2516e2 + e546e71 commit ce89fed

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

runtime/gc_vlhgc/WriteOnceCompactor.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,16 +1380,15 @@ MM_WriteOnceCompactor::fixupPointerArrayObject(MM_EnvironmentVLHGC* env, J9Objec
13801380
GC_ArrayletObjectModel::ArrayLayout layout = indexableObjectModel->getArrayLayout((J9IndexableObject *)objectPtr);
13811381

13821382
if (GC_ArrayletObjectModel::InlineContiguous == layout) {
1383-
/* For offheap we need a special check for the case of a partially offheap allocated array that caused the current GC
1384-
* (its dataAddr field will still be NULL), with offheap heap we will fixup camouflaged discontiguous arrays) - DM, like default
1385-
* balanced, wants to fixup only truly contiguous arrays
1383+
/* For offheap enabled, a special check is needed for the case of a partially offheap allocated array that caused the current GC
1384+
* (its dataAddr field will still be NULL).
1385+
* For offheap disabled, any contiguous is scanned.
13861386
*/
1387-
if (indexableObjectModel->isDataAdjacentToHeader((J9IndexableObject *)objectPtr)
13881387
#if defined(J9VM_ENV_DATA64)
1389-
|| (indexableObjectModel->isVirtualLargeObjectHeapEnabled()
1390-
&& (NULL != indexableObjectModel->getDataAddrForContiguous((J9IndexableObject *)objectPtr)))
1388+
if (!indexableObjectModel->isVirtualLargeObjectHeapEnabled()
1389+
|| (NULL != indexableObjectModel->getDataAddrForContiguous((J9IndexableObject *)objectPtr)))
13911390
#endif /* defined(J9VM_ENV_DATA64) */
1392-
) {
1391+
{
13931392
uintptr_t elementsToWalk = indexableObjectModel->getSizeInElements((J9IndexableObject *)objectPtr);
13941393
GC_PointerArrayIterator it(_javaVM, objectPtr);
13951394
uintptr_t previous = 0;

0 commit comments

Comments
 (0)