-
Notifications
You must be signed in to change notification settings - Fork 13
Sampling dict seems to falsely indicate an empty stack #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interesting, I'd guess this is a bug in the Chromium implementation's stack filtration. Definitely not expected behaviour. Do you mind filing a Chromium bug with details about what platform and Chrome version that you're on? Thanks! |
@acomminos Thanks, I just submitted the bug - https://bugs.chromium.org/p/chromium/issues/detail?id=1263007 @acomminos I also noticed that Chromium seems to set the lowest sampling interval to 10ms, is there any privacy or security reasoning behind that? |
Also noticed the same issue, ive uploaded an example code here:https://github.com/magenish/Profiler-fragmentation |
From the discussion in https://bugs.chromium.org/p/chromium/issues/detail?id=1263007, it seems that this could be a valid case where a non JS related task is running (like GC). The code in my example was in fact triggering a lot of GC (resizing array) which I suspect showed up as empty. |
Hey everyone, really excited to see this spec move forward, I think the potential for further improving the user experience with this is big and I'm looking forward to seeing the potential it unlocks and thank you for putting work into this!
I have been implementing support for the trace format in our flamegraph visualizing tool at Specto and have been comparing the output with the built-in Chrome profiler when I noticed that the sampling seems to produce holes, or at least indicate that the stack was empty at interval when it in fact wasn't.
I'm attaching a visual comparison between a trace collected with the self profiling spec and display in our dashboard and a concurrent trace collected via chrome devtools.
Specto (traced with JS Self Profiling at 2ms sampling rate):

Chrome (traced via devtools profiler)

If I investigate the samples array and track down the
Flamegraph.init
call which should occur twice in the lifetime of the trace (confirmed by the chrome trace and by manually tracking down code execution), it does indeed look like the samples indicate that the stack had been empty at certain sampling intervals (index 516, 517, 524... are not associated to any stack)So my question here is:
stackId
is optional, but it does not say if the absence of it should be interpreted as an empty stack?The text was updated successfully, but these errors were encountered: