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

2024-07-23 Thread via cfe-commits
https://github.com/PeterChou1 closed https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM modulo a small nit in the naming, we can always add more instrumentation if we need it, but this is a good start. https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list

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

2024-07-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-16 Thread Paul Kirth via cfe-commits
@@ -670,6 +671,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, T I) { template <> llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { + llvm::TimeTraceScope("Reducing infos", "readRecord"); ilovepi wrote: I know this i

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

2024-07-15 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/6] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-15 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/6] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-15 Thread via cfe-commits
@@ -681,6 +683,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { // Read a block of records into a single info. template llvm::Error ClangDocBitcodeReader::readBlock(unsigned ID, T I) { + llvm::TimeTraceScope("readBlock", "ClangDocBitcodeReader"

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

2024-07-15 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/5] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-15 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/5] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-12 Thread Paul Kirth via cfe-commits
@@ -681,6 +683,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { // Read a block of records into a single info. template llvm::Error ClangDocBitcodeReader::readBlock(unsigned ID, T I) { + llvm::TimeTraceScope("readBlock", "ClangDocBitcodeReader"

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

2024-07-12 Thread Paul Kirth via cfe-commits
@@ -13,12 +13,17 @@ #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Error.h" +#include "llvm/Support/TimeProfiler.h" namespace clang { namespace doc { void MapASTVisitor::HandleTranslationUnit(ASTContext &Context) { + if

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

2024-07-12 Thread via cfe-commits
@@ -13,12 +13,17 @@ #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Error.h" +#include "llvm/Support/TimeProfiler.h" namespace clang { namespace doc { void MapASTVisitor::HandleTranslationUnit(ASTContext &Context) { + if

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

2024-07-12 Thread via cfe-commits
@@ -30,6 +35,7 @@ template bool MapASTVisitor::mapDecl(const T *D) { if (D->getParentFunctionOrMethod()) return true; + llvm::timeTraceProfilerBegin("emit info phase", "emit info"); PeterChou1 wrote: emit info was originally meant to mean the code pa

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

2024-07-12 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-12 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/4] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-12 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-12 Thread via cfe-commits
@@ -681,6 +683,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { // Read a block of records into a single info. template llvm::Error ClangDocBitcodeReader::readBlock(unsigned ID, T I) { + llvm::TimeTraceScope("readBlock", "ClangDocBitcodeReader"

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

2024-07-12 Thread via cfe-commits
@@ -99,6 +100,16 @@ URL of repository that hosts code. Used for links to definition locations.)"), llvm::cl::cat(ClangDocCategory)); +static llvm::cl::opt FTimeTrace("ftime-trace", llvm::cl::desc(R"( +Turn on time profiler. Generates clang-doc-tracing.json)")

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

2024-07-12 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/3] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -670,6 +671,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, T I) { template <> llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { + llvm::TimeTraceScope("clang-doc", "readRecord Reference"); ilovepi wrote: Why `rea

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -362,6 +395,17 @@ Example usage for a project using a compile commands database: if (Err) { llvm::outs() << "warning: " << toString(std::move(Err)) << "\n"; } - + llvm::timeTraceProfilerEnd(); + + if (FTimeTrace) { +std::error_code EC; +llvm::raw_fd_ostrea

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -99,6 +100,16 @@ URL of repository that hosts code. Used for links to definition locations.)"), llvm::cl::cat(ClangDocCategory)); +static llvm::cl::opt FTimeTrace("ftime-trace", llvm::cl::desc(R"( +Turn on time profiler. Generates clang-doc-tracing.json)")

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -30,6 +35,7 @@ template bool MapASTVisitor::mapDecl(const T *D) { if (D->getParentFunctionOrMethod()) return true; + llvm::timeTraceProfilerBegin("emit info phase", "emit info"); ilovepi wrote: nit: try to be consistent w/ the logging style and ca

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -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("mergin

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -681,6 +683,7 @@ llvm::Error ClangDocBitcodeReader::readRecord(unsigned ID, Reference *I) { // Read a block of records into a single info. template llvm::Error ClangDocBitcodeReader::readBlock(unsigned ID, T I) { + llvm::TimeTraceScope("readBlock", "ClangDocBitcodeReader"

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -480,12 +480,15 @@ mergeInfos(std::vector> &Values); struct ClangDocContext { ClangDocContext() = default; ClangDocContext(tooling::ExecutionContext *ECtx, StringRef ProjectName, - bool PublicOnly, StringRef OutDirectory, StringRef SourceRoot, +

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -30,7 +30,7 @@ ClangDocContext getClangDocContext(std::vector UserStylesheets = {}, StringRef RepositoryUrl = "") { ClangDocContext CDCtx{ - {}, "test-project", {}, {}, {}, RepositoryUrl, UserStylesheets}; + {}, "test-project", {}, {}, {}, {},

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -13,12 +13,17 @@ #include "clang/Index/USRGeneration.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Error.h" +#include "llvm/Support/TimeProfiler.h" namespace clang { namespace doc { void MapASTVisitor::HandleTranslationUnit(ASTContext &Context) { + if

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

2024-07-09 Thread Paul Kirth via cfe-commits
@@ -362,6 +395,17 @@ Example usage for a project using a compile commands database: if (Err) { llvm::outs() << "warning: " << toString(std::move(Err)) << "\n"; } - + llvm::timeTraceProfilerEnd(); + + if (FTimeTrace) { +std::error_code EC; +llvm::raw_fd_ostrea

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

2024-07-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/97644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-04 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH 1/2] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-04 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/Bitc

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

2024-07-04 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From cbb9d73b4827206ea7f5da58cc4a765a9297d620 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:39:22 -0400 Subject: [PATCH] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/Bitc

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

2024-07-04 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From 991340e3df02bf48e7952b520ae96f5fbc806393 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:28:34 -0400 Subject: [PATCH 1/2] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/

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

2024-07-04 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From 991340e3df02bf48e7952b520ae96f5fbc806393 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 4 Jul 2024 03:28:34 -0400 Subject: [PATCH] [clang-doc] add ftime trace --- clang-tools-extra/clang-doc/Bitc

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

2024-07-04 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From ff278188403a6f89e8c13f7a2330d978f31b1ab5 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 3 Jul 2024 15:42:22 -0400 Subject: [PATCH 1/5] [clang-doc] add ftime trace option --- clang-tools-extra/cla

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

2024-07-04 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From ff278188403a6f89e8c13f7a2330d978f31b1ab5 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 3 Jul 2024 15:42:22 -0400 Subject: [PATCH 1/4] [clang-doc] add ftime trace option --- clang-tools-extra/cla

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

2024-07-03 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/97644 >From ff278188403a6f89e8c13f7a2330d978f31b1ab5 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 3 Jul 2024 15:42:22 -0400 Subject: [PATCH 1/2] [clang-doc] add ftime trace option --- clang-tools-extra/cla

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

2024-07-03 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 10c894cffd0f4bef21b54a43b5780240532e44cf 7462b374a1ec05f84c84ea705fdc98a9d3c02783 --

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

2024-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes this patches adds ftime-tracing option for clang-doc which was what I used to profile the performance problems we had with clang-doc generating the llvm docs. It introduces two option --ftime-trace an

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

2024-07-03 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/97644 this patches adds ftime-tracing option for clang-doc which was what I used to profile the performance problems we had with clang-doc generating the llvm docs. It introduces two option --ftime-trace and --ftim