Path: blob/master/runtime/gc_modron_startup/mmparseXXgc.cpp
5986 views
/*******************************************************************************1* Copyright (c) 1991, 2022 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122/**23* @file24* @ingroup GC_Modron_Startup25*/2627#include "j9.h"28#include "j9cfg.h"29#include "j9protos.h"30#include "j9consts.h"31#include "jni.h"32#include "jvminit.h"33#include "j9port.h"34#include "modronnls.h"35#include "gcutils.h"3637#include "mmparse.h"3839#include "GCExtensions.hpp"40#if defined(J9VM_GC_REALTIME)41#include "Scheduler.hpp"42#endif /* J9VM_GC_REALTIME */43#include "Wildcard.hpp"4445/**46* Parse the command line looking for private GC options.47* @params optArg string to be parsed48*/49jint50gcParseXXgcArguments(J9JavaVM *vm, char *optArg)51{52char *scan_start = optArg;53char *scan_limit = optArg + strlen(optArg);54char *error_scan;55MM_GCExtensions *extensions;56PORT_ACCESS_FROM_JAVAVM(vm);5758extensions = MM_GCExtensions::getExtensions(vm);5960jint returnValue = JNI_OK;6162while (scan_start < scan_limit) {63/* ignore separators */64try_scan(&scan_start, ",");6566error_scan = scan_start;6768#if defined(J9VM_GC_REALTIME)69if (try_scan(&scan_start, "beatsPerMeasure=")) {70if(!scan_udata_helper(vm, &scan_start, &(extensions->beatMicro), "beatsPerMeasure=")) {71returnValue = JNI_EINVAL;72break;73}74continue;75}7677if (try_scan(&scan_start, "perfTraceSocket=")) {78continue;79}80if (try_scan(&scan_start, "perfTraceLog=")) {81continue;82}83if (try_scan(&scan_start, "debug=")) {84if (scan_udata(&scan_start, &(extensions->debug))) {85returnValue = JNI_EINVAL;86break;87}88continue;89}90if (try_scan(&scan_start, "debugWriteBarrier=")) {91if(!scan_udata_helper(vm, &scan_start, &(extensions->debugWriteBarrier), "debugWriteBarrier=")) {92returnValue = JNI_EINVAL;93break;94}95continue;96}97if (try_scan(&scan_start, "tuningFork")) {98continue;99}100if (try_scan(&scan_start, "stw")) {101MM_Scheduler::initializeForVirtualSTW(extensions);102/* Stop the world collects should not do any concurrent work */103extensions->concurrentSweepingEnabled = false;104extensions->concurrentTracingEnabled = false;105continue;106}107if (try_scan(&scan_start, "headroom=")) {108if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->headRoom), "headroom=")) {109returnValue = JNI_EINVAL;110break;111}112continue;113}114if (try_scan(&scan_start, "minimumFreeEntrySize=")) {115if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->minimumFreeEntrySize), "minimumFreeEntrySize=")) {116returnValue = JNI_EINVAL;117break;118}119continue;120}121if (try_scan(&scan_start, "traceCostToCheckYield=")) {122if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->traceCostToCheckYield), "traceCostToCheckYield=")) {123returnValue = JNI_EINVAL;124break;125}126continue;127}128if (try_scan(&scan_start, "sweepCostToCheckYield=")) {129if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->sweepCostToCheckYield), "sweepCostToCheckYield=")) {130returnValue = JNI_EINVAL;131break;132}133continue;134}135if (try_scan(&scan_start, "verbose=")) {136if(!scan_udata_helper(vm, &scan_start, &(extensions->verbose), "verbose=")) {137returnValue = JNI_EINVAL;138break;139}140continue;141}142if (try_scan(&scan_start, "trigger=")) {143if(!scan_udata_memory_size_helper(vm, &scan_start, &extensions->gcInitialTrigger, "trigger=")) {144returnValue = JNI_EINVAL;145break;146}147148extensions->gcTrigger = extensions->gcInitialTrigger;149continue;150}151if (try_scan(&scan_start, "timeInterval=")) {152if(!scan_udata_helper(vm, &scan_start, &(extensions->timeWindowMicro), "timeInterval=")) {153returnValue = JNI_EINVAL;154break;155}156continue;157}158if (try_scan(&scan_start, "verboseExtensions")) {159extensions->verboseExtensions = true;160continue;161}162if(try_scan(&scan_start, "enableNonDeterministicSweep")) {163extensions->nonDeterministicSweep = true;164continue;165}166if(try_scan(&scan_start, "disableNonDeterministicSweep")) {167extensions->nonDeterministicSweep = false;168continue;169}170if(try_scan(&scan_start, "fixHeapForWalk")) {171extensions->fixHeapForWalk = true;172continue;173}174if (try_scan(&scan_start, "overflowCacheCount=")) {175if(!scan_udata_helper(vm, &scan_start, &(extensions->overflowCacheCount), "overflowCacheCount=")) {176returnValue = JNI_EINVAL;177break;178}179continue;180}181if (try_scan(&scan_start, "allocationTrackerMaxTotalError=")) {182if(!scan_udata_memory_size_helper(vm, &scan_start, &extensions->allocationTrackerMaxTotalError, "allocationTrackerMaxTotalError=")) {183extensions->allocationTrackerFlushThreshold = OMR_MIN(extensions->allocationTrackerMaxThreshold, extensions->allocationTrackerMaxTotalError);184returnValue = JNI_EINVAL;185break;186}187continue;188}189if (try_scan(&scan_start, "allocationTrackerMaxThreshold=")) {190if(!scan_udata_memory_size_helper(vm, &scan_start, &extensions->allocationTrackerMaxThreshold, "allocationTrackerMaxThreshold=")) {191extensions->allocationTrackerFlushThreshold = OMR_MIN(extensions->allocationTrackerMaxThreshold, extensions->allocationTrackerMaxTotalError);192returnValue = JNI_EINVAL;193break;194}195continue;196}197if(try_scan(&scan_start, "noConcurrentSweep")) {198extensions->concurrentSweepingEnabled = false;199continue;200}201if(try_scan(&scan_start, "noConcurrentTrace")) {202extensions->concurrentTracingEnabled = false;203continue;204}205if(try_scan(&scan_start, "concurrentSweep")) {206extensions->concurrentSweepingEnabled = true;207continue;208}209if(try_scan(&scan_start, "concurrentTrace")) {210extensions->concurrentTracingEnabled = true;211continue;212}213214if (try_scan(&scan_start, "allocationContextCount=")) {215if(!scan_udata_helper(vm, &scan_start, &(extensions->managedAllocationContextCount), "allocationContextCount=")) {216returnValue = JNI_EINVAL;217break;218}219220if (extensions->managedAllocationContextCount <= 0) {221j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "allocationContextCount=", (UDATA)0);222returnValue = JNI_EINVAL;223break;224}225226continue;227}228#endif /* J9VM_GC_REALTIME */229230#if defined(J9VM_INTERP_NATIVE_SUPPORT)231/* see if we should be using the hot field optimization for the scavenger (this is the default) */232if (try_scan(&scan_start, "scvHotAlignment")) {233extensions->scavengerAlignHotFields = true;234continue;235}236237/* see if we should disable the hot field optimization in the scavenger */238if (try_scan(&scan_start, "scvNoHotAlignment")) {239extensions->scavengerAlignHotFields = false;240continue;241}242#endif /* J9VM_INTERP_NATIVE_SUPPORT */243244#if defined (OMR_GC_COMPRESSED_POINTERS)245if (extensions->compressObjectReferences()) {246/* see if we are to force disable shifting in compressed refs */247if (try_scan(&scan_start, "noShiftingCompression")) {248extensions->shouldAllowShiftingCompression = false;249continue;250}251252/* see if we are forcing shifting to a specific value */253if (try_scan(&scan_start, "forcedShiftingCompressionAmount=")) {254extensions->shouldForceSpecifiedShiftingCompression = true;255if(!scan_udata_helper(vm, &scan_start, &(extensions->forcedShiftingCompressionAmount), "forcedShiftingCompressionAmount=")) {256returnValue = JNI_EINVAL;257break;258}259260if (extensions->forcedShiftingCompressionAmount > LOW_MEMORY_HEAP_CEILING_SHIFT) {261returnValue = JNI_EINVAL;262break;263}264265continue;266}267}268#endif /* defined (OMR_GC_COMPRESSED_POINTERS) */269270#if defined (J9VM_GC_VLHGC)271/* parse the maximum age a region can have to be included in the nursery set, if specified */272if (try_scan(&scan_start, "tarokNurseryMaxAge=")) {273if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->tarokNurseryMaxAge._valueSpecified), "tarokNurseryMaxAge=")) {274returnValue = JNI_EINVAL;275break;276}277extensions->tarokNurseryMaxAge._wasSpecified = true;278continue;279}280281/* parse the RememberedSet Card List maximum size */282if (try_scan(&scan_start, "tarokRememberedSetCardListMaxSize=")) {283if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->tarokRememberedSetCardListMaxSize), "tarokRememberedSetCardListMaxSize=")) {284returnValue = JNI_EINVAL;285break;286}287288continue;289}290291if (try_scan(&scan_start, "tarokRememberedSetCardListSize=")) {292if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->tarokRememberedSetCardListSize), "tarokRememberedSetCardListSize=")) {293returnValue = JNI_EINVAL;294break;295}296297continue;298}299300/* parse the maximum age a region can be incremented to (increments occurring after a PGC) */301if (try_scan(&scan_start, "tarokRegionMaxAge=")) {302if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->tarokRegionMaxAge), "tarokRegionMaxAge=")) {303returnValue = JNI_EINVAL;304break;305}306continue;307}308309if (try_scan(&scan_start, "tarokKickoffHeadroomRegionRate=")) {310if(!scan_u32_helper(vm, &scan_start, &(extensions->tarokKickoffHeadroomRegionRate), "tarokKickoffHeadroomRegionRate=")) {311returnValue = JNI_EINVAL;312break;313}314if (50 < extensions->tarokKickoffHeadroomRegionRate) {315j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "tarokKickoffHeadroomRegionRate=", (UDATA)0, (UDATA)50);316returnValue = JNI_EINVAL;317break;318}319continue;320}321322if (try_scan(&scan_start, "tarokKickoffHeadroomInBytes=")) {323if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->tarokKickoffHeadroomInBytes), "tarokKickoffHeadroomInBytes=")) {324returnValue = JNI_EINVAL;325break;326}327extensions->tarokForceKickoffHeadroomInBytes = true;328continue;329}330331/* see if we are being asked to enable our debugging capabilities (free region poisoning, etc) */332if (try_scan(&scan_start, "tarokDebugEnabled")) {333extensions->tarokDebugEnabled = true;334continue;335}336if (try_scan(&scan_start, "tarokDisableScoreBasedAtomicCompact")) {337extensions->tarokEnableScoreBasedAtomicCompact = false;338continue;339}340if (try_scan(&scan_start, "tarokEnableScoreBasedAtomicCompact")) {341extensions->tarokEnableScoreBasedAtomicCompact = true;342continue;343}344if (try_scan(&scan_start, "tarokEnableIncrementalGMP")) {345extensions->tarokEnableIncrementalGMP = true;346continue;347}348if (try_scan(&scan_start, "tarokDisableIncrementalGMP")) {349extensions->tarokEnableIncrementalGMP = false;350continue;351}352if (try_scan(&scan_start, "tarokEnableExpensiveAssertions")) {353extensions->tarokEnableExpensiveAssertions = true;354continue;355}356if (try_scan(&scan_start, "tarokDisableExpensiveAssertions")) {357extensions->tarokEnableExpensiveAssertions = false;358continue;359}360if (try_scan(&scan_start, "tarokTgcEnableRememberedSetDuplicateDetection")) {361extensions->tarokTgcEnableRememberedSetDuplicateDetection = true;362continue;363}364if (try_scan(&scan_start, "tarokTgcDisableRememberedSetDuplicateDetection")) {365extensions->tarokTgcEnableRememberedSetDuplicateDetection = false;366continue;367}368if (try_scan(&scan_start, "tarokPGCOnlyCopyForward")) {369extensions->tarokPGCShouldMarkCompact = false;370continue;371}372if (try_scan(&scan_start, "tarokPGCOnlyMarkCompact")) {373extensions->tarokPGCShouldCopyForward = false;374continue;375}376if (try_scan(&scan_start, "tarokEnableDynamicCollectionSetSelection")) {377extensions->tarokEnableDynamicCollectionSetSelection = true;378continue;379}380if (try_scan(&scan_start, "tarokDisableDynamicCollectionSetSelection")) {381extensions->tarokEnableDynamicCollectionSetSelection = false;382continue;383}384if (try_scan(&scan_start, "tarokDynamicCollectionSetSelectionAbsoluteBudget=")) {385if(!scan_udata_helper(vm, &scan_start, &extensions->tarokDynamicCollectionSetSelectionAbsoluteBudget, "tarokDynamicCollectionSetSelectionAbsoluteBudget=")) {386returnValue = JNI_EINVAL;387break;388}389extensions->tarokDynamicCollectionSetSelectionPercentageBudget = 0.0;390continue ;391}392if (try_scan(&scan_start, "tarokDynamicCollectionSetSelectionPercentageBudget=")) {393UDATA percentage = 0;394if(!scan_udata_helper(vm, &scan_start, &percentage, "tarokDynamicCollectionSetSelectionPercentageBudget=")) {395returnValue = JNI_EINVAL;396break;397}398if(percentage > 100) {399returnValue = JNI_EINVAL;400break;401}402extensions->tarokDynamicCollectionSetSelectionPercentageBudget = ((double)percentage) / 100.0;403extensions->tarokDynamicCollectionSetSelectionAbsoluteBudget = 0;404continue ;405}406if (try_scan(&scan_start, "tarokCoreSamplingAbsoluteBudget=")) {407if(!scan_udata_helper(vm, &scan_start, &extensions->tarokCoreSamplingAbsoluteBudget, "tarokCoreSamplingAbsoluteBudget=")) {408returnValue = JNI_EINVAL;409break;410}411extensions->tarokCoreSamplingPercentageBudget = 0.0;412continue ;413}414if (try_scan(&scan_start, "tarokCoreSamplingPercentageBudget=")) {415UDATA percentage = 0;416if(!scan_udata_helper(vm, &scan_start, &percentage, "tarokCoreSamplingPercentageBudget=")) {417returnValue = JNI_EINVAL;418break;419}420if(percentage > 100) {421returnValue = JNI_EINVAL;422break;423}424extensions->tarokCoreSamplingPercentageBudget = ((double)percentage) / 100.0;425extensions->tarokCoreSamplingAbsoluteBudget = 0;426continue ;427}428429if (try_scan(&scan_start, "tarokGlobalMarkIncrementTimeMillis=")) {430if(!scan_udata_helper(vm, &scan_start, &extensions->tarokGlobalMarkIncrementTimeMillis, "tarokGlobalMarkIncrementTimeMillis=")) {431returnValue = JNI_EINVAL;432break;433}434continue;435}436if (try_scan(&scan_start, "tarokPGCtoGMP=")) {437if(!scan_udata_helper(vm, &scan_start, &extensions->tarokPGCtoGMPNumerator, "tarokPGCtoGMP=")) {438returnValue = JNI_EINVAL;439break;440}441if (try_scan(&scan_start, ":")) {442if(!scan_udata_helper(vm, &scan_start, &extensions->tarokPGCtoGMPDenominator, "tarokPGCtoGMP=")) {443returnValue = JNI_EINVAL;444break;445}446}447if ( (1 != extensions->tarokPGCtoGMPNumerator) && (1 != extensions->tarokPGCtoGMPDenominator) ) {448j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTION_MALFORMED, "tarokPGCtoGMP=");449returnValue = JNI_EINVAL;450break;451}452453continue;454}455if (try_scan(&scan_start, "tarokGMPIntermission=")) {456if (try_scan(&scan_start, "auto")) {457extensions->tarokAutomaticGMPIntermission = true;458extensions->tarokGMPIntermission = UDATA_MAX;459} else if(scan_udata_helper(vm, &scan_start, &extensions->tarokGMPIntermission, "tarokGMPIntermission=")) {460extensions->tarokAutomaticGMPIntermission = false;461} else {462returnValue = JNI_EINVAL;463break;464}465continue;466}467if (try_scan(&scan_start, "tarokNoCommonThreads")) {468extensions->tarokAttachedThreadsAreCommon = false;469continue;470}471if (try_scan(&scan_start, "tarokCopyForwardFragmentationTarget=")) {472UDATA percentage = 0;473if(!scan_udata_helper(vm, &scan_start, &percentage, "tarokCopyForwardFragmentationTarget=")) {474returnValue = JNI_EINVAL;475break;476}477extensions->tarokCopyForwardFragmentationTarget = ((double)percentage) / 100.0;478continue ;479}480if (try_scan(&scan_start, "tarokDefragmentEmptinessThreshold=")) {481UDATA percentage = 0;482if (try_scan(&scan_start, "auto")) {483extensions->tarokAutomaticDefragmentEmptinessThreshold = true;484extensions->tarokDefragmentEmptinessThreshold = 0.0;485} else if (scan_udata_helper(vm, &scan_start, &percentage, "tarokDefragmentEmptinessThreshold=")) {486if (percentage > 100) {487j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "-XXgc:tarokDefragmentEmptinessThreshold=", (UDATA)0, (UDATA)100);488returnValue = JNI_EINVAL;489break;490}491extensions->tarokAutomaticDefragmentEmptinessThreshold = false;492extensions->tarokDefragmentEmptinessThreshold = ((double)percentage) / 100.0;493} else {494returnValue = JNI_EINVAL;495break;496}497498continue ;499}500if (try_scan(&scan_start, "tarokConcurrentMarkingCostWeight=")) {501UDATA percentage = 0;502if (!scan_udata_helper(vm, &scan_start, &percentage, "tarokConcurrentMarkingCostWeight=")) {503returnValue = JNI_EINVAL;504break;505}506if (percentage > 100) {507returnValue = JNI_EINVAL;508break;509}510extensions->tarokConcurrentMarkingCostWeight = ((double)percentage) / 100.0;511continue ;512}513if (try_scan(&scan_start, "tarokEnableCardScrubbing")) {514extensions->tarokEnableCardScrubbing = true;515continue;516}517if (try_scan(&scan_start, "tarokDisableCardScrubbing")) {518extensions->tarokEnableCardScrubbing = false;519continue;520}521if (try_scan(&scan_start, "tarokEnableConcurrentGMP")) {522extensions->tarokEnableConcurrentGMP = true;523continue;524}525if (try_scan(&scan_start, "tarokDisableConcurrentGMP")) {526extensions->tarokEnableConcurrentGMP = false;527continue;528}529if (try_scan(&scan_start, "tarokEnableIncrementalClassGC")) {530extensions->tarokEnableIncrementalClassGC = true;531continue;532}533if (try_scan(&scan_start, "tarokDisableIncrementalClassGC")) {534extensions->tarokEnableIncrementalClassGC = false;535continue;536}537if (try_scan(&scan_start, "tarokEnableCompressedCardTable")) {538extensions->tarokEnableCompressedCardTable = true;539continue;540}541if (try_scan(&scan_start, "tarokDisableCompressedCardTable")) {542extensions->tarokEnableCompressedCardTable = false;543continue;544}545if (try_scan(&scan_start, "tarokEnableLeafFirstCopying")) {546extensions->tarokEnableLeafFirstCopying = true;547continue;548}549if (try_scan(&scan_start, "tarokDisableLeafFirstCopying")) {550extensions->tarokEnableLeafFirstCopying = false;551continue;552}553if (try_scan(&scan_start, "tarokEnableStableRegionDetection")) {554extensions->tarokEnableStableRegionDetection = true;555continue;556}557if (try_scan(&scan_start, "tarokDisableStableRegionDetection")) {558extensions->tarokEnableStableRegionDetection = false;559continue;560}561if (try_scan(&scan_start, "tarokAllocationAgeEnabled")) {562extensions->tarokAllocationAgeEnabled = true;563continue;564}565if (try_scan(&scan_start, "tarokAllocationAgeDisabled")) {566extensions->tarokAllocationAgeEnabled = false;567continue;568}569if (try_scan(&scan_start, "tarokAllocationAgeExponentBase=")) {570UDATA exponentBase = 0;571if(!scan_udata_helper(vm, &scan_start, &exponentBase, "tarokAllocationAgeExponentBase=")) {572returnValue = JNI_EINVAL;573break;574}575extensions->tarokAllocationAgeExponentBase = ((double)exponentBase) / 100.0;576continue ;577}578if (try_scan(&scan_start, "tarokAllocationAgeUnit=")) {579if(!scan_udata_memory_size_helper(vm, &scan_start, &(extensions->tarokAllocationAgeUnit), "tarokAllocationAgeUnit=")) {580returnValue = JNI_EINVAL;581break;582}583continue;584}585if (try_scan(&scan_start, "tarokMaximumAgeInBytes=")) {586if(!scan_u64_memory_size_helper(vm, &scan_start, &(extensions->tarokMaximumAgeInBytes), "tarokMaximumAgeInBytes=")) {587returnValue = JNI_EINVAL;588break;589}590continue;591}592if (try_scan(&scan_start, "tarokMaximumNurseryAgeInBytes=")) {593if(!scan_u64_memory_size_helper(vm, &scan_start, &(extensions->tarokMaximumNurseryAgeInBytes), "tarokMaximumNurseryAgeInBytes=")) {594returnValue = JNI_EINVAL;595break;596}597continue;598}599if (try_scan(&scan_start, "tarokEnableProjectedSurvivalCollectionSet")) {600extensions->tarokUseProjectedSurvivalCollectionSet = true;601continue;602}603if (try_scan(&scan_start, "tarokDisableProjectedSurvivalCollectionSet")) {604extensions->tarokUseProjectedSurvivalCollectionSet = false;605continue;606}607if (try_scan(&scan_start, "tarokWorkSplittingPeriod=")) {608if(!scan_hex_helper(vm, &scan_start, &(extensions->tarokWorkSplittingPeriod), "tarokWorkSplittingPeriod=")) {609returnValue = JNI_EINVAL;610break;611}612continue;613}614if (try_scan(&scan_start, "tarokMinimumGMPWorkTargetBytes=")) {615UDATA workTarget = 0;616if(!scan_udata_memory_size_helper(vm, &scan_start, &workTarget, "tarokMinimumGMPWorkTargetBytes=")) {617returnValue = JNI_EINVAL;618break;619}620if(0 == workTarget) {621j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:tarokMinimumGMPWorkTargetBytes", (UDATA)0);622returnValue = JNI_EINVAL;623break;624}625626extensions->tarokMinimumGMPWorkTargetBytes._wasSpecified = true;627extensions->tarokMinimumGMPWorkTargetBytes._valueSpecified = workTarget;628629continue;630}631#endif /* defined (J9VM_GC_VLHGC) */632633if(try_scan(&scan_start, "packetListLockSplit=")) {634if(!scan_udata_helper(vm, &scan_start, &extensions->packetListSplit, "packetListLockSplit=")) {635returnValue = JNI_EINVAL;636break;637}638if(0 == extensions->packetListSplit) {639j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:packetListLockSplit", (UDATA)0);640returnValue = JNI_EINVAL;641break;642}643continue;644}645646#if defined(J9VM_GC_MODRON_SCAVENGER)647if(try_scan(&scan_start, "cacheListLockSplit=")) {648if(!scan_udata_helper(vm, &scan_start, &extensions->cacheListSplit, "cacheListLockSplit=")) {649returnValue = JNI_EINVAL;650break;651}652if(0 == extensions->cacheListSplit) {653j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:cacheListLockSplit", (UDATA)0);654returnValue = JNI_EINVAL;655break;656}657continue;658}659#endif /* J9VM_GC_MODRON_SCAVENGER */660661if (try_scan(&scan_start, "markingArraySplitMinimumAmount=")) {662UDATA arraySplitAmount = 0;663if(!scan_udata_helper(vm, &scan_start, &arraySplitAmount, "markingArraySplitMinimumAmount=")) {664returnValue = JNI_EINVAL;665break;666}667extensions->markingArraySplitMinimumAmount = (0 == arraySplitAmount) ? UDATA_MAX : arraySplitAmount;668continue;669}670if (try_scan(&scan_start, "markingArraySplitMaximumAmount=")) {671UDATA arraySplitAmount = 0;672if(!scan_udata_helper(vm, &scan_start, &arraySplitAmount, "markingArraySplitMaximumAmount=")) {673returnValue = JNI_EINVAL;674break;675}676extensions->markingArraySplitMaximumAmount = (0 == arraySplitAmount) ? UDATA_MAX : arraySplitAmount;677678if(extensions->markingArraySplitMaximumAmount < extensions->markingArraySplitMinimumAmount) {679j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:markingArraySplitMaximumAmount", (UDATA)extensions->markingArraySplitMinimumAmount);680returnValue = JNI_EINVAL;681break;682}683684continue;685}686687if (try_scan(&scan_start, "stdSplitFreeListSplitAmount=h")) {688j9tty_printf(PORTLIB, "stdSplitFreeListSplitAmount=h %s\n", scan_start);689690if(!scan_udata_helper(vm, &scan_start, &extensions->splitFreeListSplitAmount, "stdSplitFreeListSplitAmount=h")) {691returnValue = JNI_EINVAL;692break;693}694if(1 >= extensions->splitFreeListSplitAmount) {695j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:stdSplitFreeListSplitAmount=h", (UDATA)1);696returnValue = JNI_EINVAL;697break;698}699extensions->enableHybridMemoryPool = true;700continue;701}702703if (try_scan(&scan_start, "stdSplitFreeListSplitAmount=")) {704j9tty_printf(PORTLIB, "stdSplitFreeListSplitAmount= %s\n", scan_start);705if(!scan_udata_helper(vm, &scan_start, &extensions->splitFreeListSplitAmount, "stdSplitFreeListSplitAmount=")) {706returnValue = JNI_EINVAL;707break;708}709if(0 == extensions->splitFreeListSplitAmount) {710j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:stdSplitFreeListSplitAmount", (UDATA)0);711returnValue = JNI_EINVAL;712break;713}714continue;715}716717/* Start of options relating to dynamicBreadthFirstScanOrdering */718#if defined(J9VM_GC_MODRON_SCAVENGER) || defined (J9VM_GC_VLHGC)719if(try_scan(&scan_start, "dbfGcCountBetweenHotFieldSort=")) {720UDATA value;721if(!scan_udata_helper(vm, &scan_start, &value, "dbfGcCountBetweenHotFieldSort=")) {722returnValue = JNI_EINVAL;723break;724}725if(value > 10) {726j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "dbfGcCountBetweenHotFieldSort=", (UDATA)0, (UDATA)10);727returnValue = JNI_EINVAL;728break;729}730extensions->gcCountBetweenHotFieldSort = value;731continue;732}733734if(try_scan(&scan_start, "dbfGcCountBetweenHotFieldSortMax=")) {735UDATA value;736if(!scan_udata_helper(vm, &scan_start, &value, "dbfGcCountBetweenHotFieldSortMax=")) {737returnValue = JNI_EINVAL;738break;739}740if(value > 50) {741j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "dbfGcCountBetweenHotFieldSortMax=", (UDATA)0, (UDATA)50);742returnValue = JNI_EINVAL;743break;744}745extensions->gcCountBetweenHotFieldSortMax = value;746continue;747}748749if(try_scan(&scan_start, "dbfDisableAdaptiveGcCountBetweenHotFieldSort")) {750extensions->adaptiveGcCountBetweenHotFieldSort = false;751continue;752}753754if(try_scan(&scan_start, "dbfDisableDepthCopyTwoPaths")) {755extensions->depthCopyTwoPaths = false;756continue;757}758759if(try_scan(&scan_start, "dbfDepthCopyThreePaths")) {760extensions->depthCopyThreePaths = true;761continue;762}763764if(try_scan(&scan_start, "dbfEnableAlwaysDepthCopyFirstOffset")) {765extensions->alwaysDepthCopyFirstOffset = true;766continue;767}768769if(try_scan(&scan_start, "dbfEnablePermanantHotFields")) {770extensions->allowPermanantHotFields = true;771continue;772}773774if(try_scan(&scan_start, "dbfMaxConsecutiveHotFieldSelections=")) {775UDATA value;776if(!scan_udata_helper(vm, &scan_start, &value, "dbfMaxConsecutiveHotFieldSelections=")) {777returnValue = JNI_EINVAL;778break;779}780if(value > 50) {781j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "dbfMaxConsecutiveHotFieldSelections=", (UDATA)0, (UDATA)50);782returnValue = JNI_EINVAL;783break;784}785extensions->maxConsecutiveHotFieldSelections = value;786continue;787}788789if(try_scan(&scan_start, "dbfEnableHotFieldResetting")) {790extensions->hotFieldResettingEnabled = true;791continue;792}793794if(try_scan(&scan_start, "dbfGcCountBetweenHotFieldReset=")) {795UDATA value;796if(!scan_udata_helper(vm, &scan_start, &value, "dbfGcCountBetweenHotFieldReset=")) {797returnValue = JNI_EINVAL;798break;799}800if(value > 5000) {801j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "dbfGcCountBetweenHotFieldReset=", (UDATA)0, (UDATA)5000);802returnValue = JNI_EINVAL;803break;804}805extensions->gcCountBetweenHotFieldReset = value;806continue;807}808809if(try_scan(&scan_start, "dbfDepthCopyMax=")) {810UDATA value;811if(!scan_udata_helper(vm, &scan_start, &value, "dbfDepthCopyMax=")) {812returnValue = JNI_EINVAL;813break;814}815if(value > 10) {816j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "dbfDepthCopyMax=", (UDATA)0, (UDATA)10);817returnValue = JNI_EINVAL;818break;819}820extensions->depthCopyMax = value;821continue;822}823824if(try_scan(&scan_start, "dbfMaxHotFieldListLength=")) {825UDATA value;826if(!scan_udata_helper(vm, &scan_start, &value, "dbfMaxHotFieldListLength=")) {827returnValue = JNI_EINVAL;828break;829}830if(value > 20) {831j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "dbfMaxHotFieldListLength=", (UDATA)0, (UDATA)20);832returnValue = JNI_EINVAL;833break;834}835extensions->maxHotFieldListLength = ((uint32_t)value);836continue;837}838839if(try_scan(&scan_start, "dbfMinCpuUtil=")) {840UDATA value;841if(!scan_udata_helper(vm, &scan_start, &value, "dbfMinCpuUtil=")) {842returnValue = JNI_EINVAL;843break;844}845if(value > 15) {846j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "dbfMinCpuUtil=", (UDATA)0, (UDATA)15);847returnValue = JNI_EINVAL;848break;849}850extensions->minCpuUtil = value;851continue;852}853#endif /* defined(J9VM_GC_MODRON_SCAVENGER) || defined (J9VM_GC_VLHGC) */854/* End of options relating to dynamicBreadthFirstScanOrdering */855856#if defined(J9VM_GC_MODRON_SCAVENGER)857if (try_scan(&scan_start, "scanCacheMinimumSize=")) {858/* Read in restricted scan cache size */859if(!scan_udata_helper(vm, &scan_start, &extensions->scavengerScanCacheMinimumSize, "scanCacheMinimumSize=")) {860returnValue = JNI_EINVAL;861break;862}863if(0 == extensions->scavengerScanCacheMinimumSize) {864j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:scanCacheMinimumSize", (UDATA)0);865returnValue = JNI_EINVAL;866break;867}868continue;869}870871if (try_scan(&scan_start, "scanCacheMaximumSize=")) {872/* Read in restricted scan cache size */873if(!scan_udata_helper(vm, &scan_start, &extensions->scavengerScanCacheMaximumSize, "scanCacheMaximumSize=")) {874returnValue = JNI_EINVAL;875break;876}877if(extensions->scavengerScanCacheMinimumSize > extensions->scavengerScanCacheMaximumSize) {878j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:scanCacheMaximumSize", (UDATA)extensions->scavengerScanCacheMinimumSize);879returnValue = JNI_EINVAL;880break;881}882continue;883}884885if (try_scan(&scan_start, "scvArraySplitAmount=")) {886UDATA arraySplitAmount = 0;887if(!scan_udata_helper(vm, &scan_start, &arraySplitAmount, "scvArraySplitAmount=")) {888returnValue = JNI_EINVAL;889break;890}891extensions->scvArraySplitMinimumAmount = (0 == arraySplitAmount) ? UDATA_MAX : arraySplitAmount;892extensions->scvArraySplitMaximumAmount = extensions->scvArraySplitMinimumAmount;893continue;894}895if (try_scan(&scan_start, "scvArraySplitMinimumAmount=")) {896UDATA arraySplitAmount = 0;897if(!scan_udata_helper(vm, &scan_start, &arraySplitAmount, "scvArraySplitMinimumAmount=")) {898returnValue = JNI_EINVAL;899break;900}901extensions->scvArraySplitMinimumAmount = (0 == arraySplitAmount) ? UDATA_MAX : arraySplitAmount;902continue;903}904if (try_scan(&scan_start, "scvArraySplitMaximumAmount=")) {905UDATA arraySplitAmount = 0;906if(!scan_udata_helper(vm, &scan_start, &arraySplitAmount, "scvArraySplitMaximumAmount=")) {907returnValue = JNI_EINVAL;908break;909}910extensions->scvArraySplitMaximumAmount = (0 == arraySplitAmount) ? UDATA_MAX : arraySplitAmount;911912if(extensions->scvArraySplitMaximumAmount < extensions->scvArraySplitMinimumAmount) {913j9nls_printf(PORTLIB,J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:scvArraySplitMaximumAmount", (UDATA)extensions->scvArraySplitMinimumAmount);914returnValue = JNI_EINVAL;915break;916}917918continue;919}920if (try_scan(&scan_start, "aliasInhibitingThresholdPercentage=")) {921UDATA percentage = 0;922if(!scan_udata_helper(vm, &scan_start, &percentage, "aliasInhibitingThresholdPercentage=")) {923returnValue = JNI_EINVAL;924break;925}926if(percentage > 100) {927returnValue = JNI_EINVAL;928break;929}930extensions->aliasInhibitingThresholdPercentage = ((double)percentage) / 100.0;931932continue;933}934935if (try_scan(&scan_start, "adaptiveThreadingSensitivityFactor=")) {936UDATA sensitivityFactor = 0;937if (!scan_udata_helper(vm, &scan_start, &sensitivityFactor, "adaptiveThreadingSensitivityFactor=")) {938returnValue = JNI_EINVAL;939break;940}941extensions->adaptiveThreadingSensitivityFactor = ((float)sensitivityFactor) / 10.0f;942943continue;944}945946if (try_scan(&scan_start, "adaptiveThreadingWeightActiveThreads=")) {947UDATA adaptiveThreadingWeightActiveThreads = 0;948if (!scan_udata_helper(vm, &scan_start, &adaptiveThreadingWeightActiveThreads, "adaptiveThreadingWeightActiveThreads=")) {949returnValue = JNI_EINVAL;950break;951}952953extensions->adaptiveThreadingWeightActiveThreads = ((float)adaptiveThreadingWeightActiveThreads) / 100.0f;954955continue;956}957958if (try_scan(&scan_start, "adaptiveThreadBooster=")) {959UDATA adaptiveThreadBooster = 0;960if (!scan_udata_helper(vm, &scan_start, &adaptiveThreadBooster, "adaptiveThreadBooster=")) {961returnValue = JNI_EINVAL;962break;963}964extensions->adaptiveThreadBooster = ((float)adaptiveThreadBooster) / 100.0f;965966continue;967}968969#if defined(OMR_GC_CONCURRENT_SCAVENGER)970if (try_scan(&scan_start, "debugConcurrentScavengerPageAlignment")) {971extensions->setDebugConcurrentScavengerPageAlignment(true);972continue;973}974if(try_scan(&scan_start, "softwareRangeCheckReadBarrier")) {975extensions->softwareRangeCheckReadBarrier = true;976continue;977}978979if (try_scan(&scan_start, "enableConcurrentScavengeExhaustiveTermination")) {980extensions->concurrentScavengeExhaustiveTermination = true;981continue;982}983984if (try_scan(&scan_start, "disableConcurrentScavengeExhaustiveTermination")) {985extensions->concurrentScavengeExhaustiveTermination = false;986continue;987}988#endif /* defined(OMR_GC_CONCURRENT_SCAVENGER) */989990#endif /* defined(J9VM_GC_MODRON_SCAVENGER) */991992if (try_scan(&scan_start, "enableFrequentObjectAllocationSampling")) {993extensions->doFrequentObjectAllocationSampling = true;994continue;995}996997if (try_scan(&scan_start, "disableFrequentObjectAllocationSampling")) {998extensions->doFrequentObjectAllocationSampling = false;999continue;1000}10011002if (try_scan(&scan_start, "frequentObjectAllocationSamplingDepth=")) {1003if (!scan_u32_helper(vm, &scan_start, &extensions->frequentObjectAllocationSamplingDepth, "frequentObjectAllocationSamplingDepth=")) {1004returnValue = JNI_EINVAL;1005break;1006}1007if (0 == extensions->frequentObjectAllocationSamplingDepth) {1008j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-XXgc:frequentObjectAllocationSamplingDepth", (UDATA)0);1009returnValue = JNI_EINVAL;1010break;1011}10121013extensions->doFrequentObjectAllocationSampling = true;1014continue;1015}10161017if (try_scan(&scan_start, "frequentObjectAllocationSamplingRate=")) {1018UDATA percentage = 0;1019if (!scan_udata_helper(vm, &scan_start, &percentage, "frequentObjectAllocationSamplingRate=")) {1020returnValue = JNI_EINVAL;1021break;1022}1023if (percentage > 100) {1024returnValue = JNI_EINVAL;1025break;1026}10271028extensions->frequentObjectAllocationSamplingRate = percentage;1029extensions->doFrequentObjectAllocationSampling = true;1030continue;1031}10321033if (try_scan(&scan_start, "largeObjectAllocationProfilingThreshold=")) {1034if (!scan_udata_helper(vm, &scan_start, &extensions->largeObjectAllocationProfilingThreshold, "largeObjectAllocationProfilingThreshold=")) {1035returnValue = JNI_EINVAL;1036break;1037}1038continue;1039}10401041if (try_scan(&scan_start, "largeObjectAllocationProfilingVeryLargeObjectThreshold=")) {1042if (!scan_udata_helper(vm, &scan_start, &extensions->largeObjectAllocationProfilingVeryLargeObjectThreshold, "largeObjectAllocationProfilingVeryLargeObjectThreshold=")) {1043returnValue = JNI_EINVAL;1044break;1045}1046continue;1047}10481049if (try_scan(&scan_start, "largeObjectAllocationProfilingTopK=")) {1050if (!scan_u32_helper(vm, &scan_start, &extensions->largeObjectAllocationProfilingTopK, "largeObjectAllocationProfilingTopK=")) {1051returnValue = JNI_EINVAL;1052break;1053}10541055if ((extensions->largeObjectAllocationProfilingTopK < 1) || (128 < extensions->largeObjectAllocationProfilingTopK)) {1056j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "largeObjectAllocationProfilingTopK=", (UDATA)1, (UDATA)128);1057returnValue = JNI_EINVAL;1058break;1059}10601061continue;1062}10631064if (try_scan(&scan_start, "largeObjectAllocationProfilingSizeClassRatio=")) {1065if (!scan_u32_helper(vm, &scan_start, &extensions->largeObjectAllocationProfilingSizeClassRatio, "largeObjectAllocationProfilingSizeClassRatio=")) {1066returnValue = JNI_EINVAL;1067break;1068}10691070if ((extensions->largeObjectAllocationProfilingSizeClassRatio < 101) || (200 < extensions->largeObjectAllocationProfilingSizeClassRatio)) {1071j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "largeObjectAllocationProfilingSizeClassRatio=", (UDATA)101, (UDATA)200);1072returnValue = JNI_EINVAL;1073break;1074}10751076continue;1077}10781079if (try_scan(&scan_start, "enableEstimateFragmentationGlobalGCOnly")) {1080extensions->estimateFragmentation = GLOBALGC_ESTIMATE_FRAGMENTATION;1081extensions->processLargeAllocateStats = true;1082continue;1083}10841085if (try_scan(&scan_start, "enableEstimateFragmentation")) {1086extensions->estimateFragmentation = (GLOBALGC_ESTIMATE_FRAGMENTATION | LOCALGC_ESTIMATE_FRAGMENTATION);1087extensions->processLargeAllocateStats = true;1088continue;1089}10901091if (try_scan(&scan_start, "disableEstimateFragmentation")) {1092extensions->estimateFragmentation = NO_ESTIMATE_FRAGMENTATION;1093extensions->darkMatterSampleRate = 0;1094continue;1095}10961097if (try_scan(&scan_start, "enableProcessLargeAllocateStats")) {1098extensions->processLargeAllocateStats = true;1099continue;1100}11011102if (try_scan(&scan_start, "disableProcessLargeAllocateStats")) {1103extensions->processLargeAllocateStats = false;1104extensions->estimateFragmentation = NO_ESTIMATE_FRAGMENTATION;1105continue;1106}1107if (try_scan(&scan_start, "verboseNewFormat")) {1108extensions->verboseNewFormat = true;1109continue;1110}1111if (try_scan(&scan_start, "verboseOldFormat")) {1112extensions->verboseNewFormat = false;1113continue;1114}11151116if (try_scan(&scan_start, "heapSizeStartupHintConservativeFactor=")) {1117UDATA percentage = 0;1118if(!scan_udata_helper(vm, &scan_start, &percentage, "heapSizeStartupHintConservativeFactor=")) {1119returnValue = JNI_EINVAL;1120break;1121}1122if(percentage > 100) {1123returnValue = JNI_EINVAL;1124break;1125}1126extensions->heapSizeStartupHintConservativeFactor = ((float)percentage) / 100.0f;1127continue ;1128}11291130if (try_scan(&scan_start, "heapSizeStartupHintWeightNewValue=")) {1131UDATA percentage = 0;1132if(!scan_udata_helper(vm, &scan_start, &percentage, "heapSizeStartupHintWeightNewValue=")) {1133returnValue = JNI_EINVAL;1134break;1135}1136if(percentage > 100) {1137returnValue = JNI_EINVAL;1138break;1139}1140extensions->heapSizeStartupHintWeightNewValue = ((float)percentage) / 100.0f;1141continue ;1142}11431144if (try_scan(&scan_start, "darkMatterCompactThreshold=")) {1145UDATA percentage = 0;1146if(!scan_udata_helper(vm, &scan_start, &percentage, "darkMatterCompactThreshold=")) {1147returnValue = JNI_EINVAL;1148break;1149}1150if(percentage > 100) {1151returnValue = JNI_EINVAL;1152break;1153}1154extensions->darkMatterCompactThreshold = ((float)percentage) / 100.0f;1155continue;1156}11571158#if defined(OMR_GC_IDLE_HEAP_MANAGER)1159if (try_scan(&scan_start, "gcOnIdleCompactThreshold=")) {1160UDATA percentage = 0;1161if(!scan_udata_helper(vm, &scan_start, &percentage, "gcOnIdleCompactThreshold=")) {1162returnValue = JNI_EINVAL;1163break;1164}1165if(percentage > 100) {1166returnValue = JNI_EINVAL;1167break;1168}1169extensions->gcOnIdleCompactThreshold = ((float)percentage) / 100.0f;1170continue;1171}1172#endif /* defined(OMR_GC_IDLE_HEAP_MANAGER) */11731174#if defined (J9VM_GC_VLHGC)1175if (try_scan(&scan_start, "fvtest_tarokSimulateNUMA=")) {1176UDATA simulatedNodeCount = 0;1177if(!scan_udata_memory_size_helper(vm, &scan_start, &simulatedNodeCount, "fvtest_tarokSimulateNUMA=")) {1178returnValue = JNI_EINVAL;1179break;1180}1181extensions->_numaManager.setSimulatedNodeCountForFVTest(simulatedNodeCount);1182continue;1183}1184if (try_scan(&scan_start, "fvtest_tarokPGCRotateCollectors")) {1185extensions->tarokPGCShouldMarkCompact = true;1186extensions->tarokPGCShouldCopyForward = true;1187continue;1188}1189#endif /* defined (J9VM_GC_VLHGC) */11901191if (try_scan(&scan_start, "fvtest_disableExplictMainThread")) {1192extensions->fvtest_disableExplictMainThread = true;1193continue;1194}11951196if (try_scan(&scan_start, "fvtest_holdRandomThreadBeforeHandlingWorkUnitPeriod=")) {1197if(!scan_udata_helper(vm, &scan_start, &(extensions->_holdRandomThreadBeforeHandlingWorkUnitPeriod), "fvtest_holdRandomThreadBeforeHandlingWorkUnitPeriod=")) {1198returnValue = JNI_EINVAL;1199break;1200}1201extensions->_holdRandomThreadBeforeHandlingWorkUnit = true;1202continue;1203}12041205if (try_scan(&scan_start, "fvtest_holdRandomThreadBeforeHandlingWorkUnit")) {1206extensions->_holdRandomThreadBeforeHandlingWorkUnit = true;1207continue;1208}12091210if (try_scan(&scan_start, "fvtest_forceRandomBackoutsAfterScanPeriod=")) {1211if(!scan_udata_helper(vm, &scan_start, &(extensions->_forceRandomBackoutsAfterScanPeriod), "fvtest_forceRandomBackoutsAfterScanPeriod=")) {1212returnValue = JNI_EINVAL;1213break;1214}1215extensions->_forceRandomBackoutsAfterScan = true;1216continue;1217}12181219if (try_scan(&scan_start, "fvtest_forceRandomBackoutsAfterScan")) {1220extensions->_forceRandomBackoutsAfterScan = true;1221continue;1222}12231224#if defined(OMR_GC_MODRON_CONCURRENT_MARK)1225if (try_scan(&scan_start, "fvtest_concurrentCardTablePreparationDelay=")) {1226if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_concurrentCardTablePreparationDelay), "fvtest_concurrentCardTablePreparationDelay=")) {1227returnValue = JNI_EINVAL;1228break;1229}1230continue;1231}12321233if (try_scan(&scan_start, "fvtest_forceConcurrentTLHMarkMapCommitFailure=")) {1234if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceConcurrentTLHMarkMapCommitFailure), "fvtest_forceConcurrentTLHMarkMapCommitFailure=")) {1235returnValue = JNI_EINVAL;1236break;1237}1238if (extensions->fvtest_forceConcurrentTLHMarkMapCommitFailure > 0) {1239extensions->fvtest_forceConcurrentTLHMarkMapCommitFailureCounter = extensions->fvtest_forceConcurrentTLHMarkMapCommitFailure - 1;1240}1241continue;1242}12431244if (try_scan(&scan_start, "fvtest_forceConcurrentTLHMarkMapCommitFailure")) {1245extensions->fvtest_forceConcurrentTLHMarkMapCommitFailure = 1;1246extensions->fvtest_forceConcurrentTLHMarkMapCommitFailureCounter = 0;1247continue;1248}12491250if (try_scan(&scan_start, "fvtest_forceConcurrentTLHMarkMapDecommitFailure=")) {1251if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceConcurrentTLHMarkMapDecommitFailure), "fvtest_forceConcurrentTLHMarkMapDecommitFailure=")) {1252returnValue = JNI_EINVAL;1253break;1254}1255if (extensions->fvtest_forceConcurrentTLHMarkMapDecommitFailure > 0) {1256extensions->fvtest_forceConcurrentTLHMarkMapDecommitFailureCounter = extensions->fvtest_forceConcurrentTLHMarkMapDecommitFailure - 1;1257}1258continue;1259}12601261if (try_scan(&scan_start, "fvtest_forceConcurrentTLHMarkMapDecommitFailure")) {1262extensions->fvtest_forceConcurrentTLHMarkMapDecommitFailure = 1;1263extensions->fvtest_forceConcurrentTLHMarkMapDecommitFailureCounter = 0;1264continue;1265}12661267#endif /* OMR_GC_MODRON_CONCURRENT_MARK */12681269#if defined (J9VM_GC_HEAP_CARD_TABLE)1270if (try_scan(&scan_start, "fvtest_forceCardTableCommitFailure=")) {1271if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceCardTableCommitFailure), "fvtest_forceCardTableCommitFailure=")) {1272returnValue = JNI_EINVAL;1273break;1274}1275if (extensions->fvtest_forceCardTableCommitFailure > 0) {1276extensions->fvtest_forceCardTableCommitFailureCounter = extensions->fvtest_forceCardTableCommitFailure - 1;1277}1278continue;1279}12801281if (try_scan(&scan_start, "fvtest_forceCardTableCommitFailure")) {1282extensions->fvtest_forceCardTableCommitFailure = 1;1283extensions->fvtest_forceCardTableCommitFailureCounter = 0;1284continue;1285}12861287if (try_scan(&scan_start, "fvtest_forceCardTableDecommitFailure=")) {1288if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceCardTableDecommitFailure), "fvtest_forceCardTableDecommitFailure=")) {1289returnValue = JNI_EINVAL;1290break;1291}1292if (extensions->fvtest_forceCardTableDecommitFailure > 0) {1293extensions->fvtest_forceCardTableDecommitFailureCounter = extensions->fvtest_forceCardTableDecommitFailure - 1;1294}1295continue;1296}12971298if (try_scan(&scan_start, "fvtest_forceCardTableDecommitFailure")) {1299extensions->fvtest_forceCardTableDecommitFailure = 1;1300extensions->fvtest_forceCardTableDecommitFailureCounter = 0;1301continue;1302}1303#endif /* J9VM_GC_HEAP_CARD_TABLE */13041305if (try_scan(&scan_start, "fvtest_forceSweepChunkArrayCommitFailure=")) {1306if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceSweepChunkArrayCommitFailure), "fvtest_forceSweepChunkArrayCommitFailure=")) {1307returnValue = JNI_EINVAL;1308break;1309}1310if (extensions->fvtest_forceSweepChunkArrayCommitFailure > 0) {1311extensions->fvtest_forceSweepChunkArrayCommitFailureCounter = extensions->fvtest_forceSweepChunkArrayCommitFailure - 1;1312}1313continue;1314}13151316if (try_scan(&scan_start, "fvtest_forceSweepChunkArrayCommitFailure")) {1317extensions->fvtest_forceSweepChunkArrayCommitFailure = 1;1318extensions->fvtest_forceSweepChunkArrayCommitFailureCounter = 0;1319continue;1320}13211322if (try_scan(&scan_start, "fvtest_forceMarkMapCommitFailure=")) {1323if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceMarkMapCommitFailure), "fvtest_forceMarkMapCommitFailure=")) {1324returnValue = JNI_EINVAL;1325break;1326}1327if (extensions->fvtest_forceMarkMapCommitFailure > 0) {1328extensions->fvtest_forceMarkMapCommitFailureCounter = extensions->fvtest_forceMarkMapCommitFailure - 1;1329}1330continue;1331}13321333if (try_scan(&scan_start, "fvtest_forceMarkMapCommitFailure")) {1334extensions->fvtest_forceMarkMapCommitFailure = 1;1335extensions->fvtest_forceMarkMapCommitFailureCounter = 0;1336continue;1337}13381339if (try_scan(&scan_start, "fvtest_forceMarkMapDecommitFailure=")) {1340if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceMarkMapDecommitFailure), "fvtest_forceMarkMapDecommitFailure=")) {1341returnValue = JNI_EINVAL;1342break;1343}1344if (extensions->fvtest_forceMarkMapDecommitFailure > 0) {1345extensions->fvtest_forceMarkMapDecommitFailureCounter = extensions->fvtest_forceMarkMapDecommitFailure - 1;1346}1347continue;1348}13491350if (try_scan(&scan_start, "fvtest_forceMarkMapDecommitFailure")) {1351extensions->fvtest_forceMarkMapDecommitFailure = 1;1352extensions->fvtest_forceMarkMapDecommitFailureCounter = 0;1353continue;1354}13551356#if defined(OMR_ENV_DATA64) && defined(OMR_GC_FULL_POINTERS)1357if (try_scan(&scan_start, "fvtest_enableReadBarrierVerification=")) {1358extensions->fvtest_enableReadBarrierVerification = 0;13591360char * pattern = scan_to_delim(PORTLIB, &scan_start, ',');13611362if (true == ('0' != pattern[4])) {1363extensions->fvtest_enableHeapReadBarrierVerification = 1;1364extensions->fvtest_enableReadBarrierVerification = 1;1365}1366if (true == ('0' != pattern[3])) {1367extensions->fvtest_enableClassStaticsReadBarrierVerification = 1;1368extensions->fvtest_enableReadBarrierVerification = 1;1369}1370if (true == ('0' != pattern[2])){1371extensions->fvtest_enableMonitorObjectsReadBarrierVerification = 1;1372extensions->fvtest_enableReadBarrierVerification = 1;1373}1374if (true == ('0' != pattern[1])) {1375extensions->fvtest_enableJNIGlobalWeakReadBarrierVerification = 1;1376extensions->fvtest_enableReadBarrierVerification = 1;1377}1378continue;1379}1380#endif /* defined(OMR_ENV_DATA64) && defined(OMR_GC_FULL_POINTERS) */13811382if (try_scan(&scan_start, "fvtest_forceReferenceChainWalkerMarkMapCommitFailure=")) {1383if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceReferenceChainWalkerMarkMapCommitFailure), "fvtest_forceReferenceChainWalkerMarkMapCommitFailure=")) {1384returnValue = JNI_EINVAL;1385break;1386}1387if (extensions->fvtest_forceReferenceChainWalkerMarkMapCommitFailure > 0) {1388extensions->fvtest_forceReferenceChainWalkerMarkMapCommitFailureCounter = extensions->fvtest_forceReferenceChainWalkerMarkMapCommitFailure - 1;1389}1390continue;1391}13921393if (try_scan(&scan_start, "fvtest_forceReferenceChainWalkerMarkMapCommitFailure")) {1394extensions->fvtest_forceReferenceChainWalkerMarkMapCommitFailure = 1;1395extensions->fvtest_forceReferenceChainWalkerMarkMapCommitFailureCounter = 0;1396continue;1397}13981399if (try_scan(&scan_start, "fvtest_forceCopyForwardHybridMarkCompactRatio=")) {1400/* the percentage of the collectionSet regions would like to markCompact instead of copyForward */1401if(!scan_udata_helper(vm, &scan_start, &(extensions->fvtest_forceCopyForwardHybridRatio), "fvtest_forceCopyForwardHybridMarkCompactRatio=")) {1402returnValue = JNI_EINVAL;1403break;1404}1405if ((extensions->fvtest_forceCopyForwardHybridRatio < 1) || (100 < extensions->fvtest_forceCopyForwardHybridRatio)) {1406j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_INTEGER_OUT_OF_RANGE, "fvtest_forceCopyForwardHybridMarkCompactRatio=", (UDATA)1, (UDATA)100);1407returnValue = JNI_EINVAL;1408break;1409}1410continue;1411}14121413/* NOTE: this option must be understood by all collectors since it appears in options.default */1414if (try_scan(&scan_start, "numaCommonThreadClass=")) {1415char * pattern = scan_to_delim(PORTLIB, &scan_start, ',');1416if (NULL == pattern) {1417returnValue = JNI_ENOMEM;1418break;1419} else {1420const char* needle = NULL;1421UDATA needleLength = 0;1422U_32 matchFlag = 0;1423if (0 == parseWildcard(pattern, strlen(pattern), &needle, &needleLength, &matchFlag)) {1424MM_Wildcard *wildcard = MM_Wildcard::newInstance(extensions, matchFlag, needle, needleLength, pattern);1425if (NULL != wildcard) {1426wildcard->_next = extensions->numaCommonThreadClassNamePatterns;1427extensions->numaCommonThreadClassNamePatterns = wildcard;1428} else {1429returnValue = JNI_ENOMEM;1430break;1431}1432} else {1433j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTION_MALFORMED, pattern);1434j9mem_free_memory(pattern);1435returnValue = JNI_EINVAL;1436break;1437}1438}1439continue;1440}14411442if (try_scan(&scan_start, "stringTableListToTreeThreshold=")) {1443if(!scan_u32_helper(vm, &scan_start, &(extensions->_stringTableListToTreeThreshold), "stringTableListToTreeThreshold=")) {1444returnValue = JNI_EINVAL;1445break;1446}1447continue;1448}14491450if (try_scan(&scan_start, "objectListFragmentCount=")) {1451if(!scan_udata_helper(vm, &scan_start, &(extensions->objectListFragmentCount), "objectListFragmentCount=")) {1452returnValue = JNI_EINVAL;1453break;1454}1455continue;1456}14571458if (try_scan(&scan_start, "minimumFreeSizeForSurvivor=")) {1459UDATA size = 0;1460if(!scan_udata_helper(vm, &scan_start, &size, "minimumFreeSizeForSurvivor=")) {1461returnValue = JNI_EINVAL;1462break;1463}1464if ((size > MAXIMUM_SURVIVOR_MINIMUM_FREESIZE) || (size < MINIMUM_SURVIVOR_MINIMUM_FREESIZE) || (0 != (size & (MINIMUM_SURVIVOR_MINIMUM_FREESIZE-1)))) {1465returnValue = JNI_EINVAL;1466break;1467}1468extensions->minimumFreeSizeForSurvivor = size;1469continue;1470}14711472if (try_scan(&scan_start, "freeSizeThresholdForSurvivor=")) {1473UDATA size = 0;1474if(!scan_udata_helper(vm, &scan_start, &size, "freeSizeThresholdForSurvivor=")) {1475returnValue = JNI_EINVAL;1476break;1477}1478if ((size > MAXIMUM_SURVIVOR_THRESHOLD) || (size < MINIMUM_SURVIVOR_THRESHOLD) || (0 != (size & (MINIMUM_SURVIVOR_THRESHOLD-1)))) {1479returnValue = JNI_EINVAL;1480break;1481}1482extensions->freeSizeThresholdForSurvivor = size;1483continue;1484}14851486if (try_scan(&scan_start, "noRecycleRemainders")) {1487extensions->recycleRemainders = false;1488continue;1489}14901491if (try_scan(&scan_start, "recycleRemainders")) {1492extensions->recycleRemainders = true;1493continue;1494}14951496if (try_scan(&scan_start, "stringDedupPolicy=")) {1497if (try_scan(&scan_start, "disabled")) {1498extensions->stringDedupPolicy = MM_GCExtensions::J9_JIT_STRING_DEDUP_POLICY_DISABLED;1499} else if (try_scan(&scan_start, "favourLower")) {1500extensions->stringDedupPolicy = MM_GCExtensions::J9_JIT_STRING_DEDUP_POLICY_FAVOUR_LOWER;1501} else if (try_scan(&scan_start, "favourHigher")) {1502extensions->stringDedupPolicy = MM_GCExtensions::J9_JIT_STRING_DEDUP_POLICY_FAVOUR_HIGHER;1503} else {1504returnValue = JNI_EINVAL;1505break;1506}1507continue;1508}1509if (try_scan(&scan_start, "darkMatterSampleRate=")) {1510if(!scan_udata_helper(vm, &scan_start, &(extensions->darkMatterSampleRate), "darkMatterSampleRate=")) {1511returnValue = JNI_EINVAL;1512break;1513}1514continue;1515}151615171518/* Couldn't find a match for arguments */1519j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTION_UNKNOWN, error_scan);1520returnValue = JNI_EINVAL;1521break;15221523} /* end loop */15241525return returnValue;15261527}1528152915301531