tools/power turbostat: make fewer systems calls
authorLen Brown <len.brown@intel.com>
Sat, 27 Feb 2016 01:51:02 +0000 (20:51 -0500)
committerLen Brown <len.brown@intel.com>
Sun, 13 Mar 2016 07:55:40 +0000 (03:55 -0400)
commit36229897ba966bb0dc9e060222ff17b198252367
tree338ca7d3fa3ce6553b7b6a58bd40568a99a4a5de
parent58cc30a4e6086d542302e04eea39b2a438e4c5dd
tools/power turbostat: make fewer systems calls

skip the open(2)/close(2) on each msr read
by keeping the /dev/cpu/*/msr files open.

The remaining read(2) is generally far fewer cycles
than the removed open(2) system call.

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