diff options
author | Bruce Merry <bmerry@ska.ac.za> | 2015-01-15 04:20:22 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-22 21:10:56 -0500 |
commit | e17fdaeaec066c725f73cd3cda1feae52b2646f5 (patch) | |
tree | 6fcf188b779d1db89c2ff54f98584105ae30ac60 /tools | |
parent | 2a6730c8b6e075adf826a89a3e2caa705807afdb (diff) |
perf bench: Fix order of arguments to memcpy_alloc_mem
This was causing the destination instead of the source to be filled. As
a result, the source was typically all mapped to one zero page, and
hence very cacheable.
Signed-off-by: Bruce Merry <bmerry@ska.ac.za>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150115092022.GA11292@kryton
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/bench/mem-memcpy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index 6c14afe8c1b1..db1d3a29d97f 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c | |||
@@ -289,7 +289,7 @@ static u64 do_memcpy_cycle(const struct routine *r, size_t len, bool prefault) | |||
289 | memcpy_t fn = r->fn.memcpy; | 289 | memcpy_t fn = r->fn.memcpy; |
290 | int i; | 290 | int i; |
291 | 291 | ||
292 | memcpy_alloc_mem(&src, &dst, len); | 292 | memcpy_alloc_mem(&dst, &src, len); |
293 | 293 | ||
294 | if (prefault) | 294 | if (prefault) |
295 | fn(dst, src, len); | 295 | fn(dst, src, len); |
@@ -312,7 +312,7 @@ static double do_memcpy_gettimeofday(const struct routine *r, size_t len, | |||
312 | void *src = NULL, *dst = NULL; | 312 | void *src = NULL, *dst = NULL; |
313 | int i; | 313 | int i; |
314 | 314 | ||
315 | memcpy_alloc_mem(&src, &dst, len); | 315 | memcpy_alloc_mem(&dst, &src, len); |
316 | 316 | ||
317 | if (prefault) | 317 | if (prefault) |
318 | fn(dst, src, len); | 318 | fn(dst, src, len); |