Skip to content

Commit

Permalink
Merge pull request #15928 from dmitripivkine/master
Browse files Browse the repository at this point in the history
Fix caller of getGuaranteedNurseryRange() and use new functions
  • Loading branch information
amicic authored Sep 30, 2022
2 parents 7d076b5 + 48ed3e3 commit 710fd95
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
7 changes: 1 addition & 6 deletions runtime/gc_api/GuaranteedNurseryRange.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2001, 2019 IBM Corp. and others
* Copyright (c) 2001, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -60,13 +60,8 @@ extern "C" {
void
j9mm_get_guaranteed_nursery_range(J9JavaVM* javaVM, void** start, void** end)
{
#if defined (J9VM_GC_GENERATIONAL)
MM_GCExtensions *extensions = MM_GCExtensions::getExtensions(javaVM->omrVM);
extensions->getGuaranteedNurseryRange(start, end);
#else /* J9VM_GC_GENERATIONAL */
*start = NULL;
*end = NULL;
#endif /* J9VM_GC_GENERATIONAL */
}

}
6 changes: 3 additions & 3 deletions runtime/gc_base/GenerationalAccessBarrierComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*******************************************************************************
* Copyright (c) 1991, 2021 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -107,7 +107,7 @@ MM_GenerationalAccessBarrierComponent::postObjectStore(J9VMThread *vmThread, J9O
* The REMEMBERED bit is kept in the object for optimization purposes (only scan objects
* whose REMEMBERED bit is set in an overflow scan)
*/
extensions->setRememberedSetOverflowState();
extensions->setScavengerRememberedSetOverflowState();
reportRememberedSetOverflow(vmThread);
}
}
Expand Down Expand Up @@ -153,7 +153,7 @@ MM_GenerationalAccessBarrierComponent::postBatchObjectStore(J9VMThread *vmThread
/* No slot was available from any fragment. Set the remembered set overflow flag.
* The REMEMBERED bit is kept in the object for optimization purposes (only scan objects
* whose REMEMBERED bit is set in an overflow scan) */
extensions->setRememberedSetOverflowState();
extensions->setScavengerRememberedSetOverflowState();
reportRememberedSetOverflow(vmThread);
} else {
/* Successfully allocated a slot from the remembered set. Record the object. */
Expand Down
4 changes: 2 additions & 2 deletions runtime/gc_modron_standard/StandardAccessBarrier.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2021 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -349,7 +349,7 @@ MM_StandardAccessBarrier::recentlyAllocatedObject(J9VMThread *vmThread, J9Object
* The REMEMBERED bit is kept in the object for optimization purposes (only scan objects
* whose REMEMBERED bit is set in an overflow scan)
*/
extensions->setRememberedSetOverflowState();
extensions->setScavengerRememberedSetOverflowState();
#if defined(J9VM_GC_MODRON_EVENTS)
reportRememberedSetOverflow(vmThread);
#endif /* J9VM_GC_MODRON_EVENTS */
Expand Down
4 changes: 2 additions & 2 deletions runtime/gcchk/gcchk.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*******************************************************************************
* Copyright (c) 1991, 2018 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -478,7 +478,7 @@ hookRememberedSetOverflow(J9HookInterface** hook, UDATA eventNum, void* eventDat
GC_CheckCycle *cycle = (GC_CheckCycle *)extensions->checkCycle;

if (cycle->getMiscFlags() & J9MODRON_GCCHK_REMEMBEREDSET_OVERFLOW) {
checkEngine->_rsOverflowState = MM_GCExtensions::getExtensions(event->currentThread)->isRememberedSetInOverflowState();
checkEngine->_rsOverflowState = MM_GCExtensions::getExtensions(event->currentThread)->isScavengerRememberedSetInOverflowState();
}
}
#endif /* J9VM_GC_GENERATIONAL */
Expand Down

0 comments on commit 710fd95

Please sign in to comment.