summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2013-01-18 23:13:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-21 10:22:08 +0000
commit4287f703413a14d190152e46593bb69b141e80b4 (patch)
treebaf9e4a06985c79a4e2b09746d601d550d03b83d /scripts
parent4de6f9b17c6dd8d50ddb3050a091fae83e91bb71 (diff)
downloadpoky-4287f703413a14d190152e46593bb69b141e80b4.tar.gz
bb-matrix: Fix min and max calculations
The BB and PM ranges were originally intended to use leading 0s to ensure all the values were the same string length, making for nice log filenames and columnar dat files. However, not everyone will do this - especially if it isn't documented. Document the intent. Make the generation and parsing of dat files robust to either method. (From OE-Core rev: 90dc44c8246f2a580fe4a41ce28c201e52307500) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/bb-perf/bb-matrix-plot.sh12
-rwxr-xr-xscripts/contrib/bb-perf/bb-matrix.sh5
2 files changed, 10 insertions, 7 deletions
diff --git a/scripts/contrib/bb-perf/bb-matrix-plot.sh b/scripts/contrib/bb-perf/bb-matrix-plot.sh
index 62aa66d96d..87e8cb1abd 100755
--- a/scripts/contrib/bb-perf/bb-matrix-plot.sh
+++ b/scripts/contrib/bb-perf/bb-matrix-plot.sh
@@ -101,12 +101,12 @@ if [ -z "$TITLE" ]; then
101fi 101fi
102 102
103# Determine the dgrid3d mesh dimensions size 103# Determine the dgrid3d mesh dimensions size
104MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sort | uniq | head -n1) 104MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | head -n1)
105MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sort | uniq | tail -n1) 105MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | tail -n1)
106BB_CNT=$[${MAX#*0} - $MIN + 1] 106BB_CNT=$[${MAX} - $MIN + 1]
107MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sort | uniq | head -n1) 107MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | head -n1)
108MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sort | uniq | tail -n1) 108MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | tail -n1)
109PM_CNT=$[${MAX#*0} - $MIN + 1] 109PM_CNT=$[${MAX} - $MIN + 1]
110 110
111 111
112(cat <<EOF 112(cat <<EOF
diff --git a/scripts/contrib/bb-perf/bb-matrix.sh b/scripts/contrib/bb-perf/bb-matrix.sh
index b9edd5ff08..37721fe268 100755
--- a/scripts/contrib/bb-perf/bb-matrix.sh
+++ b/scripts/contrib/bb-perf/bb-matrix.sh
@@ -33,6 +33,8 @@
33# 33#
34 34
35# The following ranges are appropriate for a 4 core system with 8 logical units 35# The following ranges are appropriate for a 4 core system with 8 logical units
36# Use leading 0s to ensure all digits are the same string length, this results
37# in nice log file names and columnar dat files.
36BB_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16" 38BB_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16"
37PM_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16" 39PM_RANGE="04 05 06 07 08 09 10 11 12 13 14 15 16"
38 40
@@ -62,10 +64,11 @@ for BB in $BB_RANGE; do
62 echo "BB=$BB PM=$PM Logging to $BB_LOG" 64 echo "BB=$BB PM=$PM Logging to $BB_LOG"
63 65
64 # Export the variables under test and run the bitbake command 66 # Export the variables under test and run the bitbake command
67 # Strip any leading zeroes before passing to bitbake
65 export BB_NUMBER_THREADS=$(echo $BB | sed 's/^0*//') 68 export BB_NUMBER_THREADS=$(echo $BB | sed 's/^0*//')
66 export PARALLEL_MAKE="-j $(echo $PM | sed 's/^0*//')" 69 export PARALLEL_MAKE="-j $(echo $PM | sed 's/^0*//')"
67 /usr/bin/time -f "$BB $PM $TIME_STR" -a -o $RUNTIME_LOG $BB_CMD &> $BB_LOG 70 /usr/bin/time -f "$BB $PM $TIME_STR" -a -o $RUNTIME_LOG $BB_CMD &> $BB_LOG
68 71
69 echo " $(tail -n1 $RUNTIME_LOG)" 72 echo " $(tail -n1 $RUNTIME_LOG)"
70 echo -n " Cleaning up..." 73 echo -n " Cleaning up..."
71 mv tmp/buildstats $RUNDIR/$BB-$PM-buildstats 74 mv tmp/buildstats $RUNDIR/$BB-$PM-buildstats