This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] Add random memcpy test


On Mon, 2017-03-27 at 12:57 -0700, Steve Ellcey wrote:
> 
> I see the bench-memcpy-random.c file now but I think there is still
> something wrong.  I am using a glibc that has my aarch64 IFUNC version
> of memcpy and memmove implemented in it but I do not get measurements
> of the different implementations for the random memcpy test like I do
> for the other two memcpy tests.

Here is a patch so that bench-memcpy-random.c prints out timings for
all the IFUNC versions of memcpy.  The TEST_NAME change is clear,
TEST_NAME isn't really the name of the test but the name of the routine
being tested.  If you call it memcpy-random it looks for IFUNC versions
of the memcpy-random function instead of the memcpy function.  I also
changed the IMPL call to have 1 instead of 0 as the second argument.  I
don't really understand this change, but it is what the other two
memcpy tests do so I copied them and it seems to work.  Tested on x86
and aarch64.

Steve Ellcey
sellcey@cavium.com


2017-03-27  Steve Ellcey  <sellcey@caviumnetworks.com>

	* benchtests/bench-memcpy-random.c (TEST_NAME): Change to memcpy.
	(IMPL) Call with 1 instead of 0 as argument.
diff --git a/benchtests/bench-memcpy-random.c b/benchtests/bench-memcpy-random.c
index 4cd6209..9ae925e 100644
--- a/benchtests/bench-memcpy-random.c
+++ b/benchtests/bench-memcpy-random.c
@@ -18,11 +18,11 @@
 
 #define MIN_PAGE_SIZE 131072
 #define TEST_MAIN
-#define TEST_NAME "memcpy-random"
+#define TEST_NAME "memcpy"
 #include "bench-string.h"
 #include <assert.h>
 
-IMPL (memcpy, 0)
+IMPL (memcpy, 1)
 
 #define NUM_COPIES 4096
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]