mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
e893cc5e8d
The profiler writes ProfileBuffer entries in a particular order, and then later has to parse them, mostly in StreamSamplesToJSON(). That function's parsing code is poorly structured and rather gross, at least partly because no explicit grammar is identified. This patch identifies the grammar in a comment, and in the same comment also includes some examples of the more complicated subsequences. Once written down, the grammar is obviously suboptimal -- the |Sample| entries serve no useful purpose, for example -- but I will leave grammar improvements as follow-ups. The patch also rewrites the parser in a more typical fashion that obviously matches the grammar. The new parser is slightly more verbose but far easier to understand. --HG-- extra : rebase_source : 762c21a68cdc18ff25b5feda3c5dfcf33afa53be |
||
---|---|---|
.. | ||
core | ||
gecko | ||
lul | ||
public | ||
tasktracer | ||
tests | ||
merge-profiles.py | ||
moz.build | ||
nm-symbolicate.py |