Closed Bug 1569871 Opened 2 years ago Closed 2 years ago

Change the interpretation of MOZ_PROFILER_STARTUP variable to reading its value rather than its presence

Categories

(Core :: Gecko Profiler, enhancement, P3)

69 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: zxspectrum3579, Assigned: gerald)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

Switched off the profiler from running during startup by setting MOZ_PROFILER_STARTUP variable to 0.

Actual results:

The value of the variable was ignored so the profiler was running anyway.

Expected results:

The profiler should not be run.

The decision to ignore the value of the setting is inconvenient because if you do not use this feature very frequently you will forget the exact spelling of the variable what would make you wasting time while searching for it instead of just seeing it in the list of variables and changing the value from 0 to 1 when you need the profiler to run again.

So I suggest that this has to be changed.

Component: Untriaged → Gecko Profiler
Product: Firefox → Core

It is not a consistent approach when the value of the other related variables like MOZ_PROFILER_SHUTDOWN is checked but not this one.

Besides, the documentation on Mozilla's site https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler recommends to set MOZ_PROFILER_STARTUP to "1" treating it as if its value means something.

For the cases when someone wants to use a variable whose value is irrelevant something else can be added:

MOZ_PROFILER_STARTUP_ONLY_PRESENCE_IS_CHECKED
MOZ_PROFILER_STARTUP_REGARDLESS_OF_VALUE
MOZ_PROFILER_STARTUP_ANY_VALUE

The priority flag is not set for this bug.
:gerald, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gsquelart)
Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
Flags: needinfo?(gsquelart)
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All

(Also MOZ_BASE_PROFILER_STARTUP.)

This makes it easier to keep that variable setup in the environment, and change
its value to switch between enabling and disabling the profiler.

Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aea1e7b4655a
MOZ_PROFILER_STARTUP set to ''/'0'/'N'/'n' does not start the profiler - r=canaltinova
Assignee: nobody → gsquelart
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.