[sysprof] libsysprof-ui: add proc source when on Linux



commit 318744d22570a716fddc610f6c4cb6045cb7eb9f
Author: Christian Hergert <chergert redhat com>
Date:   Sat May 18 18:45:56 2019 -0700

    libsysprof-ui: add proc source when on Linux

 src/libsysprof-ui/sysprof-profiler-assistant.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/libsysprof-ui/sysprof-profiler-assistant.c b/src/libsysprof-ui/sysprof-profiler-assistant.c
index 6324747..9286e55 100644
--- a/src/libsysprof-ui/sysprof-profiler-assistant.c
+++ b/src/libsysprof-ui/sysprof-profiler-assistant.c
@@ -173,6 +173,9 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self,
                                               GtkButton                *button)
 {
   g_autoptr(SysprofProfiler) profiler = NULL;
+#ifdef __linux__
+  g_autoptr(SysprofSource) proc_source = NULL;
+#endif
 
   g_assert (SYSPROF_IS_PROFILER_ASSISTANT (self));
   g_assert (GTK_IS_BUTTON (button));
@@ -211,6 +214,14 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self,
                                                   gtk_switch_get_active (self->inherit_switch));
     }
 
+#ifdef __linux__
+  /* Always add the proc source */
+  proc_source = sysprof_proc_source_new ();
+  sysprof_profiler_add_source (profiler, proc_source);
+#endif
+
+  /* Now allow the aids to add their sources */
+
   g_signal_emit (self, signals [START_RECORDING], 0, profiler);
 }
 


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