From: Patryk Wlazlyn Date: Thu, 24 Oct 2024 13:17:45 +0000 (+0200) Subject: tools/power turbostat: Force --no-perf in --dump mode X-Git-Tag: nvme-6.13-2024-12-31~27^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bcfab87108b33f20d847fd71a2a93114dd2ce83e;p=nvme.git 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 Signed-off-by: Len Brown --- 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 */