Skip to content

Commit

Permalink
Merge pull request #469 from mikezhang1234567890/nativestack
Browse files Browse the repository at this point in the history
Set native stack size using -Xmso instead of -Xss
  • Loading branch information
keithc-ca committed Jan 17, 2022
2 parents d1525ba + 8bbac98 commit fcd00b3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/java.base/share/native/libjli/java.c
Expand Up @@ -23,6 +23,12 @@
* questions.
*/

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
* ===========================================================================
*/

/*
* Shared source for 'java' command line tool.
*
Expand Down Expand Up @@ -934,9 +940,12 @@ AddOption(char *str, void *info)
options[numOptions].optionString = str;
options[numOptions++].extraInfo = info;

if (JLI_StrCCmp(str, "-Xss") == 0) {
/* In OpenJ9 -Xmso is used to set native stack size instead of -Xss. -Xss is used to
* set Java thread size only, which is handled in the JVM code.
*/
if (JLI_StrCCmp(str, "-Xmso") == 0) {
jlong tmp;
if (parse_size(str + 4, &tmp)) {
if (parse_size(str + 5, &tmp)) {
threadStackSize = tmp;
/*
* Make sure the thread stack size is big enough that we won't get a stack
Expand Down

0 comments on commit fcd00b3

Please sign in to comment.