mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 808003 - Add a few telemetry probes to help tune tab zombification parameters. r=gcp, mfinkle
This commit is contained in:
parent
ebecbf3dd0
commit
9ae84007cb
@ -7609,12 +7609,13 @@ var MemoryObserver = {
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
if (tabs[i] != selected) {
|
||||
this.zombify(tabs[i]);
|
||||
Telemetry.addData("FENNEC_TAB_ZOMBIFIED", (Date.now() - tabs[i].lastTouchedAt) / 1000);
|
||||
}
|
||||
}
|
||||
Telemetry.addData("FENNEC_LOWMEM_TAB_COUNT", tabs.length);
|
||||
},
|
||||
|
||||
zombify: function(tab) {
|
||||
dump("Zombifying tab at index [" + tab.id + "]");
|
||||
let browser = tab.browser;
|
||||
let data = browser.__SS_data;
|
||||
let extra = browser.__SS_extdata;
|
||||
@ -7771,8 +7772,10 @@ var Tabs = {
|
||||
}
|
||||
// if the tab was last touched more than browser.tabs.expireTime seconds ago,
|
||||
// zombify it
|
||||
if (lruTab && (Date.now() - lruTab.lastTouchedAt) > expireTimeMs) {
|
||||
let tabAgeMs = Date.now() - lruTab.lastTouchedAt;
|
||||
if (lruTab && tabAgeMs > expireTimeMs) {
|
||||
MemoryObserver.zombify(lruTab);
|
||||
Telemetry.addData("FENNEC_TAB_EXPIRED", tabAgeMs / 1000);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -2309,6 +2309,13 @@
|
||||
"description": "Fennec: Time for the Awesomebar Top Sites query to return with no filter set (ms)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_LOWMEM_TAB_COUNT": {
|
||||
"kind": "exponential",
|
||||
"high": 100,
|
||||
"n_buckets": 30,
|
||||
"description": "How many tabs were open when a low-memory event was received",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_RESTORING_ACTIVITY": {
|
||||
"kind": "flag",
|
||||
"description": "Fennec is starting up but the Gecko thread was still running",
|
||||
@ -2344,6 +2351,22 @@
|
||||
"description": "The way the GeckoApp was launched. (Normal, URL, Prefetch, Redirector)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_TAB_EXPIRED": {
|
||||
"kind": "exponential",
|
||||
"low": 10,
|
||||
"high": 604800,
|
||||
"n_buckets": 20,
|
||||
"description": "How long (in seconds) a tab was inactive before it was expired",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_TAB_ZOMBIFIED": {
|
||||
"kind": "exponential",
|
||||
"low": 10,
|
||||
"high": 1000000,
|
||||
"n_buckets": 20,
|
||||
"description": "How long (in seconds) a tab was inactive when it was OOM-zombified",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_WAS_KILLED": {
|
||||
"kind": "flag",
|
||||
"description": "Killed, likely due to an OOM condition",
|
||||
|
Loading…
Reference in New Issue
Block a user