[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166240. kbobyrev marked 4 inline comments as done. https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp clang-tools-extra/clangd/index/SymbolYAML.cpp clang-tools-extra/clangd/index/dex/Dex.cpp Index: clang-tool

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-20 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:69 +// This is not a *real* benchmark: it shows size of built MemIndex (in bytes). +// Same for the next "benchmark". ioeric wrote: > The hack might not be obviou

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:69 +// This is not a *real* benchmark: it shows size of built MemIndex (in bytes). +// Same for the next "benchmark". The hack might not be obvious for other people

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165962. kbobyrev marked an inline comment as done. kbobyrev added a comment. Rebase on top of master, move logging to symbol index `build()` caller side. https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp clan

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. The benchmark change looks fine to me. But I'm not very familiar with the trick, so I'll let Sam (who proposed the idea as you mentioned), stamp the patch. Comment at: clang-tools-extra/clangd/index/dex/Dex.h:75 +

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165440. kbobyrev added a comment. Move `vlog` message to the outer `build(...)` function: otherwise `BackingMemorySize` is not set to the correct value and log reports index overhead (instead of the complete index + slab) size. https://reviews.llvm.org/D5

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165437. kbobyrev added a comment. - Start measuring time in ms - Add Tokens' `Data` size for more precise memory usage estimation (accounts for ~1MB of Static Index in LLVM) https://reviews.llvm.org/D52047 Files: clang-tools-extra/clangd/benchmarks/Inde

[PATCH] D52047: [clangd] Add a "benchmark" for tracking memory

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. While this looks like misuse of benchmark library, this can be still when experimenting with ind