From 7ca4acc30d9f942e9dac22b4ae2cfbe4583afa37 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Wed, 24 Feb 2021 11:58:59 -0800 Subject: [PATCH] sysprof-cli: always create governor source But also disable it unless we're on Linux. --- src/tools/sysprof-cli.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/sysprof-cli.c b/src/tools/sysprof-cli.c index 7590e052..55530736 100644 --- a/src/tools/sysprof-cli.c +++ b/src/tools/sysprof-cli.c @@ -521,13 +521,13 @@ Examples:\n\ g_object_unref (source); } +#ifdef __linux__ + source = sysprof_governor_source_new (); if (no_throttle) - { - source = sysprof_governor_source_new (); - sysprof_governor_source_set_disable_governor (SYSPROF_GOVERNOR_SOURCE (source), TRUE); - sysprof_profiler_add_source (profiler, source); - g_object_unref (source); - } + sysprof_governor_source_set_disable_governor (SYSPROF_GOVERNOR_SOURCE (source), TRUE); + sysprof_profiler_add_source (profiler, source); + g_object_unref (source); +#endif if (gnome_shell) {