[clang-tools-extra] [clang-doc] add ftime profiling (PR #97644)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 18:07:07 PDT 2024


================
@@ -316,32 +342,39 @@ Example usage for a project using a compile commands database:
         std::move(ReadInfos->begin(), ReadInfos->end(),
                   std::back_inserter(Infos));
       }
+      llvm::timeTraceProfilerEnd();
 
+      llvm::timeTraceProfilerBegin("merging bitcode phase", "merging");
       auto Reduced = doc::mergeInfos(Infos);
       if (!Reduced) {
         llvm::errs() << llvm::toString(Reduced.takeError());
         return;
       }
+      llvm::timeTraceProfilerEnd();
 
       // Add a reference to this Info in the Index
       {
         std::lock_guard<llvm::sys::Mutex> Guard(IndexMutex);
         clang::doc::Generator::addInfoToIndex(CDCtx.Idx, Reduced.get().get());
       }
-
----------------
ilovepi wrote:

nit: unrelated change.

https://github.com/llvm/llvm-project/pull/97644


More information about the cfe-commits mailing list