From 318744d22570a716fddc610f6c4cb6045cb7eb9f Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 18 May 2019 18:45:56 -0700 Subject: [PATCH] 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 63247471..9286e55b 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); }