[sysprof] sysprof-cli: always create governor source
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] sysprof-cli: always create governor source
- Date: Wed, 24 Feb 2021 22:01:13 +0000 (UTC)
commit 7ca4acc30d9f942e9dac22b4ae2cfbe4583afa37
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 24 11:58:59 2021 -0800
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 7590e05..5553073 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]