summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>2024-10-24 15:17:45 +0200
committerLen Brown <len.brown@intel.com>2024-11-30 16:42:07 -0500
commitbcfab87108b33f20d847fd71a2a93114dd2ce83e (patch)
tree4e3468d7b683f3312e8ef7781ba653bc7aceca4e
parent03109e2f0d18dcb84218bd91c4fbf864193ca934 (diff)
tools/power turbostat: Force --no-perf in --dump mode
Force the --no-perf early to prevent using it as a source. User asks for raw values, but perf returns them relative to the opening of the file descriptor. Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--tools/power/x86/turbostat/turbostat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index b250676c174e..1fed799a5537 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -9897,6 +9897,12 @@ void cmdline(int argc, char **argv)
break;
case 'D':
dump_only++;
+ /*
+ * Force the no_perf early to prevent using it as a source.
+ * User asks for raw values, but perf returns them relative
+ * to the opening of the file descriptor.
+ */
+ no_perf = 1;
break;
case 'e':
/* --enable specified counter */