WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
214866
Profiler resolution is too low
https://bugs.webkit.org/show_bug.cgi?id=214866
Summary
Profiler resolution is too low
Radek Pietruszewski
Reported
2020-07-28 01:53:11 PDT
Hi. It appears that the Safari/webkit web inspector profiler samples stack traces approximately every 1ms. This is slow, and not suitable for many profiling tasks, since I'm only going to get a handful of samples when trying to hit 60fps, or react to an event in 50ms. By comparison, it appears that Chrome's Timeline profiler samples stacks every 100us. Is there a technical reason why WebKit's profiler can't go up to 10kHz? If there's a tradeoff (slow processing, significantly degraded performance), can this be made configurable?
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-07-28 16:59:24 PDT
<
rdar://problem/66245375
>
Saam Barati
Comment 2
2020-07-28 18:23:52 PDT
(In reply to radexpl from
comment #0
)
> Hi. It appears that the Safari/webkit web inspector profiler samples stack > traces approximately every 1ms. This is slow, and not suitable for many > profiling tasks, since I'm only going to get a handful of samples when > trying to hit 60fps, or react to an event in 50ms. By comparison, it appears > that Chrome's Timeline profiler samples stacks every 100us. > > Is there a technical reason why WebKit's profiler can't go up to 10kHz? If > there's a tradeoff (slow processing, significantly degraded performance), > can this be made configurable?
Last time I measured this it did negatively impact performance of the script being run, and we were trying to find a balance where we didn't introduce so much perturbation that the samples you got were unrepresentative. I also remember it being difficult to be woken up reliably in 100us. However, this was a long time ago. We should check again the impact of increasing the resolution.
Radek Pietruszewski
Comment 3
2021-03-13 23:57:44 PST
Hi Saam! I wanted to bump this thread and ask again whether it's possible to increase WebKit's profiler resolution -- or at least make it a configurable option. I've just upgraded my Mac to an M1 machine, which exacerbates the issue even more -- the faster a dev machine is, the fewer samples for analysis I get. BTW: I'm not very familiar with the ins and outs of sampling profiling, but I do wonder if instead of being a hardcoded timer, the profiler sampler rate shouldn't be calculated/estimated off of CPU's speed - so that a program would get roughly the same number of samples regardless of how fast a machine is.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug