Open Bug 1525532 Opened 5 years ago Updated 2 months ago

[remote-dbg-next] Disable performance profiler in about:debugging if remote runtime is unsupported

Categories

(DevTools :: about:debugging, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

Follow up to https://bugzilla.mozilla.org/show_bug.cgi?id=1495665

We are always showing the Profile Runtime button at the moment, but maybe there are runtimes where we shouldn't show it? Missing actor trait on the server side for instance?

Julien, do you know if there is something we can check in the DevTools server to know if the Profiler can run or not on a remote device?

Flags: needinfo?(felash)

This is a very good question!

In WebIDE I used this test to enable the button:

      if (AppManager.perfFront) {
        performanceCmd.removeAttribute("disabled");
      }

perfFront is defined this way in devtools/client/webide/modules/app-manager.js:

        this.perfFront = await this.connection.client.mainRoot.getFront("perf");

Therefore this is what I'd suggest to do.
I think that nowadays the perf front is unconditionally loaded, but in older Firefox version we were loading it only when the pref devtools.performance.new-panel-enabled was set to true. So if you want to support older versions this would be a good idea.

For sure there are runtimes where the profiler doesn't work, but I don't think we can distinguish them at the moment, which is a bit bad.

I hope this helps, please ask if you want anything more!

Flags: needinfo?(felash)

thanks for the detailed answer Julien!

Summary: [remote-dbg-next] Disable performance profiler in about:debugging is remote runtime is unsupported → [remote-dbg-next] Disable performance profiler in about:debugging if remote runtime is unsupported
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.