OSDN Git Service

tools/power turbostat: bugfix: --add u32 was printed as u64
authorLen Brown <len.brown@intel.com>
Thu, 23 Feb 2017 23:10:27 +0000 (18:10 -0500)
committerLen Brown <len.brown@intel.com>
Wed, 1 Mar 2017 05:14:26 +0000 (00:14 -0500)
commit5f3aea57773dc7f788e374994636ffc0234a355f
tree156d9a9144e8ffa4e227334b66d7fe902a35ba6c
parent0815a3d09baf2cd330f75020bdaad0f1adac0ecb
tools/power turbostat: bugfix: --add u32 was printed as u64

When the "u32" keyword is used with --add, it means that
the output should be truncated to 32-bits.  This was not
happening and all 64-bits were printed.

Also, when no column name was used for an added MSR,
The default column name was in deximal, eg. MSR16.
Users report that they tend to use hex MSR numbers,
so print them in hex.  To always fit into the columns,
use the syntax M0x10.  Note that the user can always
supply any column header that they want.

eg --add msr0x10,MY_TSC

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c