mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset d19ad724c64c (bug 1198209) for test failures in browser_aboutHealthReport.js
This commit is contained in:
parent
fabcab60bc
commit
a3ed6269b1
@ -477,16 +477,6 @@
|
||||
"bug_numbers": [1226196],
|
||||
"description": "Resident memory size (KB)"
|
||||
},
|
||||
"MEMORY_TOTAL": {
|
||||
"alert_emails": ["memshrink-telemetry-alerts@mozilla.com"],
|
||||
"bug_numbers": [1198209],
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"low": "32 * 1024",
|
||||
"high": "16 * 1024 * 1024",
|
||||
"n_buckets": 100,
|
||||
"description": "Total Memory Across All Processes (KB)"
|
||||
},
|
||||
"MEMORY_UNIQUE": {
|
||||
"alert_emails": ["memshrink-telemetry-alerts@mozilla.com"],
|
||||
"bug_numbers": [1198209],
|
||||
|
@ -58,8 +58,6 @@ const PREF_UNIFIED = PREF_BRANCH + "unified";
|
||||
|
||||
const MESSAGE_TELEMETRY_PAYLOAD = "Telemetry:Payload";
|
||||
const MESSAGE_TELEMETRY_GET_CHILD_PAYLOAD = "Telemetry:GetChildPayload";
|
||||
const MESSAGE_TELEMETRY_USS = "Telemetry:USS";
|
||||
const MESSAGE_TELEMETRY_GET_CHILD_USS = "Telemetry:GetChildUSS";
|
||||
|
||||
const DATAREPORTING_DIRECTORY = "datareporting";
|
||||
const ABORTED_SESSION_FILE_NAME = "aborted-session-ping";
|
||||
@ -96,9 +94,6 @@ const ABORTED_SESSION_UPDATE_INTERVAL_MS = 5 * 60 * 1000;
|
||||
|
||||
const TOPIC_CYCLE_COLLECTOR_BEGIN = "cycle-collector-begin";
|
||||
|
||||
// How long to wait in millis for all the child memory reports to come in
|
||||
const TOTAL_MEMORY_COLLECTOR_TIMEOUT = 200;
|
||||
|
||||
var gLastMemoryPoll = null;
|
||||
|
||||
var gWasDebuggerAttached = false;
|
||||
@ -671,15 +666,6 @@ var Impl = {
|
||||
_delayedInitTask: null,
|
||||
// The deferred promise resolved when the initialization task completes.
|
||||
_delayedInitTaskDeferred: null,
|
||||
// Need a timeout in case children are tardy in giving back their memory reports.
|
||||
_totalMemoryTimeout: undefined,
|
||||
// An accumulator of total memory across all processes. Only valid once the final child reports.
|
||||
_totalMemory: null,
|
||||
// A Set of outstanding USS report ids
|
||||
_childrenToHearFrom: null,
|
||||
// monotonically-increasing id for USS reports
|
||||
_nextTotalMemoryId: 1,
|
||||
|
||||
|
||||
get _log() {
|
||||
if (!this._logger) {
|
||||
@ -1070,32 +1056,6 @@ var Impl = {
|
||||
c("GHOST_WINDOWS", "ghostWindows");
|
||||
cc("PAGE_FAULTS_HARD", "pageFaultsHard");
|
||||
|
||||
if (!Utils.isContentProcess && !this._totalMemoryTimeout) {
|
||||
// Only the chrome process should gather total memory
|
||||
// total = parent RSS + sum(child USS)
|
||||
this._totalMemory = mgr.residentFast;
|
||||
if (ppmm.childCount > 1) {
|
||||
// Do not report If we time out waiting for the children to call
|
||||
this._totalMemoryTimeout = setTimeout(
|
||||
() => {
|
||||
this._totalMemoryTimeout = undefined;
|
||||
this._childrenToHearFrom.clear();
|
||||
},
|
||||
TOTAL_MEMORY_COLLECTOR_TIMEOUT);
|
||||
this._childrenToHearFrom = new Set();
|
||||
for (let i = 1; i < ppmm.childCount; i++) {
|
||||
ppmm.getChildAt(i).sendAsyncMessage(MESSAGE_TELEMETRY_GET_CHILD_USS, {id: _nextTotalMemoryId});
|
||||
this._childrenToHearFrom.add(_nextTotalMemoryId);
|
||||
_nextTotalMemoryId++;
|
||||
}
|
||||
} else {
|
||||
boundHandleMemoryReport(
|
||||
"MEMORY_TOTAL",
|
||||
Ci.nsIMemoryReporter.UNITS_BYTES,
|
||||
this._totalMemory);
|
||||
}
|
||||
}
|
||||
|
||||
histogram.add(new Date() - startTime);
|
||||
},
|
||||
|
||||
@ -1377,7 +1337,6 @@ var Impl = {
|
||||
this._hasXulWindowVisibleObserver = true;
|
||||
|
||||
ppml.addMessageListener(MESSAGE_TELEMETRY_PAYLOAD, this);
|
||||
ppml.addMessageListener(MESSAGE_TELEMETRY_USS, this);
|
||||
|
||||
// Delay full telemetry initialization to give the browser time to
|
||||
// run various late initializers. Otherwise our gathered memory
|
||||
@ -1443,7 +1402,6 @@ var Impl = {
|
||||
|
||||
Services.obs.addObserver(this, "content-child-shutdown", false);
|
||||
cpml.addMessageListener(MESSAGE_TELEMETRY_GET_CHILD_PAYLOAD, this);
|
||||
cpml.addMessageListener(MESSAGE_TELEMETRY_GET_CHILD_USS, this);
|
||||
|
||||
this.gatherStartupHistograms();
|
||||
|
||||
@ -1503,28 +1461,6 @@ var Impl = {
|
||||
this.sendContentProcessPing("saved-session");
|
||||
break;
|
||||
}
|
||||
case MESSAGE_TELEMETRY_USS:
|
||||
{
|
||||
if (this._totalMemoryTimeout && this._childrenToHearFrom.delete(message.data.id)) {
|
||||
this._totalMemory += message.data.bytes;
|
||||
if (this._childrenToHearFrom.size == 0) {
|
||||
clearTimeout(this._totalMemoryTimeout);
|
||||
this._totalMemoryTimeout = undefined;
|
||||
this.handleMemoryReport(
|
||||
"MEMORY_TOTAL",
|
||||
Ci.nsIMemoryReporter.UNITS_BYTES,
|
||||
this._totalMemory);
|
||||
}
|
||||
} else {
|
||||
this._log.trace("Child USS report was missed");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MESSAGE_TELEMETRY_GET_CHILD_USS:
|
||||
{
|
||||
this.sendContentProcessUSS(message.data.id);
|
||||
break
|
||||
}
|
||||
default:
|
||||
throw new Error("Telemetry.receiveMessage: bad message name");
|
||||
}
|
||||
@ -1532,24 +1468,6 @@ var Impl = {
|
||||
|
||||
_processUUID: generateUUID(),
|
||||
|
||||
sendContentProcessUSS: function sendContentProcessUSS(aMessageId) {
|
||||
this._log.trace("sendContentProcessUSS");
|
||||
|
||||
let mgr;
|
||||
try {
|
||||
mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
|
||||
getService(Ci.nsIMemoryReporterManager);
|
||||
} catch (e) {
|
||||
// OK to skip memory reporters in xpcshell
|
||||
return;
|
||||
}
|
||||
|
||||
cpmm.sendAsyncMessage(
|
||||
MESSAGE_TELEMETRY_USS,
|
||||
{bytes: mgr.residentUnique, id: aMessageId}
|
||||
);
|
||||
},
|
||||
|
||||
sendContentProcessPing: function sendContentProcessPing(reason) {
|
||||
this._log.trace("sendContentProcessPing - Reason " + reason);
|
||||
const isSubsession = !this._isClassicReason(reason);
|
||||
|
Loading…
Reference in New Issue
Block a user