Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2020-08-14 00:03:01 -0400
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-08-19 10:19:04 -0400
commitda7a2c71c75d72c7e9f21f9d73a7aa439520e4ec (patch)
treedb1db29aa6d4281a208e09cfe53aca38f9c6d0f0
parent680691c4cf005e27676a3697c6a20f043e81eb49 (diff)
downloadtame-da7a2c71c75d72c7e9f21f9d73a7aa439520e4ec.tar.gz
tame-da7a2c71c75d72c7e9f21f9d73a7aa439520e4ec.tar.bz2
tame-da7a2c71c75d72c7e9f21f9d73a7aa439520e4ec.zip
tamed: TAMED_JAVA_OPTS: New environment variable
This will be passed to dslc and then to the JVM. The intent is to permit fine-grained heap ratio tuning.
-rw-r--r--RELEASES.md9
-rw-r--r--bin/dslc.in2
-rwxr-xr-xbin/tame1
-rwxr-xr-xbin/tamed5
-rw-r--r--build-aux/Makefile.am1
5 files changed, 17 insertions, 1 deletions
diff --git a/RELEASES.md b/RELEASES.md
index f15b824..e09038e 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -16,6 +16,15 @@ commits that introduce the changes. To make a new release, run
NEXT
====
+This release provides a new environment variable for JVM tuning. It does
+not provide any new compiler features or performance enhancements in itself,
+though it enables optimizations through JVM tuning.
+
+Compiler
+--------
+- The new environment variable `TAMED_JAVA_OPTS` can now be used to provide
+ arguments to the JVM. This feature was added to support heap ratio
+ tuning.
Miscellaneous
-------------
diff --git a/bin/dslc.in b/bin/dslc.in
index 3598bf3..64f62b0 100644
--- a/bin/dslc.in
+++ b/bin/dslc.in
@@ -37,6 +37,6 @@ rater-path()
CLASSPATH="$CLASSPATH:@DSLC_CLASSPATH@:$dslc_jar" \
- "@JAVA@" @JAVA_OPTS@ \
+ "@JAVA@" @JAVA_OPTS@ $JAVA_OPTS \
com.lovullo.dslc.DslCompiler \
"$( rater-path )"
diff --git a/bin/tame b/bin/tame
index 5788c5f..3ba4ad2 100755
--- a/bin/tame
+++ b/bin/tame
@@ -36,6 +36,7 @@ declare -ri TAME_CMD_WAITTIME="${TAME_CMD_WAITTIME:-3}"
# propagate to daemon
export TAMED_STALL_SECONDS
export TAMED_SPAWNER_PID
+export TAMED_JAVA_OPTS
# Send a single command to the next available runner and
diff --git a/bin/tamed b/bin/tamed
index 8722d66..aff451f 100755
--- a/bin/tamed
+++ b/bin/tamed
@@ -32,6 +32,10 @@ declare -ri TAMED_STALL_SECONDS="${TAMED_STALL_SECONDS:-1}"
# id of process that indirectly spawned tamed (default $PPID)
declare -ri TAMED_SPAWNER_PID="${TAMED_SPAWNER_PID:-$PPID}"
+# options to pass to JVM via dslc
+declare -r TAMED_JAVA_OPTS="${TAMED_JAVA_OPTS:-}"
+export JAVA_OPTS="$TAMED_JAVA_OPTS"
+
# set by `main', global for `cleanup'
declare root=
@@ -258,6 +262,7 @@ Environment Variables:
runner is automatically killed (default 1)
TAMED_SPAWNER_PID inhibit stalling while this process is running
(default PPID)
+ TAMED_JAVA_OPTS opts to pass to dslc, and in turn, the JVM
EOF
exit $EX_USAGE
diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am
index bdb5a5f..102bd92 100644
--- a/build-aux/Makefile.am
+++ b/build-aux/Makefile.am
@@ -95,6 +95,7 @@ SHELL = /bin/bash -O extglob -O nullglob
# propagate to tame{,d}
export TAME_CMD_WAITTIME
export TAMED_STALL_SECONDS
+export TAMED_JAVA_OPTS
TAMED_SPAWNER_PID=$(shell echo $$PPID)
export TAMED_SPAWNER_PID