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

Add support for -XX:Compatibility=elasticsearch #18387

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

keithc-ca
Copy link
Contributor

If -XX:Compatibility=elasticsearch is specified:

  • recognize -XX:+UseG1GC and -XX:-UseG1GC
  • include flags G1HeapRegionSize, G1ReservePercent, InitiatingHeapOccupancyPercent and UseG1GC in -XX:+PrintFlagsFinal output (G1HeapRegionSize is derived from MaxHeapSize)

If -XX:Compatibility= is specified more than once, or with a mode other than "elasticsearch" (not case-sensitive), the JVM will refuse to start.

Issue: #18265.

@keithc-ca keithc-ca requested a review from tajila November 1, 2023 21:17
If -XX:Compatibility=elasticsearch is specified:
  * recognize -XX:+UseG1GC and -XX:-UseG1GC
  * include flags G1HeapRegionSize, G1ReservePercent,
    InitiatingHeapOccupancyPercent and UseG1GC
    in -XX:+PrintFlagsFinal output

If -XX:Compatibility= is specified more than once, or with a mode
other than "elasticsearch" (not case-sensitive), the JVM will
refuse to start.

G1HeapRegionSize is derived from MaxHeapSize.

Signed-off-by: Keith W. Campbell <[email protected]>
@keithc-ca
Copy link
Contributor Author

Pushed a minor change to the computation of G1HeapRegionSize to properly round up if the maximum heap size is not a multiple of 2048.

@@ -6903,6 +6929,7 @@ protectedInitializeJavaVM(J9PortLibrary* portLibrary, void * userData)
int filter = -1;
#endif
J9JavaVM** BFUjavaVM;
IDATA xxUseG1GC = 0; /* +1 if -XX:+UseG1GC used; -1 if -XX:-UseG1GC used */
Copy link
Contributor

Choose a reason for hiding this comment

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

why not a BOOLEAN?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind, I see we need third state for "command line" vs "ergonomic"

@tajila
Copy link
Contributor

tajila commented Nov 6, 2023

jenkins test sanity alinux64 jdk17

@tajila tajila merged commit f55c20e into eclipse-openj9:master Nov 7, 2023
@keithc-ca keithc-ca deleted the compatibility branch November 7, 2023 13:37
@pshipton
Copy link
Member

Pls open a docs issue.

@keithc-ca
Copy link
Contributor Author

Pls open a docs issue.

eclipse-openj9/openj9-docs#1213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants