[PATCH v3 0/5] malloc: tcache improvements
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Mar 6 15:37:50 GMT 2025
Hi Cupertino,
> Thank you for those numbers.
> This is sort of surprising to me. I need to execute this myself.
>
> I know the basics for executing the benchtests, like calling:
> make bench BENCHSET="malloc-thread"
> But am not so familiar on how to collect the data for multiple runs and
> further comparisons.
> I had a quick read through the README file, but does not mention how to
> get result comparisons.
>
> Maybe you can point me out to some page with documentation, or some
> basic commands that would collect the data.
I believe there are some scripts that can take the json output and make graphs
of it. In the past people have done this for the memcpy benchmarks, however
it has been too long, so I have no idea how to do it today.
Most of the time I simply run the benchmarks and eyeball the numbers.
When I want to do a more detailed comparison, I cut and paste the results into
a spreadsheet. You can easily run benchmarks from the command-line like:
taskset -c 4 ./build/glibc/benchtests/bench-malloc-simple
(use taskset for single-threaded benchmarks for more repeatable results)
Also it's a good idea to run perf here as it shows the hot paths very clearly.
Besides increasing the critical paths by 20+%, there is also less inlining after
your patches (eg. _int_free is not inlined anymore).
Cheers,
Wilco
More information about the Libc-alpha
mailing list