Closed Bug 1719935 Opened 3 years ago Closed 3 years ago

Remove unused ActorReadyGeckoProfilerInterface.gzipped property

Categories

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

task

Tracking

(firefox92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: mstange, Assigned: mstange)

Details

Attachments

(1 file)

ActorReadyGeckoProfilerInterface is used both by the perf actor and by about:profiling, but it is not used by the global keyboard shortcuts, the toolbarbutton, or the profile capture button in the popup - the latter access points go through background.jsm.js instead.

about:profiling does not have a way to capture profiles. Consequently, ActorReadyGeckoProfilerInterface.getProfileAndStopProfiler() is only ever called from the actor, which passes { gzipped: false } when creating the ActorReadyGeckoProfilerInterface. So we can remove the code that supports gzipped: true.

ActorReadyGeckoProfilerInterface is used in two contexts:

  • For the perf actor, which is used when the profiler is used from the
    devtools Performance panel or via remote debugging (on about:debugging), and
  • On about:profiling, which only exercises a subset of the interface's methods
    because about:profiling does not have any UI for capturing profiles.

There are three other ways to capture profiles:

  • The global browser keyboard shortcuts (implemented in DevToolsStartup.jsm)
  • Clicking the toolbarbutton directly (implemented in popup/menu-button.jsm.js)
  • Clicking the Capture button inside the popup (implemented in popup/panel.jsm.js)

These three other ways use functions in popup/background.jsm.js to capture the profile.
They do not call ActorReadyGeckoProfilerInterface.getProfileAndStopProfiler().

When the ActorReadyGeckoProfilerInterface instance for the perf actor is created,
we pass { gzipped: false }. Consequently, ActorReadyGeckoProfilerInterface.getProfileAndStopProfiler()
is only ever called with gzipped: false. So the option can be removed.

The other three ways to capture profiles, which use captureProfile in
popup/background.jsm.js, always get the gzipped profile because captureProfile
calls Services.profiler.getProfileDataAsGzippedArrayBuffer().

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/9c0166fd5c42
Remove unused "gzipped" option from ActorReadyGeckoProfilerInterface. r=canaltinova
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: