Closed Bug 1329861 Opened 8 years ago Closed 8 years ago

Disable async stack reporting when profiling Firefox using the Gecko profiler

Categories

(Core :: Gecko Profiler, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

While we find a solution to bug 1280819, we should probably consider disabling the async stack capture when using Gecko Profiler at least.

Note that in bug 1326134, we added reporting of this pref name to the profiles.  Not sure if we should rip it out here since in theory the user can still enable the pref while the profiler is active.
Comment on attachment 8825271 [details] [diff] [review]
Disable async stack capturing while profiling using the Gecko Profiler

Review of attachment 8825271 [details] [diff] [review]:
-----------------------------------------------------------------

Ok... setting prefs while the profiler is not really following the principle of least surprise, but the alternative is worse. So let's do it.

::: tools/profiler/gecko/nsProfiler.cpp
@@ +32,5 @@
>  NS_IMPL_ISUPPORTS(nsProfiler, nsIProfiler)
>  
>  nsProfiler::nsProfiler()
> +  : mLockedForPrivateBrowsing(false),
> +    mAsyncStacksWereEnabled(false)

Gecko style is to put the comma at the beginning of the next line
Attachment #8825271 - Flags: review?(mstange) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e39a1f381b85
Disable async stack capturing while profiling using the Gecko Profiler; r=mstange
This is probably a good idea, however it means we won't be able to catch things like 1326105...

I'm not sure I have a good suggestion, though.  :(

I just wish async stack capture were less expensive.
Flags: needinfo?(ehsan)
After some more thought, this is probably not the right place to set this pref, given that StartProfiler() and StopProfiler() are also called by the devtools profiler.  Since this feature is only used in devtools, disabling it for devtools profiler seems questionable.  Instead, I'm going to do this in the Gecko Profiler add-on in this PR: <https://github.com/mstange/Gecko-Profiler-Addon/pull/18>
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(ehsan)
Resolution: --- → WONTFIX
For future reference, the Gecko Profiler addon PR mentioned in comment 6 has migrated to a new URL:

https://github.com/devtools-html/Gecko-Profiler-Addon/pull/18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: