Closed Bug 1640999 Opened 4 years ago Closed 4 years ago

Implement the "Marker 2.0" marker formatting schema

Categories

(Core :: Gecko Profiler, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: gregtatum, Assigned: mozbugz)

References

(Depends on 2 open bugs, Blocks 2 open bugs, )

Details

Attachments

(4 files)

This bug will be a little vague, but we need to implement the new Marker Schema. This is probably the hardest bug to split out, because it could be invasive. It's possible to re-work the marker API in a very invasive way with creating a new template based system. Or we could do it in a few phases, where we implement the schema, and then improve the API to it.

The schema is documented in our spec document under "marker formatting schema": https://docs.google.com/document/d/1CCvTL2O_9YF7sd6ef8pWvm23EVgArOsmoNG0zqXFk9w/edit?ts=5ea18a6c#heading=h.i1fhdd3mn4z7

This work needs to be tightly coupled with changes to the front-end.

This will need to be coordinated with the front-end. See https://github.com/firefox-devtools/profiler/issues/2732.

The initial work can land first quickly (probably in another bug), but then we can do a Gecko profile version bump in order to actually start using the new Marker Schema. This will need to be coordinated with the front-end. This issue will track when it's officially enabled on the Gecko side.

Depends on: 1662491

I'll start work on the C++ side, i.e.: Every marker type should define a display schema, and at the end all these should be put in an array under 'meta'. This will happen separately in each process, they will get combined into one list during the initial processing when uploaded to profiler.firefox.com.

Front-end side, as of this comment:
Schema Flow: https://github.com/firefox-devtools/profiler/blob/c9692715f29a5ebb03446f2de7ea74a1a3c922cf/src/types/markers.js#L75-L100
Example: https://github.com/firefox-devtools/profiler/blob/c9692715f29a5ebb03446f2de7ea74a1a3c922cf/src/profile-logic/marker-schema.js

Assignee: nobody → gsquelart

This class collects all the information necessary to stream the JSON schema that informs the front-end how to display a type of markers.
It will be created and populated in MarkerTypeDisplay() functions in each marker type definition with Add/Set functions (see following patch).

Based on https://github.com/firefox-devtools/profiler/blob/c9692715f29a5ebb03446f2de7ea74a1a3c922cf/src/profile-logic/marker-schema.js

Along with the deserializer, we now also store other marker functions (that output the marker type name and schema).
These will later be used to output the combined schema list for all used marker types.

Depends on D90658

Using the stored marker functions, stream all marker schema to JSON.

Depends on D90659

Blocks: 1666566
Attachment #9176484 - Attachment description: Bug 1640999 - MarkerSchemaWriter - r?gregtatum → Bug 1640999 - MarkerSchema schema-writer class - r?gregtatum

Bug 1669266 is changing DOM event markers from tracing to their own type.

Depends on: 1669266
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c51eabda1044
MarkerSchema schema-writer class - r=gregtatum
https://hg.mozilla.org/integration/autoland/rev/11ec29b8969c
Add `MarkerTypeDisplay` to all marker type definitions - r=gregtatum
https://hg.mozilla.org/integration/autoland/rev/69e9dc2d25a4
Store name and schema functions for each marker type - r=gregtatum
https://hg.mozilla.org/integration/autoland/rev/97e5f9fd6a99
Output meta.markerSchema for all used marker types in the process - r=gregtatum
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: