aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2019-02-14 08:22:34 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2019-02-14 08:22:34 +0530
commit24ca04febef611ad942ad5ebe3a3c7011b10c550 (patch)
tree127c6dae9d1281e28268976214193d330e6088ec
parent85bd1ddbdfdfd13cfd06f7c367519b6ed3360843 (diff)
downloadglibc-24ca04febef611ad942ad5ebe3a3c7011b10c550.tar
glibc-24ca04febef611ad942ad5ebe3a3c7011b10c550.tar.gz
glibc-24ca04febef611ad942ad5ebe3a3c7011b10c550.tar.bz2
glibc-24ca04febef611ad942ad5ebe3a3c7011b10c550.zip
benchtests: Remove useless ORIG_SRC in memmove benchmarks
The ORIG_SRC argument is likely a useless relic from the original correctness tests that are not needed in the benchmarks. Remove the argument and use S1 to point to the source to avoid confusion. * benchtests/bench-memmove.c (do_one_test): Remove unused ORIG_SRC. (do_test): Adjust. * benchtests/bench-memmove-large.c (do_one_test): Remove unused ORIG_SRC. (do_test): Adjust.
-rw-r--r--ChangeLog9
-rw-r--r--benchtests/bench-memmove-large.c8
-rw-r--r--benchtests/bench-memmove.c8
3 files changed, 17 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 20eb89d017..4a3ec3d559 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-02-14 Siddhesh Poyarekar <siddhesh@sourceware.org>
+
+ * benchtests/bench-memmove.c (do_one_test): Remove unused
+ ORIG_SRC.
+ (do_test): Adjust.
+ * benchtests/bench-memmove-large.c (do_one_test): Remove unused
+ ORIG_SRC.
+ (do_test): Adjust.
+
2019-01-13 Jim Wilson <jimw@sifive.com>
[BZ #24040]
diff --git a/benchtests/bench-memmove-large.c b/benchtests/bench-memmove-large.c
index ffc16cec8b..710c648634 100644
--- a/benchtests/bench-memmove-large.c
+++ b/benchtests/bench-memmove-large.c
@@ -30,8 +30,8 @@ IMPL (memmove, 1)
typedef char *(*proto_t) (char *, const char *, size_t);
static void
-do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
- char *orig_src, size_t len)
+do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src,
+ size_t len)
{
size_t i, iters = 16;
timing_t start, stop, cur;
@@ -62,7 +62,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
if (align2 + len >= page_size)
return;
- s1 = (char *) (buf1 + align1);
+ s1 = (char *) (buf2 + align1);
s2 = (char *) (buf2 + align2);
for (i = 0, j = 1; i < len; i++, j += 23)
@@ -75,7 +75,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
json_array_begin (json_ctx, "timings");
FOR_EACH_IMPL (impl, 0)
- do_one_test (json_ctx, impl, s2, (char *) (buf2 + align1), s1, len);
+ do_one_test (json_ctx, impl, s2, s1, len);
json_array_end (json_ctx);
json_element_object_end (json_ctx);
diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c
index a5d957791a..a4d5ecd638 100644
--- a/benchtests/bench-memmove.c
+++ b/benchtests/bench-memmove.c
@@ -47,8 +47,8 @@ simple_memmove (char *dst, const char *src, size_t n)
}
static void
-do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const
- char *orig_src, size_t len)
+do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src,
+ size_t len)
{
size_t i, iters = INNER_LOOP_ITERS;
timing_t start, stop, cur;
@@ -79,7 +79,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
if (align2 + len >= page_size)
return;
- s1 = (char *) (buf1 + align1);
+ s1 = (char *) (buf2 + align1);
s2 = (char *) (buf2 + align2);
for (i = 0, j = 1; i < len; i++, j += 23)
@@ -92,7 +92,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len)
json_array_begin (json_ctx, "timings");
FOR_EACH_IMPL (impl, 0)
- do_one_test (json_ctx, impl, s2, (char *) (buf2 + align1), s1, len);
+ do_one_test (json_ctx, impl, s2, s1, len);
json_array_end (json_ctx);
json_element_object_end (json_ctx);