[mutter/wip/chergert/clock-trace: 3/3] clutter: add tracing for frameclock cycle



commit de51e151bc812d41a0606c6081078922743b34a8
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 24 16:10:49 2020 -0800

    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 <cogl/cogl-trace.h>
+
 #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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]