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);
} }
#ifdef __linux__
source = sysprof_governor_source_new ();
if (no_throttle) if (no_throttle)
{ sysprof_governor_source_set_disable_governor (SYSPROF_GOVERNOR_SOURCE (source), TRUE);
source = sysprof_governor_source_new (); sysprof_profiler_add_source (profiler, source);
sysprof_governor_source_set_disable_governor (SYSPROF_GOVERNOR_SOURCE (source), TRUE); g_object_unref (source);
sysprof_profiler_add_source (profiler, source); #endif
g_object_unref (source);
}
if (gnome_shell) if (gnome_shell)
{ {