Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse -Xmso from OPENJ9_JAVA_OPTIONS for main thread #644

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

pshipton
Copy link
Member

}
continue; /* str already incremented */
}
str++;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be a little more sophisticated (with some of the features of parseOptionsBuffer()) to avoid mishandling quotes, etc. and values like this: -Xmso64k -Dchild.stack=-Xmso32k (the second occurrence of -Xmso should not apply).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, this is better, but doesn't handle quotes (and escapes) like the VM. Quotes need not be just at the beginning and end of elements of the value (e.g. -Xmso64k -Dchild.options="-Xint -Xmso32k -Xms4M" would not be processed properly).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated it to re-use the parsing code in libjli/args.c

src/java.base/share/native/libjli/args.c Outdated Show resolved Hide resolved
src/java.base/share/native/libjli/args.c Outdated Show resolved Hide resolved
src/java.base/share/native/libjli/java.c Outdated Show resolved Hide resolved
src/java.base/share/native/libjli/java.c Outdated Show resolved Hide resolved
Issue eclipse-openj9/openj9#16105

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
@pshipton
Copy link
Member Author

I've made the suggested changes.

@keithc-ca
Copy link
Member

Jenkins compile alinux64 jdknext

@keithc-ca keithc-ca merged commit f304f02 into ibmruntimes:openj9 Aug 21, 2023
pshipton added a commit to pshipton/openj9-openjdk-jdk21 that referenced this pull request Aug 22, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk21 that referenced this pull request Aug 22, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk17 that referenced this pull request Aug 22, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk11 that referenced this pull request Aug 22, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk8 that referenced this pull request Aug 22, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644,
the JLI helper functions, and parts of args.c applicable to jdk8.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk8 that referenced this pull request Aug 22, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644,
the JLI helper functions, and parts of args.c applicable to jdk8.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk8 that referenced this pull request Aug 24, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644,
the JLI helper functions, and parts of args.c applicable to jdk8.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk8 that referenced this pull request Aug 24, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644,
the JLI helper functions, and parts of args.c applicable to jdk8.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk8 that referenced this pull request Aug 24, 2023
Issue eclipse-openj9/openj9#16105

Backport of ibmruntimes/openj9-openjdk-jdk#644,
the JLI helper functions, and parts of args.c applicable to jdk8.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants