--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
+oysteine who knows more than anybody else about the tracing macros.> Side question: given the increasing number of tracing options and parameters, is there another way of doing things that does not rely on creating new macros for each combination?You mean in blink or in general?Not sure what is the state in blink about allowing including //base, I think that might not happen too soon.Unfortunately without that we have to do these hops.
On Thu, Sep 15, 2016 at 12:12 PM, Primiano Tucci <prim...@chromium.org> wrote:+oysteine who knows more than anybody else about the tracing macros.> Side question: given the increasing number of tracing options and parameters, is there another way of doing things that does not rely on creating new macros for each combination?You mean in blink or in general?Not sure what is the state in blink about allowing including //base, I think that might not happen too soon.Unfortunately without that we have to do these hops.We already allow including base/trace_event.h from Source/platform (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/DEPS?l=24), so I think we can include base/trace_event.h from TraceEvent.h and remove most of the code in it as well as EventTracer.
On Thu, Sep 15, 2016 at 12:23 PM, Xianzhu Wang <wangx...@chromium.org> wrote:On Thu, Sep 15, 2016 at 12:12 PM, Primiano Tucci <prim...@chromium.org> wrote:+oysteine who knows more than anybody else about the tracing macros.> Side question: given the increasing number of tracing options and parameters, is there another way of doing things that does not rely on creating new macros for each combination?You mean in blink or in general?Not sure what is the state in blink about allowing including //base, I think that might not happen too soon.Unfortunately without that we have to do these hops.We already allow including base/trace_event.h from Source/platform (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/DEPS?l=24),
- What is the "correct" include when I want to add trace calls to a file I'm working with?
- Are there any guidelines for creating new categories and naming them?
- What's the rule of thumb for choosing if a new tracing category I'm creating should be "disabled-by-default"?
I included platform/TraceEvent.h into third_party/WebKit/Source/web/WebFrameSerializer.cpp and got this error when building for some platforms but not for others (while building for Android locally it did work):../../third_party/WebKit/Source/platform/TraceEvent.h:498:5: error: call to 'setTraceValue' is ambiguoussetTraceValue(arg1Val, &argTypes[0], &argValues[0]);^~~~~~~~~~~~~../../third_party/WebKit/Source/platform/TraceEvent.h:571:12: note: in instantiation of function template specialization 'blink::TraceEvent::addTraceEvent<unsigned long>' requested herereturn addTraceEvent(phase, categoryEnabled, name, scope, id,^../../third_party/WebKit/Source/web/WebFrameSerializer.cpp:225:5: note: in instantiation of function template specialization 'blink::TraceEvent::addTraceEvent<unsigned long>' requested hereTRACE_EVENT_END1("page-serialization", "WebFrameSerializer::generateMHTMLParts serializing",^(...)This happened because I was adding the value of Vector::size() as an argument to that TRACE_EVENT_END1 call, which is of the standard type size_t. Switching to include base/trace_event/trace_event.h made it build successfully but that is still a forbidden import. For now my fix is to static cast to unsigned long long which is the type finally accepted by the setTraceValue functions defined in TraceEvent.h.Xianzhu, I'm guessing your patch would fix this as well?