aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xst_trace20
1 files changed, 13 insertions, 7 deletions
diff --git a/st_trace b/st_trace
index 65055fe..35b6efc 100755
--- a/st_trace
+++ b/st_trace
@@ -1,21 +1,27 @@
1#!/bin/bash 1#!/bin/bash
2 2
3FTCAT=ftcat 3[ -z "$FTCAT" ] && FTCAT=ftcat
4DEVICE=/home/litmus/log 4[ -z "$FTDEV" ] && FTDEV=/home/litmus/log
5 5
6# Setup up sched_trace tracing. 6# Setup up sched_trace tracing.
7 7
8# works for sparc64/x86 if no CPU is offline 8# works for sparc64 and Intel x86 if all CPUs are online
9NUM_CPUS=`egrep -c 'processor|online' /proc/cpuinfo` 9NUM_CPUS=`egrep -c 'processor|online' /proc/cpuinfo`
10 10
11ST_IDS="501 502 503 504 505 506 507 508 509" 11ST_IDS="501 502 503 504 505 506 507 508 509"
12 12
13TAG=$1 13TAG=$1
14 14PIDS=""
15for x in `seq 0 $(($NUM_CPUS - 1))` 15for x in `seq 0 $(($NUM_CPUS - 1))`
16do 16do
17 echo -n "CPU $x: " 17 TARGET="st-${TAG}-${x}.bin"
18 $FTCAT "$DEVICE$x" $ST_IDS > st${TAG}${x}.bin & 18 echo -n "CPU $x: "
19 echo $! "[$?]" 19 $FTCAT "$FTDEV$x" $ST_IDS > "$TARGET" &
20 PIDS="$PIDS $!"
21 echo $! "> $TARGET [$?]"
20done 22done
21 23
24echo "Press Enter to end tracing..."
25read
26kill $PIDS
27wait $PIDS