From b7f47ea17fc1fad6bd4e7c831f7884e6eae8d5b8 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 24 Feb 2020 16:10:49 -0800 Subject: [PATCH] clutter: add tracing for frameclock cycle This adds a new frameclock tracing mark for a single cycle of the frame clock. Doing so allows Sysprof to potentially do more with the information that happens during the frameclock. For example, we can now find allocations that happen while the frame clock is advancing. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1088 --- clutter/clutter/clutter-master-clock-default.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clutter/clutter/clutter-master-clock-default.c b/clutter/clutter/clutter-master-clock-default.c index 3197a32e3..6ee78fa7a 100644 --- a/clutter/clutter/clutter-master-clock-default.c +++ b/clutter/clutter/clutter-master-clock-default.c @@ -29,6 +29,8 @@ * of #ClutterMasterClock. */ +#include + #include "clutter-build-config.h" #include "clutter-master-clock.h" @@ -461,6 +463,8 @@ clutter_clock_dispatch (GSource *source, _clutter_threads_acquire_lock (); + COGL_TRACE_BEGIN (ClutterMasterClockTick, "Master Clock (tick)"); + /* Get the time to use for this frame */ master_clock->cur_tick = g_source_get_time (source); @@ -492,6 +496,8 @@ clutter_clock_dispatch (GSource *source, g_slist_free_full (stages, g_object_unref); + COGL_TRACE_END (ClutterMasterClockTick); + _clutter_threads_release_lock (); return TRUE;