[PATCH] Add malloc micro benchmark
Carlos O'Donell
carlos@redhat.com
Thu Feb 28 04:52:00 GMT 2019
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.
More information about the Libc-alpha
mailing list