Bug 1772223: Add some additional probes for measuring important WebRender internals. r=jrmuizel,chutten

Differential Revision: https://phabricator.services.mozilla.com/D148078
This commit is contained in:
Bas Schouten 2022-06-08 02:11:07 +00:00
Родитель 71c8e37424
Коммит 5e39d47b08
4 изменённых файлов: 60 добавлений и 1 удалений

Просмотреть файл

@ -74,6 +74,21 @@ wr:
- gfx-telemetry-alerts@mozilla.com
expires: never
telemetry_mirror: WR_RASTERIZE_BLOBS_TIME
renderer_time:
type: timing_distribution
description: >
WebRender renderer time.
time_unit: microsecond
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1772223
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1772223
data_sensitivity:
- technical
notification_emails:
- gfx-telemetry-alerts@mozilla.com
expires: never
telemetry_mirror: WR_RENDERER_TIME
framebuild_time:
type: timing_distribution
description: >
@ -124,3 +139,18 @@ wr:
- jmuizelaar@mozilla.com
expires: never
telemetry_mirror: WR_SCENESWAP_TIME
texture_cache_update_time:
type: timing_distribution
description: >
Time taken by WebRender to update the texture cache.
time_unit: microsecond
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1772223
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1772223
data_sensitivity:
- technical
notification_emails:
- gfx-telemetry-alerts@mozilla.com
expires: never
telemetry_mirror: WR_TEXTURE_CACHE_UPDATE_TIME

Просмотреть файл

@ -94,6 +94,7 @@ use crate::screen_capture::AsyncScreenshotGrabber;
use crate::render_target::{AlphaRenderTarget, ColorRenderTarget, PictureCacheTarget, PictureCacheTargetKind};
use crate::render_target::{RenderTarget, TextureCacheRenderTarget};
use crate::render_target::{RenderTargetKind, BlitJob};
use crate::telemetry::Telemetry;
use crate::texture_cache::{TextureCache, TextureCacheConfig};
use crate::picture_textures::PictureTextures;
use crate::tile_cache::PictureCacheDebugInfo;
@ -2058,8 +2059,9 @@ impl Renderer {
})
});
self.profile.end_time(profiler::RENDERER_TIME);
let t = self.profile.end_time(profiler::RENDERER_TIME);
self.profile.end_time_if_started(profiler::TOTAL_FRAME_CPU_TIME);
Telemetry::record_renderer_time(Duration::from_micros((t * 1000.00) as u64));
let current_time = precise_time_ns();
if device_size.is_some() {
@ -2440,6 +2442,7 @@ impl Renderer {
let t = self.profile.end_time(profiler::TEXTURE_CACHE_UPDATE_TIME);
self.resource_upload_time += t;
Telemetry::record_texture_cache_update_time(Duration::from_micros((t * 1000.00) as u64));
drain_filter(
&mut self.notifications,

Просмотреть файл

@ -19,10 +19,12 @@ impl Telemetry {
pub fn stop_and_accumulate_rasterize_glyphs_time(_id: TimerId) { }
pub fn start_framebuild_time() -> TimerId { TimerId { id: 0 } }
pub fn stop_and_accumulate_framebuild_time(_id: TimerId) { }
pub fn renderer_time(duration: Duration) { }
pub fn record_scenebuild_time(_duration: Duration) { }
pub fn start_sceneswap_time() -> TimerId { TimerId { id: 0 } }
pub fn stop_and_accumulate_sceneswap_time(_id: TimerId) { }
pub fn cancel_sceneswap_time(_id: TimerId) { }
pub fn record_texture_cache_update_time(duration: Duration) { }
}
#[cfg(feature = "gecko")]
@ -32,8 +34,10 @@ impl Telemetry {
pub fn stop_and_accumulate_rasterize_glyphs_time(id: TimerId) { wr::rasterize_glyphs_time.stop_and_accumulate(id); }
pub fn start_framebuild_time() -> TimerId { wr::framebuild_time.start() }
pub fn stop_and_accumulate_framebuild_time(id: TimerId) { wr::framebuild_time.stop_and_accumulate(id); }
pub fn record_renderer_time(duration: Duration) { wr::renderer_time.accumulate_raw_duration(duration); }
pub fn record_scenebuild_time(duration: Duration) { wr::scenebuild_time.accumulate_raw_duration(duration); }
pub fn start_sceneswap_time() -> TimerId { wr::sceneswap_time.start() }
pub fn stop_and_accumulate_sceneswap_time(id: TimerId) { wr::sceneswap_time.stop_and_accumulate(id); }
pub fn cancel_sceneswap_time(id: TimerId) { wr::sceneswap_time.cancel(id); }
pub fn record_texture_cache_update_time(duration: Duration) { wr::texture_cache_update_time.accumulate_raw_duration(duration); }
}

Просмотреть файл

@ -16100,6 +16100,17 @@
"high": 1000,
"n_buckets": 50,
"description": "The time spent waiting for the GPU to complete previously issued drawing commands in milliseconds"
},
"WR_RENDERER_TIME": {
"record_in_processes": [ "main", "gpu" ],
"products": [ "firefox" ],
"alert_emails": [ "gfx-telemetry-alerts@mozilla.com" ],
"bug_numbers": [ 1772223 ],
"expires_in_version": "never",
"kind": "exponential",
"high": 1000,
"n_buckets": 50,
"description": "The time spent by WebRender in the Renderer in milliseconds."
},
"WR_SCENEBUILD_TIME": {
"record_in_processes": ["main", "gpu"],
@ -16156,6 +16167,17 @@
"n_buckets": 50,
"description": "Time taken by WebRender to rasterize blobs"
},
"WR_TEXTURE_CACHE_UPDATE_TIME": {
"record_in_processes": [ "main", "gpu" ],
"products": [ "firefox" ],
"alert_emails": [ "gfx-telemetry-alerts@mozilla.com" ],
"bug_numbers": [ 1772223 ],
"expires_in_version": "never",
"kind": "exponential",
"high": 1000,
"n_buckets": 50,
"description": "Time taken by WebRender to update the texture cache in milliseconds."
},
"WEB_AUDIO_BECOMES_AUDIBLE_TIME": {
"record_in_processes": ["content"],
"products": ["firefox"],