Skip to content

Commit

Permalink
Merge pull request #960 from AdoptOpenJDK/update_jvm_args
Browse files Browse the repository at this point in the history
OWS-638: update allowed jvm args
  • Loading branch information
sclassen authored Nov 21, 2024
2 parents 8034478 + 9f27b93 commit b3ffe05
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/src/main/java/net/adoptopenjdk/icedteaweb/jvm/JvmUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ private static String[] getValidVMArguments() {
"-XX:+ScavengeBeforeFullGC",
"-XX:-ScavengeBeforeFullGC",
"-XX:+UseParallelScavenge",
"-XX:-UseParallelScavenge"
"-XX:-UseParallelScavenge",
"-XX:+UseParNewGC",
"-XX:+PrintFlagsFinal",
"-XX:+PrintCommandLineFlags",
"-XX:+PrintGCDateStamps"
};
}

Expand All @@ -197,6 +201,7 @@ private static String[] getValidVMArguments() {
* <p>
* Based on
* https://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html#secure-property
* https://docs.oracle.com/en/java/javase/21/docs/specs/man/java.html
*/
private static String[] getValidStartingVMArguments() {
return new String[]{
Expand All @@ -217,6 +222,7 @@ private static String[] getValidStartingVMArguments() {
"-XX:MinHeapFreeRatio", /* heap free percentage (default 40) */
"-XX:UseSerialGC", /* use serial garbage collection */
"-XX:-UseSerialGC",
"-XX:+UseSerialGC",
"-XX:ThreadStackSize", /* thread stack size (in KB) */
"-XX:MaxInlineSize", /* set max num of bytecodes to inline */
"-XX:ReservedCodeCacheSize", /* Reserved code cache size (bytes) */
Expand All @@ -240,6 +246,9 @@ private static String[] getValidStartingVMArguments() {
"-XX:GCHeapFreeLimit",
"-XX:+UseParNewGC",
"-XX:+CMSParallelRemarkEnabled",
"-XX:+UseZGC",
"-XX:+ZGenerational",
"-XX:HeapDumpPath",
"-XX:InitialRAMPercentage", /* The initial heap size as percentage of total memory, conflicts with Xms */
"-XX:MinRAMPercentage", /* Sets the max heap size of RAM as a percentage before looking at other heuristics like MaxRAMPercentage. This is primarily useful for low memory environments (<100m) */
"-XX:MaxRAMPercentage", /* Sets the max heap size of RAM as a percentage */
Expand Down Expand Up @@ -289,6 +298,7 @@ private static String[] getValidSecureProperties() {
"http.maxRedirects",
"http.auth.digest.validateProxy",
"http.auth.digest.validateServer",
"user.timezone",
// https://news.kynosarges.org/2019/03/24/swing-high-dpi-properties/
"sun.java2d.uiScale.enabled",
"sun.java2d.win.uiScaleX",
Expand Down

0 comments on commit b3ffe05

Please sign in to comment.