]> git.llucax.com Git - software/dgc/dgcbench.git/blob - s.sh
Add scripts to generate memory usage pattern charts
[software/dgc/dgcbench.git] / s.sh
1 #!/bin/sh
2
3 . ./tests-args.sh
4
5
6 TIME=${TIME:-/usr/bin/time}
7
8 FORMATS=${FORMATS:-png svg eps}
9
10 NAMES=${NAMES:-`echo ./micro/*.d | xargs -n1 sh -c 'basename $0 .d'` dil}
11
12 GCS=${GCS:-basic cdgc-conservative=1:fork=0:early_collect=0:eager_alloc=0}
13
14 CPUS=${CPUS:-`grep '^processor' /proc/cpuinfo | wc -l`}
15
16 PLOTONLY=${PLOTONLY:-0}
17
18 NORUN=${NORUN:-}
19
20 STRIP=${STRIP:-1}
21
22 ARCH=${ARCH:-}
23
24
25 for CPUS in 1 2 4; do
26 for name in $NAMES
27 do
28         dst=./results/to-plot/collect-stw-$name-${CPUS}cpu.csv
29         #if test -f $dst
30         #then
31         #       echo "$NORUN" | grep -q "$name" &&
32         #               continue
33         #       test $PLOTONLY -eq 1 &&
34         #               continue
35         #       mv $dst ./build/time-$name-${CPUS}cpu-old.csv
36         #fi
37         echo -n > $dst
38         #for gc in basic \
39         for gc in \
40                         cdgc-conservative=1:fork=0:early_collect=0:eager_alloc=0 \
41                         cdgc-conservative=0:fork=0:early_collect=0:eager_alloc=0 \
42                         cdgc-conservative=0:fork=1:early_collect=0:eager_alloc=0 \
43                         cdgc-conservative=0:fork=1:early_collect=1:eager_alloc=0 \
44                         cdgc-conservative=0:fork=1:early_collect=0:eager_alloc=1 \
45                         cdgc-conservative=0:fork=1:early_collect=1:eager_alloc=1
46         do
47                 eval "factor=\"\$factor_$name\""
48                 test -z "$factor" &&
49                         factor=1
50                 [ "$gc" = "basic" ] && pgc="tbgc"
51                 [ "$gc" = "cdgc-conservative=1:fork=0:early_collect=0:eager_alloc=0" ] && pgc="cons"
52                 [ "$gc" = "cdgc-conservative=0:fork=0:early_collect=0:eager_alloc=0" ] && pgc="prec"
53                 [ "$gc" = "cdgc-conservative=0:fork=1:early_collect=0:eager_alloc=0" ] && pgc="fork"
54                 [ "$gc" = "cdgc-conservative=0:fork=1:early_collect=1:eager_alloc=0" ] && pgc="ecol"
55                 [ "$gc" = "cdgc-conservative=0:fork=1:early_collect=0:eager_alloc=1" ] && pgc="eall"
56                 [ "$gc" = "cdgc-conservative=0:fork=1:early_collect=1:eager_alloc=1" ] && pgc="todo"
57                 echo -n "   STATS $name-$gc"
58                 echo -n "$pgc," >> $dst
59                 (
60                         for f in results/raw-collect/collect-$name-$gc-${CPUS}cpu-*.csv;
61                         do
62                                 grep -v -- -1 "$f" | ./stats.py '$4' '%(max)f';
63                                 #echo $((`grep -v -- -1 "$f" | wc -l`-1))
64                         done
65                 ) | ./stats.py >> $dst
66                 echo " (`tail -n1 $dst | tr , ' '`) >> $dst"
67         done
68 done
69 done
70