[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps
Takuto Ikuta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 08:26:25 PDT 2019
takuto.ikuta added inline comments.
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:1352
+
+ llvm::TimeTraceScope TimeScope("Backend", StringRef(""));
+
----------------
We don't need explicit StringRef constructor call here. Just passing "" is enough.
================
Comment at: clang/lib/Parse/ParseAST.cpp:154
if (HaveLexer) {
+ llvm::TimeTraceScope TimeScope("Frontend", StringRef(""));
P.Initialize();
----------------
Remove StringRef?
================
Comment at: clang/lib/Serialization/GlobalModuleIndex.cpp:131
NumIdentifierLookupHits() {
+ llvm::TimeTraceScope TimeScope("Module LoadIndex", StringRef(""));
// Read the global index.
----------------
Remove StringRef?
================
Comment at: clang/lib/Serialization/GlobalModuleIndex.cpp:745
using namespace llvm;
+ llvm::TimeTraceScope TimeScope("Module WriteIndex", StringRef(""));
----------------
Remove StringRef?
================
Comment at: clang/tools/driver/cc1_main.cpp:224
+ {
+ llvm::TimeTraceScope TimeScope("ExecuteCompiler", StringRef(""));
+ Success = ExecuteCompilerInvocation(Clang.get());
----------------
Remove StringRef?
================
Comment at: llvm/lib/Support/TimeProfiler.cpp:44
+ default:
+ if (isPrint(C)) {
+ OS += C;
----------------
include StringExtras.h for this?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58675/new/
https://reviews.llvm.org/D58675
More information about the cfe-commits
mailing list