[mutter/wip/chergert/clock-trace] clutter: add tracing for frameclock cycle
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/chergert/clock-trace] clutter: add tracing for frameclock cycle
- Date: Tue, 25 Feb 2020 00:11:42 +0000 (UTC)
commit 5a232ceac133dd707851f9dcc4ba2f55062b0613
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 frameclock is advancing.
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..f08904fa1 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 (ClutterFrameCycle, "Single FrameClock Cycle");
+
/* 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 (ClutterFrameCycle);
+
_clutter_threads_release_lock ();
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]