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•4 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•4 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•4 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
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c19cd174982c Use SpliceableJSONWriter instead of JSONWriter when streaming markers - r=gregtatum https://hg.mozilla.org/integration/autoland/rev/d203ffa2b29e Make SpliceableJSONWriter optionally point at a UniqueJSONStrings, with pass-through functions - r=gregtatum https://hg.mozilla.org/integration/autoland/rev/855f21902872 Use SpliceableJSONWriter::UniqueStringElement in DeserializeAfterKindAndStream - r=gregtatum
Comment 5•4 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
•