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

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 31 14:57:49 PDT 2020


vsapsai created this revision.
vsapsai added reviewers: bruno, rsmith, Bigcheese.
Herald added subscribers: llvm-commits, ributzka, dexonsmith, jkorous, hiraditya.
Herald added projects: clang, LLVM.
vsapsai requested review of this revision.

Measure amount of high-level or fixed-cost operations performed during
building/loading modules and during header search. High-level operations
like building a module or processing a .pcm file are motivated by
previous issues where clang was re-building modules or re-reading .pcm
files unnecessarily. Fixed-cost operations like `stat` calls are tracked
because clang cannot change how long each operation takes but it can
perform fewer of such operations to improve the compile time.

Also tracking such stats over time can help us detect compile-time
regressions. Added stats are more stable than the actual measured
compilation time, so expect the detected regressions to be less noisy.

rdar://problem/55715134


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86895

Files:
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Serialization/ASTReader.cpp
  llvm/lib/Support/MemoryBuffer.cpp
  llvm/lib/Support/Path.cpp
  llvm/lib/Support/Unix/Path.inc
  llvm/lib/Support/Windows/Path.inc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86895.289028.patch
Type: text/x-patch
Size: 6370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200831/d3b39c5d/attachment.bin>


More information about the cfe-commits mailing list