[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
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? > >

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Ilya Biryukov via Phabricator via cfe-commits
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: >

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D40132: [clangd] Tracing improvements

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D40132: [clangd] Tracing improvements

2017-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
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.

[PATCH] D40132: [clangd] Tracing improvements

2017-11-22 Thread Ilya Biryukov via Phabricator via cfe-commits
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)) { +

[PATCH] D40132: [clangd] Tracing improvements

2017-11-16 Thread Sam McCall via Phabricator via cfe-commits
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