diff --git a/runtime/gc_modron_startup/mmparseXgc.cpp b/runtime/gc_modron_startup/mmparseXgc.cpp index 88456ce02bd..cc206b7e6ab 100644 --- a/runtime/gc_modron_startup/mmparseXgc.cpp +++ b/runtime/gc_modron_startup/mmparseXgc.cpp @@ -1448,6 +1448,32 @@ gcParseXgcArguments(J9JavaVM *vm, char *optArg) continue; } + /* Check if there is a request to set the suballocator reservation increment size. */ + if (try_scan(&scan_start, "suballocatorIncrementSize=")) { + if (!scan_udata_memory_size_helper(vm, &scan_start, &extensions->suballocatorIncrementSize, "suballocatorIncrementSize=")) { + returnValue = JNI_EINVAL; + break; + } + if (0 == extensions->suballocatorIncrementSize) { + j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "-Xgc:suballocatorIncrementSize=", (UDATA)0); + returnValue = JNI_EINVAL; + break; + } + continue; + } + + /* Check if there is a request to enable the mmap-based allocation for the suballocator (Linux only). */ + if (try_scan(&scan_start, "suballocatorQuickAllocEnable")) { + extensions->suballocatorQuickAlloc = true; + continue; + } + + /* Check if there is a request to disable the mmap-based allocation for the suballocator (Linux only). */ + if (try_scan(&scan_start, "suballocatorQuickAllocDisable")) { + extensions->suballocatorQuickAlloc = false; + continue; + } + /* for testing and service reasons, split heaps is currently restricted to Win32 only */ #if defined(J9VM_GC_GENERATIONAL) && (defined(WIN32) && !defined(WIN64)) /* see if we are supposed to enable split heaps */ diff --git a/test/functional/cmdLineTests/gcsuballoctests/gcsuballoctests.xml b/test/functional/cmdLineTests/gcsuballoctests/gcsuballoctests.xml index 021de939d76..99168d160b0 100644 --- a/test/functional/cmdLineTests/gcsuballoctests/gcsuballoctests.xml +++ b/test/functional/cmdLineTests/gcsuballoctests/gcsuballoctests.xml @@ -24,10 +24,11 @@ - - - + + + $EXE$ -Xgc:suballocatorInitialSize=100m -version @@ -48,12 +49,42 @@ JVMDUMP006I Processing dump event - + + + $EXE$ -Xgc:suballocatorIncrementSize=100m -version + version + (Semeru|OpenJDK|Java\(TM\) SE) Runtime + Exception + Error + JVMDUMP006I + Processing dump event + + + + $EXE$ -Xgc:suballocatorQuickAllocEnable -version + version + (Semeru|OpenJDK|Java\(TM\) SE) Runtime + Exception + Error + JVMDUMP006I + Processing dump event + + + + $EXE$ -Xgc:suballocatorQuickAllocDisable -version + version + (Semeru|OpenJDK|Java\(TM\) SE) Runtime + Exception + Error + JVMDUMP006I + Processing dump event + + $EXE$ -Xgc:suballocatorCommitSize=300m -version JVMJ9GC057E - + JVMJ9VM015W Could not create the Java Virtual Machine. version @@ -61,12 +92,12 @@ JVMDUMP006I Processing dump event - + $EXE$ -Xgc:suballocatorCommitSize=0 -version JVMJ9GC036E - + JVMJ9VM015W Could not create the Java Virtual Machine. version @@ -79,7 +110,20 @@ $EXE$ -Xgc:suballocatorInitialSize=0 -version JVMJ9GC036E - + + JVMJ9VM015W + Could not create the Java Virtual Machine. + version + (Semeru|OpenJDK|Java\(TM\) SE) Runtime + JVMDUMP006I + Processing dump event + + + + $EXE$ -Xgc:suballocatorIncrementSize=0 -version + + JVMJ9GC036E + JVMJ9VM015W Could not create the Java Virtual Machine. version @@ -92,7 +136,7 @@ $EXE$ -Xgc:suballocatorCommitSize=512m -Xgc:suballocatorInitialSize=256m -version JVMJ9GC057E - + JVMJ9VM015W Could not create the Java Virtual Machine. version @@ -176,4 +220,3 @@ -