]> www.infradead.org Git - nvme.git/commitdiff
tools/power turbostat: Force --no-perf in --dump mode
authorPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Thu, 24 Oct 2024 13:17:45 +0000 (15:17 +0200)
committerLen Brown <len.brown@intel.com>
Sat, 30 Nov 2024 21:42:07 +0000 (16:42 -0500)
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>
tools/power/x86/turbostat/turbostat.c

index b250676c174e7f0ebdec20c7c962c39f69f383ed..1fed799a55379e3f1d9e2813f07b2e4a1695701d 100644 (file)
@@ -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 */