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.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.sh')
-rwxr-xr-x | scripts/contrib/bb-perf/buildstats.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/contrib/bb-perf/buildstats.sh b/scripts/contrib/bb-perf/buildstats.sh index 26bfaca86b..2f017efeb8 100755 --- a/scripts/contrib/bb-perf/buildstats.sh +++ b/scripts/contrib/bb-perf/buildstats.sh | |||
@@ -36,6 +36,7 @@ Child rusage ru_majflt:Child rusage ru_inblock:Child rusage ru_oublock:Child rus | |||
36 | Child rusage ru_nivcsw" | 36 | Child rusage ru_nivcsw" |
37 | 37 | ||
38 | BS_DIR="tmp/buildstats" | 38 | BS_DIR="tmp/buildstats" |
39 | RECIPE="" | ||
39 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" | 40 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" |
40 | STATS="$TIME" | 41 | STATS="$TIME" |
41 | ACCUMULATE="" | 42 | ACCUMULATE="" |
@@ -47,6 +48,7 @@ cat <<EOM | |||
47 | Usage: $CMD [-b buildstats_dir] [-t do_task] | 48 | Usage: $CMD [-b buildstats_dir] [-t do_task] |
48 | -b buildstats The path where the folder resides | 49 | -b buildstats The path where the folder resides |
49 | (default: "$BS_DIR") | 50 | (default: "$BS_DIR") |
51 | -r recipe The recipe to be computed | ||
50 | -t tasks The tasks to be computed | 52 | -t tasks The tasks to be computed |
51 | (default: "$TASKS") | 53 | (default: "$TASKS") |
52 | -s stats The stats to be matched. Options: TIME, IO, RUSAGE, CHILD_RUSAGE | 54 | -s stats The stats to be matched. Options: TIME, IO, RUSAGE, CHILD_RUSAGE |
@@ -63,11 +65,14 @@ EOM | |||
63 | } | 65 | } |
64 | 66 | ||
65 | # Parse and validate arguments | 67 | # Parse and validate arguments |
66 | while getopts "b:t:s:aHh" OPT; do | 68 | while getopts "b:r:t:s:aHh" OPT; do |
67 | case $OPT in | 69 | case $OPT in |
68 | b) | 70 | b) |
69 | BS_DIR="$OPTARG" | 71 | BS_DIR="$OPTARG" |
70 | ;; | 72 | ;; |
73 | r) | ||
74 | RECIPE="$OPTARG" | ||
75 | ;; | ||
71 | t) | 76 | t) |
72 | TASKS="$OPTARG" | 77 | TASKS="$OPTARG" |
73 | ;; | 78 | ;; |
@@ -133,7 +138,7 @@ fi | |||
133 | 138 | ||
134 | for task in ${TASKS}; do | 139 | for task in ${TASKS}; do |
135 | task="do_${task}" | 140 | task="do_${task}" |
136 | for file in $(find ${BS_DIR} -type f -name ${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do | 141 | for file in $(find ${BS_DIR} -type f -path *${RECIPE}*/${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do |
137 | recipe="$(basename $(dirname $file))" | 142 | recipe="$(basename $(dirname $file))" |
138 | times="" | 143 | times="" |
139 | for stat in ${stats}; do | 144 | for stat in ${stats}; do |