Open Bug 1355556 Opened 8 years ago Updated 2 months ago

Make it easier to find out why there are gaps between samples

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox55 --- affected

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

Sometimes there are gaps between samples and it's hard to find out the cause of these gaps. These gaps could have any number of reasons: (1) The SamplerThread wasn't scheduled (2) The SamplerThread was waiting on the gPS lock (3) The SamplerThread failed to suspend the target thread (4) Suspending the target thread took too long (5) We succeeded suspending the thread but bailed out during Tick We can make (3) and (5) leave traces in the profile buffer, by inserting a sample that has no stack but comes with some kind of error annotation. For (1), we can annotate the sample with the time that has passed since the last tick. For (2), we can annotate the sample with the time that it took to grab the lock. For (4), we can annotate the sample with the time that it took to suspend the thread.

Bug 1519752 captures some overheads, including locking time (2), total thread-sampling time (4)-ish. But this detailed information is not easily accessible.

Thanks to the CPU usage work (bug 1329600, https://github.com/firefox-devtools/profiler/pull/3098 ), samples in profile JSON will allow more freedom with added fields. So we should be able to add this kind of information per sample...

Severity: normal → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.