Bug 1123815 - Merge gum into fx-team to enable the Performance++ tool, r=me

This commit is contained in:
Victor Porof 2015-03-14 16:14:37 -04:00
Родитель 088905d5b9
Коммит 3a6e36b016
16 изменённых файлов: 21 добавлений и 138 удалений

Просмотреть файл

@ -1433,33 +1433,8 @@ pref("devtools.debugger.ui.variables-sorting-enabled", true);
pref("devtools.debugger.ui.variables-only-enum-visible", false);
pref("devtools.debugger.ui.variables-searchbox-visible", false);
// Enable the Profiler
pref("devtools.profiler.enabled", true);
// Timeline panel settings
#ifdef NIGHTLY_BUILD
pref("devtools.timeline.enabled", true);
#else
pref("devtools.timeline.enabled", false);
#endif
// TODO remove `devtools.timeline.hiddenMarkers.` branches when performance
// tool lands (bug 1075567)
pref("devtools.timeline.hiddenMarkers", "[]");
// Enable perftools via build command
#ifdef MOZ_DEVTOOLS_PERFTOOLS
pref("devtools.performance_dev.enabled", true);
#else
pref("devtools.performance_dev.enabled", false);
#endif
// The default Profiler UI settings
// TODO remove `devtools.profiler.ui.` branches when performance
// tool lands (bug 1075567)
pref("devtools.profiler.ui.flatten-tree-recursion", true);
pref("devtools.profiler.ui.show-platform-data", false);
pref("devtools.profiler.ui.show-idle-blocks", true);
// Enable the Performance tools
pref("devtools.performance.enabled", true);
// The default Performance UI settings
pref("devtools.performance.memory.sample-probability", "0.05");

Просмотреть файл

