This revision was automatically updated to reflect the committed changes.
Closed by commit rL318928: [clangd] Tracing improvements (authored by
sammccall).
Repository:
rL LLVM
https://reviews.llvm.org/D40132
Files:
clang-tools-extra/trunk/clangd/ClangdUnit.cpp
clang-tools-extra/trunk/clan
ilya-biryukov added inline comments.
Comment at: clangd/JSONRPCDispatcher.h:78
llvm::Optional ID;
+ std::unique_ptr Tracer;
};
ilya-biryukov wrote:
> sammccall wrote:
> > ilya-biryukov wrote:
> > > Why do we need `unique_ptr`? Are `Span`s non-movable?
> > Sp
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: clangd/JSONRPCDispatcher.h:78
llvm::Optional ID;
+ std::unique_ptr Tracer;
};
sammccall wrote:
> ilya-biryukov wrote:
> >
sammccall added inline comments.
Comment at: clangd/JSONRPCDispatcher.h:78
llvm::Optional ID;
+ std::unique_ptr Tracer;
};
ilya-biryukov wrote:
> Why do we need `unique_ptr`? Are `Span`s non-movable?
Spans aren't movable, they have an explicitly declared des
sammccall updated this revision to Diff 124069.
sammccall marked an inline comment as done.
sammccall added a comment.
Address review comment.
https://reviews.llvm.org/D40132
Files:
clangd/ClangdUnit.cpp
clangd/JSONRPCDispatcher.cpp
clangd/JSONRPCDispatcher.h
clangd/Trace.cpp
clangd/T
ilya-biryukov requested changes to this revision.
ilya-biryukov added a comment.
This revision now requires changes to proceed.
Oops, accidentally accepted the revision.
There are no major issues, but still wanted to learn the reasons we use
rval-refs and allocate span dynamically.
https://revi
ilya-biryukov accepted this revision.
ilya-biryukov added inline comments.
This revision is now accepted and ready to land.
Comment at: clangd/JSONRPCDispatcher.h:61
+ llvm::Optional ID)
+ : Out(Out), ID(std::move(ID)), Tracer(new trace::Span(Method)) {
+
sammccall created this revision.
[clangd] Tracing improvements
Compose JSON using JSONExpr
Allow attaching metadata to spans (and avoid it if tracing is off)
Attach IDs and responses of JSON RPCs to their spans
The downside is that large responses make the trace viewer sluggish.
We should make o