linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/44] perf tools: Introduce an abstraction for AUX Area  and Instruction Tracing
@ 2015-04-09 15:53 Adrian Hunter
  2015-04-09 15:53 ` [PATCH 01/44] perf header: Add AUX area tracing feature Adrian Hunter
                   ` (43 more replies)
  0 siblings, 44 replies; 79+ messages in thread
From: Adrian Hunter @ 2015-04-09 15:53 UTC (permalink / raw)
  To: Peter Zijlstra, Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Namhyung Kim, Stephane Eranian

Hi

Here are patches for the introduction of an abstraction for
using the AUX area and Instruction tracing. This patch
set now include support for Intel PT / Intel BTS.

The first 25 patches have been sent before and some have
Jiri's acks. One patch that Jiri acked "perf evlist: Add
support for mmapping an AUX area buffer" has been since
modified slightly so I dropped the ack.

Intel BTS can be used on most recent Intel CPUs. Intel PT
is available on Broadwell.

Examples:

	Trace 'ls' with Intel BTS userspace only

	perf record --per-thread -e intel_bts//u ls
	perf report
	perf script

	Trace 'ls' with Intel BTS kernel and userspace

	~/libexec/perf-core/perf-with-kcore record bts-ls --per-thread -e intel_bts// -- ls
	~/libexec/perf-core/perf-with-kcore report bts-ls
	~/libexec/perf-core/perf-with-kcore script bts-ls

	Trace 'ls' with Intel PT userspace only

	perf record -e intel_pt//u ls
	perf report
	perf script

	Trace 'ls' with Intel PT kernel and userspace

	~/libexec/perf-core/perf-with-kcore record pt-ls -e intel_pt// -- ls
	~/libexec/perf-core/perf-with-kcore report pt-ls
	~/libexec/perf-core/perf-with-kcore script pt-ls


The abstraction has two separate aspects:
	1. recording AUX area data
	2. processing AUX area data

Recording consists of mmapping a separate buffer and copying
the data into the perf.data file.  The buffer is an AUX area
buffer.  The data is written preceded by a new user event
PERF_RECORD_AUXTRACE.  The data is too big to fit in the event
but follows immediately afterward. Session processing has to
skip to get to the next event header in a similar fashion to
the existing PERF_RECORD_HEADER_TRACING_DATA
event.  The main recording patches are:

      perf evlist: Add support for mmapping an AUX area buffer
      perf tools: Add user events for AUX area tracing
      perf tools: Add support for AUX area recording
      perf record: Add basic AUX area tracing support

Processing consists of providing hooks in session processing
to enable a decoder to see all the events and deliver synthesized
events transparently into the event stream.  The main processing
patch is:

      perf session: Add hooks to allow transparent decoding of AUX area tracing data


