Closed
Bug 1128859
Opened 10 years ago
Closed 10 years ago
Memory allocations views should be dependent on `enable-memory` pref
Categories
(DevTools :: Performance Tools (Profiler/Timeline), defect)
Tracking
(firefox38 fixed)
RESOLVED
FIXED
Firefox 38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: jsantell, Assigned: jsantell)
References
Details
Attachments
(1 file, 3 obsolete files)
30.69 KB,
patch
|
jsantell
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•10 years ago
|
Blocks: perf-tool-v2
Assignee | ||
Updated•10 years ago
|
Blocks: enable-perf-tool
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8559457 -
Flags: review?(vporof)
Comment 3•10 years ago
|
||
Comment on attachment 8559457 [details] [diff] [review]
1128859-enable-allocations-pref.patch
Review of attachment 8559457 [details] [diff] [review]:
-----------------------------------------------------------------
Sweet
::: browser/devtools/performance/modules/recording-model.js
@@ +19,5 @@
> const RecordingModel = function (options={}) {
> this._front = options.front;
> this._performance = options.performance;
> this._label = options.label || "";
> +
Nit: ws.
::: browser/devtools/performance/performance-controller.js
@@ -57,5 @@
>
> // Events emitted by various objects in the panel.
> const EVENTS = {
> // Fired by the OptionsView when a preference changes.
> - PREF_CHANGED: "Preformance:PrefChanged",
Lolol
@@ +234,4 @@
>
> this.emit(EVENTS.RECORDING_WILL_STOP, recording);
> +
> + yield recording.stopRecording({ withAllocations });
Can't `stopRecording` just read from its own model configuration, instead of expecting an argument?
::: browser/devtools/performance/test/browser_perf-details-03.js
@@ +9,5 @@
> + */
> +function spawnTest () {
> + let { panel } = yield initPerformance(SIMPLE_URL);
> + let { EVENTS, DetailsView } = panel.panelWin;
> + let { $, WaterfallView, MemoryCallTreeView } = panel.panelWin;
Would be better if we made sure everything works when both the MemoryCallTreeView and the MemoryFlameGraphView are toggled, not just the call tree.
::: browser/devtools/performance/test/browser_perf-options-enable-memory-02.js
@@ +18,5 @@
> + Services.prefs.setBoolPref(MEMORY_PREF, true);
> + yield stopRecording(panel);
> +
> + is(PerformanceController.getCurrentRecording().getConfiguration().withAllocations, false,
> + "The recording finished without tracking memory.");
Should check `withMemory` here as well.
@@ +25,5 @@
> + yield startRecording(panel);
> + Services.prefs.setBoolPref(MEMORY_PREF, false);
> + yield stopRecording(panel);
> + is(PerformanceController.getCurrentRecording().getConfiguration().withAllocations, true,
> + "The recording finished with tracking memory.");
Ditto.
::: browser/devtools/performance/test/browser_perf-options-invert-call-tree-02.js
@@ +1,5 @@
> /* Any copyright is dedicated to the Public Domain.
> http://creativecommons.org/publicdomain/zero/1.0/ */
>
> const INVERT_PREF = "devtools.performance.ui.invert-call-tree";
> +const MEMORY_PREF = "devtools.performance.ui.enable-memory";
Maybe move all these consts the head.js?
::: browser/devtools/performance/views/details.js
@@ +68,5 @@
> + if (!pref) {
> + continue;
> + }
> + let value = PerformanceController.getPref(pref);
> + // Hide the button that selects the view
Nit: somewhat redundant comment.
Attachment #8559457 -
Flags: review?(vporof) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8559457 [details] [diff] [review]
1128859-enable-allocations-pref.patch
Review of attachment 8559457 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/performance/performance-controller.js
@@ +234,4 @@
>
> this.emit(EVENTS.RECORDING_WILL_STOP, recording);
> +
> + yield recording.stopRecording({ withAllocations });
Yeah I like that, if we continue with the assumption that these things can't change
::: browser/devtools/performance/test/browser_perf-details-03.js
@@ +9,5 @@
> + */
> +function spawnTest () {
> + let { panel } = yield initPerformance(SIMPLE_URL);
> + let { EVENTS, DetailsView } = panel.panelWin;
> + let { $, WaterfallView, MemoryCallTreeView } = panel.panelWin;
+1
::: browser/devtools/performance/test/browser_perf-options-invert-call-tree-02.js
@@ +1,5 @@
> /* Any copyright is dedicated to the Public Domain.
> http://creativecommons.org/publicdomain/zero/1.0/ */
>
> const INVERT_PREF = "devtools.performance.ui.invert-call-tree";
> +const MEMORY_PREF = "devtools.performance.ui.enable-memory";
+1
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8559457 -
Attachment is obsolete: true
Attachment #8559482 -
Flags: review+
Assignee | ||
Comment 7•10 years ago
|
||
rebased
Attachment #8559482 -
Attachment is obsolete: true
Attachment #8559904 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 8•10 years ago
|
||
There's a couple tests where stopRecording is used with a param, when that's not necessary anymore. Should clean those up, and there's a new case added in bug 1130200
Assignee | ||
Comment 10•10 years ago
|
||
Removed instances where stopRecording takes arguments
Attachment #8559904 -
Attachment is obsolete: true
Flags: needinfo?(jsantell)
Attachment #8560278 -
Flags: review+
Comment 11•10 years ago
|
||
Hi,
this patch failed to apply cleanly:
applying 1128859-enable-allocations-pref.patch
patching file browser/devtools/performance/performance-controller.js
Hunk #3 FAILED at 291
1 out of 3 hunks FAILED -- saving rejects to file browser/devtools/performance/performance-controller.js.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh 1128859-enable-allocations-pref.patch
could you take a look? thanks!
Flags: needinfo?(jsantell)
Keywords: checkin-needed
Comment 12•10 years ago
|
||
Rebased and landed myself: https://hg.mozilla.org/integration/fx-team/rev/4cff6f1458dd
Flags: needinfo?(jsantell)
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 38
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•