[PATCH] D46504: [clang-tidy] Profile is a per-AST (per-TU) data.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 6 10:23:04 PDT 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: alexfh, sbenza.
lebedev.ri added a project: clang-tools-extra.
Herald added subscribers: mgrang, xazax.hun, mgorny.

As discussed in https://reviews.llvm.org/D45931, currently, profiling output of clang-tidy is somewhat not great.
It outputs one profile at the end of the execution, and that profile contains the data
from the last TU that was processed. So if the tool run on multiple TU's, the data is
not accumulated, it is simply discarded.

It would be nice to improve this.

This differential is the first step - make this profiling info per-TU,
and output it after the tool has finished processing each TU.
In particular, when `ClangTidyASTConsumer` destructor runs.

Next step will be to add a CSV (JSON?) printer to store said profiles under user-specified directory prefix.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46504

Files:
  clang-tidy/CMakeLists.txt
  clang-tidy/ClangTidy.cpp
  clang-tidy/ClangTidy.h
  clang-tidy/ClangTidyDiagnosticConsumer.cpp
  clang-tidy/ClangTidyDiagnosticConsumer.h
  clang-tidy/ClangTidyProfiling.cpp
  clang-tidy/ClangTidyProfiling.h
  clang-tidy/tool/ClangTidyMain.cpp
  test/clang-tidy/clang-tidy-enable-check-profile-one-tu.cpp
  test/clang-tidy/clang-tidy-enable-check-profile-two-tu.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46504.145402.patch
Type: text/x-patch
Size: 13942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180506/cd2efe7a/attachment.bin>


More information about the cfe-commits mailing list