[clangd] Add symbol slab size to index memory consumption estimates
authorKirill Bobyrev <kbobyrev.opensource@gmail.com>
Mon, 10 Sep 2018 11:46:07 +0000 (11:46 +0000)
committerKirill Bobyrev <kbobyrev.opensource@gmail.com>
Mon, 10 Sep 2018 11:46:07 +0000 (11:46 +0000)
commit38a889c1853c1831a1b3eef07122415645582fac
treea901252dc956ad41d14e63c1c6fb6de1dfc6d663
parentfc2931375d6ca8ab4d45cb820d91c7c88469f012
[clangd] Add symbol slab size to index memory consumption estimates

Currently, `SymbolIndex::estimateMemoryUsage()` returns the "overhead"
estimate, i.e. the estimate of the Index data structure excluding
backing data (such as Symbol Slab and Reference Slab). This patch
propagates information about paired data size where necessary.

Reviewed By: ioeric, sammccall

Differential Revision: https://reviews.llvm.org/D51539

llvm-svn: 341800
clang-tools-extra/clangd/index/FileIndex.cpp
clang-tools-extra/clangd/index/MemIndex.cpp
clang-tools-extra/clangd/index/MemIndex.h
clang-tools-extra/clangd/index/dex/Dex.cpp
clang-tools-extra/clangd/index/dex/Dex.h
clang-tools-extra/unittests/clangd/IndexTests.cpp