diff options
author | Delan Azabani <dazabani@igalia.com> | 2024-11-15 17:10:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 09:10:01 +0000 |
commit | aa7116c75d2f13f554ce4db162344aaea59e60b0 (patch) | |
tree | 6b23fa65221101ac202e0742dc749c255627beb1 /components/compositing | |
parent | 495cceb7de813f6f1936d77821e8cf04ca2857cd (diff) | |
download | servo-aa7116c75d2f13f554ce4db162344aaea59e60b0.tar.gz servo-aa7116c75d2f13f554ce4db162344aaea59e60b0.zip |
Plumb time profiler output into tracing (#34238)
* Plumb time profiler output into tracing
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Enter the span tightly around the callback
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Use `info_span!()` shorthand
Signed-off-by: Delan Azabani <dazabani@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Diffstat (limited to 'components/compositing')
-rw-r--r-- | components/compositing/compositor.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 08df16515cd..0a6d764c722 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -27,7 +27,8 @@ use ipc_channel::ipc::{self, IpcSharedMemory}; use libc::c_void; use log::{debug, error, info, trace, warn}; use pixels::{CorsStatus, Image, PixelFormat}; -use profile_traits::time::{self as profile_time, profile, ProfilerCategory}; +use profile_traits::time::{self as profile_time, ProfilerCategory}; +use profile_traits::time_profile; use script_traits::CompositorEvent::{MouseButtonEvent, MouseMoveEvent, TouchEvent, WheelEvent}; use script_traits::{ AnimationState, AnimationTickType, ConstellationControlMsg, MouseButton, MouseEventType, @@ -2098,7 +2099,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> { self.assert_gl_framebuffer_complete(); } - profile( + time_profile!( ProfilerCategory::Compositing, None, self.time_profiler_chan.clone(), @@ -2214,7 +2215,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> { }) }, CompositeTarget::PngFile(path) => { - profile( + time_profile!( ProfilerCategory::ImageSaving, None, self.time_profiler_chan.clone(), |