[gtk/matthiasc/perf-tests: 2/3] gdk: Make profiler support unconditional



commit 05b98c3834f8fddb41d8893b5c4820dc9a72a229
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 21 11:50:12 2020 -0500

    gdk: Make profiler support unconditional
    
    We are still not providing samples unless debugging is enabled.
    That needs a bit more work.

 gdk/gdk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index c3c58b053b..ae456dc3e2 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -212,14 +212,14 @@ gdk_pre_parse (void)
       _gdk_debug_flags = g_parse_debug_string (debug_string,
                                               (GDebugKey *) gdk_debug_keys,
                                               G_N_ELEMENTS (gdk_debug_keys));
-
-    if (g_getenv ("GTK_TRACE_FD"))
-      gdk_profiler_start (atoi (g_getenv ("GTK_TRACE_FD")));
-    else if (g_getenv ("GTK_TRACE"))
-      gdk_profiler_start (-1);
   }
 #endif  /* G_ENABLE_DEBUG */
 
+  if (g_getenv ("GTK_TRACE_FD"))
+    gdk_profiler_start (atoi (g_getenv ("GTK_TRACE_FD")));
+  else if (g_getenv ("GTK_TRACE"))
+    gdk_profiler_start (-1);
+
 #ifndef G_HAS_CONSTRUCTORS
   stash_desktop_startup_notification_id ();
 #endif


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