aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2016-02-17 13:12:54 -0500
committerBjoern Brandenburg <bbb@mpi-sws.org>2016-03-08 11:04:11 -0500
commit4d6773e9c1d86b198806652cfc46313df64d5767 (patch)
tree46a4149b71d33caf2ae7c80da342040d0b2c97e0
parentd085e70581760ffb9231bd01d79e08be6a1604ef (diff)
ft-trace-overheads: make use ftcat -p to await initialization
Wait until all tracers have initialized before message to user.
-rwxr-xr-xft-trace-overheads19
1 files changed, 17 insertions, 2 deletions
diff --git a/ft-trace-overheads b/ft-trace-overheads
index 28913e9..0651352 100755
--- a/ft-trace-overheads
+++ b/ft-trace-overheads
@@ -93,13 +93,17 @@ then
93fi 93fi
94SCHEDULER=${SCHEDULER//[ \/_]/-} 94SCHEDULER=${SCHEDULER//[ \/_]/-}
95 95
96DIR=`mktemp -d` || die "mktemp failed"
97
98COUNT=0
96for dev in $CPU_FILES 99for dev in $CPU_FILES
97do 100do
98 CPU=`basename ${dev} | sed 's/ft_cpu_trace//'` 101 CPU=`basename ${dev} | sed 's/ft_cpu_trace//'`
99 TRACE="overheads_host=`hostname`_scheduler=${SCHEDULER}_trace=${NAME}_cpu=${CPU}.bin" 102 TRACE="overheads_host=`hostname`_scheduler=${SCHEDULER}_trace=${NAME}_cpu=${CPU}.bin"
100 echo "[II] Recording $dev -> $TRACE" 103 echo "[II] Recording $dev -> $TRACE"
101 $FTCAT $dev $CPU_EVENTS > $TRACE & 104 $FTCAT -p "$DIR/cpu$CPU.pid" $dev $CPU_EVENTS > $TRACE &
102 PIDS="$PIDS $!" 105 PIDS="$PIDS $!"
106 COUNT=$((COUNT + 1))
103done 107done
104 108
105for dev in $MSG_FILES 109for dev in $MSG_FILES
@@ -107,10 +111,21 @@ do
107 CPU=`basename ${dev} | sed 's/ft_msg_trace//'` 111 CPU=`basename ${dev} | sed 's/ft_msg_trace//'`
108 TRACE="overheads_host=`hostname`_scheduler=${SCHEDULER}_trace=${NAME}_msg=${CPU}.bin" 112 TRACE="overheads_host=`hostname`_scheduler=${SCHEDULER}_trace=${NAME}_msg=${CPU}.bin"
109 echo "[II] Recording $dev -> $TRACE" 113 echo "[II] Recording $dev -> $TRACE"
110 $FTCAT $dev $MSG_EVENTS > $TRACE & 114 $FTCAT -p "$DIR/msg$CPU.pid" $dev $MSG_EVENTS > $TRACE &
111 PIDS="$PIDS $!" 115 PIDS="$PIDS $!"
116 COUNT=$((COUNT + 1))
112done 117done
113 118
119READY=`ls $DIR/*.pid | wc -l`
120while [[ $READY != $COUNT ]]
121do
122 sleep 0.5
123 READY=`ls $DIR/*.pid | wc -l`
124done
125
126rm $DIR/*.pid
127rmdir $DIR
128
114 129
115if [[ $AUTO != 1 ]] 130if [[ $AUTO != 1 ]]
116then 131then