labath added a comment.

Yeah, allocating 256MB sounds a bit too much, particularly for lldb-server 
(ideally, I'd remove ConstString from lldb-server completely, but that's a 
different story). The reason for 256 string pools was to avoid/reduce locking 
contention when accessing the pool, but that does make the power-of-2 scaling 
in BumpPtrAllocator kick in too slowly.

Maybe we could reduce the initial size by an order of magnitude here? 
Allocating 25MB (or whatever is the closest power of 2) does not sound like too 
much, and it should still be much better than 4kb. As an alternative, we could 
make the scaling in BumpPtrAllocator faster/configurable. I also doubt that the 
number of string pools was arrived at very scientifically, so it may be 
possible to tune that number too (though, without any data back it up, it seems 
to me that reducing the slab size should have less impact than reducing the 
pool count).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68549/new/

https://reviews.llvm.org/D68549



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to