[gtk: 11/14] profiler: Clean up profiler marks for frameclock



commit 324202a56c57375b1daf7ba61f099fe9773aabcb
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Feb 12 13:20:32 2020 +0100

    profiler: Clean up profiler marks for frameclock
    
    This drops the marks for before/after-paint as they are internal
    things that very rarely use any time, and also flush/resume-events
    as any events reported here will get separate marks so will be easy
    to see anyway.
    
    Also, we rename the entire frameclock cycle to "frameclock cycle"
    rather than "paint_idle" which is rather cryptic.

 gdk/gdkframeclock.c     | 20 --------------------
 gdk/gdkframeclockidle.c |  4 ++--
 2 files changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c
index 940d39ca6d..ee76368935 100644
--- a/gdk/gdkframeclock.c
+++ b/gdk/gdkframeclock.c
@@ -647,23 +647,13 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
 void
 _gdk_frame_clock_emit_flush_events (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[FLUSH_EVENTS], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "flush-events");
 }
 
 void
 _gdk_frame_clock_emit_before_paint (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[BEFORE_PAINT], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "before-paint");
 }
 
 void
@@ -702,23 +692,13 @@ _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock)
 void
 _gdk_frame_clock_emit_after_paint (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[AFTER_PAINT], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "after-paint");
 }
 
 void
 _gdk_frame_clock_emit_resume_events (GdkFrameClock *frame_clock)
 {
-  gint64 before = g_get_monotonic_time ();
-
   g_signal_emit (frame_clock, signals[RESUME_EVENTS], 0);
-
-  if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "resume-events");
 }
 
 static gint64
diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c
index 2a0dbd8f07..2312e30b25 100644
--- a/gdk/gdkframeclockidle.c
+++ b/gdk/gdkframeclockidle.c
@@ -502,7 +502,7 @@ gdk_frame_clock_paint_idle (void *data)
     priv->sleep_serial = get_sleep_serial ();
 
   if (GDK_PROFILER_IS_RUNNING)
-    gdk_profiler_end_mark (before, "frameclock", "paint_idle");
+    gdk_profiler_end_mark (before, "frameclock cycle", NULL);
 
   return FALSE;
 }
@@ -599,7 +599,7 @@ gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
           if (priv->freeze_time != 0)
             {
               gdk_profiler_end_mark (priv->freeze_time,
-                                     "frameclock freeze", NULL);
+                                     "frameclock frozen", NULL);
               priv->freeze_time = 0;
             }
         }


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