Closed Bug 1748280 Opened 3 years ago Closed 3 years ago

Pass arguments from webrtc TRACE_EVENTs to the profiler

Categories

(Core :: Gecko Profiler, task, P2)

task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(4 files)

Currently the TRACE_EVENT{0|1|2} macros in libwebrtc are plumbed to the gecko profiler. But several macro callers (those suffixed 1 and 2) provide detailed information that can be particularly handy when debugging. The existing integration misses these details as it only captures the name of the trace event.

Depends on: 1714577

I'm gonna guess there was no existing use of the tuple
serialization/deserialization code, because Bytes doesn't exist in the
deserializer, and cannot possibly function properly on tuple members that
serialize to a non-constant size, since it's called on a default-constructed
tuple.

This patch took inspiration in the deserializer for Variant and seems to work
fine.

This patch adds a part of TraceEvent.h that we had previously skipped. It
handles the conversion from the arg-ful TRACE_EVENTn forms to the internal
representation which carries around a dynamic number of args (num_args and
friends).

This allows us to hook into GeckoTraceEvent.h at a higher level, where all trace
events end up, with or without args.

This patch changes where we hook into GeckoTraceEvent.h and lets us capture
args.

Many revisions later... this is my best shoehorning attempt of webrtc's trace
events into the profiler.

It is not an optimal fit as the profiler wants a static schema, and the trace
event framework provides labels and values for the args dynamically.

But it allows displaying all args in the profiler which is a big step for
low-maintenance webrtc trace event integration into the profiler.

Blocks: 1743694
Blocks: 1748458
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0987c68e9683 Gecko Profiler: Fix std::tuple deserialization. r=gerald https://hg.mozilla.org/integration/autoland/rev/775843562f7e Add trace_event_internal section verbatim to GeckoTraceEvent. r=padenot https://hg.mozilla.org/integration/autoland/rev/baf39ae53772 Update GeckoTraceEvent to plumb through trace args. r=padenot https://hg.mozilla.org/integration/autoland/rev/eccba94506f0 Add TraceMarker and friends to support GeckoTraceEvent with args in the profiler. r=gerald,padenot
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/61aa46ad333a Gecko Profiler: Fix std::tuple deserialization. r=gerald https://hg.mozilla.org/integration/autoland/rev/686c81ffdf0e Add trace_event_internal section verbatim to GeckoTraceEvent. r=padenot https://hg.mozilla.org/integration/autoland/rev/ef3cab042f98 Update GeckoTraceEvent to plumb through trace args. r=padenot https://hg.mozilla.org/integration/autoland/rev/ff06d9e647c0 Add TraceMarker and friends to support GeckoTraceEvent with args in the profiler. r=gerald,padenot
Regressions: 1755889
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: