Closed Bug 1764505 Opened 2 years ago Closed 2 years ago

Allow profiling the browser toolbox process

Categories

(DevTools :: Performance Tools (Profiler/Timeline), enhancement)

enhancement

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

Details

Attachments

(3 files)

For now, the new profiler is disabled from the browser toolbox.
There is typically two ways to use the new profiler:

  • from the panel, within the toolbox, this only applies to local tabs
  • from about:debugging, for any remote target
  • from the browser toolbar button

But the thing is that the browser toolbox isn't in the scope of about:debugging.
I sounds unecessary complex to follow this track. Recording such profile should be one or two clicks away from the browser toolbox itself.

And as we don't display the browser UI in the browser toolbox process, we don't get the toolbar button. It sounds also complex to try to make it work from the browser toolbox, which only loads the toolbox as a unique toplevel window?

So that it sounds like the best approach would be to make the panel work within the browser toolbox. It will be confusing as it wouldn't debug the Firefox instance the browser toolbox is debugging, but instead it would debug "itself", the Browser Toolbox process.

Attachment #9272063 - Attachment description: Bug 1764505 - [devtools] Enable the new profile on the browser toolbox. → Bug 1764505 - [devtools] Enable the new profiler on the browser toolbox.

I'm not opposed, but I'd like to reflect on two sentences you wrote:

(In reply to Alexandre Poirot [:ochameau] from comment #0)

1:

I sounds unecessary complex to follow this track. Recording such profile should be one or two clicks away from the browser toolbox itself.

2:

It will be confusing as it wouldn't debug the Firefox instance the browser toolbox is debugging, but instead it would debug "itself", the Browser Toolbox process.

From the first sentence: is that true that "recording such profile should be one or two clicks away from the browser toolbox"? I'm not so sure, because the browser toolbox' primary users are Firefox Frontend developers, but this feature's primary users are Devtools developers. (<= is that true? Maybe my own assumptions are wrong :-) )

From the second sentence: I agree completely, this would be confusing to most current users of the browser toolbox.

from about:debugging, for any remote target

This sounds like the most interesting to me, because this would make it possible to use the other tools with the browser toolbox as well! The inspector, the debugger, etc... Wouldn't the devtools developers be interested in this?

Again, I'm not opposed to the approach you propose, especially if you think it can unblock you. But wanted to outline this still :-)

And pass a toolbox instead of only the toplevel target.
It helps identify the browser toolbox and easily enable/disable tools for it.

Attachment #9272065 - Attachment description: Bug 1764505 - [devtools] Demo to record browser toolbox startup → Bug 1764505 - [devtools] Allow recording the browser toolbox startup by setting MOZ_BROWSER_TOOLBOX_PROFILER_STARTUP=1.
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/775ba0c2e92d
[devtools] Migrate Tool's definition isTargetSupport to isToolSupported. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/21fe563b3aa1
[devtools] Enable the new profiler on the browser toolbox. r=nchevobbe,julienw
https://hg.mozilla.org/integration/autoland/rev/5a4edbc7bf26
[devtools] Allow recording the browser toolbox startup by setting MOZ_BROWSER_TOOLBOX_PROFILER_STARTUP=1. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: