[clang-tools-extra] 8a13119 - [clangd] Remove second tracer (which breaks threading contract)
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 20 13:17:45 PDT 2022
Author: Sam McCall
Date: 2022-09-20T22:17:34+02:00
New Revision: 8a131190070152ffb0a27ab5dd14d98052467aa9
URL: https://github.com/llvm/llvm-project/commit/8a131190070152ffb0a27ab5dd14d98052467aa9
DIFF: https://github.com/llvm/llvm-project/commit/8a131190070152ffb0a27ab5dd14d98052467aa9.diff
LOG: [clangd] Remove second tracer (which breaks threading contract)
Added:
Modified:
clang-tools-extra/clangd/TUScheduler.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp
index 1e64fac80d94c..b85b8e5d399f6 100644
--- a/clang-tools-extra/clangd/TUScheduler.cpp
+++ b/clang-tools-extra/clangd/TUScheduler.cpp
@@ -395,11 +395,9 @@ class PreambleThrottlerRequest {
// If there is no throttler, this dummy request is always satisfied.
if (!Throttler)
return;
- Tracer.emplace("PreambleThrottled");
ID = Throttler->acquire(Filename, [&] {
Satisfied.store(true, std::memory_order_release);
CV.notify_all();
- Tracer.reset();
});
}
@@ -414,7 +412,6 @@ class PreambleThrottlerRequest {
}
private:
- llvm::Optional<trace::Span> Tracer;
PreambleThrottler::RequestID ID;
PreambleThrottler *Throttler;
std::atomic<bool> Satisfied = {false};
More information about the cfe-commits
mailing list