firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.21k stars 392 forks source link

Cannot open Chrome Trace Event profile #4915

Open ilyapopov opened 9 months ago

ilyapopov commented 9 months ago

This file cannot be loaded into firefox profiler. To my knowledge, it conforms to the Chrome Trace Event format as specified by Google's documentation. Ref: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

[
{"name": "Initialization", "cat": "", "ph": "X", "pid": 346905, "tid": 346905, "ts": 2343, "dur": 100}
]

The error message is:

Error: Unserializing the profile failed: Error: This does not appear to be a valid Gecko Profile, there is no meta field.

In fact, Firefox profiler cannot even open the file shown in that document as an example:

[ {"name": "Asub", "cat": "PERF", "ph": "B", "pid": 22630, "tid": 22630, "ts": 829},
  {"name": "Asub", "cat": "PERF", "ph": "E", "pid": 22630, "tid": 22630, "ts": 833} ]

The same file can be opened fine by other tools that support Trace Events format.

┆Issue is synchronized with this Jira Task

mstange commented 9 months ago

The Chrome format importer currently handles profiles exported from the Performance panel in the Chrome devtools - those profiles have sample and stack data. The importer currently does not handle the generic Chrome Trace Event format. But it would be nice if it did!