mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-ui: add proc source when on Linux
This commit is contained in:
@ -173,6 +173,9 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self,
|
|||||||
GtkButton *button)
|
GtkButton *button)
|
||||||
{
|
{
|
||||||
g_autoptr(SysprofProfiler) profiler = NULL;
|
g_autoptr(SysprofProfiler) profiler = NULL;
|
||||||
|
#ifdef __linux__
|
||||||
|
g_autoptr(SysprofSource) proc_source = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_assert (SYSPROF_IS_PROFILER_ASSISTANT (self));
|
g_assert (SYSPROF_IS_PROFILER_ASSISTANT (self));
|
||||||
g_assert (GTK_IS_BUTTON (button));
|
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));
|
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);
|
g_signal_emit (self, signals [START_RECORDING], 0, profiler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user