Bug 1370215 - Add the AsyncShutdownTimeout and ShutdownProgress annotations to the crash ping sent via the crashreporter client; r=ted
authorGabriele Svelto <gsvelto@mozilla.com>
Mon, 05 Jun 2017 14:50:44 +0200
changeset 410611 01baa0629d259266ac5d5c7826e5bb8fb965e232
parent 410610 278354d1b831c0f3c89e46f7638f95fbb868a240
child 410612 7d7a141c99e72ca7b486f5408c7d926803a0a7a7
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1370215
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370215 - Add the AsyncShutdownTimeout and ShutdownProgress annotations to the crash ping sent via the crashreporter client; r=ted This also removes the TelemetrySessionId field from the whitelist because that field is already manually stripped and moved into the ping's root node. Putting it in the whitelist is redundant. MozReview-Commit-ID: B3WAyCSHoyR
toolkit/components/telemetry/docs/data/crash-ping.rst
toolkit/crashreporter/client/ping.cpp
--- a/toolkit/components/telemetry/docs/data/crash-ping.rst
+++ b/toolkit/components/telemetry/docs/data/crash-ping.rst
@@ -40,29 +40,31 @@ Structure:
         processType: <type>, // Type of process that crashed, see below for a list of types
         stackTraces: { ... }, // Optional, see below
         metadata: { // Annotations saved while Firefox was running. See nsExceptionHandler.cpp for more information
           ProductID: "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
           ProductName: "Firefox",
           ReleaseChannel: <channel>,
           Version: <version number>,
           BuildID: "YYYYMMDDHHMMSS",
+          AsyncShutdownTimeout: <json>, // Optional, present when a shutdown blocker failed to respond within a reasonable amount of time
           AvailablePageFile: <size>, // Windows-only, available paging file
           AvailablePhysicalMemory: <size>, // Windows-only, available physical memory
           AvailableVirtualMemory: <size>, // Windows-only, available virtual memory
           BlockedDllList: <list>, // Windows-only, see WindowsDllBlocklist.cpp for details
           BlocklistInitFailed: 1, // Windows-only, present only if the DLL blocklist initialization failed
           CrashTime: <time>, // Seconds since the Epoch
           ContainsMemoryReport: 1, // Optional
           EventLoopNestingLevel: <levels>, // Optional, present only if >0
           IsGarbageCollecting: 1, // Optional, present only if set to 1
           MozCrashReason: <reason>, // Optional, contains the string passed to MOZ_CRASH()
           OOMAllocationSize: <size>, // Size of the allocation that caused an OOM
           RemoteType: <type>, // Optional, type of content process, see below for a list of types
           SecondsSinceLastCrash: <duration>, // Seconds elapsed since the last crash occurred
+          ShutdownProgress: <phase>, // Optional, contains the shutdown phase in which the crash occurred
           SystemMemoryUsePercentage: <percentage>, // Windows-only, percent of memory in use
           TelemetrySessionId: <id>, // Active telemetry session ID when the crash was recorded
           TextureUsage: <usage>, // Optional, usage of texture memory in bytes
           TotalPageFile: <size>, // Windows-only, paging file in use
           TotalPhysicalMemory: <size>, // Windows-only, physical memory in use
           TotalVirtualMemory: <size>, // Windows-only, virtual memory in use
           UptimeTS: <duration>, // Seconds since Firefox was started
           User32BeforeBlocklist: 1, // Windows-only, present only if user32.dll was loaded before the DLL blocklist has been initialized
--- a/toolkit/crashreporter/client/ping.cpp
+++ b/toolkit/crashreporter/client/ping.cpp
@@ -117,16 +117,17 @@ const int  kTelemetryVersion     = 4;
 
 // Create the payload.metadata node of the crash ping using fields extracted
 // from the .extra file
 static Json::Value
 CreateMetadataNode(StringTable& strings)
 {
   // The following list should be kept in sync with the one in CrashManager.jsm
   const char *entries[] = {
+    "AsyncShutdownTimeout",
     "AvailablePageFile",
     "AvailablePhysicalMemory",
     "AvailableVirtualMemory",
     "BlockedDllList",
     "BlocklistInitFailed",
     "BuildID",
     "ContainsMemoryReport",
     "CrashTime",
@@ -134,19 +135,19 @@ CreateMetadataNode(StringTable& strings)
     "IsGarbageCollecting",
     "MozCrashReason",
     "OOMAllocationSize",
     "ProductID",
     "ProductName",
     "ReleaseChannel",
     "RemoteType",
     "SecondsSinceLastCrash",
+    "ShutdownProgress",
     "StartupCrash",
     "SystemMemoryUsePercentage",
-    "TelemetrySessionId",
     "TextureUsage",
     "TotalPageFile",
     "TotalPhysicalMemory",
     "TotalVirtualMemory",
     "UptimeTS",
     "User32BeforeBlocklist",
     "Version",
   };