All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] perf: add ability to sample physical data addresses
@ 2013-06-21 14:20 Stephane Eranian
  2013-06-21 14:20 ` [PATCH 1/8] perf,x86: disable PEBS-LL in intel_pmu_pebs_disable() Stephane Eranian
                   ` (9 more replies)
  0 siblings, 10 replies; 47+ messages in thread
From: Stephane Eranian @ 2013-06-21 14:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, ak, acme, jolsa, namhyung.kim

This patch series extends perf_events with the ability to sample
physical data addresses. This is useful with the memory access
sampling mode added just recently. In particular, it helps
disambiguate data addresses between two processes, such as
in the case of a shared memory segment mapped at different
addresses in different processes.

The patch adds the PERF_SAMPLE_PHYS_ADDR sample_type.
A 64-bit address is added to the sample record for
the corresponding event.

On Intel X86, it is used with the PEBS Load Latency
support. On other architectures, zero is returned.

The patch series also demonstrates the use of this
new feature by extending perf report, mem, record
with a --phys-addr option. When enable, it will 
capture physical data address and display it.
This is implemented as a new sort_order (symbol_paddr).

$ perf mem --phys-addr -t load rec ...
$ perf mem --phys-addr -t load rep ...

Note that for now on X86, only user addresses are converted
to physical whenever possible. Kernel addresses will show
as -1.

Thanks to Hugh Dickins for the uvirt_to_phys_nmi() code.

The series contains a couple of patches related to
PEBS in general:
 - Patch 1 contains a small bug fix to clear the PEBS-LL
   bits in pebs_enable in intel_pmu_pebs_disable().

 - Patch 2 removes event->flags because it is not used
   anymore. The code now uses event->hw.constraints->flags.

Signed-off-by: Stephane Eranian <eranian@google.com>
---

Stephane Eranian (8):
  perf,x86: disable PEBS-LL in intel_pmu_pebs_disable()
  perf,x86: drop event->flags and use hw.constraint->flags
  perf,x86: add uvirt_to_phys_nmi helper function
  perf: add PERF_SAMPLE_PHYS_ADDR sample type
  perf,x86: add support for PERF_SAMPLE_PHYS_ADDR for PEBS-LL
  perf tools: add infrastructure to handle PERF_SAMPLE_PHYS_ADDR
  perf record: add option to sample physical load/store addresses
  perf mem: add physical addr sampling support

 arch/x86/include/asm/uaccess.h            |   1 +
 arch/x86/kernel/cpu/perf_event_intel.c    |   6 +-
 arch/x86/kernel/cpu/perf_event_intel_ds.c |  28 +++++---
 arch/x86/lib/usercopy.c                   |  43 +++++++++++
 include/linux/perf_event.h                |   3 +-
 include/uapi/linux/perf_event.h           |   3 +-
 kernel/events/core.c                      |   6 ++
 tools/perf/Documentation/perf-record.txt  |   4 ++
 tools/perf/builtin-mem.c                  | 116 +++++++++++++++++++++++-------
 tools/perf/builtin-record.c               |   2 +
 tools/perf/builtin-report.c               |   2 +-
 tools/perf/perf.h                         |   1 +
 tools/perf/util/event.h                   |   1 +
 tools/perf/util/evsel.c                   |  16 ++++-
 tools/perf/util/hist.c                    |   4 +-
 tools/perf/util/hist.h                    |   1 +
 tools/perf/util/machine.c                 |   1 +
 tools/perf/util/session.c                 |   6 ++
 tools/perf/util/sort.c                    |  42 +++++++++++
 tools/perf/util/sort.h                    |   1 +
 tools/perf/util/symbol.h                  |   1 +
 21 files changed, 243 insertions(+), 45 deletions(-)

-- 
1.8.1.2


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

end of thread, other threads:[~2013-07-30 16:16 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 14:20 [PATCH 0/8] perf: add ability to sample physical data addresses Stephane Eranian
2013-06-21 14:20 ` [PATCH 1/8] perf,x86: disable PEBS-LL in intel_pmu_pebs_disable() Stephane Eranian
2013-06-24  8:44   ` Peter Zijlstra
2013-06-26  7:35     ` Stephane Eranian
2013-06-27  9:01   ` [tip:perf/core] perf/x86: Disable " tip-bot for Stephane Eranian
2013-06-21 14:20 ` [PATCH 2/8] perf,x86: drop event->flags and use hw.constraint->flags Stephane Eranian
2013-06-24  8:45   ` Peter Zijlstra
2013-06-26  7:36     ` Stephane Eranian
2013-06-26 10:36       ` Peter Zijlstra
2013-06-27 10:23         ` Stephane Eranian
2013-06-27 10:48           ` Peter Zijlstra
2013-06-27 11:01             ` Stephane Eranian
2013-06-27 11:14               ` Peter Zijlstra
2013-06-27 12:33                 ` Stephane Eranian
2013-06-27 14:10                   ` Peter Zijlstra
2013-06-21 14:20 ` [PATCH 3/8] perf,x86: add uvirt_to_phys_nmi helper function Stephane Eranian
2013-06-21 14:20 ` [PATCH 4/8] perf: add PERF_SAMPLE_PHYS_ADDR sample type Stephane Eranian
2013-06-21 14:20 ` [PATCH 5/8] perf,x86: add support for PERF_SAMPLE_PHYS_ADDR for PEBS-LL Stephane Eranian
2013-06-21 14:20 ` [PATCH 6/8] perf tools: add infrastructure to handle PERF_SAMPLE_PHYS_ADDR Stephane Eranian
2013-06-21 14:20 ` [PATCH 7/8] perf record: add option to sample physical load/store addresses Stephane Eranian
2013-06-21 14:20 ` [PATCH 8/8] perf mem: add physical addr sampling support Stephane Eranian
2013-06-23 21:58 ` [PATCH 0/8] perf: add ability to sample physical data addresses Jiri Olsa
2013-06-24  8:16   ` Stephane Eranian
2013-06-24  8:45     ` Jiri Olsa
2013-06-24  8:43 ` Peter Zijlstra
2013-06-25  9:59   ` Stephane Eranian
2013-06-25 10:47     ` Peter Zijlstra
2013-06-25 10:51       ` Ingo Molnar
2013-06-26 10:33         ` Peter Zijlstra
2013-06-26 19:10           ` Stephane Eranian
2013-06-28  9:58             ` Peter Zijlstra
2013-07-05 22:48               ` Stephane Eranian
2013-07-08  8:19                 ` Peter Zijlstra
2013-07-09  6:02                   ` Stephane Eranian
2013-07-30  8:02                   ` Stephane Eranian
2013-07-30  8:37                     ` Peter Zijlstra
2013-07-30  8:51                       ` Stephane Eranian
2013-07-30  9:02                         ` Peter Zijlstra
2013-07-30 13:09                           ` Stephane Eranian
2013-07-30 14:21                             ` Stephane Eranian
2013-07-30 14:50                               ` David Ahern
2013-07-30 14:53                                 ` Stephane Eranian
2013-07-30 14:59                                   ` David Ahern
2013-07-30 15:52                               ` Peter Zijlstra
2013-07-30 16:09                                 ` Stephane Eranian
2013-07-30 16:16                                   ` Peter Zijlstra
2013-06-26 13:29       ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.