Bug 1956726 - Migrate histograms to use Glean APIs in gfx/, r=chutten,jgilbert,firefox-desktop-core-reviewers ,mconley.
Differential Revision: https://phabricator.services.mozilla.com/D242765
This commit is contained in:
@@ -1849,9 +1849,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
_firstWindowTelemetry(aWindow) {
|
||||
let scaling = aWindow.devicePixelRatio * 100;
|
||||
try {
|
||||
Services.telemetry.getHistogramById("DISPLAY_SCALING").add(scaling);
|
||||
} catch (ex) {}
|
||||
Glean.gfxDisplay.scaling.accumulateSingleSample(scaling);
|
||||
},
|
||||
|
||||
_collectStartupConditionsTelemetry() {
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "mozilla/StaticPrefs_media.h"
|
||||
#include "mozilla/RemoteDecoderManagerChild.h"
|
||||
#include "mozilla/RemoteDecoderManagerParent.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/gfx/gfxVars.h"
|
||||
#include "mozilla/gfx/GPUChild.h"
|
||||
@@ -778,7 +777,7 @@ void GPUProcessManager::NotifyWebRenderError(wr::WebRenderError aError) {
|
||||
/* static */
|
||||
void GPUProcessManager::RecordDeviceReset(DeviceResetReason aReason) {
|
||||
if (aReason != DeviceResetReason::FORCED_RESET) {
|
||||
Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON, uint32_t(aReason));
|
||||
glean::gfx::device_reset_reason.AccumulateSingleSample(uint32_t(aReason));
|
||||
}
|
||||
|
||||
CrashReporter::RecordAnnotationU32(
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "mozilla/layers/ScreenshotGrabber.h"
|
||||
#include "mozilla/layers/SurfacePoolCA.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "mozilla/webrender/RenderMacIOSurfaceTextureHost.h"
|
||||
#include "ScopedGLHelpers.h"
|
||||
|
||||
@@ -55,47 +55,67 @@ using gl::GLContext;
|
||||
using gl::GLContextCGL;
|
||||
#endif
|
||||
|
||||
static Maybe<Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER>
|
||||
VideoLowPowerTypeToTelemetryType(VideoLowPowerType aVideoLowPower) {
|
||||
static void EmitTelemetryForVideoLowPower(VideoLowPowerType aVideoLowPower) {
|
||||
switch (aVideoLowPower) {
|
||||
case VideoLowPowerType::NotVideo:
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eNotvideo)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::LowPower:
|
||||
return Some(Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::LowPower);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eLowpower)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailMultipleVideo:
|
||||
return Some(
|
||||
Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailMultipleVideo);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailmultiplevideo)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailWindowed:
|
||||
return Some(Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailWindowed);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailwindowed)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailOverlaid:
|
||||
return Some(Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailOverlaid);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailoverlaid)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailBacking:
|
||||
return Some(Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailBacking);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailbacking)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailMacOSVersion:
|
||||
return Some(
|
||||
Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailMacOSVersion);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailmacosversion)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailPref:
|
||||
return Some(Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailPref);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailpref)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailSurface:
|
||||
return Some(Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailSurface);
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailsurface)
|
||||
.Add();
|
||||
return;
|
||||
|
||||
case VideoLowPowerType::FailEnqueue:
|
||||
return Some(Telemetry::LABELS_GFX_MACOS_VIDEO_LOW_POWER::FailEnqueue);
|
||||
|
||||
default:
|
||||
return Nothing();
|
||||
}
|
||||
}
|
||||
|
||||
static void EmitTelemetryForVideoLowPower(VideoLowPowerType aVideoLowPower) {
|
||||
auto telemetryValue = VideoLowPowerTypeToTelemetryType(aVideoLowPower);
|
||||
if (telemetryValue.isSome()) {
|
||||
Telemetry::AccumulateCategorical(telemetryValue.value());
|
||||
glean::gfx::macos_video_low_power
|
||||
.EnumGet(glean::gfx::MacosVideoLowPowerLabel::eFailenqueue)
|
||||
.Add();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1626,7 +1626,7 @@ nsEventStatus AsyncPanZoomController::OnScaleBegin(
|
||||
}
|
||||
|
||||
SetState(PINCHING);
|
||||
Telemetry::Accumulate(Telemetry::APZ_ZOOM_PINCHSOURCE, (int)aEvent.mSource);
|
||||
glean::apz_zoom::pinchsource.AccumulateSingleSample((int)aEvent.mSource);
|
||||
SetVelocityVector(ParentLayerPoint(0, 0));
|
||||
RecursiveMutexAutoLock lock(mRecursiveMutex);
|
||||
mLastZoomFocus =
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc
|
||||
#include "nsIWidget.h" // for nsIWidget
|
||||
#include "nsThreadUtils.h" // for NS_IsMainThread
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "mozilla/VsyncDispatcher.h"
|
||||
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
|
||||
# include "VsyncSource.h"
|
||||
@@ -274,9 +274,8 @@ void CompositorVsyncScheduler::Composite(const VsyncEvent& aVsyncEvent,
|
||||
mVsyncNotificationsSkipped = 0;
|
||||
|
||||
TimeDuration compositeFrameTotal = TimeStamp::Now() - aVsyncEvent.mTime;
|
||||
mozilla::Telemetry::Accumulate(
|
||||
mozilla::Telemetry::COMPOSITE_FRAME_ROUNDTRIP_TIME,
|
||||
compositeFrameTotal.ToMilliseconds());
|
||||
mozilla::glean::gfx::composite_frame_roundtrip_time.AccumulateRawDuration(
|
||||
compositeFrameTotal);
|
||||
} else if (mVsyncNotificationsSkipped++ >
|
||||
StaticPrefs::gfx_vsync_compositor_unobserve_count_AtStartup()) {
|
||||
UnobserveVsync();
|
||||
|
||||
@@ -2574,18 +2574,6 @@ void WebRenderBridgeParent::NotifyDidSceneBuild(
|
||||
wr::RenderReasons::SCENE, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static Telemetry::HistogramID GetHistogramId(const bool aIsLargePaint,
|
||||
const bool aIsFullDisplayList) {
|
||||
const Telemetry::HistogramID histogramIds[] = {
|
||||
Telemetry::CONTENT_SMALL_PAINT_PHASE_WEIGHT_PARTIAL,
|
||||
Telemetry::CONTENT_LARGE_PAINT_PHASE_WEIGHT_PARTIAL,
|
||||
Telemetry::CONTENT_SMALL_PAINT_PHASE_WEIGHT_FULL,
|
||||
Telemetry::CONTENT_LARGE_PAINT_PHASE_WEIGHT_FULL,
|
||||
};
|
||||
|
||||
return histogramIds[(aIsFullDisplayList * 2) + aIsLargePaint];
|
||||
}
|
||||
|
||||
static void RecordPaintPhaseTelemetry(wr::RendererStats* aStats) {
|
||||
if (!aStats || !aStats->full_paint) {
|
||||
return;
|
||||
@@ -2611,8 +2599,23 @@ static void RecordPaintPhaseTelemetry(wr::RendererStats* aStats) {
|
||||
|
||||
auto RecordKey = [&](const nsCString& aKey, const double aTimeMs) -> void {
|
||||
const auto val = static_cast<uint32_t>(AsPercentage(aTimeMs));
|
||||
const auto histogramId = GetHistogramId(isLargePaint, isFullDisplayList);
|
||||
Telemetry::Accumulate(histogramId, aKey, val);
|
||||
if (isFullDisplayList) {
|
||||
if (isLargePaint) {
|
||||
glean::gfx_content::large_paint_phase_weight_full.Get(aKey)
|
||||
.AccumulateSingleSample(val);
|
||||
} else {
|
||||
glean::gfx_content::small_paint_phase_weight_full.Get(aKey)
|
||||
.AccumulateSingleSample(val);
|
||||
}
|
||||
} else {
|
||||
if (isLargePaint) {
|
||||
glean::gfx_content::large_paint_phase_weight_partial.Get(aKey)
|
||||
.AccumulateSingleSample(val);
|
||||
} else {
|
||||
glean::gfx_content::small_paint_phase_weight_partial.Get(aKey)
|
||||
.AccumulateSingleSample(val);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
RecordKey("dl"_ns, geckoDL);
|
||||
|
||||
390
gfx/metrics.yaml
390
gfx/metrics.yaml
@@ -440,6 +440,205 @@ gfx:
|
||||
expires: never
|
||||
telemetry_mirror: GFX_SUPPORTS_HDR
|
||||
|
||||
composite_swap_time:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
Time to do swap/present/commit in 100 microseconds
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry
|
||||
exponential histogram COMPOSITE_SWAP_TIME.
|
||||
range_min: 1
|
||||
range_max: 1000
|
||||
bucket_count: 50
|
||||
histogram_type: exponential
|
||||
unit: 100 microseconds
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1612511
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1612511
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- jmuizelaar@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: COMPOSITE_SWAP_TIME
|
||||
|
||||
composite_frame_roundtrip_time:
|
||||
type: timing_distribution
|
||||
description: >
|
||||
Time from vsync to finishing a composite in milliseconds.
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry
|
||||
exponential histogram COMPOSITE_FRAME_ROUNDTRIP_TIME.
|
||||
time_unit: millisecond
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: COMPOSITE_FRAME_ROUNDTRIP_TIME
|
||||
|
||||
device_reset_reason:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
GPU Device Reset Reason (ok, hung, removed, reset, internal error, invalid
|
||||
call, out of memory)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry enumerated
|
||||
histogram DEVICE_RESET_REASON.
|
||||
range_min: 0
|
||||
range_max: 10
|
||||
bucket_count: 11
|
||||
histogram_type: linear
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1135408
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1529352
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1135408
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1529352
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: DEVICE_RESET_REASON
|
||||
|
||||
forced_device_reset_reason:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
GPU Forced Device Reset Reason (OpenSharedHandle)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry enumerated
|
||||
histogram FORCED_DEVICE_RESET_REASON.
|
||||
range_min: 0
|
||||
range_max: 50
|
||||
bucket_count: 51
|
||||
histogram_type: linear
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1235407
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1235407
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: FORCED_DEVICE_RESET_REASON
|
||||
|
||||
graphics_driver_startup_test:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
Reports whether or not graphics drivers crashed during startup.
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry enumerated
|
||||
histogram GRAPHICS_DRIVER_STARTUP_TEST.
|
||||
range_min: 0
|
||||
range_max: 20
|
||||
bucket_count: 21
|
||||
histogram_type: linear
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: GRAPHICS_DRIVER_STARTUP_TEST
|
||||
|
||||
content_failed_to_acquire_device:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
Failed to create a gfx content device. 0=content d3d11, 1=image d3d11,
|
||||
2=d2d1.
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry enumerated
|
||||
histogram GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE.
|
||||
range_min: 0
|
||||
range_max: 6
|
||||
bucket_count: 7
|
||||
histogram_type: linear
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE
|
||||
|
||||
crash:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
Graphics Crash Reason (...)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry enumerated
|
||||
histogram GFX_CRASH.
|
||||
range_min: 0
|
||||
range_max: 100
|
||||
bucket_count: 101
|
||||
histogram_type: linear
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: GFX_CRASH
|
||||
|
||||
macos_video_low_power:
|
||||
type: labeled_counter
|
||||
description: >
|
||||
MacOS video low power state achieved when enqueueing a video frame.
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry
|
||||
categorical histogram GFX_MACOS_VIDEO_LOW_POWER.
|
||||
labels:
|
||||
- NotVideo
|
||||
- LowPower
|
||||
- FailMultipleVideo
|
||||
- FailWindowed
|
||||
- FailOverlaid
|
||||
- FailBacking
|
||||
- FailMacOSVersion
|
||||
- FailPref
|
||||
- FailSurface
|
||||
- FailEnqueue
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1737682
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1737682
|
||||
notification_emails:
|
||||
- bwerth@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: h#GFX_MACOS_VIDEO_LOW_POWER
|
||||
|
||||
sanity_test:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
Reports results from the graphics sanity test to track which drivers are
|
||||
having problems (0=TEST_PASSED, 1=TEST_FAILED_RENDER, 2=TEST_FAILED_VIDEO,
|
||||
3=TEST_CRASHED)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry enumerated
|
||||
histogram GRAPHICS_SANITY_TEST.
|
||||
range_min: 0
|
||||
range_max: 20
|
||||
bucket_count: 21
|
||||
histogram_type: linear
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- rhunt@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: GRAPHICS_SANITY_TEST
|
||||
|
||||
gfx.display:
|
||||
count:
|
||||
description: >
|
||||
@@ -460,6 +659,7 @@ gfx.display:
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
primary_width:
|
||||
description: >
|
||||
Width of the primary display, takes device rotation into account.
|
||||
@@ -479,6 +679,7 @@ gfx.display:
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
primary_height:
|
||||
description: >
|
||||
Height of the primary display, takes device rotation into account.
|
||||
@@ -499,6 +700,26 @@ gfx.display:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
scaling:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
Scaling percentage for the display where the first window is opened
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry linear
|
||||
histogram DISPLAY_SCALING.
|
||||
range_min: 1
|
||||
range_max: 500
|
||||
bucket_count: 100
|
||||
histogram_type: linear
|
||||
unit: percentage
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1121966
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1121966
|
||||
notification_emails:
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: DISPLAY_SCALING
|
||||
|
||||
gfx.checkerboard:
|
||||
duration:
|
||||
@@ -865,6 +1086,130 @@ gfx.content:
|
||||
- jmuizelaar@mozilla.com
|
||||
expires: never
|
||||
|
||||
small_paint_phase_weight_partial:
|
||||
type: labeled_custom_distribution
|
||||
description: >
|
||||
Percentages of times for phases in a normal content paint relative to the
|
||||
time spent in the entire normal paint. ("dl" = Display list, "wrdl" =
|
||||
WebRender display list, "sb" = Scene building, "fb" = Frame building)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry linear
|
||||
histogram CONTENT_SMALL_PAINT_PHASE_WEIGHT_PARTIAL.
|
||||
range_min: 1
|
||||
range_max: 100
|
||||
bucket_count: 12
|
||||
histogram_type: linear
|
||||
unit: percent
|
||||
labels:
|
||||
- dl
|
||||
- wrdl
|
||||
- sb
|
||||
- fb
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1430897
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1430897
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- mmynttinen@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: CONTENT_SMALL_PAINT_PHASE_WEIGHT_PARTIAL
|
||||
|
||||
large_paint_phase_weight_partial:
|
||||
type: labeled_custom_distribution
|
||||
description: >
|
||||
Percentages of times for phases in an expensive content paint relative to
|
||||
the time spent in the entire expensive paint. ("dl" = Display list, "wrdl"
|
||||
= WebRender display list, "sb" = Scene building, "fb" = Frame building)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry linear
|
||||
histogram CONTENT_LARGE_PAINT_PHASE_WEIGHT_PARTIAL.
|
||||
range_min: 1
|
||||
range_max: 100
|
||||
bucket_count: 12
|
||||
histogram_type: linear
|
||||
unit: percent
|
||||
labels:
|
||||
- dl
|
||||
- wrdl
|
||||
- sb
|
||||
- fb
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1309442
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1309442
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- mmynttinen@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: CONTENT_LARGE_PAINT_PHASE_WEIGHT_PARTIAL
|
||||
|
||||
small_paint_phase_weight_full:
|
||||
type: labeled_custom_distribution
|
||||
description: >
|
||||
Percentages of times for phases in a normal content paint relative to the
|
||||
time spent in the entire normal paint. ("dl" = Display list, "wrdl" =
|
||||
WebRender display list, "sb" = Scene building, "fb" = Frame building)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry linear
|
||||
histogram CONTENT_SMALL_PAINT_PHASE_WEIGHT_FULL.
|
||||
range_min: 1
|
||||
range_max: 100
|
||||
bucket_count: 12
|
||||
histogram_type: linear
|
||||
unit: percent
|
||||
labels:
|
||||
- dl
|
||||
- wrdl
|
||||
- sb
|
||||
- fb
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1430897
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1430897
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- mmynttinen@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: CONTENT_SMALL_PAINT_PHASE_WEIGHT_FULL
|
||||
|
||||
large_paint_phase_weight_full:
|
||||
type: labeled_custom_distribution
|
||||
description: >
|
||||
Percentages of times for phases in an expensive content paint relative to
|
||||
the time spent in the entire expensive paint. ("dl" = Display list, "wrdl"
|
||||
= WebRender display list, "sb" = Scene building, "fb" = Frame building)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry linear
|
||||
histogram CONTENT_LARGE_PAINT_PHASE_WEIGHT_FULL.
|
||||
range_min: 1
|
||||
range_max: 100
|
||||
bucket_count: 12
|
||||
histogram_type: linear
|
||||
unit: percent
|
||||
labels:
|
||||
- dl
|
||||
- wrdl
|
||||
- sb
|
||||
- fb
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1309442
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1309442
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1518134
|
||||
notification_emails:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
- mmynttinen@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: CONTENT_LARGE_PAINT_PHASE_WEIGHT_FULL
|
||||
|
||||
gfx.adapter.primary:
|
||||
description:
|
||||
description: >
|
||||
@@ -1355,3 +1700,48 @@ fontlist:
|
||||
- gfx-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: MAC_INITFONTLIST_TOTAL
|
||||
|
||||
apz_zoom:
|
||||
activity:
|
||||
type: labeled_counter
|
||||
description: >
|
||||
Whether non-RDM page had user-triggered zooming activity
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry boolean
|
||||
histogram APZ_ZOOM_ACTIVITY.
|
||||
labels:
|
||||
- "false"
|
||||
- "true"
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1627708
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1672576
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1627708
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1672576
|
||||
notification_emails:
|
||||
- botond@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: h#APZ_ZOOM_ACTIVITY
|
||||
|
||||
pinchsource:
|
||||
type: custom_distribution
|
||||
description: >
|
||||
Input device that triggered the zoom gesture
|
||||
(InputData::PinchGestureSource)
|
||||
|
||||
This metric was generated to correspond to the Legacy Telemetry enumerated
|
||||
histogram APZ_ZOOM_PINCHSOURCE.
|
||||
range_min: 0
|
||||
range_max: 5
|
||||
bucket_count: 6
|
||||
histogram_type: linear
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1627708
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1672576
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1627708
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1672576
|
||||
notification_emails:
|
||||
- botond@mozilla.com
|
||||
expires: never
|
||||
telemetry_mirror: APZ_ZOOM_PINCHSOURCE
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
#include "mozilla/StaticPrefs_webgl.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "mozilla/Components.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
@@ -447,8 +447,8 @@ void D3D11LayersCrashGuard::RecordTelemetry(TelemetryState aState) {
|
||||
return;
|
||||
}
|
||||
|
||||
Telemetry::Accumulate(Telemetry::GRAPHICS_DRIVER_STARTUP_TEST,
|
||||
int32_t(aState));
|
||||
glean::gfx::graphics_driver_startup_test.AccumulateSingleSample(
|
||||
int32_t(aState));
|
||||
sTelemetryStateRecorded = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "mozilla/D3DMessageUtils.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
#include "mozilla/StaticPrefs_layers.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "mozilla/gfx/GPUParent.h"
|
||||
#include "mozilla/gfx/GPUProcessManager.h"
|
||||
#include "mozilla/gfx/GraphicsMessages.h"
|
||||
@@ -1288,8 +1288,8 @@ bool DeviceManagerDx::GetAnyDeviceRemovedReason(DeviceResetReason* aOutReason) {
|
||||
}
|
||||
|
||||
void DeviceManagerDx::ForceDeviceReset(ForcedDeviceResetReason aReason) {
|
||||
Telemetry::Accumulate(Telemetry::FORCED_DEVICE_RESET_REASON,
|
||||
uint32_t(aReason));
|
||||
glean::gfx::forced_device_reset_reason.AccumulateSingleSample(
|
||||
uint32_t(aReason));
|
||||
{
|
||||
MutexAutoLock lock(mDeviceLock);
|
||||
if (!mDeviceResetReason) {
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "mozilla/StaticPrefs_privacy.h"
|
||||
#include "mozilla/StaticPrefs_webgl.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/Unused.h"
|
||||
@@ -354,7 +353,7 @@ class CrashTelemetryEvent : public Runnable {
|
||||
|
||||
NS_IMETHOD Run() override {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
Telemetry::Accumulate(Telemetry::GFX_CRASH, mReason);
|
||||
glean::gfx::crash.AccumulateSingleSample(mReason);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -377,7 +376,7 @@ void CrashStatsLogForwarder::CrashAction(LogReason aReason) {
|
||||
// The callers need to assure that aReason is in the range
|
||||
// that the telemetry call below supports.
|
||||
if (NS_IsMainThread()) {
|
||||
Telemetry::Accumulate(Telemetry::GFX_CRASH, (uint32_t)aReason);
|
||||
glean::gfx::crash.AccumulateSingleSample((uint32_t)aReason);
|
||||
} else {
|
||||
nsCOMPtr<nsIRunnable> r1 = new CrashTelemetryEvent((uint32_t)aReason);
|
||||
NS_DispatchToMainThread(r1);
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "nsTArray.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include "plbase64.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
@@ -441,8 +440,8 @@ bool gfxWindowsPlatform::HandleDeviceReset() {
|
||||
}
|
||||
|
||||
if (resetReason != mozilla::gfx::DeviceResetReason::FORCED_RESET) {
|
||||
Telemetry::Accumulate(Telemetry::DEVICE_RESET_REASON,
|
||||
uint32_t(resetReason));
|
||||
glean::gfx::device_reset_reason.AccumulateSingleSample(
|
||||
uint32_t(resetReason));
|
||||
}
|
||||
|
||||
// Remove devices and adapters.
|
||||
@@ -1461,8 +1460,8 @@ void gfxWindowsPlatform::RecordContentDeviceFailure(
|
||||
if (!XRE_IsContentProcess()) {
|
||||
return;
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE,
|
||||
uint32_t(aDevice));
|
||||
glean::gfx::content_failed_to_acquire_device.AccumulateSingleSample(
|
||||
uint32_t(aDevice));
|
||||
}
|
||||
|
||||
void gfxWindowsPlatform::RecordStartupTelemetry() {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "mozilla/webrender/RenderTextureHost.h"
|
||||
#include "mozilla/webrender/RenderThread.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "WinUtils.h"
|
||||
|
||||
@@ -631,8 +631,8 @@ void DCLayerTree::CompositorEndFrame() {
|
||||
mCompositionDevice->Commit();
|
||||
|
||||
auto end = TimeStamp::Now();
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::COMPOSITE_SWAP_TIME,
|
||||
(end - start).ToMilliseconds() * 10.);
|
||||
mozilla::glean::gfx::composite_swap_time.AccumulateSingleSample(
|
||||
(end - start).ToMilliseconds() * 10.);
|
||||
|
||||
// Remove any framebuffers that haven't been
|
||||
// used in the last 60 frames.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "mozilla/widget/CompositorWidget.h"
|
||||
#include "mozilla/widget/WinCompositorWidget.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "FxROutputHandler.h"
|
||||
|
||||
@@ -528,8 +528,8 @@ RenderedFrameId RenderCompositorANGLE::EndFrame(
|
||||
mSwapChain->Present(interval, flags);
|
||||
}
|
||||
auto end = TimeStamp::Now();
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::COMPOSITE_SWAP_TIME,
|
||||
(end - start).ToMilliseconds() * 10.);
|
||||
mozilla::glean::gfx::composite_swap_time.AccumulateSingleSample(
|
||||
(end - start).ToMilliseconds() * 10.);
|
||||
|
||||
if (mFirstPresent && mDCLayerTree) {
|
||||
// Wait for the GPU to finish executing its commands before
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
#include "mozilla/SVGFragmentIdentifier.h"
|
||||
#include "mozilla/SVGObserverUtils.h"
|
||||
#include "mozilla/glean/GfxMetrics.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/TextComposition.h"
|
||||
#include "mozilla/TextEvents.h"
|
||||
@@ -1190,8 +1191,10 @@ void PresShell::Destroy() {
|
||||
return true;
|
||||
};
|
||||
if (isUserZoomablePage()) {
|
||||
Telemetry::Accumulate(Telemetry::APZ_ZOOM_ACTIVITY,
|
||||
IsResolutionUpdatedByApz());
|
||||
glean::apz_zoom::activity
|
||||
.EnumGet(static_cast<glean::apz_zoom::ActivityLabel>(
|
||||
IsResolutionUpdatedByApz()))
|
||||
.Add();
|
||||
}
|
||||
|
||||
// dump out cumulative text perf metrics
|
||||
|
||||
@@ -24,7 +24,7 @@ const TIMEOUT_SEC = 20;
|
||||
|
||||
const MEDIA_ENGINE_PREF = "media.wmf.media-engine.enabled";
|
||||
|
||||
// GRAPHICS_SANITY_TEST histogram enumeration values
|
||||
// Glean.gfx.sanityTest values
|
||||
const TEST_PASSED = 0;
|
||||
const TEST_FAILED_RENDER = 1;
|
||||
const TEST_FAILED_VIDEO = 2;
|
||||
@@ -46,9 +46,7 @@ function testPixel(ctx, x, y, r, g, b, a, fuzz) {
|
||||
}
|
||||
|
||||
function reportResult(val) {
|
||||
try {
|
||||
Services.telemetry.getHistogramById("GRAPHICS_SANITY_TEST").add(val);
|
||||
} catch (e) {}
|
||||
Glean.gfx.sanityTest.accumulateSingleSample(val);
|
||||
|
||||
Services.prefs.setBoolPref(RUNNING_PREF, false);
|
||||
Services.prefs.savePrefFile(null);
|
||||
|
||||
@@ -538,7 +538,7 @@ class PinchGestureInput : public InputData {
|
||||
MOUSEWHEEL // Synthesized from modifier+mousewheel
|
||||
|
||||
// If adding more items here, increase n_values for the
|
||||
// APZ_ZOOM_PINCHSOURCE Telemetry metric.
|
||||
// APZ_ZOOM_PINCHSOURCE Telemetry and glean::apz_zoom::pinchsource metrics.
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user