Closed Bug 1575453 Opened 2 years ago Closed 2 years ago

Optional AUTO_BASE_PROFILER_STATS to gather dev-specific profiler overhead

Categories

(Core :: Gecko Profiler, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: gerald, Assigned: gerald)

References

Details

Attachments

(2 files)

While working on changing the way we store markers, I want to gather some overheads before and after, to compare profiler performance.

Note that this is intended only for internal developer consumption, so it will be controlled by a #define and output results in printfs, and will be off by default. I'll enable it locally and in some tries.

AUTO_BASE_PROFILER_STATS(name) can be used to time a {block}.
Statistics are gathered in a function-static variable, and printf'd when the
program ends.

Depends on D42824

Use AUTO_BASE_PROFILER_STATS in both profilers, in:

  • SamplerThread::Run() calling DoPeriodicSample()
  • racy_profiler_add_marker
  • ProfileBuffer::DeleteExpiredStoredMarkers()

This should cover all areas affected by the upcoming changes to the
ProfileBuffer storage, and how markers are stored.

Depends on D42825

Attachment #9086986 - Attachment description: Bug 1575453 - AUTO_BASE_PROFILER_STATS (off by default) - r?gregtatum → Bug 1575453 - AUTO_PROFILER_STATS (off by default) - r?gregtatum
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e8848c8fdfdb
AUTO_PROFILER_STATS (off by default) - r=gregtatum
https://hg.mozilla.org/integration/autoland/rev/36da91720ede
Collect stats for sampling, and markers (add, collect, expire) - r=gregtatum
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Blocks: 1576550
You need to log in before you can comment on or make changes to this bug.