Pass SpliceableJSONWriter to StreamJSONMarkerData, and attach UniqueJSONStrings
Categories
(Core :: Gecko Profiler, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox84 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Currently StreamJSONMarkerData functions (in marker definition structs) are given a JSONWriter reference.
Some markers, like GC major/minor/slice, need to splice JSON strings (without escaping them). So instead of a JSONWriter, we now give SpliceableJSONWriter to StreamJSONMarkerData.
Some other markers, like Screenshot, also need to store some data as unique strings.
To help with that, the UniqueJSONStrings object that's used when streaming a profile, will be attached to the SpliceableJSONWriter, and relevant functions will be added.
| Assignee | ||
Comment 1•5 years ago
|
||
Some markers (e.g., GC major/minor/slice) need to splice JSON strings in their data.
So now, instead of JSONWriter, StreamJSONMarkerData functions will be given a mozilla::baseprofiler::SpliceableJSONWriter.
Depends on D95116
| Assignee | ||
Comment 2•5 years ago
|
||
Some markers (e.g., Screenshot) use unique strings in their data.
The UniqueJSONStrings used during streaming is attached to the SpliceableJSONWriter, and StreamJSONMarkerData can use pass-through functions UniqueStringProperty() and UniqueStringElement().
Depends on D95511
| Assignee | ||
Comment 3•5 years ago
|
||
Unique strings are used to encode all markers' 'name' field, SpliceableJSONWriter::UniqueStringElement can be used for that (instead of a caller-provided callback, which was necessary before UniqueJSONStrings was de-duplicated).
Depends on D95512
Comment 5•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c19cd174982c
https://hg.mozilla.org/mozilla-central/rev/d203ffa2b29e
https://hg.mozilla.org/mozilla-central/rev/855f21902872
Description
•