[PATCH] D43578: -ftime-report switch support in Clang

Andrew V. Tischenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 08:03:44 PST 2018


avt77 created this revision.
avt77 added reviewers: simon.f.whittaker, RKSimon, spatel, dtemirbulatov, MatzeB, eduardo-elizondo, erik.pilkington, mzolotukhin, vsk.

The current support of the feature produces only 2 lines in report:

- Some general Code Generation Time
- Total time of Backend Consumer actions

This patch extends Clang time report with the following lines:

-------------------------------------------------------------------------
-------------------------------------------------------------------------

  ===== Clang Parser =====

-------------------------------------------------------------------------
-------------------------------------------------------------------------

  Total Execution Time: 0.0160 seconds (0.0189 wall clock)
  
   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
   0.0080 ( 66.7%)   0.0040 (100.0%)   0.0120 ( 75.0%)   0.0114 ( 60.3%)  Parse Template
   0.0040 ( 33.3%)   0.0000 (  0.0%)   0.0040 ( 25.0%)   0.0057 ( 30.2%)  Parse Function Body
   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0011 (  5.8%)  PP Macro Expansion
   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0005 (  2.4%)  Scope manipulation
   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0001 (  0.5%)  Annotation operations
   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0001 (  0.5%)  PP Macro Call Args
   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0000 (  0.0%)   0.0001 (  0.3%)  PP Find Handler
   0.0120 (100.0%)   0.0040 (100.0%)   0.0160 (100.0%)   0.0189 (100.0%)  Total

We could add more lines in the report but it'd be nice to understand what we'd like to see.


https://reviews.llvm.org/D43578

Files:
  include/clang/Lex/Preprocessor.h
  include/clang/Parse/Parser.h
  lib/CodeGen/BackendUtil.cpp
  lib/CodeGen/CodeGenAction.cpp
  lib/Lex/PPMacroExpansion.cpp
  lib/Lex/Pragma.cpp
  lib/Parse/ParseDeclCXX.cpp
  lib/Parse/ParseStmt.cpp
  lib/Parse/ParseTemplate.cpp
  lib/Parse/Parser.cpp
  test/Frontend/ftime-report-template-decl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43578.135260.patch
Type: text/x-patch
Size: 26054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180221/aeef3be2/attachment.bin>


More information about the llvm-commits mailing list