aboutsummaryrefslogtreecommitdiff
path: root/tools/power/x86/turbostat/Makefile
AgeCommit message (Collapse)Author
2015-04-18tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for ↵Thomas D
O= option in Makefile Since commit ee0778a30153 ("tools/power: turbostat: make Makefile a bit more capable") turbostat's Makefile is using [...] BUILD_OUTPUT := $(PWD) [...] which obviously causes trouble when building "turbostat" with make -C /usr/src/linux/tools/power/x86/turbostat ARCH=x86 turbostat because GNU make does not update nor guarantee that $PWD is set. This patch changes the Makefile to use $CURDIR instead, which GNU make guarantees to set and update (i.e. when using "make -C ...") and also adds support for the O= option (see "make help" in your root of your kernel source tree for more details). Link: https://bugs.gentoo.org/show_bug.cgi?id=533918 Fixes: ee0778a30153 ("tools/power: turbostat: make Makefile a bit more capable") Signed-off-by: Thomas D. <whissi@whissi.de> Cc: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Len Brown <len.brown@intel.com>
2014-01-18turbostat: Don't put unprocessed uapi headers in the include pathJosh Triplett
turbostat's Makefile puts arch/x86/include/uapi/ in the include path, so that it can include <asm/msr.h> from it. It isn't in general safe to include even uapi headers directly from the kernel tree without processing them through scripts/headers_install.sh, but asm/msr.h happens to work. However, that include path can break with some versions of system headers, by overriding some system headers with the unprocessed versions directly from the kernel source. For instance: In file included from /build/x86-generic/usr/include/bits/sigcontext.h:28:0, from /build/x86-generic/usr/include/signal.h:339, from /build/x86-generic/usr/include/sys/wait.h:31, from turbostat.c:27: ../../../../arch/x86/include/uapi/asm/sigcontext.h:4:28: fatal error: linux/compiler.h: No such file or directory This occurs because the system bits/sigcontext.h on that build system includes <asm/sigcontext.h>, and asm/sigcontext.h in the kernel source includes <linux/compiler.h>, which scripts/headers_install.sh would have filtered out. Since turbostat really only wants a single header, just include that one header rather than putting an entire directory of kernel headers on the include path. In the process, switch from msr.h to msr-index.h, since turbostat just wants the MSR numbers. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Cc: stable@vger.kernel.org Signed-off-by: Len Brown <len.brown@intel.com>
2012-12-18Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull powertool update from Len Brown: "This updates the tree w/ the latest version of turbostat, which reports temperature and - on SNB and later - Watts." Fix up semantic merge conflict as per Len. * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools: Allow tools to be installed in a user specified location tools/power: turbostat: make Makefile a bit more capable tools/power x86_energy_perf_policy: close /proc/stat in for_every_cpu() tools/power turbostat: v3.0: monitor Watts and Temperature tools/power turbostat: fix output buffering issue tools/power turbostat: prevent infinite loop on migration error path x86 power: define RAPL MSRs tools/power/x86/turbostat: share kernel MSR #defines
2012-11-30tools/power: turbostat: make Makefile a bit more capableMark Asselstine
The turbostat Makefile is pretty simple, its output is placed in the same directory as the source, the install rule has no concept of a prefix or sysroot, and you can set CC to use a specific compiler but not use the more familiar CROSS_COMPILE. By making a few minor changes these limitations are removed while leaving the default behavior matching what it used to be. Example build with these changes: make CROSS_COMPILE=i686-wrs-linux-gnu- DESTDIR=/tmp install or from the tools directory make CROSS_COMPILE=i686-wrs-linux-gnu- DESTDIR=/tmp turbostat_install Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-11-23tools/power/x86/turbostat: share kernel MSR #definesLen Brown
Now that turbostat is built in the kernel tree, it can share MSR #defines with the kernel. Signed-off-by: Len Brown <len.brown@intel.com> Cc: x86@kernel.org
2012-07-19tools/power: turbostat v2 - re-write for efficiencyLen Brown
Measuring large profoundly-idle configurations requires turbostat to be more lightweight. Otherwise, the operation of turbostat itself can interfere with the measurements. This re-write makes turbostat topology aware. Hardware is accessed in "topology order". Redundant hardware accesses are deleted. Redundant output is deleted. Also, output is buffered and local RDTSC use replaces remote MSR access for TSC. From a feature point of view, the output looks different since redundant figures are absent. Also, there are now -c and -p options -- to restrict output to the 1st thread in each core, and the 1st thread in each package, respectively. This is helpful to reduce output on big systems, where more detail than the "-s" system summary is desired. Finally, periodic mode output is now on stdout, not stderr. Turbostat v2 is also slightly more robust in handling run-time CPU online/offline events, as it now checks the actual map of on-line cpus rather than just the total number of on-line cpus. Signed-off-by: Len Brown <len.brown@intel.com>
2011-01-11tools: create power/x86/turbostatLen Brown
turbostat is a Linux tool to observe proper operation of Intel(R) Turbo Boost Technology. turbostat displays the actual processor frequency on x86 processors that include APERF and MPERF MSRs. Note that turbostat is of limited utility on Linux kernels 2.6.29 and older, as acpi_cpufreq cleared APERF/MPERF up through that release. On Intel Core i3/i5/i7 (Nehalem) and newer processors, turbostat also displays residency in idle power saving states, which are necessary for diagnosing any cpuidle issues that may have an effect on turbo-mode. See the turbostat.8 man page for example usage. Signed-off-by: Len Brown <len.brown@intel.com>