From 6ffdfff9ee07c074de191ce2eb1f36d21a69a8d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 25 Mar 2020 09:02:12 +0100 Subject: [PATCH] frame-clock: Add basic tracing https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285 --- clutter/clutter/clutter-frame-clock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index 1f3d10926..e7726dda2 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -20,6 +20,7 @@ #include "clutter/clutter-frame-clock.h" #include "clutter/clutter-main.h" +#include "cogl/cogl-trace.h" static inline uint64_t us (uint64_t us) @@ -256,13 +257,17 @@ clutter_frame_clock_dispatch (gpointer user_data) ClutterFrameClock *frame_clock = user_data; ClutterFrameResult result; + COGL_TRACE_BEGIN_SCOPED (ClutterFrameCLockDispatch, "Frame Clock (dispatch)"); + g_source_set_ready_time (frame_clock->source, -1); frame_clock->state = CLUTTER_FRAME_CLOCK_STATE_DISPATCHING; + COGL_TRACE_BEGIN (ClutterFrameClockFrame, "Frame Clock (frame)"); result = frame_clock->listener.iface->frame (frame_clock, frame_clock->frame_count++, frame_clock->listener.user_data); + COGL_TRACE_END (ClutterFrameClockFrame); switch (frame_clock->state) {