Closed Bug 1459653 Opened 7 years ago Closed 3 years ago

Cannot auto-start the profiler on Firefox restart

Categories

(Core :: Gecko Profiler, defect, P2)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bytesized, Unassigned)

Details

I am currently trying to keep the profiler extension running on my browser to catch an elusive problem. However, this problem seems to (intermittently) occur right after Nightly updates. Unfortunately, the profiler seems to refuse to start automatically after the update is installed. I have these environment variables set: MOZ_PROFILER_STARTUP=1 MOZ_PROFILER_STARTUP_ENTRIES=40000000 MOZ_PROFILER_STARTUP_INTERVAL=1 If I simply close and reopen Nightly, the profiler starts automatically, as expected. If I close and reopen Nightly while an update is pending, the update installs upon reopening and the profiler still starts automatically. However, if I click the restart button on the update doorhanger, or navigate to about:profiles and click "Restart normally...", the browser restarts but the profiler does not. Since I want to make sure that I am reproducing the case that causes my issue to intermittently occur, I want to keep clicking the restart button. But I need the profiler to start too.
If I remember correctly we pass some flags in the restart button handler code. We should check if we are using the same flags in all of these restart code paths.
Priority: -- → P2

It would be good to know if this still happens now that we don't use the addon anymore. By chance would you know Kirk?

Flags: needinfo?(bytesized)

(In reply to Kirk Steuber (he/him) [:bytesized] from comment #0)

MOZ_PROFILER_STARTUP=1

However, if I […] navigate
to about:profiles and click "Restart normally...", the browser restarts but
the profiler does not.

I just tried to reproduce using these steps on a Macbook M1, and couldn't: the profiler was running after the restart.

I just tried when applying an update, and it seems to work on Linux too.
It would be good to know the status on Windows finally.

(In reply to Julien Wajsberg [:julienw] from comment #2)

It would be good to know if this still happens now that we don't use the addon anymore. By chance would you know Kirk?

I haven't actually used the profiler in quite some time. I was going to try to give this a quick test to find out, but I'm a little confused.

The docs say:

  1. Then capture the profile using the add-on, as usual.

But you just said

we don't use the addon anymore

Flags: needinfo?(bytesized)

Then capture the profile using the add-on, as usual.

Oops, the docs are badly outdated in this page, I'll make sure to update them.

The current way is with the popup that you can add from profiler.firefox.com. (In the future it should be shown automatically if startup profiling is enabled, but it's not happening currently).

Cool, this seems to working now on Windows too.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME

Thanks a lot for checking!

You need to log in before you can comment on or make changes to this bug.