sysprof-cli: always create governor source

But also disable it unless we're on Linux.
This commit is contained in:
Christian Hergert
2021-02-24 11:58:59 -08:00
parent 53d3c0afc9
commit 7ca4acc30d

View File

@ -521,13 +521,13 @@ Examples:\n\
g_object_unref (source); g_object_unref (source);
} }
if (no_throttle) #ifdef __linux__
{
source = sysprof_governor_source_new (); source = sysprof_governor_source_new ();
if (no_throttle)
sysprof_governor_source_set_disable_governor (SYSPROF_GOVERNOR_SOURCE (source), TRUE); sysprof_governor_source_set_disable_governor (SYSPROF_GOVERNOR_SOURCE (source), TRUE);
sysprof_profiler_add_source (profiler, source); sysprof_profiler_add_source (profiler, source);
g_object_unref (source); g_object_unref (source);
} #endif
if (gnome_shell) if (gnome_shell)
{ {