@ -10,7 +10,7 @@ let gAddon, gClient, gThreadClient, gDebugger, gSources;
let PREFS = [
"devtools.canvasdebugger.enabled",
"devtools.shadereditor.enabled",
"devtools.profiler.enabled",
"devtools.performance.enabled",
"devtools.netmonitor.enabled"
];
function test() {

Просмотреть файл

@ -1217,8 +1217,8 @@ let gDevToolsBrowser = {
* necessary because of the WebConsole's `profile` and `profileEnd` methods.
*/
_connectToProfiler: function DT_connectToProfiler(event, toolbox) {
let SharedProfilerUtils = devtools.require("devtools/profiler/shared");
let connection = SharedProfilerUtils.getProfilerConnection(toolbox);
let SharedPerformanceUtils = devtools.require("devtools/performance/front");
let connection = SharedPerformanceUtils.getPerformanceActorsConnection(toolbox.target);
connection.open();
},

Просмотреть файл

@ -87,7 +87,7 @@
<vbox id="profiler-options" class="options-groupbox">
<checkbox label="&options.showPlatformData.label;"
tooltiptext="&options.showPlatformData.tooltip;"
data-pref="devtools.profiler.ui.show-platform-data"/>
data-pref="devtools.performance.ui.show-platform-data"/>
</vbox>
</vbox>

Просмотреть файл

@ -51,7 +51,7 @@ let connect = Task.async(function*() {
// Certain options should be toggled since we can assume chrome debugging here
function setPrefDefaults() {
Services.prefs.setBoolPref("devtools.inspector.showUserAgentStyles", true);
Services.prefs.setBoolPref("devtools.profiler.ui.show-platform-data", true);
Services.prefs.setBoolPref("devtools.performance.ui.show-platform-data", true);
Services.prefs.setBoolPref("browser.devedition.theme.showCustomizeButton", false);
Services.prefs.setBoolPref("devtools.inspector.showAllAnonymousContent", true);
Services.prefs.setBoolPref("browser.dom.window.dump.enabled", true);

Просмотреть файл

@ -89,11 +89,6 @@ browser.jar:
content/browser/devtools/webaudioeditor/views/inspector.js (webaudioeditor/views/inspector.js)
content/browser/devtools/webaudioeditor/views/properties.js (webaudioeditor/views/properties.js)
content/browser/devtools/webaudioeditor/views/automation.js (webaudioeditor/views/automation.js)
content/browser/devtools/profiler.xul (profiler/profiler.xul)
content/browser/devtools/profiler.js (profiler/profiler.js)
content/browser/devtools/ui-recordings.js (profiler/ui-recordings.js)
content/browser/devtools/ui-profile.js (profiler/ui-profile.js)
#ifdef MOZ_DEVTOOLS_PERFTOOLS
content/browser/devtools/performance.xul (performance/performance.xul)
content/browser/devtools/performance/performance-controller.js (performance/performance-controller.js)
content/browser/devtools/performance/performance-view.js (performance/performance-view.js)
@ -107,7 +102,6 @@ browser.jar:
content/browser/devtools/performance/views/details-memory-call-tree.js (performance/views/details-memory-call-tree.js)
content/browser/devtools/performance/views/details-memory-flamegraph.js (performance/views/details-memory-flamegraph.js)
content/browser/devtools/performance/views/recordings.js (performance/views/recordings.js)
#endif
content/browser/devtools/responsivedesign/resize-commands.js (responsivedesign/resize-commands.js)
content/browser/devtools/commandline.css (commandline/commandline.css)
content/browser/devtools/commandlineoutput.xhtml (commandline/commandlineoutput.xhtml)
@ -148,5 +142,3 @@ browser.jar:
content/browser/devtools/eyedropper.xul (eyedropper/eyedropper.xul)
content/browser/devtools/eyedropper/crosshairs.css (eyedropper/crosshairs.css)
content/browser/devtools/eyedropper/nocursor.css (eyedropper/nocursor.css)
content/browser/devtools/timeline/timeline.xul (timeline/timeline.xul)
content/browser/devtools/timeline/timeline.js (timeline/timeline.js)

Просмотреть файл

@ -30,9 +30,7 @@ loader.lazyGetter(this, "StyleEditorPanel", () => require("devtools/styleeditor/
loader.lazyGetter(this, "ShaderEditorPanel", () => require("devtools/shadereditor/panel").ShaderEditorPanel);
loader.lazyGetter(this, "CanvasDebuggerPanel", () => require("devtools/canvasdebugger/panel").CanvasDebuggerPanel);
loader.lazyGetter(this, "WebAudioEditorPanel", () => require("devtools/webaudioeditor/panel").WebAudioEditorPanel);
loader.lazyGetter(this, "ProfilerPanel", () => require("devtools/profiler/panel").ProfilerPanel);
loader.lazyGetter(this, "PerformancePanel", () => require("devtools/performance/panel").PerformancePanel);
loader.lazyGetter(this, "TimelinePanel", () => require("devtools/timeline/panel").TimelinePanel);
loader.lazyGetter(this, "NetMonitorPanel", () => require("devtools/netmonitor/panel").NetMonitorPanel);
loader.lazyGetter(this, "StoragePanel", () => require("devtools/storage/panel").StoragePanel);
loader.lazyGetter(this, "ScratchpadPanel", () => require("devtools/scratchpad/scratchpad-panel").ScratchpadPanel);
@ -47,7 +45,6 @@ const shaderEditorProps = "chrome://browser/locale/devtools/shadereditor.propert
const canvasDebuggerProps = "chrome://browser/locale/devtools/canvasdebugger.properties";
const webAudioEditorProps = "chrome://browser/locale/devtools/webaudioeditor.properties";
const profilerProps = "chrome://browser/locale/devtools/profiler.properties";
const timelineProps = "chrome://browser/locale/devtools/timeline.properties";
const netMonitorProps = "chrome://browser/locale/devtools/netmonitor.properties";
const storageProps = "chrome://browser/locale/devtools/storage.properties";
const scratchpadProps = "chrome://browser/locale/devtools/scratchpad.properties";
@ -61,7 +58,6 @@ loader.lazyGetter(this, "shaderEditorStrings", () => Services.strings.createBund
loader.lazyGetter(this, "canvasDebuggerStrings", () => Services.strings.createBundle(canvasDebuggerProps));
loader.lazyGetter(this, "webAudioEditorStrings", () => Services.strings.createBundle(webAudioEditorProps));
loader.lazyGetter(this, "inspectorStrings", () => Services.strings.createBundle(inspectorProps));
loader.lazyGetter(this, "timelineStrings", () => Services.strings.createBundle(timelineProps));
loader.lazyGetter(this, "netMonitorStrings", () => Services.strings.createBundle(netMonitorProps));
loader.lazyGetter(this, "storageStrings", () => Services.strings.createBundle(storageProps));
loader.lazyGetter(this, "scratchpadStrings", () => Services.strings.createBundle(scratchpadProps));
@ -249,41 +245,15 @@ Tools.canvasDebugger = {
}
};
Tools.jsprofiler = {
id: "jsprofiler",
accesskey: l10n("profiler.accesskey", profilerStrings),
key: l10n("profiler.commandkey2", profilerStrings),
ordinal: 7,
modifiers: "shift",
visibilityswitch: "devtools.profiler.enabled",
icon: "chrome://browser/skin/devtools/tool-profiler.svg",
invertIconForLightTheme: true,
url: "chrome://browser/content/devtools/profiler.xul",
label: l10n("profiler.label2", profilerStrings),
panelLabel: l10n("profiler.panelLabel2", profilerStrings),
tooltip: l10n("profiler.tooltip2", profilerStrings),
inMenu: true,
isTargetSupported: function (target) {
// Hide the profiler when debugging devices pre bug 1046394,
// that don't expose profiler actor in content processes.
return target.hasActor("profiler");
},
build: function (frame, target) {
return new ProfilerPanel(frame, target);
}
};
Tools.performance = {
id: "performance",
ordinal: 19,
ordinal: 7,
icon: "chrome://browser/skin/devtools/tool-profiler.svg",
invertIconForLightTheme: true,
url: "chrome://browser/content/devtools/performance.xul",
// TODO bug 1082695 audit the Performance tools labels
label: "Performance++", //l10n("profiler.label2", profilerStrings),
panelLabel: "Performance++", //l10n("profiler.panelLabel2", profilerStrings),
visibilityswitch: "devtools.performance.enabled",
label: l10n("profiler.label2", profilerStrings),
panelLabel: l10n("profiler.panelLabel2", profilerStrings),
tooltip: l10n("profiler.tooltip2", profilerStrings),
accesskey: l10n("profiler.accesskey", profilerStrings),
key: l10n("profiler.commandkey2", profilerStrings),
@ -299,27 +269,6 @@ Tools.performance = {
}
};
Tools.timeline = {
id: "timeline",
ordinal: 8,
visibilityswitch: "devtools.timeline.enabled",
icon: "chrome://browser/skin/devtools/tool-network.svg",
invertIconForLightTheme: true,
url: "chrome://browser/content/devtools/timeline/timeline.xul",
label: l10n("timeline.label", timelineStrings),
panelLabel: l10n("timeline.panelLabel", timelineStrings),
tooltip: l10n("timeline.tooltip", timelineStrings),
isTargetSupported: function(target) {
return target.hasActor("timeline");
},
build: function (iframeWindow, toolbox) {
let panel = new TimelinePanel(iframeWindow, toolbox);
return panel.open();
}
};
Tools.netMonitor = {
id: "netmonitor",
accesskey: l10n("netmonitor.accesskey", netMonitorStrings),
@ -422,23 +371,12 @@ let defaultTools = [
Tools.shaderEditor,
Tools.canvasDebugger,
Tools.webAudioEditor,
Tools.jsprofiler,
Tools.timeline,
Tools.performance,
Tools.netMonitor,
Tools.storage,
Tools.scratchpad
];
// Only enable in-development performance tools if `--enable-devtools-perf`
// used in build, turning on `devtools.performance_dev.enabled`.
// Add to normal `defaultTools` when ready for normal release,
// pull out MOZ_DEVTOOLS_PERFTOOLS setting in `./configure.in`, and
// leave config on in `./browser/app/profile/firefox.js`, and always
// build in `./browser/devtools/moz.build`.
if (Services.prefs.getBoolPref("devtools.performance_dev.enabled")) {
defaultTools.push(Tools.performance);
}
exports.defaultTools = defaultTools;
for (let definition of defaultTools) {

Просмотреть файл

@ -17,7 +17,7 @@ DIRS += [
'layoutview',
'markupview',
'netmonitor',
'profiler',
'performance',
'projecteditor',
'responsivedesign',
'scratchpad',
@ -28,15 +28,11 @@ DIRS += [
'styleeditor',
'styleinspector',
'tilt',
'timeline',
'webaudioeditor',
'webconsole',
'webide',
]
if CONFIG['MOZ_DEVTOOLS_PERFTOOLS']:
DIRS += ['performance']
EXTRA_COMPONENTS += [
'devtools-clhandler.js',
'devtools-clhandler.manifest',

Просмотреть файл

@ -48,17 +48,13 @@ let DEFAULT_PREFS = [
"devtools.performance.ui.show-idle-blocks",
"devtools.performance.ui.enable-memory",
"devtools.performance.ui.enable-framerate",
// remove after bug 1075567 is resolved.
"devtools.performance_dev.enabled"
].reduce((prefs, pref) => {
prefs[pref] = Services.prefs.getBoolPref(pref);
return prefs;
}, {});
// Enable the new performance panel for all tests. Remove this after
// bug 1075567 is resolved.
Services.prefs.setBoolPref("devtools.performance_dev.enabled", true);
// Enable the new performance panel for all tests.
Services.prefs.setBoolPref("devtools.performance.enabled", true);
// Enable logging for all the tests. Both the debugger server and frontend will
// be affected by this pref.
Services.prefs.setBoolPref("devtools.debugger.log", false);

Просмотреть файл

@ -7,5 +7,3 @@ EXTRA_JS_MODULES.devtools.profiler += [
'panel.js',
'utils/shared.js'
]
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']

Просмотреть файл

@ -140,7 +140,7 @@ Telemetry.prototype = {
userHistogram: "DEVTOOLS_CANVASDEBUGGER_OPENED_PER_USER_FLAG",
timerHistogram: "DEVTOOLS_CANVASDEBUGGER_TIME_ACTIVE_SECONDS"
},
jsprofiler: {
performance: {
histogram: "DEVTOOLS_JSPROFILER_OPENED_BOOLEAN",
userHistogram: "DEVTOOLS_JSPROFILER_OPENED_PER_USER_FLAG",
timerHistogram: "DEVTOOLS_JSPROFILER_TIME_ACTIVE_SECONDS"

Просмотреть файл

@ -11,7 +11,7 @@ add_task(function*() {
yield promiseTab(TEST_URI);
let Telemetry = loadTelemetryAndRecordLogs();
yield openAndCloseToolbox(2, TOOL_DELAY, "jsprofiler");
yield openAndCloseToolbox(2, TOOL_DELAY, "performance");
checkTelemetryResults(Telemetry);
stopRecordingTelemetryLogs(Telemetry);

Просмотреть файл

@ -6,5 +6,3 @@
EXTRA_JS_MODULES.devtools.timeline += [
'panel.js',
]
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']

Просмотреть файл

@ -53,7 +53,7 @@ function test()
yield openAndCheckPanel("jsdebugger");
yield openAndCheckPanel("inspector");
yield openAndCheckPanel("styleeditor");
yield openAndCheckPanel("jsprofiler");
yield openAndCheckPanel("performance");
yield openAndCheckPanel("netmonitor");
yield checkWebconsolePanelOpened();

Просмотреть файл

@ -17,3 +17,6 @@ ac_add_options --enable-crashreporter
ac_add_options --enable-release
. "$topsrcdir/build/mozconfig.automation"
# Temporarily enable building the new Performance++ tool.
ac_add_options --enable-devtools-perf

Просмотреть файл

@ -7665,19 +7665,6 @@ if test "$MOZ_CHROME_FILE_FORMAT" != "jar" &&
AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, or omni])
fi
dnl =========================================================
dnl Enable support for revamped devtools Performance Tools
dnl =========================================================
MOZ_ARG_ENABLE_BOOL(devtools-perf,
[ --enable-devtools-perf Set compile flags necessary for compiling devtools perftools],
MOZ_DEVTOOLS_PERFTOOLS=1,
MOZ_DEVTOOLS_PERFTOOLS= )
if test -n "$MOZ_DEVTOOLS_PERFTOOLS"; then
AC_DEFINE(MOZ_DEVTOOLS_PERFTOOLS)
fi
AC_SUBST(MOZ_DEVTOOLS_PERFTOOLS)
dnl =========================================================
dnl Omnijar packaging (bug 552121)
dnl =========================================================