summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ToolDrivers
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-06-29 02:51:58 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-06-29 02:51:58 +0000
commitd16a61d2c84b73144f232dcd75b6c5e03f9f898c (patch)
tree852c3fa067fdb423874dcc8f6f9239c697a8a272 /llvm/lib/ToolDrivers
parent1631129834a06f5a1438288fd25fc984fc40862d (diff)
downloadbcm5719-llvm-d16a61d2c84b73144f232dcd75b6c5e03f9f898c.tar.gz
bcm5719-llvm-d16a61d2c84b73144f232dcd75b6c5e03f9f898c.zip
llvm-profdata: Indirect infrequently used fields to reduce memory usage
Examining a large profile example, it seems relatively few records have non-empty IndirectCall and MemOP data, so indirecting these through a unique_ptr (non-null only when they are non-empty) Reduces memory usage on this particular example from 14GB to 10GB according to valgrind's massif. I suspect it'd still be worth moving InstrProfWriter to its own data structure that had Counts and the indirected IndirectCall+MemOP, and did not include the Name, Hash, or Error fields. This would reduce the size of this dominant data structure by half of this new, lower amount. (Name(2), Hash(1), Error(1) ~= Counts(vector, 3), ValueProfData (unique_ptr, 1)) -> From code review feedback, might actually refactor InstrProfRecord itself to have a sub-struct with all the counts, and use that from InstrProfWriter, rather than InstrProfWriter owning its own data structure for this. Reviewers: davidxl Differential Revision: https://reviews.llvm.org/D34694 llvm-svn: 306631
Diffstat (limited to 'llvm/lib/ToolDrivers')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud