Skip to content

Commit

Permalink
[clangd] Dont include file version in task name
Browse files Browse the repository at this point in the history
This will drop file version information from span names, reducing
overall cardinality and also effect logging when skipping actions in scheduler.

Differential Revision: https://reviews.llvm.org/D113390
  • Loading branch information
kadircet committed Nov 17, 2021
1 parent 693b020 commit e76e572
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang-tools-extra/clangd/TUScheduler.cpp
Expand Up @@ -992,7 +992,7 @@ void ASTWorker::updatePreamble(std::unique_ptr<CompilerInvocation> CI,
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),
Expand Down Expand Up @@ -1032,7 +1032,7 @@ void ASTWorker::updatePreamble(std::unique_ptr<CompilerInvocation> CI,
}
{
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});
Expand Down

0 comments on commit e76e572

Please sign in to comment.