[Lldb-commits] [lldb] [lldb] Add Checksum to FileSpec (PR #71457)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 7 17:00:17 PST 2023
clayborg wrote:
> > So I debugged lldb with lldb and adding a counter into the FileSpec constructor and came up a max of 721833 files after trying to set a breakpoint in Driver.cpp, so that storage is about 16.5MB which isn't too bad. This goes up to 27.5MB with the FileSpec being 40 bytes, so not too bad. Hopefully this won't overwhelm some larger targets in LLDB memory wise
>
> @clayborg I think it would be worth having that stat for FileSpecs in-tree so everyone can have access to it using `statistics dump` for instance.
I agree. Easy to add a static variable into FileSpec to do the counting and then hookup to stats. Might be nice to make a mix in class that any internal objects can inherit from that wouldn't change the size of any objects, but on construction would add to a count, and on destruction would decrement. It would be nice to track FileSpec, Symbol and other common objects in a debugger process.
https://github.com/llvm/llvm-project/pull/71457
More information about the lldb-commits
mailing list