Bug 1601091 - gfx.status.compositor is NULL in an unexpectedly frequent number of pings. r=chutten
authorKris Taeleman <ktaeleman@mozilla.com>
Fri, 13 Dec 2019 21:08:28 +0000
changeset 507301 559f8162e4a490d647f7ff199ac875564825a9b0
parent 507300 3d08c3cce53325d6623178e60d1ca5d38b4721c5
child 507302 bb65f13df2ffb99efa6576641e83d89db9ccd98b
push id103348
push userktaeleman@mozilla.com
push dateMon, 16 Dec 2019 21:35:33 +0000
treeherderautoland@559f8162e4a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1601091
milestone73.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 1601091 - gfx.status.compositor is NULL in an unexpectedly frequent number of pings. r=chutten * Duplicate gfx.compositor and gfx.adapter.device_id with last_seen versions that have a 'user' lifetime to temporarily work around telemetry null string issues. * Fix linting warnings Differential Revision: https://phabricator.services.mozilla.com/D57143
gfx/thebes/gfxPlatform.cpp
toolkit/components/telemetry/Scalars.yaml
toolkit/components/telemetry/geckoview/streaming/metrics.yaml
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -1144,16 +1144,20 @@ void gfxPlatform::ReportTelemetry() {
   gfxInfo->GetAdapterVendorID(adapterVendorId);
   Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_VENDOR_ID,
                        adapterVendorId);
 
   nsString adapterDeviceId;
   gfxInfo->GetAdapterDeviceID(adapterDeviceId);
   Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DEVICE_ID,
                        adapterDeviceId);
+  // Temporary workaround for bug 1601091, should be removed once telemetry
+  // issue is fixed.
+  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DEVICE_ID_LAST_SEEN,
+                       adapterDeviceId);
 
   nsString adapterSubsystemId;
   gfxInfo->GetAdapterSubsysID(adapterSubsystemId);
   Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_SUBSYSTEM_ID,
                        adapterSubsystemId);
 
   uint32_t adapterRam = 0;
   gfxInfo->GetAdapterRAM(&adapterRam);
@@ -3797,16 +3801,22 @@ void gfxPlatform::NotifyCompositorCreate
 
   // Set the backend before we notify so it's available immediately.
   mCompositorBackend = aBackend;
 
   if (XRE_IsParentProcess()) {
     Telemetry::ScalarSet(
         Telemetry::ScalarID::GFX_COMPOSITOR,
         NS_ConvertUTF8toUTF16(GetLayersBackendName(mCompositorBackend)));
+
+    // Temporary workaround for bug 1601091, should be removed once telemetry
+    // issue is fixed.
+    Telemetry::ScalarSet(
+        Telemetry::ScalarID::GFX_COMPOSITOR_LAST_SEEN,
+        NS_ConvertUTF8toUTF16(GetLayersBackendName(mCompositorBackend)));
   }
 
   // Notify that we created a compositor, so telemetry can update.
   NS_DispatchToMainThread(
       NS_NewRunnableFunction("gfxPlatform::NotifyCompositorCreated", [] {
         if (nsCOMPtr<nsIObserverService> obsvc =
                 services::GetObserverService()) {
           obsvc->NotifyObservers(nullptr, "compositor:created", nullptr);
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -2873,16 +2873,32 @@ gfx.adapter:
     notification_emails:
       - gfx-telemetry-alerts@mozilla.com
       - ktaeleman@mozilla.com
     products:
       - 'geckoview_streaming'
     record_in_processes:
       - 'main'
     release_channel_collection: opt-out
+  device_id_last_seen:
+    bug_numbers:
+      - 1601091
+    description: >
+      Graphics adapter device identification
+      This is a temporary workaround for some early telemetry system issues. See Bug 1601091 for more information
+    expires: "74"
+    kind: string
+    notification_emails:
+      - gfx-telemetry-alerts@mozilla.com
+      - ktaeleman@mozilla.com
+    products:
+      - 'geckoview_streaming'
+    record_in_processes:
+      - 'main'
+    release_channel_collection: opt-out
   subsystem_id:
     bug_numbers:
       - 1594145
     description: >
       Graphics adapter subsystem identification
     expires: never
     kind: string
     notification_emails:
@@ -2979,16 +2995,32 @@ gfx:
     notification_emails:
       - gfx-telemetry-alerts@mozilla.com
       - ktaeleman@mozilla.com
     products:
       - 'geckoview_streaming'
     record_in_processes:
       - 'main'
     release_channel_collection: opt-out
+  compositor_last_seen:
+    bug_numbers:
+      - 1601091
+    description: >
+      Name of the graphics compositor in use. possible values are "opengl, d3d11, client, webrender or basic".
+      This is a temporary workaround for some early telemetry system issues. See Bug 1601091 for more information
+    expires: "74"
+    kind: string
+    notification_emails:
+      - gfx-telemetry-alerts@mozilla.com
+      - ktaeleman@mozilla.com
+    products:
+      - 'geckoview_streaming'
+    record_in_processes:
+      - 'main'
+    release_channel_collection: opt-out
   headless:
     bug_numbers:
       - 1594145
     description: >
       Boolean indicated whether graphics is running in headless (no display) mode
     expires: never
     kind: boolean
     notification_emails:
--- a/toolkit/components/telemetry/geckoview/streaming/metrics.yaml
+++ b/toolkit/components/telemetry/geckoview/streaming/metrics.yaml
@@ -500,16 +500,31 @@ gfx.adapter.primary:
     bugs:
       - 1594145
     data_reviews:
       - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
     notification_emails:
       - gfx-telemetry-alerts@mozilla.com
       - ktaeleman@mozilla.com
     expires: never
+  device_id_last_seen:
+    description: >
+      Graphics adapter device identification last seen
+      This is a temporary workaround for some early telemetry system issues. See Bug 1601091 for more information
+    type: string
+    lifetime: user
+    gecko_datapoint: gfx.adapter.device_id_last_seen
+    bugs:
+      - 1601091
+    data_reviews:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
+    notification_emails:
+      - gfx-telemetry-alerts@mozilla.com
+      - ktaeleman@mozilla.com
+    expires: "2020-02-01"
   subsystem_id:
     description: >
       Graphics adapter subsystem identification
     type: string
     lifetime: application
     gecko_datapoint: gfx.adapter.subsystem_id
     bugs:
       - 1594145
@@ -601,16 +616,31 @@ gfx.status:
     bugs:
       - 1594145
     data_reviews:
       - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
     notification_emails:
       - gfx-telemetry-alerts@mozilla.com
       - ktaeleman@mozilla.com
     expires: never
+  compositor_last_seen:
+    description: >
+      Name of the graphics compositor last seen in use. possible values are "opengl, d3d11, client, webrender or basic"
+      This is a temporary workaround for some early telemetry system issues. See Bug 1601091 for more information
+    type: string
+    lifetime: user
+    gecko_datapoint: gfx.compositor_last_seen
+    bugs:
+      - 1601091
+    data_reviews:
+      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
+    notification_emails:
+      - gfx-telemetry-alerts@mozilla.com
+      - ktaeleman@mozilla.com
+    expires: "2020-02-01"
   headless:
     description: >
       Boolean indicated whether graphics is running in headless (no display) mode
     type: boolean
     lifetime: application
     gecko_datapoint: gfx.headless
     bugs:
       - 1594145