Adrian Hunter (44):
      perf header: Add AUX area tracing feature
      perf evlist: Add support for mmapping an AUX area buffer
      perf tools: Add user events for AUX area tracing
      perf tools: Add support for AUX area recording
      perf record: Add basic AUX area tracing support
      perf record: Extend -m option for AUX area tracing mmap pages
      perf tools: Add a user event for AUX area tracing errors
      perf session: Add hooks to allow transparent decoding of AUX area tracing data
      perf session: Add instruction tracing options
      perf auxtrace: Add helpers for AUX area tracing errors
      perf auxtrace: Add helpers for queuing AUX area tracing data
      perf auxtrace: Add a heap for sorting AUX area tracing queues
      perf auxtrace: Add processing for AUX area tracing events
      perf auxtrace: Add a hashtable for caching
      perf tools: Add member to struct dso for an instruction cache
      perf script: Add Instruction Tracing support
      perf script: Always allow fields 'addr' and 'cpu' for auxtrace
      perf report: Add Instruction Tracing support
      perf inject: Re-pipe AUX area tracing events
      perf inject: Add Instruction Tracing support
      perf tools: Add AUX area tracing index
      perf tools: Hit all build ids when AUX area tracing
      perf tools: Add build option NO_AUXTRACE to exclude AUX area tracing
      perf auxtrace: Add option to synthesize events for transactions
      perf script: Add field option 'flags' to print sample flags
      perf tools: Add aux_watermark member of struct perf_event_attr
      perf tools: Add support for PERF_RECORD_AUX
      perf tools: Add support for PERF_RECORD_ITRACE_START
      perf tools: Add AUX area tracing Snapshot Mode
      perf record: Add AUX area tracing Snapshot Mode support
      perf auxtrace: Add Intel PT as an AUX area tracing type
      perf tools: Add Intel PT packet decoder
      perf tools: Add Intel PT instruction decoder
      perf tools: Add Intel PT log
      perf tools: Add Intel PT decoder
      perf tools: Add Intel PT support
      perf tools: Take Intel PT into use
      perf tools: Allow auxtrace data alignment
      perf tools: Add Intel BTS support
      perf tools: Output sample flags and insn_len from intel_pt
      perf tools: Output sample flags and insn_len from intel_bts
      perf tools: Intel PT to always update thread stack trace number
      perf tools: Intel BTS to always update thread stack trace number
      perf tools: Add example call-graph script

 tools/build/Makefile.build                         |    2 +
 tools/perf/.gitignore                              |    2 +
 tools/perf/Documentation/intel-bts.txt             |   67 +
 tools/perf/Documentation/intel-pt.txt              |  537 ++++
 tools/perf/Documentation/perf-inject.txt           |   27 +
 tools/perf/Documentation/perf-record.txt           |    9 +
 tools/perf/Documentation/perf-report.txt           |   29 +
 tools/perf/Documentation/perf-script.txt           |   38 +-
 tools/perf/Makefile.perf                           |    8 +-
 tools/perf/arch/x86/util/Build                     |    3 +
 tools/perf/arch/x86/util/auxtrace.c                |   82 +
 tools/perf/arch/x86/util/pmu.c                     |   15 +
 tools/perf/builtin-buildid-list.c                  |    9 +
 tools/perf/builtin-inject.c                        |  174 +-
 tools/perf/builtin-record.c                        |  270 +-
 tools/perf/builtin-report.c                        |   11 +
 tools/perf/builtin-script.c                        |   74 +-
 tools/perf/config/Makefile                         |    5 +
 tools/perf/perf.h                                  |    5 +
 .../scripts/python/call-graph-from-postgresql.py   |  285 +++
 tools/perf/tests/make                              |    2 +
 tools/perf/util/Build                              |    4 +
 tools/perf/util/auxtrace.c                         | 1362 ++++++++++
 tools/perf/util/auxtrace.h                         |  646 +++++
 tools/perf/util/dso.c                              |    2 +
 tools/perf/util/dso.h                              |    3 +
 tools/perf/util/event.c                            |   42 +
 tools/perf/util/event.h                            |   70 +
 tools/perf/util/evlist.c                           |   71 +-
 tools/perf/util/evlist.h                           |    6 +
 tools/perf/util/evsel.c                            |    1 +
 tools/perf/util/header.c                           |   37 +
 tools/perf/util/header.h                           |    1 +
 tools/perf/util/intel-bts.c                        | 1353 ++++++++++
 tools/perf/util/intel-bts.h                        |   31 +
 tools/perf/util/intel-pt-decoder/Build             |   14 +
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 1738 +++++++++++++
 .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |   89 +
 .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |  246 ++
 .../util/intel-pt-decoder/intel-pt-insn-decoder.h  |   65 +
 tools/perf/util/intel-pt-decoder/intel-pt-log.c    |  155 ++
 tools/perf/util/intel-pt-decoder/intel-pt-log.h    |   52 +
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   |  400 +++
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   64 +
 tools/perf/util/intel-pt.c                         | 2637 ++++++++++++++++++++
 tools/perf/util/intel-pt.h                         |   35 +
 tools/perf/util/machine.c                          |   21 +
 tools/perf/util/machine.h                          |    4 +
 tools/perf/util/parse-options.h                    |    4 +
 tools/perf/util/record.c                           |   11 +-
 tools/perf/util/session.c                          |  184 +-
 tools/perf/util/session.h                          |    6 +
 tools/perf/util/tool.h                             |   12 +-
 53 files changed, 10971 insertions(+), 49 deletions(-)
 create mode 100644 tools/perf/Documentation/intel-bts.txt
 create mode 100644 tools/perf/Documentation/intel-pt.txt
 create mode 100644 tools/perf/arch/x86/util/auxtrace.c
 create mode 100644 tools/perf/arch/x86/util/pmu.c
 create mode 100644 tools/perf/scripts/python/call-graph-from-postgresql.py
 create mode 100644 tools/perf/util/auxtrace.c
 create mode 100644 tools/perf/util/auxtrace.h
 create mode 100644 tools/perf/util/intel-bts.c
 create mode 100644 tools/perf/util/intel-bts.h
 create mode 100644 tools/perf/util/intel-pt-decoder/Build
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.h
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-log.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-log.h
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
 create mode 100644 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.h
 create mode 100644 tools/perf/util/intel-pt.c
 create mode 100644 tools/perf/util/intel-pt.h


