profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Make it easier to identify samples where we were _only_ running script

Open mikeconley opened this issue 7 years ago • 8 comments

This is distinct from the "JS Only" view in the Tree View, since that feature shows us stacks where JS is involved. What I'm requesting here is slightly deeper - what I'm hoping for is something that highlights samples where the deepest part of the stack is still JS, and that the JS isn't calling into platform-y things.

I think this would help us identify things like "this page is just running super expensive algorithms in JS".

/cc jrmuizel

┆Issue is synchronized with this Jira Task

mikeconley avatar Feb 06 '18 18:02 mikeconley

It sounds like you are saying "Drop samples with non-JS leaf nodes"? This could get implemented as a transform.

I think we need to resolves #586 first (which needs a Gecko patch: https://bugzilla.mozilla.org/show_bug.cgi?id=1426124).

cpp -> js -> js
cpp -> js -> js -> cpp
cpp
cpp -> js

Would then get transformed to:

cpp -> js -> js
cpp -> js

gregtatum avatar Feb 07 '18 20:02 gregtatum

It sounds like you are saying "Drop samples with non-JS leaf nodes"?

Yeah, I think that sounds right.

mikeconley avatar Feb 07 '18 20:02 mikeconley

Would it be more helpful the other way? I mean, drop samples with JS-leaf nodes, so that we can see how time is distributed inside the platform-y things. And from there, we can further identify any performance issue inside the platform code without things from JS.

upsuper avatar Mar 09 '18 05:03 upsuper

Maybe that's what "c++ only" should really do. Is the current behavior of "c++ only" actually useful ?

julienw avatar Mar 09 '18 11:03 julienw

That's probably true? The current behavior of "C++ only" for me is somehow useful to shallow the call tree... but I don't see other usefulness there indeed.

upsuper avatar Mar 12 '18 00:03 upsuper

I agree it would be very useful to separate JS execution from platform calls.

I always assumed that the "C++ only" thing referred to the stack type (C++ stacks vs JS stacks). I never really explored that stuff, but we should be wary about muddying the difference between a JS callstack and a C++ callstack in the interpreter.

bholley avatar Mar 12 '18 22:03 bholley

This should be implemented with this: https://github.com/devtools-html/perf.html/issues/911

gregtatum avatar Apr 05 '18 16:04 gregtatum

Does the activity graph answer this question? If it's yellow at the top of the graph, it means we're doing JS. Is that good enough?

julienw avatar Mar 06 '20 17:03 julienw