This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Collect macros in static index.
Needs ReviewPublic

Authored by hokein on Jan 28 2019, 6:51 AM.

Details

Reviewers
sammccall
Summary

We are missing macros in static index.

symbols: before 407 K vs after 420 K
dex memory usage (static index): before 299 MB vs 304 MB

Event Timeline

hokein created this revision.Jan 28 2019, 6:51 AM
kadircet added inline comments.Jan 30 2019, 1:40 AM
unittests/clangd/BackgroundIndexTests.cpp
128

Shouldn't we also have Named("A") in here ?

hokein marked an inline comment as done.Jan 30 2019, 3:36 AM
hokein added inline comments.
unittests/clangd/BackgroundIndexTests.cpp
128

The symbol A is filtered out (as it is defined via a compile command-line option -DA=1).

So I'm not sure this is actually going to be a win.

When building google's big static index, we index these symbols and then throw most of them away (a high usage threshold applies).
But there's no mechanism here to do that.
If we do index *all* of these, how often are they going to be good vs bad results?

Is there a motivating case for the sorts of macros you are missing?

Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2019, 9:08 PM