-
Dominic Mazzoni authored
This reverts commit 8fe65f6f. Reason for revert: Suspecting that it's causing these tests to fail: services_unittests MemoryTracingIntegrationTest.GenerationChangeDoesntReenterMDM content_browsertests MemoryTracingTest.BrowserInitiatedDump See bug 899813 Original change's description: > Introduce base::trace_event::TraceArguments helper class. > > This CL introduces the TraceArguments helper class to simplify > the way TRACE_EVENTXXX macro named arguments are passed to the > trace log. By using a small dedicated data structure, it is > possible to generate less code at each trace call site, > compared to the old way that relies on passing 5 specially > crafted arguments to TraceLog methods. > > For example, this optimization can save about 12 kiB in > libmonochrome.so for the 32-bit ARM build of Chrome on Android. > For more details, see corresponding bug entry. > > This CL does the following: > > - Introduce the new class in base/trace_event/trace_arguments.h > > - Move the definition of TraceValue to trace_arguments.h and > augment the union with templated methods to support easy > initialization from a large set of C++ value types. > > - Add new TraceLog methods to add trace events using an > optional TraceArguments parameter, instead of a bag of > 5 ones (count + names + types + values + convertables). > > - Simplify internal templates using C++11 universal references > and std::forward<> to remove special-casing convertable > arguments in trace event calls. > > - Remove the now obsolete TraceValueUnion type from trace_event.h > > - Make the TraceEvent class fully C++11 movable, to simplify > its usage (this removes the Initialize() and MoveFrom() methods). > > - Update base/trace_event/ code to use TraceArguments and the > new TraceEvent move operations. > > - Note that this keeps a few forwarding data types, values and > methods to avoid other direct callers from the Chromium tree, > these will be updated in future CLs. One Blink header needs > to be modified though because it specializes a template > defined in trace_arguments.h, to support sending WTF::CString > references as trace arguments. > > BUG=898794 > R=oysteine@chromium.org,chiniforooshan@chromium.org,alexiln@chromium.org > TBR=primiano@chromium.org,torne@chromium.org > > Change-Id: I8fe2225974f7044515a2f64bdc67f6d36abfe004 > Reviewed-on: https://chromium-review.googlesource.com/c/1298997 > Commit-Queue: David Turner <digit@chromium.org> > Reviewed-by: Richard Coles <torne@chromium.org> > Reviewed-by: oysteine <oysteine@chromium.org> > Cr-Commit-Position: refs/heads/master@{#603500} TBR=digit@chromium.org,primiano@chromium.org,torne@chromium.org,chiniforooshan@chromium.org,oysteine@chromium.org,alexiln@chromium.org Change-Id: I165b96fde68d927f966bdb4ed8649dd7bb4dd0f5 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 898794, 899813 Reviewed-on: https://chromium-review.googlesource.com/c/1305250Reviewed-by:
Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#603564}
2c7b7e4b