Skip to content

Commit

Permalink
Merge pull request #20495 from dmitripivkine/master
Browse files Browse the repository at this point in the history
Correct parsing for -Xgc:"tlhInitialSize and -Xgc:tlhMinimumSize
  • Loading branch information
amicic authored Nov 4, 2024
2 parents 517905a + a9b3539 commit 743425f
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions runtime/gc_modron_startup/mmparseXgc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,39 @@ j9gc_initialize_parse_gc_colon(J9JavaVM *javaVM, char **scan_start)
PORT_ACCESS_FROM_JAVAVM(javaVM);

#if defined(J9VM_GC_THREAD_LOCAL_HEAP)
if(try_scan(scan_start, "tlhInitialSize=")) {
if(!scan_udata_helper(javaVM, scan_start, &extensions->tlhInitialSize, "tlhInitialSize=")) {
if (try_scan(scan_start, "tlhInitialSize=")) {
if (!scan_udata_helper(javaVM, scan_start, &extensions->tlhInitialSize, "tlhInitialSize=")) {
goto _error;
}
if (MINIMUM_TLH_SIZE > extensions->tlhInitialSize) {
j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "tlhInitialSize=", (UDATA)MINIMUM_TLH_SIZE);
goto _error;
}
goto _exit;
}
if(try_scan(scan_start, "tlhMinimumSize=")) {
if(!scan_udata_helper(javaVM, scan_start, &extensions->tlhMinimumSize, "tlhMinimumSize=")) {
if (try_scan(scan_start, "tlhMinimumSize=")) {
if (!scan_udata_helper(javaVM, scan_start, &extensions->tlhMinimumSize, "tlhMinimumSize=")) {
goto _error;
}
if (MINIMUM_TLH_SIZE > extensions->tlhMinimumSize) {
j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "tlhMinimumSize=", (UDATA)MINIMUM_TLH_SIZE);
goto _error;
}
goto _exit;
}
if(try_scan(scan_start, "tlhMaximumSize=")) {
if(!scan_udata_helper(javaVM, scan_start, &extensions->tlhMaximumSize, "tlhMaximumSize=")) {
if (try_scan(scan_start, "tlhMaximumSize=")) {
if (!scan_udata_helper(javaVM, scan_start, &extensions->tlhMaximumSize, "tlhMaximumSize=")) {
goto _error;
}
if (MINIMUM_TLH_SIZE > extensions->tlhMaximumSize) {
j9nls_printf(PORTLIB, J9NLS_ERROR, J9NLS_GC_OPTIONS_VALUE_MUST_BE_ABOVE, "tlhMaximumSize=", (UDATA)MINIMUM_TLH_SIZE);
goto _error;
}
extensions->tlhMaximumSizeSpecified = true;
goto _exit;
}
if(try_scan(scan_start, "tlhIncrementSize=")) {
if(!scan_udata_helper(javaVM, scan_start, &extensions->tlhIncrementSize, "tlhIncrementSize=")) {
if (try_scan(scan_start, "tlhIncrementSize=")) {
if (!scan_udata_helper(javaVM, scan_start, &extensions->tlhIncrementSize, "tlhIncrementSize=")) {
goto _error;
}
goto _exit;
Expand Down

0 comments on commit 743425f

Please sign in to comment.