7 FORMATS=${FORMATS:-png svg eps}
9 NAMES=${NAMES:-`echo ./micro/*.d | xargs -n1 sh -c 'basename $0 .d'` dil}
11 TYPES=${TYPES:-stw fork ea}
13 CPUS=${CPUS:-`grep '^processor' /proc/cpuinfo | wc -l`}
15 PLOTONLY=${PLOTONLY:-0}
28 eval "args=\"\$args_$name\""
29 if test $type = "warm"
32 $prog $args > /dev/null
35 dst="./build/cdgc/pause/$name-$type-${CPUS}cpu.csv"
38 echo "$NORUN" | grep -q "cdgc\\|$name" &&
40 test $PLOTONLY -eq 1 &&
44 test $type = "stw" && gc_opts="fork=0"
45 test $type = "fork" && gc_opts="eager_alloc=0"
46 test $type = "ea" && gc_opts=""
48 test ${#args} -gt 40 &&
49 pa="`echo $args | cut -b1-40`..."
50 echo " RUN $name $pa > $dst"
51 D_GC_OPTS="$D_GC_OPTS:collect_stats_file=$dst:$gc_opts" \
52 setarch i386 $ARCH $prog $args > /dev/null
56 make -srj4 micro-gc-build dil-gc-build GC=cdgc
60 prog="./build/cdgc/bin/$name"
63 for type in warm $TYPES
73 dst=./build/$time-$name-${CPUS}cpu.csv
76 echo "$NORUN" | grep -q "$name" &&
78 test $PLOTONLY -eq 1 &&
80 mv $dst ./build/$time-$name-${CPUS}cpu-old.csv
82 col=4 # Stop-the-world data column
83 test $time = "pause" && col=2 # Total pause data column
87 src="./build/cdgc/pause/$name-$type-${CPUS}cpu.csv"
88 eval "factor=\"\$factor_$name\""
91 (echo -n $type,; awk -F, \
92 "{if (FNR > 1 && \$$col > 0)
93 print \$$col*$factor}" $src \
95 echo " STATS `tail -n1 $dst | tr , ' '` >> $dst"
100 for time in stw pause
102 echo -n " PLOT $time ${CPUS}cpu > ./build/$time-${CPUS}cpu.{"
105 dst=./build/$time-${CPUS}cpu.$fmt
107 mv $dst ./build/$time-${CPUS}cpu-old.$fmt
112 files="$files ./build/$time-$name-${CPUS}cpu.csv"
114 test $time = "stw" && title="Stop-the-world Time"
115 test $time = "pause" && title="Pause Time"
116 ./pause-plot.sh "$title" $fmt $dst $files