]> git.ipfire.org Git - thirdparty/glibc.git/commit
benchtest: malloc tcache hotpath benchtest
authorCupertino Miranda <cupertino.miranda@oracle.com>
Thu, 15 May 2025 13:09:25 +0000 (13:09 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Thu, 15 May 2025 13:13:00 +0000 (13:13 +0000)
commitc6bf6d1897c9f2eebf7efd0eef231025764bf146
tree929b41a7bec28650334213e66fffe41346d66237
parent06caf53adfae0c93062edd62f83eed16ab5cec0b
benchtest: malloc tcache hotpath benchtest

Existing benchtests for malloc infrastructure seem to be rather generic
to test global malloc implementation performance.  This new benchtest
focus on reducing any non tcache related side effects, allowing to more
realistically predict performance impacts of tcache code changes.
The test was inpired in bench-[cm]alloc-thread code, with severe
simplifications:
 - forces single thread execution, reducing concurrency side-effects,
   like cache incoherence penalties due simultaneous writes to the same
   cache pages;
 - Focus on allocating and deallocating a single size for all the
   duration of the benchmark. Since all it does is allocate and
   deallocate, it will measure the tcache hotpath without any
   side-effects.
 - Allows to specify the allocation size as input argument.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
benchtests/Makefile
benchtests/bench-calloc-tcache.c [new file with mode: 0644]
benchtests/bench-malloc-tcache.c [new file with mode: 0644]