-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·50 lines (47 loc) · 1.16 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#
# Decide on the file for output
#
N=`cat count 2>/dev/null`
if [ "$N" == "" ]
then
N=2
fi
N=$((N + 1))
echo $N > count
FILE=outputs/output-$N.txt
unset _JAVA_OPTIONS
echo Output will go to $FILE...
sleep 3
#
# Prepare the command line
#
PRINT_COMPILATION="-XX:+PrintCompilation"
PRINT_INLINING="-XX:+PrintInlining"
#PRINT_ASSEMBLY="-XX:+PrintOptoAssembly"
TRACE_DEOPT="-XX:+TraceDeoptimization"
PROF_TRAPS="-XX:+ProfileTraps"
OTHERS="-XX:+TraceICs -XX:+TraceInlineCacheClearing -XX:+LogCompilation"
JAVA_OPTS="-Xms2g \
-Xmx2g \
-Xss4m \
-XX:MaxPermSize=512M \
-XX:ReservedCodeCacheSize=256m \
-XX:+UseParallelGC \
-XX:PermSize=256m \
-XX:+UseNUMA \
-XX:-TieredCompilation \
-XX:+UnlockDiagnosticVMOptions \
$PRINT_COMPILATION \
$PRINT_INLINING \
$TRACE_DEOPT \
$PRINT_ASSEMBLY \
$PROF_TRAPSi
$OTHERS"
CMD="java -server -cp lib/scala-library.jar:exp.jar $JAVA_OPTS miniboxing.test.TestJVM"
#
# Run and store results
#
echo -e "$CMD\n\n\n" > $FILE
$CMD 2>&1 | tee -a $FILE
cp hotspot.log hotspot-$N.log