summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-08-15 17:55:58 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-08-15 17:55:58 -0400
commitc3d0b9d89caf27ff0011ecc40d810ea6d920e7d2 (patch)
tree214bbbef06d795755be22df7b8bd66bce3c6cc62 /base
parentcb6acf78ee1ae56d240645419e9c081cae7337d3 (diff)
downloadiceweasel-uxp-c3d0b9d89caf27ff0011ecc40d810ea6d920e7d2.tar.gz
Remove TelemetryStopwatch
Diffstat (limited to 'base')
-rw-r--r--base/content/browser-fullScreenAndPointerLock.js3
-rw-r--r--base/content/browser-gestureSupport.js10
-rwxr-xr-xbase/content/browser.js23
-rw-r--r--base/content/browser.xul3
-rw-r--r--base/content/sanitize.js55
-rw-r--r--base/content/tabbrowser.xml50
6 files changed, 8 insertions, 136 deletions
diff --git a/base/content/browser-fullScreenAndPointerLock.js b/base/content/browser-fullScreenAndPointerLock.js
index dbc9478..ebe5537 100644
--- a/base/content/browser-fullScreenAndPointerLock.js
+++ b/base/content/browser-fullScreenAndPointerLock.js
@@ -379,12 +379,10 @@ var FullScreen = {
let topWin = event.target.ownerGlobal.top;
browser = gBrowser.getBrowserForContentWindow(topWin);
}
- TelemetryStopwatch.start("FULLSCREEN_CHANGE_MS");
this.enterDomFullscreen(browser);
break;
}
case "MozDOMFullscreen:Exited":
- TelemetryStopwatch.start("FULLSCREEN_CHANGE_MS");
this.cleanupDomFullscreen();
break;
}
@@ -410,7 +408,6 @@ var FullScreen = {
}
case "DOMFullscreen:Painted": {
Services.obs.notifyObservers(window, "fullscreen-painted", "");
- TelemetryStopwatch.finish("FULLSCREEN_CHANGE_MS");
break;
}
}
diff --git a/base/content/browser-gestureSupport.js b/base/content/browser-gestureSupport.js
index f472e5c..6c21a6a 100644
--- a/base/content/browser-gestureSupport.js
+++ b/base/content/browser-gestureSupport.js
@@ -1001,13 +1001,10 @@ var gHistorySwipeAnimation = {
ctx.DRAWWINDOW_ASYNC_DECODE_IMAGES |
ctx.DRAWWINDOW_USE_WIDGET_LAYERS);
- TelemetryStopwatch.start("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
try {
this._installCurrentPageSnapshot(canvas);
this._assignSnapshotToCurrentBrowser(canvas);
- } finally {
- TelemetryStopwatch.finish("FX_GESTURE_INSTALL_SNAPSHOT_OF_PAGE");
- }
+ } catch (e) {}
},
/**
@@ -1058,7 +1055,6 @@ var gHistorySwipeAnimation = {
return;
}
- TelemetryStopwatch.start("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
try {
let browser = gBrowser.selectedBrowser;
let snapshots = browser.snapshots;
@@ -1072,9 +1068,7 @@ var gHistorySwipeAnimation = {
}
}, "image/png"
);
- } finally {
- TelemetryStopwatch.finish("FX_GESTURE_COMPRESS_SNAPSHOT_OF_PAGE");
- }
+ } catch (e) {}
},
/**
diff --git a/base/content/browser.js b/base/content/browser.js
index ae7fd5f..6469ab0 100755
--- a/base/content/browser.js
+++ b/base/content/browser.js
@@ -45,7 +45,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["SitePermissions", "resource:///modules/SitePermissions.jsm"],
["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"],
["Task", "resource://gre/modules/Task.jsm"],
- ["TelemetryStopwatch", "resource://gre/modules/TelemetryStopwatch.jsm"],
["Translation", "resource:///modules/translation/Translation.jsm"],
["UpdateUtils", "resource://gre/modules/UpdateUtils.jsm"],
["Weave", "resource://services-sync/main.js"],
@@ -3892,8 +3891,6 @@ function toOpenWindowByType(inType, uri, features)
function OpenBrowserWindow(options)
{
- var telemetryObj = {};
- TelemetryStopwatch.start("FX_NEW_WINDOW_MS", telemetryObj);
function newDocumentShown(doc, topic, data) {
if (topic == "document-shown" &&
@@ -3901,7 +3898,6 @@ function OpenBrowserWindow(options)
doc.defaultView == win) {
Services.obs.removeObserver(newDocumentShown, "document-shown");
Services.obs.removeObserver(windowClosed, "domwindowclosed");
- TelemetryStopwatch.finish("FX_NEW_WINDOW_MS", telemetryObj);
}
}
@@ -4697,25 +4693,6 @@ var TabsProgressListener = {
_startedLoadTimer: new WeakSet(),
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
- // Collect telemetry data about tab load times.
- if (aWebProgress.isTopLevel && (!aRequest.originalURI || aRequest.originalURI.spec.scheme != "about")) {
- if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
- if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
- this._startedLoadTimer.add(aBrowser);
- TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
- Services.telemetry.getHistogramById("FX_TOTAL_TOP_VISITS").add(true);
- } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
- this._startedLoadTimer.has(aBrowser)) {
- this._startedLoadTimer.delete(aBrowser);
- TelemetryStopwatch.finish("FX_PAGE_LOAD_MS", aBrowser);
- }
- } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
- aStatus == Cr.NS_BINDING_ABORTED &&
- this._startedLoadTimer.has(aBrowser)) {
- this._startedLoadTimer.delete(aBrowser);
- TelemetryStopwatch.cancel("FX_PAGE_LOAD_MS", aBrowser);
- }
- }
// We used to listen for clicks in the browser here, but when that
// became unnecessary, removing the code below caused focus issues.
diff --git a/base/content/browser.xul b/base/content/browser.xul
index 06bab58..06e05cc 100644
--- a/base/content/browser.xul
+++ b/base/content/browser.xul
@@ -521,8 +521,7 @@
tabbrowser="content"
flex="1"
setfocus="false"
- tooltip="tabbrowser-tab-tooltip"
- stopwatchid="FX_TAB_CLICK_MS">
+ tooltip="tabbrowser-tab-tooltip">
<tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
</tabs>
diff --git a/base/content/sanitize.js b/base/content/sanitize.js
index 8413765..0a00def 100644
--- a/base/content/sanitize.js
+++ b/base/content/sanitize.js
@@ -19,8 +19,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",
"resource:///modules/DownloadsCommon.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
- "resource://gre/modules/TelemetryStopwatch.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
@@ -154,8 +152,6 @@ Sanitizer.prototype = {
// we catch and store them, but continue to sanitize as much as possible.
// Callers should check returned errors and give user feedback
// about items that could not be sanitized
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_TOTAL", refObj);
let annotateError = (name, ex) => {
progress[name] = "failed";
@@ -188,7 +184,7 @@ Sanitizer.prototype = {
}
// Sanitization is complete.
- TelemetryStopwatch.finish("FX_SANITIZE_TOTAL", refObj);
+
// Reset the inProgress preference since we were not killed during
// sanitization.
Preferences.reset(Sanitizer.PREF_SANITIZE_IN_PROGRESS);
@@ -210,8 +206,6 @@ Sanitizer.prototype = {
cache: {
clear: Task.async(function* (range) {
let seenException;
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_CACHE", refObj);
try {
// Cache doesn't consult timespan, nor does it have the
@@ -232,7 +226,6 @@ Sanitizer.prototype = {
seenException = ex;
}
- TelemetryStopwatch.finish("FX_SANITIZE_CACHE", refObj);
if (seenException) {
throw seenException;
}
@@ -243,10 +236,8 @@ Sanitizer.prototype = {
clear: Task.async(function* (range) {
let seenException;
let yieldCounter = 0;
- let refObj = {};
// Clear cookies.
- TelemetryStopwatch.start("FX_SANITIZE_COOKIES_2", refObj);
try {
let cookieMgr = Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Ci.nsICookieManager);
@@ -274,8 +265,6 @@ Sanitizer.prototype = {
}
} catch (ex) {
seenException = ex;
- } finally {
- TelemetryStopwatch.finish("FX_SANITIZE_COOKIES_2", refObj);
}
// Clear deviceIds. Done asynchronously (returns before complete).
@@ -332,13 +321,6 @@ Sanitizer.prototype = {
if (!range || age >= 0) {
let tags = ph.getPluginTags();
for (let tag of tags) {
- let refObj = {};
- let probe = "";
- if (/\bFlash\b/.test(tag.name)) {
- probe = tag.loaded ? "FX_SANITIZE_LOADED_FLASH"
- : "FX_SANITIZE_UNLOADED_FLASH";
- TelemetryStopwatch.start(probe, refObj);
- }
try {
let rv = yield new Promise(resolve =>
ph.clearSiteData(tag, null, FLAG_CLEAR_ALL, age, resolve)
@@ -349,14 +331,8 @@ Sanitizer.prototype = {
ph.clearSiteData(tag, null, FLAG_CLEAR_ALL, -1, resolve)
);
}
- if (probe) {
- TelemetryStopwatch.finish(probe, refObj);
- }
} catch (ex) {
// Ignore errors from plug-ins
- if (probe) {
- TelemetryStopwatch.cancel(probe, refObj);
- }
}
}
}
@@ -413,8 +389,6 @@ Sanitizer.prototype = {
history: {
clear: Task.async(function* (range) {
let seenException;
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_HISTORY", refObj);
try {
if (range) {
yield PlacesUtils.history.removeVisitsByFilter({
@@ -427,8 +401,6 @@ Sanitizer.prototype = {
}
} catch (ex) {
seenException = ex;
- } finally {
- TelemetryStopwatch.finish("FX_SANITIZE_HISTORY", refObj);
}
try {
@@ -455,8 +427,6 @@ Sanitizer.prototype = {
formdata: {
clear: Task.async(function* (range) {
let seenException;
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_FORMDATA", refObj);
try {
// Clear undo history of all searchBars
let windows = Services.wm.getEnumerator("navigator:browser");
@@ -504,7 +474,6 @@ Sanitizer.prototype = {
seenException = ex;
}
- TelemetryStopwatch.finish("FX_SANITIZE_FORMDATA", refObj);
if (seenException) {
throw seenException;
}
@@ -513,8 +482,6 @@ Sanitizer.prototype = {
downloads: {
clear: Task.async(function* (range) {
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_DOWNLOADS", refObj);
try {
let filterByTime = null;
if (range) {
@@ -528,16 +495,13 @@ Sanitizer.prototype = {
// Clear all completed/cancelled downloads
let list = yield Downloads.getList(Downloads.ALL);
list.removeFinished(filterByTime);
- } finally {
- TelemetryStopwatch.finish("FX_SANITIZE_DOWNLOADS", refObj);
- }
+ } catch (ex) {
+ }
})
},
sessions: {
clear: Task.async(function* (range) {
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_SESSIONS", refObj);
try {
// clear all auth tokens
@@ -547,17 +511,14 @@ Sanitizer.prototype = {
// clear FTP and plain HTTP auth sessions
Services.obs.notifyObservers(null, "net:clear-active-logins", null);
- } finally {
- TelemetryStopwatch.finish("FX_SANITIZE_SESSIONS", refObj);
- }
+ } catch (ex) {
+ }
})
},
siteSettings: {
clear: Task.async(function* (range) {
let seenException;
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_SITESETTINGS", refObj);
let startDateMS = range ? range[0] / 1000 : null;
@@ -615,7 +576,6 @@ Sanitizer.prototype = {
seenException = ex;
}
- TelemetryStopwatch.finish("FX_SANITIZE_SITESETTINGS", refObj);
if (seenException) {
throw seenException;
}
@@ -672,9 +632,6 @@ Sanitizer.prototype = {
// If/once we get here, we should actually be able to close all windows.
- let refObj = {};
- TelemetryStopwatch.start("FX_SANITIZE_OPENWINDOWS", refObj);
-
// First create a new window. We do this first so that on non-mac, we don't
// accidentally close the app by closing all the windows.
let handler = Cc["@mozilla.org/browser/clh;1"].getService(Ci.nsIBrowserHandler);
@@ -719,7 +676,6 @@ Sanitizer.prototype = {
newWindowOpened = true;
// If we're the last thing to happen, invoke callback.
if (numWindowsClosing == 0) {
- TelemetryStopwatch.finish("FX_SANITIZE_OPENWINDOWS", refObj);
resolve();
}
}
@@ -731,7 +687,6 @@ Sanitizer.prototype = {
Services.obs.removeObserver(onWindowClosed, "xul-window-destroyed");
// If we're the last thing to happen, invoke callback.
if (newWindowOpened) {
- TelemetryStopwatch.finish("FX_SANITIZE_OPENWINDOWS", refObj);
resolve();
}
}
diff --git a/base/content/tabbrowser.xml b/base/content/tabbrowser.xml
index f8dbcf3..76ea5d1 100644
--- a/base/content/tabbrowser.xml
+++ b/base/content/tabbrowser.xml
@@ -1042,11 +1042,6 @@
</body>
</method>
- <!-- Holds a unique ID for the tab change that's currently being timed.
- Used to make sure that multiple, rapid tab switches do not try to
- create overlapping timers. -->
- <field name="_tabSwitchID">null</field>
-
<method name="updateCurrentBrowser">
<parameter name="aForceUpdate"/>
<body>
@@ -1055,33 +1050,6 @@
if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
return;
- if (!aForceUpdate) {
- TelemetryStopwatch.start("FX_TAB_SWITCH_UPDATE_MS");
- if (!gMultiProcessBrowser) {
- // old way of measuring tab paint which is not valid with e10s.
- // Waiting until the next MozAfterPaint ensures that we capture
- // the time it takes to paint, upload the textures to the compositor,
- // and then composite.
- if (this._tabSwitchID) {
- TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_MS");
- }
-
- let tabSwitchID = Symbol();
-
- TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_MS");
- this._tabSwitchID = tabSwitchID;
-
- let onMozAfterPaint = () => {
- if (this._tabSwitchID === tabSwitchID) {
- TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_MS");
- this._tabSwitchID = null;
- }
- window.removeEventListener("MozAfterPaint", onMozAfterPaint);
- }
- window.addEventListener("MozAfterPaint", onMozAfterPaint);
- }
- }
-
var oldTab = this.mCurrentTab;
// Preview mode should not reset the owner
@@ -1274,9 +1242,6 @@
});
this.dispatchEvent(event);
}
-
- if (!aForceUpdate)
- TelemetryStopwatch.finish("FX_TAB_SWITCH_UPDATE_MS");
]]>
</body>
</method>
@@ -4145,8 +4110,6 @@
*/
startTabSwitch: function () {
- TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
- TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
this.addMarker("AsyncTabSwitch:Start");
this.switchInProgress = true;
},
@@ -4162,31 +4125,18 @@
this.getTabState(this.requestedTab) == this.STATE_LOADED) {
// After this point the tab has switched from the content thread's point of view.
// The changes will be visible after the next refresh driver tick + composite.
- let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
- if (time != -1) {
- TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
- this.log("DEBUG: tab switch time = " + time);
this.addMarker("AsyncTabSwitch:Finish");
- }
this.switchInProgress = false;
}
},
spinnerDisplayed: function () {
this.assert(!this.spinnerTab);
- TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
- // We have a second, similar probe for capturing recordings of
- // when the spinner is displayed for very long periods.
- TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
this.addMarker("AsyncTabSwitch:SpinnerShown");
},
spinnerHidden: function () {
this.assert(this.spinnerTab);
- this.log("DEBUG: spinner time = " +
- TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window));
- TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
- TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
this.addMarker("AsyncTabSwitch:SpinnerHidden");
// we do not get a onPaint after displaying the spinner
this.maybeFinishTabSwitch();