]> git.karo-electronics.de Git - karo-tx-linux.git/commit
perf/x86: Add ability to calculate TSC from perf sample timestamps
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 28 Jun 2013 13:22:18 +0000 (16:22 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 23 Jul 2013 10:17:45 +0000 (12:17 +0200)
commitc73deb6aecda2955716f31572516f09d930ef450
tree037f7945cb4289545d5ffbe9506e071a83d6c1a6
parent860f085b74e9f0075de8140ed3a1e5b5e3e39aa8
perf/x86: Add ability to calculate TSC from perf sample timestamps

For modern CPUs, perf clock is directly related to TSC.  TSC
can be calculated from perf clock and vice versa using a simple
calculation.  Two of the three componenets of that calculation
are already exported in struct perf_event_mmap_page.  This patch
exports the third.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: http://lkml.kernel.org/r/1372425741-1676-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/tsc.h
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/tsc.c
include/uapi/linux/perf_event.h