This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add a metric for tracking memory usage
ClosedPublic

Authored by kadircet on Sep 28 2020, 6:17 AM.

Diff Detail

Event Timeline

kadircet created this revision.Sep 28 2020, 6:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2020, 6:17 AM
kadircet requested review of this revision.Sep 28 2020, 6:17 AM
kadircet updated this revision to Diff 296678.Oct 7 2020, 7:54 AM
  • Rebase and introduce helper for recording a MemoryTree.
kadircet updated this revision to Diff 297172.Oct 9 2020, 3:28 AM
  • Move MemoryTree recording from Trace into MemoryTree as suggested in D88417.
sammccall added inline comments.Oct 9 2020, 3:52 AM
clang-tools-extra/clangd/support/MemoryTree.h
68 ↗(On Diff #297172)

can we make this a non-member function and take the metric to write into as a parameter?

Putting this here for reuse seems OK to me but it's not an essential part of MemoryTree itself.
In particular I'd like to avoid baking magic metrics into support/.

(I know we have one already for fallback latency recording, but that seems much costlier to avoid as there are many callsites. Here we expect... 2?)

kadircet updated this revision to Diff 297542.Oct 12 2020, 3:54 AM
kadircet marked an inline comment as done.
  • Make traversal a free function and take metric to populate as a parameter.
sammccall accepted this revision.Oct 12 2020, 4:51 AM
This revision is now accepted and ready to land.Oct 12 2020, 4:51 AM
This revision was landed with ongoing or failed builds.Oct 12 2020, 6:27 AM
This revision was automatically updated to reflect the committed changes.