Merge pull request #268 from eed3si9n/wip/opts

Update Java options
This commit is contained in:
eugene yokota 2019-05-23 13:35:10 -04:00 committed by GitHub
commit 9956a676ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 21 deletions

View File

@ -19,7 +19,7 @@ install:
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sbt-bin.zip", "C:\sbt")
}
- SET PATH=C:\sbt\sbt\bin;%PATH%
- SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g -Dfile.encoding=UTF8
- SET SBT_OPTS=-Xmx4g -Dfile.encoding=UTF8
test_script:
- sbt "-Dsbt.build.version=1.3.0-M4" universal:packageBin

View File

@ -16,7 +16,7 @@ Usage: sbt [options]
-sbt-dir <path> path to global settings/plugins directory (default: ~/.sbt)
-sbt-boot <path> path to shared boot directory (default: ~/.sbt/boot in 0.11 series)
-ivy <path> path to local Ivy repository (default: ~/.ivy2)
-mem <integer> set memory options (default: 1024, which is -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxMetaspaceSize=256m)
-mem <integer> set memory options (default: 1024, which is -Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m)
-no-share use all local caches; no sharing
-no-global uses global caches, but does not use global ~/.sbt directory.
-jvm-debug <port> Turn on JVM debugging, open at the given port.

View File

@ -17,7 +17,6 @@ lazy val root = (project in file("."))
val ys = IO.readLines(file("err.txt")).toVector.distinct
assert(ys.size == 1, s"ys has more than one item: $ys")
assert(ys(0) startsWith "Java HotSpot(TM) 64-Bit Server VM warning")
assert(ys.isEmpty, s"there's an stderr: $ys")
}
)

View File

@ -13,7 +13,7 @@ export SBT_OPTS=-Dfile.encoding=UTF-8
./freshly-baked/sbt/bin/sbt about run -v
export SBT_OPTS="-Dfile.encoding=UTF-8 -Xms2048M -Xmx2048M -Xss2M -XX:MaxPermSize=512M"
export SBT_OPTS="-Dfile.encoding=UTF-8 -Xms2048M -Xmx2048M -Xss4M"
./freshly-baked/sbt/bin/sbt about run

View File

@ -144,13 +144,13 @@ addMemory () {
if [[ -z $java_version ]]; then
java_version=$(jdk_version)
fi
local class_metadata_opt=$((( $java_version < 8 )) && echo "MaxPermSize" || echo "MaxMetaspaceSize")
local class_metadata_opt="MaxPermSize"
addJava "-Xms${mem}m"
addJava "-Xmx${mem}m"
addJava "-Xss2M"
addJava "-Xss4M"
addJava "-XX:ReservedCodeCacheSize=${codecache}m"
if [[ (( $java_version > 7 )) ]]; then
if [[ (( $java_version < 8 )) ]]; then
addJava "-XX:${class_metadata_opt}=${class_metadata_size}m"
fi
}
@ -401,7 +401,7 @@ Usage: `basename "$0"` [options]
--sbt-dir <path> path to global settings/plugins directory (default: ~/.sbt)
--sbt-boot <path> path to shared boot directory (default: ~/.sbt/boot in 0.11 series)
--ivy <path> path to local Ivy repository (default: ~/.ivy2)
--mem <integer> set memory options (default: $sbt_default_mem, which is $(get_mem_opts))
--mem <integer> set memory options (default: $sbt_default_mem)
--no-share use all local caches; no sharing
--no-global uses global caches, but does not use global ~/.sbt directory.
--jvm-debug <port> Turn on JVM debugging, open at the given port.

View File

@ -1,14 +1,12 @@
# Set the java args to high
# sbt configuration file for Windows
-Xmx512M
-XX:MaxPermSize=256m
# Set the java args
-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m
# Set the extra sbt options
# Set the extra SBT options
-Dsbt.log.format=true
# -Dsbt.log.format=true

View File

@ -17,7 +17,7 @@
# Path to shared boot directory (default: ~/.sbt/boot in 0.11 series)
#
#-sbt-boot ~/.sbt/boot
#-sbt-boot ~/.sbt/boot
# Path to local Ivy repository (default: ~/.ivy2)
#
@ -25,7 +25,7 @@
# set memory options
#
#-mem <integer>
#-mem <integer>
# Use local caches for projects, no sharing.
#
@ -40,7 +40,7 @@
# Scala version (default: latest release)
#
#-scala-home <path>
#-scala-home <path>
#-scala-version <version>
# java version (default: java from PATH, currently $(java -version |& grep version))