Skip to content

Commit

Permalink
tools/power turbostat: Force --no-perf in --dump mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patryk Wlazlyn authored and Len Brown committed Nov 30, 2024
1 parent 03109e2 commit bcfab87
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit bcfab87

Please sign in to comment.