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:37 +0000 |
commit | b4bf898d53af60f5d69b50ec5cdd7f9b3870f2dd (patch) | |
tree | 9dfe1f24caf7b89063dee668d6427712eeb403e8 /scripts/contrib/bb-perf/buildstats.sh | |
parent | e6f1aea6260343cb5194f7f8ab70213b705ab441 (diff) | |
download | openembedded-core-contrib-b4bf898d53af60f5d69b50ec5cdd7f9b3870f2dd.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.
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 Child rusage ru_nivcsw" BS_DIR="tmp/buildstats" +RECIPE="" TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" STATS="$TIME" ACCUMULATE="" @@ -47,6 +48,7 @@ cat <<EOM Usage: $CMD [-b buildstats_dir] [-t do_task] -b buildstats The path where the folder resides (default: "$BS_DIR") + -r recipe The recipe to be computed -t tasks The tasks to be computed (default: "$TASKS") -s stats The stats to be matched. Options: TIME, IO, RUSAGE, CHILD_RUSAGE @@ -63,11 +65,14 @@ EOM } # Parse and validate arguments -while getopts "b:t:s:aHh" OPT; do +while getopts "b:r:t:s:aHh" OPT; do case $OPT in b) BS_DIR="$OPTARG" ;; + r) + RECIPE="$OPTARG" + ;; t) TASKS="$OPTARG" ;; @@ -133,7 +138,7 @@ fi for task in ${TASKS}; do task="do_${task}" - for file in $(find ${BS_DIR} -type f -name ${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do + for file in $(find ${BS_DIR} -type f -path *${RECIPE}*/${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do recipe="$(basename $(dirname $file))" times="" for stat in ${stats}; do |