Closed Bug 1726657 Opened 4 years ago Closed 4 years ago

Profiler stats take up a lot of space in the profile, for not much value

Categories

(Core :: Gecko Profiler, defect, P2)

defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mstange, Assigned: mozbugz)

References

Details

Attachments

(1 file)

Example profile: https://share.firefox.dev/3z4Agb1

This profile is 13.2MB (gzipped), and it does not show much activity. It should be possible to create smaller profiles with the same information.

Removing the profiler overhead information from this profile reduces the size by 30-35%.

Uncompressed: 72MB -> 48MB (-35%)
Compressed: 13.2MB -> 9.5MB (-30%)

One problem with the overhead information is the fact that floats don't stringify very well.

For example you have this:

"locking":[0,0.16666666666666666,0.08333333333333333,0.125,0.041666666666666664,

"0.041666666666666664" is a floating point value in microseconds.
Expressed as integer nanoseconds, this would just be "42".

Yeah I think you're right, this is currently adding its own overhead for little value, especially now that we have CPU usage.
The overhead summary stats could still stay I think, they're small enough.

Regarding the "floats don't stringify very well", it would be nice to solve that anyway, because a lot of these are present everywhere. I'll file a separate bug.

Severity: -- → S3
Priority: -- → P2

Sampling overheads are very rarely useful, but they occupy some space during profiling, but also a lot of space in the final JSON profile.
So now they will only be recorded if the environment variable "MOZ_PROFILER_RECORD_OVERHEADS" is set to any non-empty value.

Assignee: nobody → gsquelart
Status: NEW → ASSIGNED
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/54e7fb66ad44 Only record sampling overheads if MOZ_PROFILER_RECORD_OVERHEADS is set - r=florian
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
Depends on: 1896582
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: