This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] Add random memcpy test
- From: Siddhesh Poyarekar <siddhesh at gotplt dot org>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Thu, 23 Mar 2017 19:53:56 +0530
- Subject: Re: [PATCH v3] Add random memcpy test
- Authentication-results: sourceware.org; auth=none
- References: <AM5PR0802MB2610503A08645AFD99BB993A83450@AM5PR0802MB2610.eurprd08.prod.outlook.com> <CAMe9rOrh5LPingwhq8nX4ojWcEDTL72aQEuQQ3nD+Mu+eV6K4A@mail.gmail.com> <AM5PR0802MB2610B43B1CD53A988A3772F383440@AM5PR0802MB2610.eurprd08.prod.outlook.com> <AM5PR0802MB2610AB5C0264248645E9990C835D0@AM5PR0802MB2610.eurprd08.prod.outlook.com> <VI1PR0802MB262101F7F436006E88237BD6832F0@VI1PR0802MB2621.eurprd08.prod.outlook.com> <AM5PR0802MB261043A55245CE7BF460ACA9833F0@AM5PR0802MB2610.eurprd08.prod.outlook.com>
On Thursday 23 March 2017 04:45 PM, Wilco Dijkstra wrote:
> The 2nd version of this patch removes the made-up distribution and one based on a real
> trace instead:
>
> Add a new randomized memcpy test for copies up to 256 bytes. The distribution of size and
> alignment is based on a trace of SPEC2006 (other traces could be added in the future).
> Instead of repeating the same copy over and over again like the existing tests, it times several
> thousand different copies to more accurately estimate the overhead of branch prediction due to
> the different sizes and alignments.
>
> ChangeLog:
> 2017-02-09 Wilco Dijkstra <wdijkstr@arm.com>
>
> * benchtests/Makefile (string-benchset): Add memcpy-random.
> * benchtests/bench-memcpy-random.c: New file.
Nice, this looks good to me. There may be additional cache effects in
spec2006 that may make these results different from actual spec2006, but
it is still a valuable data point, definitely more than the repeated copies.
Siddhesh