This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Possible inline malloc alternatives: bitmap
On 03/03/2018 03:37 PM, Carlos O'Donell wrote:
> On 03/03/2018 12:24 PM, Paul Eggert wrote:
>> I didn't quite follow your profiling proposals. As near as I can make
>> out you'd like to log calls to malloc, free, etc. But for good
>> results don't you also need to log memory accesses? Otherwise how
>> will you know which objects are hot?
>
> We can already log malloc, free, etc. with the inlined tracing code we
> have on DJ's branch, and we in turn simulate those traces again.
>
> You only need to log memory accesses if you want perfect reconstruction
> of the various memory subsystem effects. As you know this is obviously
> very expensive and difficult if not impossible to do. Some suggestions
> at LPC were provided though, including tracking heuristics or statistical
> profiles of hits/misses and trying to recreate those profiles in the
> page-touch heuristics used by the simulator (something it does when it
> gets a new block of memory).
>
> Today we mostly use the simulator to look at in-use RSS, RSS max,
> and external and internal fragmentation, looking at trying to reduce
> that as much as we can.
>
> Actually using it for profile driven feedback is very hard, and that
> kind of behaviour seems to be largely derived from first principles
> in most academic work.
>
This is a link to the tcmalloc work which we are trying to coordinate with:
https://docs.google.com/document/d/1S8T9apA2juEC5sV2UVXUan4e4_029fTmoAEoX7MEB9s/edit#heading=h.ljaekvl39oaq
--
Cheers,
Carlos.