Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use adjacancy check for arraylets in WOC fixup #21144

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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