Bug 1190594 - Disable memory flame graphs in performance tool. r=vp

This commit is contained in:
Jordan Santell 2015-08-06 11:15:51 -07:00
parent 7f3e243797
commit 4f244c3506
4 changed files with 17 additions and 3 deletions

View File

@ -1446,6 +1446,10 @@ pref("devtools.performance.ui.enable-allocations", false);
pref("devtools.performance.ui.enable-framerate", true);
pref("devtools.performance.ui.enable-jit-optimizations", false);
// Temporary pref disabling memory flame views
// TODO remove once we have flame charts via bug 1148663
pref("devtools.performance.ui.enable-memory-flame", false);
// Enable experimental options in the UI only in Nightly
#if defined(NIGHTLY_BUILD)
pref("devtools.performance.ui.experimental", true);

View File

@ -24,6 +24,8 @@ const PREFS = new ViewHelpers.Prefs("devtools.performance", {
"memory-max-log-length": ["Int", "memory.max-log-length"],
"profiler-buffer-size": ["Int", "profiler.buffer-size"],
"profiler-sample-frequency": ["Int", "profiler.sample-frequency-khz"],
// TODO re-enable once we flame charts via bug 1148663
"enable-memory-flame": ["Bool", "ui.enable-memory-flame"],
}, {
monitorChanges: true
});

View File

@ -79,6 +79,10 @@ Services.prefs.setBoolPref("devtools.performance.enabled", true);
// be affected by this pref.
Services.prefs.setBoolPref("devtools.debugger.log", false);
// By default, enable memory flame graphs for tests for now
// TODO remove when we have flame charts via bug 1148663
Services.prefs.setBoolPref("devtools.performance.ui.enable-memory-flame", true);
/**
* Call manually in tests that use frame script utils after initializing
* the tool. Must be called after initializing (once we have a tab).

View File

@ -34,7 +34,8 @@ let DetailsView = {
"memory-flamegraph": {
id: "memory-flamegraph-view",
view: MemoryFlameGraphView,
features: ["withAllocations"]
features: ["withAllocations"],
prefs: ["enable-memory-flame"],
},
"optimizations": {
id: "optimizations-view",
@ -126,14 +127,17 @@ let DetailsView = {
* @return {boolean}
*/
_isViewSupported: function (viewName) {
let { features } = this.components[viewName];
let { features, prefs } = this.components[viewName];
let recording = PerformanceController.getCurrentRecording();
if (!recording || !recording.isCompleted()) {
return false;
}
return PerformanceController.isFeatureSupported(features);
let prefSupported = (prefs && prefs.length) ?
prefs.every(p => PerformanceController.getPref(p)) :
true;
return PerformanceController.isFeatureSupported(features) && prefSupported;
},
/**