This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE320708: [clangd] Changed tracing interfaces (authored by
ibiryukov, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D40489?vs=126957&id=126959#toc
Repository:
rCTE Clang Tools Ext
ilya-biryukov updated this revision to Diff 126957.
ilya-biryukov added a comment.
Merged with head
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D40489
Files:
clangd/Trace.cpp
clangd/Trace.h
Index: clangd/Trace.h
===
ilya-biryukov added inline comments.
Comment at: clangd/Trace.cpp:134
+ Callback = T->beginSpan(Ctx, Name);
+ if (!Callback)
+return;
sammccall wrote:
> I'm not sure this is useful. Tracers that aren't interested in args can't opt
> out by providing a null
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clangd/Trace.cpp:134
+ Callback = T->beginSpan(Ctx, Name);
+ if (!Callback)
+return;
I'm not sure this is useful. Tracers that ar
ilya-biryukov added inline comments.
Comment at: clangd/Trace.h:39
+ /// Called when event with \p Name starts.
+ virtual void begin_event(const ContextData &Ctx, llvm::StringRef Name) = 0;
+ /// Called when event with \p Name ends.
sammccall wrote:
> just cal
ilya-biryukov updated this revision to Diff 126762.
ilya-biryukov marked 3 inline comments as done.
ilya-biryukov added a comment.
- Changed the EventTracer interface to return a callback from beginEvent
instead of using begin_event/end_event method pairs.
Repository:
rCTE Clang Tools Extra
ilya-biryukov updated this revision to Diff 126329.
ilya-biryukov added a comment.
Updated the patch after changes to Context
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D40489
Files:
clangd/Trace.cpp
clangd/Trace.h
Index: clangd/Trace.h
=
ilya-biryukov updated this revision to Diff 126318.
ilya-biryukov added a comment.
- Update the patch to accomodate changes from tracing and Context patches.
- Updated tracing after changes to Context. We now store a clone() of Context
in Span instead of ContextData.
- Pass Context by const-ref i
sammccall added inline comments.
Comment at: clangd/Trace.cpp:138
return;
- if (!Args)
-Args = llvm::make_unique();
- T->event(Ctx, "E",
- Args ? json::obj{{"args", std::move(*Args)}} : json::obj{});
+ assert(Args && "Args can't be null at this point");
+ T
ilya-biryukov added inline comments.
Comment at: clangd/Trace.cpp:138
return;
- if (!Args)
-Args = llvm::make_unique();
- T->event(Ctx, "E",
- Args ? json::obj{{"args", std::move(*Args)}} : json::obj{});
+ assert(Args && "Args can't be null at this point");
sammccall added inline comments.
Comment at: clangd/Trace.cpp:138
return;
- if (!Args)
-Args = llvm::make_unique();
- T->event(Ctx, "E",
- Args ? json::obj{{"args", std::move(*Args)}} : json::obj{});
+ assert(Args && "Args can't be null at this point");
+ T
ilya-biryukov updated this revision to Diff 125696.
ilya-biryukov added a comment.
Herald added a subscriber: klimek.
- Update the patch to accomodate changes from tracing and Context patches.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D40489
Files:
clangd/Trace.cpp
clan
ilya-biryukov planned changes to this revision.
ilya-biryukov added a comment.
Have to update to match the new `Context` implementation.
https://reviews.llvm.org/D40489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cg
luckygeck added inline comments.
Comment at: clangd/Trace.h:41
+ /// Context.
static PtrKey CtxKey;
ilya-biryukov wrote:
> luckygeck wrote:
> > This is a (1)static non-pod member in an (2) interface. Is it really a good
> > idea? If we plan to have only on
ilya-biryukov marked an inline comment as done.
ilya-biryukov added inline comments.
Comment at: clangd/Trace.h:41
+ /// Context.
static PtrKey CtxKey;
luckygeck wrote:
> This is a (1)static non-pod member in an (2) interface. Is it really a good
> idea? I
ilya-biryukov updated this revision to Diff 124371.
ilya-biryukov added a comment.
- Fixed a typo.
https://reviews.llvm.org/D40489
Files:
clangd/Trace.cpp
clangd/Trace.h
Index: clangd/Trace.h
===
--- clangd/Trace.h
+++ clangd/
luckygeck added inline comments.
Comment at: clangd/Trace.h:41
+ /// Context.
static PtrKey CtxKey;
This is a (1)static non-pod member in an (2) interface. Is it really a good
idea? If we plan to have only one ctxkey, then maybe let's make it not bound to
ilya-biryukov created this revision.
Introduced begin_event, end_event and instant_event instead of a
string phase name.
https://reviews.llvm.org/D40489
Files:
clangd/Trace.cpp
clangd/Trace.h
Index: clangd/Trace.h
===
--- clan
18 matches
Mail list logo