This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates
ClosedPublic

Authored by teemperor on Dec 19 2019, 4:19 AM.

Details

Summary

We currently do far more malloc calls than necessary in the ConstString BumpPtrAllocator. This is due to the 256 BumpPtrAllocators
our ConstString implementation uses internally which end up all just receiving a small share of the total allocated memory
and therefore keep allocating memory in small chunks for far too long. This patch fixes this by increasing the rate at which we increase the
memory chunk size so that our collection of BumpPtrAllocators behaves in total similar to a single BumpPtrAllocator.

Diff Detail

Event Timeline

teemperor created this revision.Dec 19 2019, 4:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2019, 4:19 AM

@llunak can you test how this affects your runtime for the use case you wanted this for?

(This patch is otherwise ready to land)

llunak accepted this revision.Dec 20 2019, 5:15 AM

I'm back at using gdb for the time being, so I'd have to build code with debuginfo suitable for lldb, which would take some time. But given that this is more or less the same as I did before, I don't see why this shouldn't work similarly. Thank you for getting these changes in.

This revision is now accepted and ready to land.Dec 20 2019, 5:15 AM
This revision was automatically updated to reflect the committed changes.