summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-21 15:15:20 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-21 15:24:47 +0300
commitf7f3826e5aa6a2aa467c27bb320ca2480d019158 (patch)
treef94cb261f3e445daa53aef05e9e651e2b4ef644a
parent45bad3d8012b6360aad6f10539a7918ab36a22af (diff)
downloadopenembedded-core-contrib-f7f3826e5aa6a2aa467c27bb320ca2480d019158.tar.gz
build-perf-bisect: introduce -j and -t options
For controlling the parallelism of the build. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-xbuild-perf-bisect.sh16
-rwxr-xr-xbuild-perf-test-revs.sh8
2 files changed, 19 insertions, 5 deletions
diff --git a/build-perf-bisect.sh b/build-perf-bisect.sh
index ec070a4b51..52c00650a6 100755
--- a/build-perf-bisect.sh
+++ b/build-perf-bisect.sh
@@ -24,10 +24,12 @@ build_target="core-image-sato"
workdir=`realpath build-perf-bisect`
test_method="buildtime"
test_count=1
+parallel_make='${@oe.utils.cpu_count()}'
+bb_number_threads='${@oe.utils.cpu_count()}'
usage () {
cat << EOF
-Usage: $script [-h] [-b BUILD_TARGET] [-c COUNT] [-d DL_DIR] [-m TEST_METHOD] [-w WORKDIR] [-n | THRESHOLD]
+Usage: $script [-h] [-b BUILD_TARGET] [-c COUNT] [-d DL_DIR] [-j MAKE_JOBS] [-t BB_THREADS] [-m TEST_METHOD] [-w WORKDIR] [-n | THRESHOLD]
Optional arguments:
-h show this help and exit.
@@ -37,16 +39,20 @@ Optional arguments:
-d DL_DIR to use
-i invert logic: values above the threshold are OK, below it
FAIL
+ -j number of make jobs, i.e. PARALLEL_MAKE to use in bitbake
+ conf (default: $parallel_make)
-m test method, available options are:
buildtime, buildtime2, tmpsize, esdktime, esdksize,
parsetime (default: $test_method)
-n no threshold, do not do any comparison, all successful
builds return 0
+ -t number of task threads, i.e. BB_NUMBER_THREADS to use
+ in bitbake conf (default: $bb_number_threads)
-w work directory to use
EOF
}
-while getopts "hb:c:d:im:nw:" opt; do
+while getopts "hb:c:d:ij:m:nt:w:" opt; do
case $opt in
h) usage
exit 0
@@ -59,10 +65,14 @@ while getopts "hb:c:d:im:nw:" opt; do
;;
i) invert_cmp="1"
;;
+ j) parallel_make="$OPTARG"
+ ;;
m) test_method="$OPTARG"
;;
n) no_threshold="1"
;;
+ t) bb_number_threads="$OPTARG"
+ ;;
w) workdir=`realpath "$OPTARG"`
;;
*) usage
@@ -352,6 +362,8 @@ mkdir -p $workdir
echo DL_DIR = \"$downloaddir\" >> conf/local.conf
echo CONNECTIVITY_CHECK_URIS = \"\" >> conf/local.conf
+echo PARALLEL_MAKE = \"-j $parallel_make\" >> conf/local.conf
+echo BB_NUMBER_THREADS = \"$bb_number_threads\" >> conf/local.conf
# Do actual build
log "TESTING REVISION $git_rev (#$git_rev_cnt), AVERAGING OVER $test_count TEST RUNS"
diff --git a/build-perf-test-revs.sh b/build-perf-test-revs.sh
index 6897f240df..d469a21f40 100755
--- a/build-perf-test-revs.sh
+++ b/build-perf-test-revs.sh
@@ -24,25 +24,27 @@ scriptdir=`dirname $0`
usage () {
cat << EOF
-Usage: $script [-h] [-b BUILD_TARGET] [-c COUNT] [-d DL_DIR] [-m TEST_METHOD] [-w WORKDIR] [REV1 [REV2]...]
+Usage: $script [-h] [-b BUILD_TARGET] [-c COUNT] [-d DL_DIR] [-j MAKE_JOBS] [-t BB_THREADS] [-m TEST_METHOD] [-w WORKDIR] [REV1 [REV2]...]
Optional arguments:
-h show this help and exit.
-b build target to test
-c average over COUNT test runs
-d DL_DIR to use
+ -j number of make jobs, i.e. PARALLEL_MAKE to use
-m test method (buildtime, buildtime2, tmpsize, esdktime,
parsetime)
+ -t number of task threads, i.e. BB_NUMBER_THREADS to use
-w work directory to use
EOF
}
-while getopts "hb:c:d:m:w:" opt; do
+while getopts "hb:c:d:j:m:t:w:" opt; do
case $opt in
h) usage
exit 0
;;
- b|c|d|m|w) cmd_args+=(-$opt "$OPTARG")
+ b|c|d|j|m|t|w) cmd_args+=(-$opt "$OPTARG")
;;
*) usage
exit 1