runClient.sh 906 Bytes
Newer Older
1 2
#!/bin/bash

3 4 5 6
# set default lib path
if [ -z "${DISL_LIB_P}" ]; then
	DISL_LIB_P=./build
fi
7

8
# test number of arguments
9
if [ $# -lt 2 ]; then
10
	echo "Usage: `basename $0` instr-lib java-params"
11
	exit 1
12
fi
13

14
# determine libs depending on the OS
15
OS=`uname`
16
if [ "${OS}" = "Darwin" ]; then
17
	AGENT="${DISL_LIB_P}/libdislagent.jnilib"
18
	RE_AGENT="${DISL_LIB_P}/libdislreagent.jnilib"
19
else
20
	AGENT="${DISL_LIB_P}/libdislagent.so"
21
	RE_AGENT="${DISL_LIB_P}/libdislreagent.so"
22 23
fi

24 25 26 27
# get instrumentation library and shift parameters
INSTR_LIB=$1
shift

28
# start the client
29 30 31 32 33 34
# options available:
#	-Ddisl.bypass=never \
#	-Ddisl.bypass=bootstrap \
#	-Ddisl.bypass=dynamic \
#	-Ddisl.splitmethods=false \
#	-Ddisl.excepthandler=true \
35
${JAVA_HOME:+$JAVA_HOME/jre/bin/}java \
36
	-agentpath:${AGENT} -agentpath:${RE_AGENT} \
37
	-Xbootclasspath/a:${DISL_LIB_P}/disl-bypass.jar:${INSTR_LIB}:${DISL_LIB_P}/dislre-dispatch.jar \
38
	"$@"