Shorten JVM options

This commit is contained in:
JeremyStar™ 2024-12-13 03:35:55 +01:00
parent 0a30180d00
commit 3b1d60f41c
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -47,14 +47,14 @@ application {
// -> JVM // -> JVM
jvmArgs.add("-XX:+UnlockDiagnosticVMOptions") jvmArgs.add("-XX:+UnlockDiagnosticVMOptions")
if (hasProperty("run.args.logGC") && property("run.args.logGC") as String == "true") if (hasProperty("jvm.logGC") && property("jvm.logGC") as String == "true")
jvmArgs.add("-Xlog:gc") jvmArgs.add("-Xlog:gc")
if (hasProperty("run.args.logJITandAOT") && property("run.args.logJITandAOT") as String == "true") { if (hasProperty("jvm.logJITandAOT") && property("jvm.logJITandAOT") as String == "true") {
jvmArgs.add("-XX:+PrintCompilation") jvmArgs.add("-XX:+PrintCompilation")
jvmArgs.add("-XX:+PrintInlining") jvmArgs.add("-XX:+PrintInlining")
} }
if (hasProperty("run.args.garbageCollector")) if (hasProperty("jvm.garbageCollector"))
when (property("run.args.garbageCollector")) { when (property("jvm.garbageCollector")) {
"epsilon" -> jvmArgs.add("-XX:+UseEpsilonGC") "epsilon" -> jvmArgs.add("-XX:+UseEpsilonGC")
"serial" -> jvmArgs.add("-XX:+UseSerialGC") "serial" -> jvmArgs.add("-XX:+UseSerialGC")
"g1" -> jvmArgs.add("-XX:+UseG1GC") "g1" -> jvmArgs.add("-XX:+UseG1GC")