[gnome-builder] sysprof: add gtk tracefd source



commit 9d46d588ce7aea6bc118c2bb2a2d20f1d5566ab7
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 11 10:26:18 2019 -0700

    sysprof: add gtk tracefd source
    
    We still need some work in Sysprof to modify the spawn environment, but
    this gets things prepared for that so we get the data sources we want.

 src/plugins/sysprof/gbp-sysprof-workspace-addin.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c 
b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
index 7e0633859..3b9d26364 100644
--- a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
+++ b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
@@ -119,6 +119,7 @@ profiler_run_handler (IdeRunManager *run_manager,
   g_autoptr(SysprofSource) memory_source = NULL;
   g_autoptr(SysprofSource) app_source = NULL;
   g_autoptr(SysprofSource) gjs_source = NULL;
+  g_autoptr(SysprofSource) gtk_source = NULL;
   g_autoptr(SysprofSource) symbols_source = NULL;
   IdeContext *context;
 
@@ -187,10 +188,13 @@ profiler_run_handler (IdeRunManager *run_manager,
   memory_source = sysprof_memory_source_new ();
   sysprof_profiler_add_source (profiler, memory_source);
 
-  /* TODO: Only add this when a GJS-based app is run */
   gjs_source = sysprof_gjs_source_new ();
   sysprof_profiler_add_source (profiler, gjs_source);
 
+  gtk_source = sysprof_tracefd_source_new ();
+  sysprof_tracefd_source_set_envvar (SYSPROF_TRACEFD_SOURCE (gtk_source), "GTK_TRACE_FD");
+  sysprof_profiler_add_source (profiler, gtk_source);
+
   /* Allow the app to submit us data if it supports "SYSPROF_TRACE_FD" */
   app_source = sysprof_tracefd_source_new ();
   sysprof_tracefd_source_set_envvar (SYSPROF_TRACEFD_SOURCE (app_source), "SYSPROF_TRACE_FD");


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