diff options
| author | Luis Martins <luis.martins@criticaltechworks.com> | 2020-03-24 11:33:12 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-24 16:39:40 +0000 |
| commit | 41b145b2b10dc9eadebba0d2ea16cd6f21f8c12f (patch) | |
| tree | 64b7cf30bdb2973eb16e6419750ba3c4bc3d8264 /scripts/contrib/bb-perf/buildstats-plot.sh | |
| parent | 3bd3e23304a41c2cabab4dd7994af2e2bfcc7dca (diff) | |
| download | poky-41b145b2b10dc9eadebba0d2ea16cd6f21f8c12f.tar.gz | |
buildstats*.sh: add recipe parameter to scripts
Add option to filter the stats results for a single recipe, allowing
to easilly visuality the task resource consumption per recipe.
This is specially useful when debugging the performance of
the overall bitbake build system.
(From OE-Core rev: b4bf898d53af60f5d69b50ec5cdd7f9b3870f2dd)
Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/bb-perf/buildstats-plot.sh')
| -rwxr-xr-x | scripts/contrib/bb-perf/buildstats-plot.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/contrib/bb-perf/buildstats-plot.sh b/scripts/contrib/bb-perf/buildstats-plot.sh index f26312f355..320c4910a1 100755 --- a/scripts/contrib/bb-perf/buildstats-plot.sh +++ b/scripts/contrib/bb-perf/buildstats-plot.sh | |||
| @@ -39,6 +39,7 @@ set -o errexit | |||
| 39 | 39 | ||
| 40 | BS_DIR="tmp/buildstats" | 40 | BS_DIR="tmp/buildstats" |
| 41 | N=10 | 41 | N=10 |
| 42 | RECIPE="" | ||
| 42 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" | 43 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" |
| 43 | STATS="utime" | 44 | STATS="utime" |
| 44 | ACCUMULATE="" | 45 | ACCUMULATE="" |
| @@ -53,6 +54,7 @@ Usage: $CMD [-b buildstats_dir] [-t do_task] | |||
| 53 | (default: "$BS_DIR") | 54 | (default: "$BS_DIR") |
| 54 | -n N Top N recipes to display. Ignored if -S is present | 55 | -n N Top N recipes to display. Ignored if -S is present |
| 55 | (default: "$N") | 56 | (default: "$N") |
| 57 | -r recipe The recipe mask to be searched | ||
| 56 | -t tasks The tasks to be computed | 58 | -t tasks The tasks to be computed |
| 57 | (default: "$TASKS") | 59 | (default: "$TASKS") |
| 58 | -s stats The stats to be matched. If more that one stat, units | 60 | -s stats The stats to be matched. If more that one stat, units |
| @@ -69,7 +71,7 @@ EOM | |||
| 69 | } | 71 | } |
| 70 | 72 | ||
| 71 | # Parse and validate arguments | 73 | # Parse and validate arguments |
| 72 | while getopts "b:n:t:s:o:aSh" OPT; do | 74 | while getopts "b:n:r:t:s:o:aSh" OPT; do |
| 73 | case $OPT in | 75 | case $OPT in |
| 74 | b) | 76 | b) |
| 75 | BS_DIR="$OPTARG" | 77 | BS_DIR="$OPTARG" |
| @@ -77,6 +79,9 @@ while getopts "b:n:t:s:o:aSh" OPT; do | |||
| 77 | n) | 79 | n) |
| 78 | N="$OPTARG" | 80 | N="$OPTARG" |
| 79 | ;; | 81 | ;; |
| 82 | r) | ||
| 83 | RECIPE="-r $OPTARG" | ||
| 84 | ;; | ||
| 80 | t) | 85 | t) |
| 81 | TASKS="$OPTARG" | 86 | TASKS="$OPTARG" |
| 82 | ;; | 87 | ;; |
| @@ -112,7 +117,7 @@ CD=$(dirname $0) | |||
| 112 | 117 | ||
| 113 | # Parse buildstats recipes to produce a single table | 118 | # Parse buildstats recipes to produce a single table |
| 114 | OUTBUILDSTATS="$PWD/buildstats.log" | 119 | OUTBUILDSTATS="$PWD/buildstats.log" |
| 115 | $CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $ACCUMULATE -H > $OUTBUILDSTATS | 120 | $CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $RECIPE $ACCUMULATE -H > $OUTBUILDSTATS |
| 116 | 121 | ||
| 117 | # Get headers | 122 | # Get headers |
| 118 | HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') | 123 | HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') |
