зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1269961 - Collect more telemetry on content process crashes (r=jimm,mconley)
This commit is contained in:
Родитель
7b97705614
Коммит
4d99b7209e
|
@ -151,6 +151,7 @@ this.TabCrashHandler = {
|
|||
return
|
||||
|
||||
if (!message.data.sendReport) {
|
||||
Services.telemetry.getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED").add(1);
|
||||
this.prefs.setBoolPref("sendReport", false);
|
||||
return;
|
||||
}
|
||||
|
@ -246,6 +247,12 @@ this.TabCrashHandler = {
|
|||
|
||||
let dumpID = this.getDumpID(browser);
|
||||
if (!dumpID) {
|
||||
// Make sure to only count once even if there are multiple windows
|
||||
// that will all show about:tabcrashed.
|
||||
if (this._crashedTabCount == 1) {
|
||||
Services.telemetry.getHistogramById("FX_CONTENT_CRASH_DUMP_UNAVAILABLE").add(1);
|
||||
}
|
||||
|
||||
message.target.sendAsyncMessage("SetCrashReportAvailable", {
|
||||
hasReport: false,
|
||||
});
|
||||
|
@ -261,10 +268,16 @@ this.TabCrashHandler = {
|
|||
data.email = this.prefs.getCharPref("email", "");
|
||||
}
|
||||
|
||||
// Make sure to only count once even if there are multiple windows
|
||||
// that will all show about:tabcrashed.
|
||||
if (this._crashedTabCount == 1) {
|
||||
Services.telemetry.getHistogramById("FX_CONTENT_CRASH_PRESENTED").add(1);
|
||||
}
|
||||
|
||||
message.target.sendAsyncMessage("SetCrashReportAvailable", data);
|
||||
},
|
||||
|
||||
onAboutTabCrashedUnload: function() {
|
||||
onAboutTabCrashedUnload(message) {
|
||||
if (!this._crashedTabCount) {
|
||||
Cu.reportError("Can not decrement crashed tab count to below 0");
|
||||
return;
|
||||
|
@ -278,7 +291,16 @@ this.TabCrashHandler = {
|
|||
this.pageListener.sendAsyncMessage("UpdateCount", {
|
||||
count: this._crashedTabCount,
|
||||
});
|
||||
},
|
||||
|
||||
let browser = message.target.browser;
|
||||
let childID = this.browserMap.get(browser.permanentKey);
|
||||
|
||||
// Make sure to only count once even if there are multiple windows
|
||||
// that will all show about:tabcrashed.
|
||||
if (this._crashedTabCount == 0 && childID) {
|
||||
Services.telemetry.getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED").add(1);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* For some <xul:browser>, return a crash report dump ID for that browser
|
||||
|
|
|
@ -3545,6 +3545,8 @@ ContentParent::ForceKillTimerCallback(nsITimer* aTimer, void* aClosure)
|
|||
self->KillHard("ShutDownKill");
|
||||
}
|
||||
|
||||
// WARNING: aReason appears in telemetry, so any new value passed in requires
|
||||
// data review.
|
||||
void
|
||||
ContentParent::KillHard(const char* aReason)
|
||||
{
|
||||
|
@ -3575,11 +3577,6 @@ ContentParent::KillHard(const char* aReason)
|
|||
crashReporter->AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("additional_minidumps"),
|
||||
additionalDumps);
|
||||
if (IsKillHardAnnotationSet()) {
|
||||
crashReporter->AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("kill_hard"),
|
||||
GetKillHardAnnotation());
|
||||
}
|
||||
nsDependentCString reason(aReason);
|
||||
crashReporter->AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("ipc_channel_error"),
|
||||
|
@ -3587,6 +3584,8 @@ ContentParent::KillHard(const char* aReason)
|
|||
|
||||
// Generate the report and insert into the queue for submittal.
|
||||
mCreatedPairedMinidumps = crashReporter->GenerateCompleteMinidump(this);
|
||||
|
||||
Telemetry::Accumulate(Telemetry::SUBPROCESS_KILL_HARD, reason, 1);
|
||||
}
|
||||
#endif
|
||||
ProcessHandle otherProcessHandle;
|
||||
|
|
|
@ -340,22 +340,12 @@ public:
|
|||
* Kill our subprocess and make sure it dies. Should only be used
|
||||
* in emergency situations since it bypasses the normal shutdown
|
||||
* process.
|
||||
*
|
||||
* WARNING: aReason appears in telemetry, so any new value passed in requires
|
||||
* data review.
|
||||
*/
|
||||
void KillHard(const char* aWhy);
|
||||
|
||||
/**
|
||||
* API for adding a crash reporter annotation that provides a reason
|
||||
* for a listener request to abort the child.
|
||||
*/
|
||||
bool IsKillHardAnnotationSet() const { return mKillHardAnnotation.IsEmpty(); }
|
||||
|
||||
const nsCString& GetKillHardAnnotation() const { return mKillHardAnnotation; }
|
||||
|
||||
void SetKillHardAnnotation(const nsACString& aReason)
|
||||
{
|
||||
mKillHardAnnotation = aReason;
|
||||
}
|
||||
|
||||
ContentParentId ChildID() const override { return mChildID; }
|
||||
|
||||
const nsString& AppManifestURL() const { return mAppManifestURL; }
|
||||
|
|
|
@ -10633,5 +10633,38 @@
|
|||
"n_buckets": 20,
|
||||
"keyed": true,
|
||||
"description": "Tracking how long a Worker thread is blocked when a sync operation is executed on the main-thread."
|
||||
},
|
||||
"SUBPROCESS_KILL_HARD": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
"bug_numbers": [1269961],
|
||||
"expires_in_version": "never",
|
||||
"kind": "count",
|
||||
"keyed": true,
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Counts the number of times a subprocess was forcibly killed, and the reason."
|
||||
},
|
||||
"FX_CONTENT_CRASH_DUMP_UNAVAILABLE": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
"bug_numbers": [1269961],
|
||||
"expires_in_version": "never",
|
||||
"kind": "count",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Counts the number of times that about:tabcrashed was unable to find a crash dump."
|
||||
},
|
||||
"FX_CONTENT_CRASH_PRESENTED": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
"bug_numbers": [1269961],
|
||||
"expires_in_version": "never",
|
||||
"kind": "count",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Counts the number of times that about:tabcrashed appeared and found a crash dump."
|
||||
},
|
||||
"FX_CONTENT_CRASH_NOT_SUBMITTED": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
"bug_numbers": [1269961],
|
||||
"expires_in_version": "never",
|
||||
"kind": "count",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Counts the number of times that about:tabcrashed was unloaded without submitting."
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче