linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] perf/x86-ibs: Precise event sampling with IBS for AMD CPUs
@ 2012-04-02 18:19 Robert Richter
  2012-04-02 18:19 ` [PATCH 01/12] perf/x86-ibs: Fix update of period Robert Richter
                   ` (12 more replies)
  0 siblings, 13 replies; 48+ messages in thread
From: Robert Richter @ 2012-04-02 18:19 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo, LKML,
	Robert Richter

This patch set adds support for precise event sampling with IBS. It
also contains IBS fixes and updates not directly related to precise
event sampling, but found during testing. There are no changes of perf
tools required, thus this set only contains kernel patches. There will
be also updated perf tools patches available that basically base on my
previous postings to this list and additionally implement IBS pseudo
events.

With IBS there are two counting modes available to count either cycles
or micro-ops. If the corresponding performance counter events (hw
events) are setup with the precise flag set, the request is redirected
to the ibs pmu:

 perf record -a -e cpu-cycles:p ...    # use ibs op counting cycle count
 perf record -a -e r076:p ...          # same as -e cpu-cycles:p
 perf record -a -e r0C1:p ...          # use ibs op counting micro-ops

Each IBS sample contains a linear address that points to the
instruction that was causing the sample to trigger. With ibs we have
skid 0.

Though the skid is 0, we map IBS sampling to following precise levels:

 1: RIP taken from IBS sample or (if invalid) from stack.
 2: RIP always taken from IBS sample, samples with an invalid rip
    are dropped. Thus samples of an event containing two precise
    modifiers (e.g. r076:pp) only contain (precise) addresses
    detected with IBS.

Precise level 3 is reserved for other purposes in the future.

The patches base on a trivial merge of tip/perf/core into
tip/perf/x86-ibs. The merge and also the patches are available here:

The following changes since commit 820b3e44dc22ac8072cd5ecf82d62193392fcca3:

  Merge remote-tracking branch 'tip/perf/core' into HEAD (2012-03-21 19:15:20 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git perf-ibs

-Robert


Robert Richter (12):
  perf/x86-ibs: Fix update of period
  perf: Pass last sampling period to perf_sample_data_init()
  perf/x86-ibs: Enable ibs op micro-ops counting mode
  perf/x86-ibs: Fix frequency profiling
  perf/x86-ibs: Take instruction pointer from ibs sample
  perf/x86-ibs: Precise event sampling with IBS for AMD CPUs
  perf/x86-ibs: Rename some variables
  perf/x86-ibs: Trigger overflow if remaining period is too small
  perf/x86-ibs: Extend hw period that triggers overflow
  perf/x86-ibs: Implement workaround for IBS erratum #420
  perf/x86-ibs: Catch spurious interrupts after stopping ibs
  perf/x86-ibs: Fix usage of IBS op current count

 arch/alpha/kernel/perf_event.c            |    3 +-
 arch/arm/kernel/perf_event_v6.c           |    4 +-
 arch/arm/kernel/perf_event_v7.c           |    4 +-
 arch/arm/kernel/perf_event_xscale.c       |    8 +-
 arch/mips/kernel/perf_event_mipsxx.c      |    2 +-
 arch/powerpc/kernel/perf_event.c          |    3 +-
 arch/powerpc/kernel/perf_event_fsl_emb.c  |    3 +-
 arch/sparc/kernel/perf_event.c            |    4 +-
 arch/x86/include/asm/perf_event.h         |    6 +-
 arch/x86/kernel/cpu/perf_event.c          |    4 +-
 arch/x86/kernel/cpu/perf_event_amd.c      |    7 +-
 arch/x86/kernel/cpu/perf_event_amd_ibs.c  |  274 +++++++++++++++++++++--------
 arch/x86/kernel/cpu/perf_event_intel.c    |    4 +-
 arch/x86/kernel/cpu/perf_event_intel_ds.c |    6 +-
 arch/x86/kernel/cpu/perf_event_p4.c       |    6 +-
 include/linux/perf_event.h                |    5 +-
 kernel/events/core.c                      |    9 +-
 17 files changed, 237 insertions(+), 115 deletions(-)

-- 
1.7.8.4



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

end of thread, other threads:[~2012-05-09 14:39 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-02 18:19 [PATCH 00/12] perf/x86-ibs: Precise event sampling with IBS for AMD CPUs Robert Richter
2012-04-02 18:19 ` [PATCH 01/12] perf/x86-ibs: Fix update of period Robert Richter
2012-05-09 14:29   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 02/12] perf: Pass last sampling period to perf_sample_data_init() Robert Richter
2012-05-09 14:30   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 03/12] perf/x86-ibs: Enable ibs op micro-ops counting mode Robert Richter
2012-05-09 14:31   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 04/12] perf/x86-ibs: Fix frequency profiling Robert Richter
2012-05-09 14:32   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 05/12] perf/x86-ibs: Take instruction pointer from ibs sample Robert Richter
2012-05-09 14:33   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 06/12] perf/x86-ibs: Precise event sampling with IBS for AMD CPUs Robert Richter
2012-04-14 10:21   ` Peter Zijlstra
2012-04-23  9:56     ` Robert Richter
2012-04-27 12:34       ` Robert Richter
2012-04-27 12:39         ` Stephane Eranian
2012-04-27 12:54           ` Robert Richter
2012-04-27 13:10             ` Stephane Eranian
2012-04-27 15:18               ` Robert Richter
2012-04-27 15:30                 ` Peter Zijlstra
2012-04-27 15:57                   ` Stephane Eranian
2012-04-27 15:30             ` Peter Zijlstra
2012-04-27 16:09               ` Robert Richter
2012-04-27 16:21                 ` Peter Zijlstra
2012-04-27 16:23                   ` Stephane Eranian
2012-04-14 10:22   ` Peter Zijlstra
2012-04-23  8:41     ` Robert Richter
2012-04-23 10:36       ` Peter Zijlstra
2012-04-14 10:24   ` Peter Zijlstra
2012-04-23 10:08     ` Robert Richter
2012-05-02 10:33   ` [PATCH v2] " Robert Richter
2012-05-02 11:14     ` Peter Zijlstra
2012-05-04 17:53       ` Peter Zijlstra
2012-05-09 14:34     ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 07/12] perf/x86-ibs: Rename some variables Robert Richter
2012-05-09 14:34   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 08/12] perf/x86-ibs: Trigger overflow if remaining period is too small Robert Richter
2012-05-09 14:35   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 09/12] perf/x86-ibs: Extend hw period that triggers overflow Robert Richter
2012-05-09 14:36   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 10/12] perf/x86-ibs: Implement workaround for IBS erratum #420 Robert Richter
2012-05-09 14:37   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 11/12] perf/x86-ibs: Catch spurious interrupts after stopping ibs Robert Richter
2012-05-09 14:38   ` [tip:perf/core] perf/x86-ibs: Catch spurious interrupts after stopping IBS tip-bot for Robert Richter
2012-04-02 18:19 ` [PATCH 12/12] perf/x86-ibs: Fix usage of IBS op current count Robert Richter
2012-05-09 14:39   ` [tip:perf/core] " tip-bot for Robert Richter
2012-04-02 19:11 ` [PATCH 00/12] perf/x86-ibs: Precise event sampling with IBS for AMD CPUs Ingo Molnar
2012-04-03 10:48   ` Robert Richter

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).