Skip to content

Commit

Permalink
Merge pull request #3192 from eclipse/revert-2855-CopyForwardHybrid2
Browse files Browse the repository at this point in the history
Revert "CopyForwardHybrid"
  • Loading branch information
amicic committed Oct 9, 2018
2 parents 3ce8244 + 7d277b0 commit 213d251
Show file tree
Hide file tree
Showing 11 changed files with 133 additions and 345 deletions.
19 changes: 0 additions & 19 deletions runtime/gc_modron_startup/mmparseXXgc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,6 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg)

continue;
}
if (try_scan(&scan_start, "tarokEnableCopyForwardMarkCompactHybrid")) {
extensions->tarokEnableCopyForwardHybrid = true;
continue;
}

#endif /* defined (J9VM_GC_VLHGC) */

if(try_scan(&scan_start, "packetListLockSplit=")) {
Expand Down Expand Up @@ -1129,20 +1124,6 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg)
continue;
}

if (try_scan(&scan_start, "fvtest_forceCopyForwardHybridMarkCompactRatio=")) {
/* the percentage of the collectionSet regions would like to markCompact instead of copyForward */
if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceCopyForwardHybridRatio), "fvtest_forceCopyForwardHybridMarkCompactRatio=")) {
returnValue = JNI_EINVAL;
break;
}
if ((extensions->fvtest_forceCopyForwardHybridRatio < 1) || (100 < extensions->fvtest_forceCopyForwardHybridRatio)) {
j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "fvtest_forceCopyForwardHybridMarkCompactRatio=", (UDATA)1, (UDATA)100);
returnValue = JNI_EINVAL;
break;
}
continue;
}

/* NOTE: this option must be understood by all collectors since it appears in options.default */
if (try_scan(&scan_start, "numaCommonThreadClass=")) {
char * pattern = scan_to_delim(PORTLIB, &scan_start, ',');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2018 IBM Corp. and others
* Copyright (c) 1991, 2017 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 @@ -400,7 +400,7 @@ MM_VerboseHandlerOutputVLHGC::handleCopyForwardEnd(J9HookInterface** hook, UDATA
copyForwardStats->_copyObjectsNonEden, copyForwardStats->_copyBytesNonEden, copyForwardStats->_copyDiscardBytesNonEden);
writer->formatAndOutput(env, 1, "<memory-cardclean objects=\"%zu\" bytes=\"%zu\" />",
copyForwardStats->_objectsCardClean, copyForwardStats->_bytesCardClean);
if(copyForwardStats->_aborted || (0 != copyForwardStats->_nonEvacuateRegionCount)) {
if(copyForwardStats->_aborted) {
writer->formatAndOutput(env, 1, "<memory-traced type=\"eden\" objects=\"%zu\" bytes=\"%zu\" />",
copyForwardStats->_scanObjectsEden, copyForwardStats->_scanBytesEden);
writer->formatAndOutput(env, 1, "<memory-traced type=\"other\" objects=\"%zu\" bytes=\"%zu\" />",
Expand All @@ -426,9 +426,6 @@ MM_VerboseHandlerOutputVLHGC::handleCopyForwardEnd(J9HookInterface** hook, UDATA
if(copyForwardStats->_scanCacheOverflow) {
writer->formatAndOutput(env, 1, "<warning details=\"scan cache overflow (storage acquired from heap)\" />");
}
if (0 != copyForwardStats->_nonEvacuateRegionCount) {
writer->formatAndOutput(env, 1, "<warning details=\"running under hybrid mode, JNI Critical region count=%zu\" />", copyForwardStats->_nonEvacuateRegionCount);
}
if(copyForwardStats->_aborted) {
writer->formatAndOutput(env, 1, "<warning details=\"operation aborted due to insufficient free space\" />");
}
Expand Down
6 changes: 1 addition & 5 deletions runtime/gc_vlhgc/CollectionSetDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,7 @@ MM_CollectionSetDelegate::createNurseryCollectionSet(MM_EnvironmentVLHGC *env)
bool regionHasCriticalRegions = (0 != region->_criticalRegionsInUse);
bool isSelectionForCopyForward = env->_cycleState->_shouldRunCopyForward;

/* For CopyForwardHybrid mode we allow eden regions, which has jniCritical,to be part of nursery collectionSet, those regions would be marked instead of copyforwarded.
* Would not add any non Eden regions with jniCritical to collectionSet for copyforward
* For Non CopyForwardHybrid mode we do not check Eden regions with jniCritical here, because we have already set MarkCompact PGC mode for the case in early. */
if (region->getRememberedSetCardList()->isAccurate() && (!isSelectionForCopyForward || !regionHasCriticalRegions || (regionHasCriticalRegions && region->isEden()))) {
if (region->getRememberedSetCardList()->isAccurate() && (!isSelectionForCopyForward || !regionHasCriticalRegions)) {
if(MM_CompactGroupManager::isRegionInNursery(env, region)) {
UDATA compactGroup = MM_CompactGroupManager::getCompactGroupNumber(env, region);
/* on collection phase, mark all non-overflowed regions and those that RSCL is not being rebuilt */
Expand Down Expand Up @@ -462,7 +459,6 @@ MM_CollectionSetDelegate::deleteRegionCollectionSetForPartialGC(MM_EnvironmentVL

region->_markData._shouldMark = false;
region->_reclaimData._shouldReclaim = false;
region->_markData._noEvacuation = false;
}
}

Expand Down
14 changes: 1 addition & 13 deletions runtime/gc_vlhgc/CopyForwardDelegate.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2018 IBM Corp. and others
* Copyright (c) 1991, 2017 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 @@ -104,18 +104,6 @@ class MM_CopyForwardDelegate : public MM_BaseNonVirtual
* @return the estimated number of bytes which will survive
*/
UDATA estimateRequiredSurvivorBytes(MM_EnvironmentVLHGC *env);

/**
* Return true if the copyForward is running under Hybrid mode
*/
bool isHybrid(MM_EnvironmentVLHGC *env)
{
bool ret = false;
if (NULL != _breadthFirstCopyForwardScheme) {
ret = _breadthFirstCopyForwardScheme->isHybrid(env);
}
return ret;
}
};


Expand Down
Loading

0 comments on commit 213d251

Please sign in to comment.