diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-benchmark/lmbench')
4 files changed, 223 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-doc-Fix-typos-in-manual-pages.patch b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-doc-Fix-typos-in-manual-pages.patch new file mode 100644 index 000000000..b27e6c9fe --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-doc-Fix-typos-in-manual-pages.patch @@ -0,0 +1,100 @@ +From a8d86a2d994a008dab3c3ecad65528c0e5fc2cba Mon Sep 17 00:00:00 2001 +From: He Zhe <zhe.he@windriver.com> +Date: Fri, 22 Jan 2021 11:22:48 +0800 +Subject: [PATCH] doc: Fix typos in manual pages + +Signed-off-by: He Zhe <zhe.he@windriver.com> +--- + doc/bw_mem.8 | 2 +- + doc/lat_fcntl.8 | 2 +- + doc/lat_fifo.8 | 2 +- + doc/lat_http.8 | 6 +++--- + doc/lat_select.8 | 2 +- + doc/lat_sig.8 | 2 +- + 6 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/doc/bw_mem.8 b/doc/bw_mem.8 +index 33df417..9e84d73 100644 +--- a/doc/bw_mem.8 ++++ b/doc/bw_mem.8 +@@ -3,7 +3,7 @@ + .SH NAME + bw_mem \- time memory bandwidth + .SH SYNOPSIS +-.B bw_mem_cp ++.B bw_mem + [ + .I "-P <parallelism>" + ] +diff --git a/doc/lat_fcntl.8 b/doc/lat_fcntl.8 +index cf3c93e..2e501d6 100644 +--- a/doc/lat_fcntl.8 ++++ b/doc/lat_fcntl.8 +@@ -3,7 +3,7 @@ + .SH NAME + lat_fcntl \- fcntl file locking benchmark + .SH SYNOPSIS +-.B lat_ctx ++.B lat_fcntl + [ + .I "-P <parallelism>" + ] +diff --git a/doc/lat_fifo.8 b/doc/lat_fifo.8 +index 65e5a08..90bc900 100644 +--- a/doc/lat_fifo.8 ++++ b/doc/lat_fifo.8 +@@ -3,7 +3,7 @@ + .SH NAME + lat_fifo \- FIFO benchmark + .SH SYNOPSIS +-.B lat_ctx ++.B lat_fifo + [ + .I "-P <parallelism>" + ] +diff --git a/doc/lat_http.8 b/doc/lat_http.8 +index a4bb459..99c5d4a 100644 +--- a/doc/lat_http.8 ++++ b/doc/lat_http.8 +@@ -1,9 +1,9 @@ + .\" $Id$ +-.TH LAT_FCNTL 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" ++.TH LAT_HTTP 8 "$Date$" "(c)1994-2000 Carl Staelin and Larry McVoy" "LMBENCH" + .SH NAME +-lat_fcntl \- fcntl file locking benchmark ++lat_http \- http GET request latency + .SH SYNOPSIS +-.B lat_ctx ++.B lat_http + [ + .I "-d" + ] +diff --git a/doc/lat_select.8 b/doc/lat_select.8 +index 03f83bf..e13499f 100644 +--- a/doc/lat_select.8 ++++ b/doc/lat_select.8 +@@ -3,7 +3,7 @@ + .SH NAME + lat_select \- select benchmark + .SH SYNOPSIS +-.B lat_ctx ++.B lat_select + [ + .I "-P <parallelism>" + ] +diff --git a/doc/lat_sig.8 b/doc/lat_sig.8 +index 91baf78..19a8838 100644 +--- a/doc/lat_sig.8 ++++ b/doc/lat_sig.8 +@@ -3,7 +3,7 @@ + .SH NAME + lat_sig \- select benchmark + .SH SYNOPSIS +-.B lat_ctx ++.B lat_sig + [ + .I "-P <parallelism>" + ] +-- +2.17.1 + diff --git a/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch new file mode 100644 index 000000000..42b14cece --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_fifo-Fix-cleanup-sequence.patch @@ -0,0 +1,42 @@ +From 78912c0ac5e090095a2f2bd6226e02cce949e72e Mon Sep 17 00:00:00 2001 +From: He Zhe <zhe.he@windriver.com> +Date: Fri, 22 Jan 2021 10:03:38 +0000 +Subject: [PATCH] lat_fifo: Fix cleanup sequence + +Files should be unlinked after all users exit. + +Signed-off-by: He Zhe <zhe.he@windriver.com> +--- + src/lat_fifo.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/lat_fifo.c b/src/lat_fifo.c +index c625161..85bb9d1 100644 +--- a/src/lat_fifo.c ++++ b/src/lat_fifo.c +@@ -120,16 +120,16 @@ cleanup(iter_t iterations, void * cookie) + + if (iterations) return; + +- unlink(state->filename1); +- unlink(state->filename2); +- close(state->wr); +- close(state->rd); +- + if (state->pid > 0) { +- kill(state->pid, 15); ++ kill(state->pid, SIGKILL); + waitpid(state->pid, NULL, 0); + state->pid = 0; + } ++ ++ unlink(state->filename1); ++ unlink(state->filename2); ++ close(state->wr); ++ close(state->rd); + } + + void +-- +2.29.2 + diff --git a/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lmbench-Point-webpage-lm-to-target-directory.patch b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lmbench-Point-webpage-lm-to-target-directory.patch new file mode 100644 index 000000000..4a26b8ea7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lmbench-Point-webpage-lm-to-target-directory.patch @@ -0,0 +1,77 @@ +From 353e8a62bf3cb5f1b9504efa16b8b974e93cac49 Mon Sep 17 00:00:00 2001 +From: He Zhe <zhe.he@windriver.com> +Date: Fri, 22 Jan 2021 10:58:41 +0800 +Subject: [PATCH] lmbench: Point webpage-lm to target directory + +As webpage-lm.tar has been copied to ${datadir}\lmbench. +Plus improve 'hello' copying in lmbench script. + +Signed-off-by: He Zhe <zhe.he@windriver.com> +--- + scripts/lmbench | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/scripts/lmbench b/scripts/lmbench +index 7a52cb1..82e36b6 100755 +--- a/scripts/lmbench ++++ b/scripts/lmbench +@@ -167,7 +167,7 @@ if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_UNIX = XYES ]; then + lat_unix -P $SYNC_MAX + fi + if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_PROC = XYES ]; then +- cp hello /tmp/hello ++ cp `which hello` /tmp/hello + for i in fork exec shell + do lat_proc -P $SYNC_MAX $i + done +@@ -237,14 +237,14 @@ fi + + date >> ${OUTPUT} + echo Local networking >> ${OUTPUT} +-if [ ! -d ../../src/webpage-lm ] +-then (cd ../../src && tar xf webpage-lm.tar) ++if [ ! -d /usr/share/lmbench/webpage-lm ] ++then (cd /usr/share/lmbench && tar xf webpage-lm.tar) + sync + sleep 1 + fi + SERVERS="lat_udp lat_tcp lat_rpc lat_connect bw_tcp" + for server in $SERVERS; do $server -s; done +-DOCROOT=../../src/webpage-lm lmhttp 8008 & ++DOCROOT=/usr/share/lmbench/webpage-lm lmhttp 8008 & + sleep 2; + + if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_UDP = XYES ]; then +@@ -280,15 +280,15 @@ bw_tcp -S localhost + + if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_HTTP = XYES ]; then + # I want a hot cache number +- lat_http localhost 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1 +- lat_http localhost 8008 < ../../src/webpage-lm/URLS ++ lat_http localhost 8008 < /usr/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 ++ lat_http localhost 8008 < /usr/share/lmbench/webpage-lm/URLS + fi + lat_http -S localhost 8008 + + for remote in $REMOTE + do + echo Networking to $remote >> ${OUTPUT} +- $RCP $SERVERS lmhttp ../../src/webpage-lm.tar ${remote}:/tmp ++ $RCP $SERVERS lmhttp /usr/share/lmbench/webpage-lm.tar ${remote}:/tmp + for server in $SERVERS + do $RSH $remote -n /tmp/$server -s & + done +@@ -327,8 +327,8 @@ do + + if [ X$BENCHMARK_OS = XYES -o X$BENCHMARK_HTTP = XYES ]; then + # I want a hot cache number +- lat_http $remote 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1 +- lat_http $remote 8008 < ../../src/webpage-lm/URLS ++ lat_http $remote 8008 < /usr/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 ++ lat_http $remote 8008 < /usr/share/lmbench/webpage-lm/URLS + fi + lat_http -S $remote 8008 + +-- +2.17.1 + diff --git a/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb index 171ac31ac..21e81ecf2 100644 --- a/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +++ b/meta-openembedded/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb @@ -26,6 +26,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \ file://0001-Check-for-musl-define-guard-before-redefining-sockle.patch \ file://0002-build-Adjust-CFLAGS-LDFLAGS-to-append-values-passed-.patch \ file://0001-src-Makefile-use-libdir-instead-of-hardcoded-lib.patch \ + file://0001-lmbench-Point-webpage-lm-to-target-directory.patch \ + file://0001-doc-Fix-typos-in-manual-pages.patch \ + file://0001-lat_fifo-Fix-cleanup-sequence.patch \ " SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf" SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551" @@ -75,6 +78,7 @@ do_install () { ${D}${bindir}/lmbench-run install -m 0755 ${S}/scripts/lmbench ${D}${bindir} install -m 0755 ${S}/scripts/* ${D}${datadir}/lmbench/scripts + install -m 0644 ${S}/src/webpage-lm.tar ${D}${datadir}/lmbench } pkg_postinst_${PN} () { |