From f49f7499c24713ca524acb533a349b5e7eb9a129 Mon Sep 17 00:00:00 2001 From: Aleksandar Micic Date: Tue, 8 Jul 2025 10:21:06 -0400 Subject: [PATCH] Cmdline options for CS taxation headroom Private command line options to tune taxation headroom Valid values to provide are any positive integer, but the map to floats by subtracting 100 (possibly leading to negative values) and dividing by 100. The current internal defaults are -0.1 to +0.2, what would map into 90 and 120 for the command line option values. Values 0 and 0 should be provided to disable the taxation. --- runtime/gc_modron_startup/mmparseXXgc.cpp | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/runtime/gc_modron_startup/mmparseXXgc.cpp b/runtime/gc_modron_startup/mmparseXXgc.cpp index 6e30964a313..2a4c351fd28 100644 --- a/runtime/gc_modron_startup/mmparseXXgc.cpp +++ b/runtime/gc_modron_startup/mmparseXXgc.cpp @@ -1025,6 +1025,30 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg) continue; } + if (try_scan(&scan_start, "concurrentScavengeTaxationHeadroomLow=")) { + UDATA value = 0; + if (!scan_udata_helper(vm, &scan_start, &value, "concurrentScavengeTaxationHeadroomLow=")) { + returnValue = JNI_EINVAL; + break; + } + + extensions->concurrentScavengeTaxationHeadroomLow = ((float)value - 100.0f) / 100.0f; + continue; + } + + if (try_scan(&scan_start, "concurrentScavengeTaxationHeadroomHigh=")) { + UDATA value = 0; + if (!scan_udata_helper(vm, &scan_start, &value, "concurrentScavengeTaxationHeadroomHigh=")) { + returnValue = JNI_EINVAL; + break; + } + + extensions->concurrentScavengeTaxationHeadroomHigh = ((float)value - 100.0f) / 100.0f; + continue; + } + + + #endif /* defined(OMR_GC_CONCURRENT_SCAVENGER) */ #endif /* defined(J9VM_GC_MODRON_SCAVENGER) */