[PATCH] D96027: [clangd] Trace queue state for each TUScheduler action.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 4 12:34:20 PST 2021
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:511
llvm::Optional<std::shared_ptr<const PreambleData>> LatestPreamble;
- std::queue<Request> PreambleRequests; /* GUARDED_BY(Mutex) */
+ std::deque<Request> PreambleRequests; /* GUARDED_BY(Mutex) */
/// Signaled whenever LatestPreamble changes state or there's a new
----------------
TIL: queue doesn't allow iteration :shrug:
================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:1054
Requests.push_back({std::move(Task), std::string(Name), steady_clock::now(),
- std::move(Ctx), Update, Invalidation,
- std::move(Invalidate)});
+ std::move(Ctx), std::move(QueueCtx), Update,
+ Invalidation, std::move(Invalidate)});
----------------
what if we just pushed the span here and kept it alive in the queue? it is move-able at the moment.
our tracing contract seem to be saying beginSpan/endSpan calls would always form a proper stack, i am not sure about its importance to the jsontracer, but I don't think rest of our tracers cares (and i think it would be nice for that trace to actually span the whole time in queue).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96027/new/
https://reviews.llvm.org/D96027
More information about the cfe-commits
mailing list