From 6d3398f2583d5b8ed3e44565f1a05e54824d2118 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Wed, 24 Feb 2021 12:19:08 -0800 Subject: [PATCH] libsysprof-ui: always setup governor source on Linux We need this for disabling paranoid perf event. --- src/libsysprof-ui/sysprof-profiler-assistant.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/libsysprof-ui/sysprof-profiler-assistant.c b/src/libsysprof-ui/sysprof-profiler-assistant.c index 89e35137..c2ee6205 100644 --- a/src/libsysprof-ui/sysprof-profiler-assistant.c +++ b/src/libsysprof-ui/sysprof-profiler-assistant.c @@ -255,13 +255,14 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self, /* Always add the proc source */ proc_source = sysprof_proc_source_new (); sysprof_profiler_add_source (profiler, proc_source); -#endif - if (!gtk_switch_get_active (self->allow_throttling)) - { - g_autoptr(SysprofSource) governor = sysprof_governor_source_new (); - sysprof_profiler_add_source (profiler, governor); - } + { + g_autoptr(SysprofSource) governor = sysprof_governor_source_new (); + sysprof_governor_source_set_disable_governor (SYSPROF_GOVERNOR_SOURCE (governor), + !gtk_switch_get_active (self->allow_throttling)); + sysprof_profiler_add_source (profiler, governor); + } +#endif /* Always add symbol decoder to save to file immediately */ symbols_source = sysprof_symbols_source_new ();