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

CopyForwardHybrid #3208

Merged
merged 1 commit into from
Oct 10, 2018
Merged

Conversation

LinHu2016
Copy link
Contributor

CopyForwardHybrid is hybrid mode of CopyForward Scheme that
GC can run both copyforward and markcompact on the collection set
simultaneously (for balanced PGC only). During precollection,
GC can reserve some regions for markcompact only(non evacuated
regions -- such as jni critical regions) and copyforward for
the rest of collection set. CopyForwardHybrid intent to avoid
markcompact PGC due to nonEvacuated regions in collection set,
in order to minimize the longer gc pause time and affection to
concurrent gc.

  • new java Option -XXgc:tarokEnableCopyForwardMarkCompactHybrid for
    enabling
    CopyForwardHybrid mode, default is disabled.
  • new java Option
    -XXgc:fvtest_forceCopyForwardMarkCompactHybridRatio=nn,
    (1 <=nn<= 100) nn is the percentage of collection set to be reserved
    for markcompact(for margin testing CopyForwardHybrid).
  • report copyforward is running hybrid mode in verbose gc
  • allow jni critical eden regions in nursery collectionSet for
    copyforward
  • _noEvacuation flag in HeapRegionDescriptorVLHGC, set it true
    if the regions can not be evacuated. decide which region can not
    be evacuated in preProcessRegions.
  • pull scan work from both scanCache and workPacket in CompleteScan
  • synchronize working threads with both scanCache and workPacket
  • if live object in non evacurated regions mark map instead of
    copyforward.
  • exception case 1: if abort case happens, stop to pull scan work
    from workPacket
  • exception case 2: if workPacket overflow during CompleteScan
    set it to abort case to handle overflow

Signed-off-by: Lin Hu [email protected]

 CopyForwardHybrid is hybrid mode of CopyForward Scheme that 
 GC can run both copyforward and markcompact on the collection set
 simultaneously (for balanced PGC only). During precollection, 
 GC can reserve some regions for markcompact only(non evacuated 
 regions -- such as jni critical regions) and copyforward for 
 the rest of collection set. CopyForwardHybrid intent to avoid 
 markcompact PGC due to nonEvacuated regions in collection set,
 in order to minimize the longer gc pause time and affection to
 concurrent gc.

 - new java Option -XXgc:tarokEnableCopyForwardMarkCompactHybrid for
enabling
 CopyForwardHybrid mode, default is disabled.
 - new java Option
-XXgc:fvtest_forceCopyForwardMarkCompactHybridRatio=nn,
 (1 <=nn<= 100) nn is the percentage of collection set to be reserved
for markcompact(for margin testing CopyForwardHybrid).
 - report copyforward is running hybrid mode in verbose gc
 - allow jni critical eden regions in nursery collectionSet for
copyforward
  - _noEvacuation flag in HeapRegionDescriptorVLHGC, set it true 
  if the regions can not be evacuated. decide which region can not 
  be evacuated in preProcessRegions.
  - pull scan work from both scanCache and workPacket in CompleteScan
  - synchronize working threads with both scanCache and workPacket
  - if live object in non evacurated regions mark map instead of
copyforward.
  - exception case 1: if abort case happens, stop to pull scan work
  from workPacket
  - exception case 2: if workPacket overflow during CompleteScan
  set it to abort case to handle overflow
 
Signed-off-by: Lin Hu <[email protected]>
@LinHu2016
Copy link
Contributor Author

This is related pull request #2855 (#2855),
pull request #2855 has been reverted due to failures when running with debug -XXgc:tarokEnableExpensiveAssertions option.
the failures caused by the debugging code, which tries to verify that the references in the Objects inside survivor regions are not in the collection set, except abort case, we add another exception case check(region reserved for mark/compact) for copyForwardHybrid mode, the references could be NULL, which caused the failure.

This pull request has included the fix for the the failure.
the detail changes at below

bool
MM_CopyForwardScheme::isObjectInNoEvacuationRegions(MM_EnvironmentVLHGC *env, J9Object *objectPtr)
{
++ if ((NULL == objectPtr) || (0 == _regionCountCannotBeEvacuated)) {
++ return false;
++ }
MM_HeapRegionDescriptorVLHGC *region = (MM_HeapRegionDescriptorVLHGC *)_regionManager->tableDescriptorForAddress(objectPtr);
return region->_markData._noEvacuation;
}

@dmitripivkine
Copy link
Contributor

Jenkins test sanity zLinux jdk8

@dmitripivkine dmitripivkine merged commit 642c244 into eclipse-openj9:master Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants