summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch40
-rw-r--r--meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb4
2 files changed, 43 insertions, 1 deletions
diff --git a/meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch b/meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch
new file mode 100644
index 0000000000..d628e81b56
--- /dev/null
+++ b/meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch
@@ -0,0 +1,40 @@
1From c1ebf893e32a0a77e820484d48a903523fef7c1b Mon Sep 17 00:00:00 2001
2From: Vasily Tarasov <tarasov@vasily.name>
3Date: Fri, 10 Jun 2016 14:33:48 -0400
4Subject: [PATCH] Adding volatile modifier to tmp variable in memory test
5
6Issue explanation:
7
8./sysbench/sysbench --test=memory --num-threads=16 \
9 --memory-block-size=268435456 \
10 --memory-total-size=137438953472 \
11 --memory-oper=read \
12 --memory-access-mode=seq \
13 --memory-scope=local run
14
15Without this commit the time to run the above command is 0.0004 seconds.
16With this commit the time is greater than 3 seconds. Essentially,
17without the volatile modifier, the compiler optimizes read access so
18that no real access happens.
19
20Upstream-Status: Backport [part of v1.0.0 https://github.com/akopytov/sysbench/commit/8753cb93be4c0b81a20b704ced91e7a422da52b1]
21
22(cherry picked from commit 8753cb93be4c0b81a20b704ced91e7a422da52b1)
23Signed-off-by: massimo toscanelli <massimo.toscanelli@leica-geosystems.com>
24---
25 sysbench/tests/memory/sb_memory.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28diff --git a/sysbench/tests/memory/sb_memory.c b/sysbench/tests/memory/sb_memory.c
29index 2e8998f..7d22bb9 100644
30--- a/sysbench/tests/memory/sb_memory.c
31+++ b/sysbench/tests/memory/sb_memory.c
32@@ -244,7 +244,7 @@ sb_request_t memory_get_request(int tid)
33 int memory_execute_request(sb_request_t *sb_req, int thread_id)
34 {
35 sb_mem_request_t *mem_req = &sb_req->u.mem_request;
36- int tmp = 0;
37+ volatile int tmp = 0;
38 int idx;
39 int *buf, *end;
40 log_msg_t msg;
diff --git a/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb b/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb
index 708c71f4ff..d1725dddd6 100644
--- a/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb
+++ b/meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb
@@ -8,7 +8,9 @@ inherit autotools
8 8
9# The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from 9# The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from
10# Launchpad until the next release is available from Github. 10# Launchpad until the next release is available from Github.
11SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz" 11SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz \
12 file://0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch \
13 "
12 14
13SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d" 15SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d"
14SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e" 16SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e"