firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.21k stars 392 forks source link

Data transform: Collapse all functions in a given namespace #244

Open bzbarsky opened 7 years ago

bzbarsky commented 7 years ago

This is similar to https://github.com/devtools-html/perf.html/issues/238 but instead of collapsing/charging time spent "in JS" it would be nice to do it for everything in a given namespace or path, For example, one could combine the fix for https://github.com/devtools-html/perf.html/issues/238 and collapsing/charging everything in the "js" and "JS" namespaces, or in the "js/" directory, to cleanly separate out the "JS" time from "other Gecko" time.

If the condition for collapsing/charging could be negated, the collapsing could also be done the other way, to effectively collapse together all the non-JS Gecko bits and focus on what's going on with the JS side.

cc gregtatum

┆Issue is synchronized with this Jira Task

gregtatum commented 7 years ago

When charging to callers, add a way to charge all unsymbolicated frames to the caller. See #285

gregtatum commented 6 years ago

@bzbarsky Can you help me spec out exactly what you want to see here? I'd like to break this out into separate issues if there are multiple requests here. The underlying request looks like you want:

All js namespaced frames are merged (they have their self times applied to their parent).

root -> js::RunScript -> js::jit::MaybeEntierJit -> doSomething()

turns into:

root -> doSomething()

What about nested namespaces? I could do a sub-menu for that case.

gregtatum commented 6 years ago

A second request looks like you want to "Merge nodes not in the namespace js".

root -> js::RunScript -> js::jit::MaybeEntierJit -> doSomething()

turns into:

js::RunScript -> js::jit::MaybeEntierJit

Oh, and also JS:: would not be the same as js in this implementation, as they are logically different namespaces in C++.

bzbarsky commented 6 years ago

@gregtatum Sorry for the lag....

Choose from the context menu: "Merge namespace js"

Yes, if I were clicking on the js::RunScript. Less clear about the js::jit::MaybeEnterJit case.

All js namespaced frames are merged (they have their self times applied to their parent).

I would prefer they have all their time applied to the place where that namespace got entered. So this:

root -> js::RunScript -> js::jit::MaybeEntierJit -> doSomething()

becomes:

root -> js::RunScript -> doSomething()

with MaybeEnterJit merged into RunScript.

What about nested namespaces?

I would be fine with "merge namespace mozilla::dom" if I'm clicking on a mozilla::dom thing and not have a way to merge all of "mozilla" from there. But sure, if I could select either one, that's great too. ;)

A second request looks like you want to "Merge nodes not in the namespace js".

Yep.

js::RunScript -> js::jit::MaybeEntierJit

Correct.

Oh, and also JS:: would not be the same as js in this implementation

Yes, that's expected.