linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] perf/x86: Add ability to sample TSC
@ 2015-02-20 12:44 Adrian Hunter
  2015-02-20 12:44 ` [PATCH V2 1/2] perf: Sample additional clock value Adrian Hunter
  2015-02-20 12:44 ` [PATCH V2 2/2] perf/x86: Provide TSC for PERF_SAMPLE_CLOCK_PT Adrian Hunter
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Hunter @ 2015-02-20 12:44 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, linux-kernel, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Namhyung Kim, Paul Mackerras,
	Stephane Eranian, John Stultz, Thomas Gleixner, Pawel Moll,
	Steven Rostedt, Andi Kleen, Mathieu Poirier

Hi

TSC is needed to synchronize Intel Processor Trace (Intel PT)
with perf event samples. Refer to patch 1 for more details.

There is a description of Intel PT in the Intel Architecture
manuals:

http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html 

With the advent of switching perf_clock to CLOCK_MONOTONIC,
it will not be possible to convert perf_clock directly to/from
TSC. So add the ability to sample TSC instead.

Changes in V2:
    perf: Sample additional clock value
        Rename "Architecture specific clock" to
        "Processor trace clock" 
        Rename PERF_SAMPLE_CLOCK_ARCH -> PERF_SAMPLE_CLOCK_PT etc
        Expand commit message

    perf/x86: Provide TSC for PERF_SAMPLE_CLOCK_PT
        Rename PERF_SAMPLE_CLOCK_ARCH -> PERF_SAMPLE_CLOCK_PT etc
        Expand commit message


Adrian Hunter (2):
      perf: Sample additional clock value
      perf/x86: Provide TSC for PERF_SAMPLE_CLOCK_PT

 arch/x86/include/asm/perf_event.h |  6 ++++++
 arch/x86/kernel/cpu/perf_event.c  | 10 ++++++++++
 include/linux/perf_event.h        |  3 ++-
 include/uapi/linux/perf_event.h   | 19 +++++++++++++++++--
 kernel/events/core.c              | 30 ++++++++++++++++++++++++++++++
 kernel/events/internal.h          |  4 ++++
 6 files changed, 69 insertions(+), 3 deletions(-)


Regards
Adrian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-23  7:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 12:44 [PATCH V2 0/2] perf/x86: Add ability to sample TSC Adrian Hunter
2015-02-20 12:44 ` [PATCH V2 1/2] perf: Sample additional clock value Adrian Hunter
2015-02-20 17:06   ` David Ahern
2015-02-23  7:29     ` Adrian Hunter
2015-02-20 12:44 ` [PATCH V2 2/2] perf/x86: Provide TSC for PERF_SAMPLE_CLOCK_PT Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).