Skip to content

Commit

Permalink
Merge pull request #21144 from amicic/WOC_adjacency_check
Browse files Browse the repository at this point in the history
Don't use adjacancy check for arraylets in WOC fixup
  • Loading branch information
dmitripivkine authored Feb 19, 2025
2 parents e2516e2 + e546e71 commit ce89fed
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions runtime/gc_vlhgc/WriteOnceCompactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1380,16 +1380,15 @@ MM_WriteOnceCompactor::fixupPointerArrayObject(MM_EnvironmentVLHGC* env, J9Objec
GC_ArrayletObjectModel::ArrayLayout layout = indexableObjectModel->getArrayLayout((J9IndexableObject *)objectPtr);

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

0 comments on commit ce89fed

Please sign in to comment.