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

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 17 00:53:20 PDT 2018


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
+                                        URISchemes);
+    vlog("Built Dex with estimated memory usage {0} bytes.",
+         Index->estimateMemoryUsage());
----------------
It's a bit strange to log this in the constructor. And we only do the logging for one of the constructors. Maybe just have the user log the mem usage when they want?


https://reviews.llvm.org/D52047





More information about the cfe-commits mailing list