[PATCH] D86895: [Modules] Add stats to measure performance of building and loading modules.

Volodymyr Sapsai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 13:24:51 PDT 2020


vsapsai planned changes to this revision.
vsapsai added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInstance.cpp:60
+
+ALWAYS_ENABLED_STATISTIC(NumCompileModule, "Number of compiled modules.");
+
----------------
aprantl wrote:
> `NumCompiledModules`?
Sounds good to me, will change.


================
Comment at: clang/lib/Serialization/ASTReader.cpp:151
+                                           "and using cached results.");
+ALWAYS_ENABLED_STATISTIC(NumReadASTCore, "Number of times read AST core.");
+
----------------
aprantl wrote:
> `Number of times ReadASTCore() is invoked`?
The suggested wording is not entirely correct because I deliberately want to ignore cases when `ReadASTCore()` was invoked but returned early due to `ModuleManager` caching. The purpose of `NumReadASTCore` is to measure non-trivial work done in `ReadASTCore()`.

I agree the description isn't clear enough and cached/non-cached distinction isn't obvious. I plan to use the suggested wording and to clarify it like for `NumTryLoadModule`. For instance, "Includes only actual core parsing and ignores cached results."


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86895/new/

https://reviews.llvm.org/D86895



More information about the llvm-commits mailing list