This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add malloc micro benchmark
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, 'GNU C Library' <libc-alpha at sourceware dot org>
- Cc: nd <nd at arm dot com>, Florian Weimer <fweimer at redhat dot com>
- Date: Wed, 27 Feb 2019 23:52:47 -0500
- Subject: Re: [PATCH] Add malloc micro benchmark
- References: <DB5PR08MB1030A3EB64DA81DB604E140183920@DB5PR08MB1030.eurprd08.prod.outlook.com>
On 2/1/19 11:27 AM, Wilco Dijkstra wrote:
> Add a malloc micro benchmark to enable accurate testing of the
> various paths in malloc and free. The benchmark does a varying
> number of allocations of a given block size, then frees them again.
>
> It tests 3 different scenarios: single-threaded using main arena,
> multi-threaded using thread-arena, main arena with SINGLE_THREAD_P
> false.
>
> OK for commit?
>
> ChangeLog:
> 2019-02-01 Wilco Dijkstra <wdijkstr@arm.com>
>
> * benchtests/Makefile: Add malloc-simple benchmark.
> * benchtests/bench-malloc-simple.c: New benchmark.
This broke Fedora Rawhide during CI testing:
BUILDSTDERR: bench-malloc-simple.c: In function 'bench':
BUILDSTDERR: bench-malloc-simple.c:89:17: error: variable 'res' set but not used [-Werror=unused-but-set-variable]
BUILDSTDERR: 89 | unsigned long res;
BUILDSTDERR: | ^~~
BUILDSTDERR: cc1: all warnings being treated as errors
Affects aarch64, armv7hl, and s390x.
I assume we need a "(void) res" like we have in bench-malloc-thread.c?
I'm going to checkin a quick fix to Rawhide and report back if anything
else breaks.
--
Cheers,
Carlos.