Regards
Adrian


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

end of thread, other threads:[~2015-05-06  3:04 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09 15:53 [PATCH 00/44] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing Adrian Hunter
2015-04-09 15:53 ` [PATCH 01/44] perf header: Add AUX area tracing feature Adrian Hunter
2015-05-06  2:58   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 02/44] perf evlist: Add support for mmapping an AUX area buffer Adrian Hunter
2015-05-06  2:58   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 03/44] perf tools: Add user events for AUX area tracing Adrian Hunter
2015-04-20 23:06   ` Arnaldo Carvalho de Melo
2015-04-20 23:10     ` Arnaldo Carvalho de Melo
2015-04-21  9:23     ` Adrian Hunter
2015-05-06  2:59   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 04/44] perf tools: Add support for AUX area recording Adrian Hunter
2015-04-20 23:17   ` Arnaldo Carvalho de Melo
2015-05-06  2:59   ` [tip:perf/core] perf auxtrace: " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 05/44] perf record: Add basic AUX area tracing support Adrian Hunter
2015-05-06  2:59   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 06/44] perf record: Extend -m option for AUX area tracing mmap pages Adrian Hunter
2015-05-06  2:59   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 07/44] perf tools: Add a user event for AUX area tracing errors Adrian Hunter
2015-05-06  3:00   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 08/44] perf session: Add hooks to allow transparent decoding of AUX area tracing data Adrian Hunter
2015-04-21 14:41   ` Arnaldo Carvalho de Melo
2015-04-21 14:46     ` Arnaldo Carvalho de Melo
2015-05-06  3:00   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 09/44] perf session: Add instruction tracing options Adrian Hunter
2015-04-21 14:50   ` Arnaldo Carvalho de Melo
2015-04-22  6:23     ` Adrian Hunter
2015-04-23 14:08       ` Arnaldo Carvalho de Melo
2015-05-06  3:00   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 10/44] perf auxtrace: Add helpers for AUX area tracing errors Adrian Hunter
2015-05-06  3:01   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 11/44] perf auxtrace: Add helpers for queuing AUX area tracing data Adrian Hunter
2015-04-21  9:21   ` [PATCH V2 " Adrian Hunter
2015-05-06  3:01     ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 12/44] perf auxtrace: Add a heap for sorting AUX area tracing queues Adrian Hunter
2015-04-21 15:01   ` Arnaldo Carvalho de Melo
2015-05-06  3:01   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 13/44] perf auxtrace: Add processing for AUX area tracing events Adrian Hunter
2015-05-06  3:01   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 14/44] perf auxtrace: Add a hashtable for caching Adrian Hunter
2015-05-06  3:02   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 15/44] perf tools: Add member to struct dso for an instruction cache Adrian Hunter
2015-05-06  3:02   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 16/44] perf script: Add Instruction Tracing support Adrian Hunter
2015-05-06  3:02   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:53 ` [PATCH 17/44] perf script: Always allow fields 'addr' and 'cpu' for auxtrace Adrian Hunter
2015-04-09 15:53 ` [PATCH 18/44] perf report: Add Instruction Tracing support Adrian Hunter
2015-04-23 14:16   ` Arnaldo Carvalho de Melo
2015-04-09 15:53 ` [PATCH 19/44] perf inject: Re-pipe AUX area tracing events Adrian Hunter
2015-04-21  9:21   ` [PATCH V2 " Adrian Hunter
2015-05-06  3:03     ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:54 ` [PATCH 20/44] perf inject: Add Instruction Tracing support Adrian Hunter
2015-05-06  3:03   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:54 ` [PATCH 21/44] perf tools: Add AUX area tracing index Adrian Hunter
2015-04-09 15:54 ` [PATCH 22/44] perf tools: Hit all build ids when AUX area tracing Adrian Hunter
2015-04-09 15:54 ` [PATCH 23/44] perf tools: Add build option NO_AUXTRACE to exclude " Adrian Hunter
2015-04-21  9:21   ` [PATCH V2 " Adrian Hunter
2015-04-09 15:54 ` [PATCH 24/44] perf auxtrace: Add option to synthesize events for transactions Adrian Hunter
2015-04-09 15:54 ` [PATCH 25/44] perf script: Add field option 'flags' to print sample flags Adrian Hunter
2015-05-06  3:03   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:54 ` [PATCH 26/44] perf tools: Add aux_watermark member of struct perf_event_attr Adrian Hunter
2015-05-06  3:03   ` [tip:perf/core] " tip-bot for Adrian Hunter
2015-04-09 15:54 ` [PATCH 27/44] perf tools: Add support for PERF_RECORD_AUX Adrian Hunter
2015-04-09 15:54 ` [PATCH 28/44] perf tools: Add support for PERF_RECORD_ITRACE_START Adrian Hunter
2015-04-09 15:54 ` [PATCH 29/44] perf tools: Add AUX area tracing Snapshot Mode Adrian Hunter
2015-04-09 15:54 ` [PATCH 30/44] perf record: Add AUX area tracing Snapshot Mode support Adrian Hunter
2015-04-09 15:54 ` [PATCH 31/44] perf auxtrace: Add Intel PT as an AUX area tracing type Adrian Hunter
2015-04-09 15:54 ` [PATCH 32/44] perf tools: Add Intel PT packet decoder Adrian Hunter
2015-04-09 15:54 ` [PATCH 33/44] perf tools: Add Intel PT instruction decoder Adrian Hunter
2015-04-09 15:54 ` [PATCH 34/44] perf tools: Add Intel PT log Adrian Hunter
2015-04-09 15:54 ` [PATCH 35/44] perf tools: Add Intel PT decoder Adrian Hunter
2015-04-09 15:54 ` [PATCH 36/44] perf tools: Add Intel PT support Adrian Hunter
2015-04-09 15:54 ` [PATCH 37/44] perf tools: Take Intel PT into use Adrian Hunter
2015-04-09 15:54 ` [PATCH 38/44] perf tools: Allow auxtrace data alignment Adrian Hunter
2015-04-09 15:54 ` [PATCH 39/44] perf tools: Add Intel BTS support Adrian Hunter
2015-04-09 15:54 ` [PATCH 40/44] perf tools: Output sample flags and insn_len from intel_pt Adrian Hunter
2015-04-09 15:54 ` [PATCH 41/44] perf tools: Output sample flags and insn_len from intel_bts Adrian Hunter
2015-04-09 15:54 ` [PATCH 42/44] perf tools: Intel PT to always update thread stack trace number Adrian Hunter
2015-04-09 15:54 ` [PATCH 43/44] perf tools: Intel BTS " Adrian Hunter
2015-04-09 15:54 ` [PATCH 44/44] perf tools: Add example call-graph script 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).