Closed Bug 1900846 Opened 2 years ago Closed 1 year ago

Emit gecko profiler markers as perfetto track events

Categories

(Core :: Performance Engineering, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: denispal, Assigned: denispal)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

We have perfetto integration within Firefox for Android, but we only currently emit two track events for user timing markers and taskcontroller tasks. We should instead emit all existing gecko profiler markers as perfetto track events as well.

Component: Performance → Performance Engineering

Depends on D214033

Attachment #9408016 - Attachment description: WIP: Bug 1900846: WIP Emit gecko profiler markers to perfetto → WIP: Bug 1900846: WIP Emit gecko profiler markers as perfetto track events if enabled.
Attachment #9413073 - Attachment description: WIP: Bug 1900846: WIP Emit NetworkMarker payload to perfetto → WIP: Bug 1900846: WIP Add perfetto track event specialization for the NetworkMarker.

The CCIntervalMarker marker accepts a CycleCollectorResults struct as one of it's parameters and emits each field individually during StreamJSONMarkerData. This is difficult to translate to a perfetto track event, so instead pass each field directly to profiler_add_marker so that the parameters line up with the PayloadFields descriptions.

Depends on D216734

This patch removes some duplicate macro definitions for the perfetto macro's, such as TRACE_EVENT_BEGIN. They are not currently used and are mapped to no-op's in this file.

Depends on D217411

Attachment #9413072 - Attachment is obsolete: true
Attachment #9408016 - Attachment description: WIP: Bug 1900846: WIP Emit gecko profiler markers as perfetto track events if enabled. → Bug 1900846: Emit gecko profiler markers as perfetto track events if enabled. r=canaltinova!
Attachment #9413073 - Attachment description: WIP: Bug 1900846: WIP Add perfetto track event specialization for the NetworkMarker. → Bug 1900846: Add perfetto track event specialization for the NetworkMarker. r=canaltinova!
Attachment #9414343 - Attachment description: WIP: Bug 1900846: WIP Pass each individual field as parameters instead of the CycleCollectorResults struct when emitting the CCIntervalMarker profiler marker. → Bug 1900846: Pass each individual field as parameters instead of the CycleCollectorResults struct when emitting the CCIntervalMarker profiler marker. r=canaltinova!
Attachment #9414344 - Attachment description: WIP: Bug 1900846: WIP Remove duplicate definitions of perfetto macros. → Bug 1900846: Remove duplicate definitions of perfetto macros. r=canaltinova!
Pushed by dpalmeiro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d5ba32edc63c Emit gecko profiler markers as perfetto track events if enabled. r=profiler-reviewers,canaltinova https://hg.mozilla.org/integration/autoland/rev/5c6c1e590b8c Add perfetto track event specialization for the NetworkMarker. r=necko-reviewers,canaltinova,jesup https://hg.mozilla.org/integration/autoland/rev/3a9a742747b0 Pass each individual field as parameters instead of the CycleCollectorResults struct when emitting the CCIntervalMarker profiler marker. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/3020439d8d51 Remove duplicate definitions of perfetto macros. r=canaltinova,profiler-reviewers
Backout by tszentpeteri@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bb02892b5321 Backed out 4 changesets for causing crashes related to MarkerPhase.
Pushed by dpalmeiro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7c46e5ef4f69 Emit gecko profiler markers as perfetto track events if enabled. r=profiler-reviewers,canaltinova https://hg.mozilla.org/integration/autoland/rev/5a87c9e315c9 Add perfetto track event specialization for the NetworkMarker. r=necko-reviewers,canaltinova,jesup https://hg.mozilla.org/integration/autoland/rev/a6a44279e929 Pass each individual field as parameters instead of the CycleCollectorResults struct when emitting the CCIntervalMarker profiler marker. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/8cd38ce20a6e Remove duplicate definitions of perfetto macros. r=canaltinova,profiler-reviewers
Depends on: 1918045
Flags: needinfo?(dpalmeiro)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: