Bug 1393399 P1 - add telemetry probes;
Here, we calculate the recovery time from two different start points because that when GPU crashes, VideoDecoderChild::ActorDestory() is called, but VideoDecoderChild doesn't dispatch events to trigger decoder recreation immediately.
Instead, it waits until a new VideoDecoderManager has been recreated [1], and then rejects all pending promises to MFR with a NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER, which triggers playback pipeline recreation.
These two probes help us to know the gap between "GPU crash" and "MFR is notified". We don't need to wait for VideoDecoderManager recreation if we're certain that we don't create remote video decoder anymore. And if the gap is large, it might be a significant optimization.
[1] http://searchfox.org/mozilla-central/rev/51b3d67a5ec1758bd2fe7d7b6e75ad6b6b5da223/dom/media/ipc/VideoDecoderChild.cpp#124-145
MozReview-Commit-ID: DcI2CwWORxZ
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -13607,10 +13607,32 @@
"alert_emails": ["ajones@mozilla.com", "bwu@mozilla.com", "tkuo@mozilla.com"],
"expires_in_version": "60",
"releaseChannelCollection": "opt-out",
"keyed": true,
"kind": "enumerated",
"n_values": 10,
"bug_numbers": [1393392],
"description": "The runtime status, sent when a remote HW video decoder is shutdown, of previously-blacklisted driver: 0:remote HW-decoding and GPU process didn't crash, 1:remote HW-decoding and GPU process crashed. The histogram is keyed by the blacklisted driver name."
+ },
+ "VIDEO_HW_DECODER_CRASH_RECOVERY_TIME_SINCE_GPU_CRASHED_MS" : {
+ "record_in_processes": ["content"],
+ "alert_emails": ["ajones@mozilla.com", "bwu@mozilla.com", "tkuo@mozilla.com"],
+ "expires_in_version": "60",
+ "releaseChannelCollection": "opt-out",
+ "kind": "exponential",
+ "high": 64000,
+ "n_buckets": 100,
+ "bug_numbers": [1393399],
+ "description": "Time in milliseconds to recover a video decoder from a HW video decoder crash, calculated since VideoDecoderChild::ActorDestroy() is called. The data is sent when video decoding is recovered from a GPU crash and the first frame is decoded."
+ },
+ "VIDEO_HW_DECODER_CRASH_RECOVERY_TIME_SINCE_MFR_NOTIFIED_MS" : {
+ "record_in_processes": ["content"],
+ "alert_emails": ["ajones@mozilla.com", "bwu@mozilla.com", "tkuo@mozilla.com"],
+ "expires_in_version": "60",
+ "releaseChannelCollection": "opt-out",
+ "kind": "exponential",
+ "high": 64000,
+ "n_buckets": 100,
+ "bug_numbers": [1393399],
+ "description": "Time in milliseconds to recover a video decoder from a HW video decoder crash, calculated since MFR gets a NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER error. The data is sent when video decoding is recovered from a GPU crash and the first frame is decoded."
}
}