[PATCH] D113390: [clangd] Dont include file version in task name

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 8 02:20:53 PST 2021

kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: usaxena95, arphaman, javed.absar.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

This will drop file version information from span names, reducing
overall cardinality and also effect logging when skipping actions in scheduler.

  rG LLVM Github Monorepo



Index: clang-tools-extra/clangd/TUScheduler.cpp
--- clang-tools-extra/clangd/TUScheduler.cpp
+++ clang-tools-extra/clangd/TUScheduler.cpp
@@ -992,7 +992,7 @@
                                std::shared_ptr<const PreambleData> Preamble,
                                std::vector<Diag> CIDiags,
                                WantDiagnostics WantDiags) {
-  std::string TaskName = llvm::formatv("Build AST for ({0})", PI.Version);
+  llvm::StringLiteral TaskName = "Build AST";
   // Store preamble and build diagnostics with new preamble if requested.
   auto Task = [this, Preamble = std::move(Preamble), CI = std::move(CI),
                PI = std::move(PI), CIDiags = std::move(CIDiags),
@@ -1032,7 +1032,7 @@
     std::lock_guard<std::mutex> Lock(Mutex);
-    PreambleRequests.push_back({std::move(Task), std::move(TaskName),
+    PreambleRequests.push_back({std::move(Task), std::string(TaskName),
                                 steady_clock::now(), Context::current().clone(),
                                 llvm::None, llvm::None,
                                 TUScheduler::NoInvalidation, nullptr});

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113390.385430.patch
Type: text/x-patch
Size: 1196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211108/71a5d359/attachment.bin>

More information about the cfe-commits mailing list