uftrace
uftrace copied to clipboard
support firefox profiler with uftrace dump --firefox
uftrace currently support chrome trace viewer format with uftrace dump --chrome
and that is really useful to visualize the workload.
However, there are some requests to support firefox profiler format as well. We can add another firefox option and it can be used as uftrace dump --firefox
.
The firefox profiler file can be opened at https://profiler.firefox.com/ and the most interesting thing is that it supports workload comparison at https://profiler.firefox.com/compare/.
The file format can be found at https://github.com/firefox-devtools/profiler/blob/main/docs-developer/gecko-profile-format.md.
We can add similar code to chrome option in cmds/dump.c
for this feature.
https://github.com/namhyung/uftrace/blob/v0.12/cmds/dump.c#L1644-L1656
If anyone doesn't care of it, I'll give it a try.
I'm also interested in firefox profiler. Maybe we could do this job together.
You can refer to the initial patch for --chrome
option at c6422d84c6b3239547643f7df8feb420a7ef24f3.
I wrote the patch based on the document at https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#.
As I previously discussed with @dongwooklee96, previous empty_profile.json.zip were converted from chrome trace to firefox trace.
But, the content of this profile doesn't show any event or function information. It may helpful for understanding basic members to create firefox trace.
This is live capture example Firefox 2022-09-12 20.09 profile_formatted.zip with less than a second to capture traces.
As the Gecko profile format says, saving original data (similar to record-based data in RDB) to mapped data (similar to column-based data in NoSQL) helps speed and lack of GC pauses. But, this may hard to implement in native C directly. So I'm trying to implement in python scripting first, then port into C implementation.
There is a related discussion for perf tool at https://lore.kernel.org/lkml/ZG5kjDN63HqqMuJJ@yoga.
Hi, I'm interested in this issue and if it hasn't been completed yet, would it be okay to join in?
@sypark9646 Sure. You can go ahead.
At this point, I think we should not add more options for new formats and just convert them something like to --format=firefox
. So let's deprecate --chrome
and use --format=chrome
. Ditto for the other options.