From: Adrian Hunter <adrian.hunter@intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@gmail.com>,
Paul Mackerras <paulus@samba.org>,
Stephane Eranian <eranian@google.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH V6 00/25] perf tools: Introduce an abstraction for AUX Area and Instruction Tracing
Date: Mon, 16 Mar 2015 14:41:22 +0200 [thread overview]
Message-ID: <1426509707-24961-1-git-send-email-adrian.hunter@intel.com> (raw)
Hi
Here is V6 of some more preparatory patches for Intel PT
that introduce an abstraction for using the AUX area and
Instruction tracing.
The master branch of the tree:
git://git.infradead.org/users/ahunter/linux-perf.git
contains these patches and working Intel PT and Intel BTS.
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
Changes in V6:
Renamed itrace to auxtrace to better reflect the use of the
AUX area. In some cases itrace was retained where it seemed
to relate exclusively to Instruction Tracing.
Print warnings for separate auxtrace error types
Re-based on Arnaldo's perf/core branch:
107eb964d8c04417e8bce9e9ec2ed61d9261aec6
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Changes in V5:
perf tools: Add a user event for Instruction Tracing errors
Print error count from stats->nr_events
perf session: Add hooks to allow transparent decoding of Instruction Tracing data
Don't count Instruction Tracing errors (using stats->nr_events instead)
perf itrace: Add helpers for Instruction Tracing errors
Don't count Instruction Tracing errors (using stats->nr_events instead)
perf itrace: Add option to synthesize events for transactions
New patch
perf script: Add field option 'flags' to print sample flags
New patch
Re-based on tip perf/core branch:
94ac003b665fc04f13a7ab3b2be896b9b9503451
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Changes in V4:
perf tools: Add build option NO_ITRACE to exclude Instruction Tracing
New patch
Re-based on Arnaldo's perf/core branch:
3dd417d4010c8e141b0f32121cdc8d82aa4a9c6a
perf tools: Remove some unused functions from color.c
Changes in V3:
perf tools: Add support for Instruction Trace recording
Added evsel as a parameter to itrace_record__init
perf record: Add basic Instruction Tracing support
Moved the call to itrace_record__init after parse
options so that evsel could be passed and the
selected events used to determine what kind of
Instruction Tracing to use e.g. Intel PT vs BTS
Re-based on Arnaldo's perf/core branch:
41e950c033b7df997d4b38653efe6554be9b96a7
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Changes in V2:
Dropped patches already applied.
Re-based on Arnaldo's perf/core branch:
a84808083688d82d7f1e5786ccf5df0ff7d448cb
perf tools: Only override the default :tid comm entry
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 although the details of the AUX area are not implemented
because the kernel support is pending. 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 initial 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 (25):
perf header: Add AUX area tracing feature
perf evlist: Add initial 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
tools/perf/Documentation/perf-inject.txt | 27 +
tools/perf/Documentation/perf-record.txt | 2 +
tools/perf/Documentation/perf-report.txt | 29 +
tools/perf/Documentation/perf-script.txt | 38 +-
tools/perf/Makefile.perf | 2 +
tools/perf/builtin-buildid-list.c | 9 +
tools/perf/builtin-inject.c | 172 +++-
tools/perf/builtin-record.c | 167 +++-
tools/perf/builtin-report.c | 11 +
tools/perf/builtin-script.c | 74 +-
tools/perf/config/Makefile | 5 +
tools/perf/perf.h | 2 +
tools/perf/tests/make | 2 +
tools/perf/util/Build | 1 +
tools/perf/util/auxtrace.c | 1293 ++++++++++++++++++++++++++++++
tools/perf/util/auxtrace.h | 575 +++++++++++++
tools/perf/util/dso.c | 2 +
tools/perf/util/dso.h | 3 +
tools/perf/util/event.c | 3 +
tools/perf/util/event.h | 46 ++
tools/perf/util/evlist.c | 71 +-
tools/perf/util/evlist.h | 6 +
tools/perf/util/header.c | 37 +
tools/perf/util/header.h | 1 +
tools/perf/util/record.c | 11 +-
tools/perf/util/session.c | 169 +++-
tools/perf/util/session.h | 6 +
tools/perf/util/tool.h | 10 +-
28 files changed, 2720 insertions(+), 54 deletions(-)
create mode 100644 tools/perf/util/auxtrace.c
create mode 100644 tools/perf/util/auxtrace.h
Regards
Adrian
next reply other threads:[~2015-03-16 12:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 12:41 Adrian Hunter [this message]
2015-03-16 12:41 ` [PATCH V6 01/25] perf header: Add AUX area tracing feature Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 02/25] perf evlist: Add initial support for mmapping an AUX area buffer Adrian Hunter
2015-03-24 11:07 ` Jiri Olsa
2015-03-31 9:09 ` Adrian Hunter
2015-03-24 11:07 ` Jiri Olsa
2015-03-16 12:41 ` [PATCH V6 03/25] perf tools: Add user events for AUX area tracing Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 04/25] perf tools: Add support for AUX area recording Adrian Hunter
2015-03-24 11:07 ` Jiri Olsa
2015-03-24 11:07 ` Jiri Olsa
2015-03-16 12:41 ` [PATCH V6 05/25] perf record: Add basic AUX area tracing support Adrian Hunter
2015-03-24 11:07 ` Jiri Olsa
2015-03-16 12:41 ` [PATCH V6 06/25] perf record: Extend -m option for AUX area tracing mmap pages Adrian Hunter
2015-03-24 11:08 ` Jiri Olsa
2015-03-16 12:41 ` [PATCH V6 07/25] perf tools: Add a user event for AUX area tracing errors Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 08/25] perf session: Add hooks to allow transparent decoding of AUX area tracing data Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 09/25] perf session: Add instruction tracing options Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 10/25] perf auxtrace: Add helpers for AUX area tracing errors Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 11/25] perf auxtrace: Add helpers for queuing AUX area tracing data Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 12/25] perf auxtrace: Add a heap for sorting AUX area tracing queues Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 13/25] perf auxtrace: Add processing for AUX area tracing events Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 14/25] perf auxtrace: Add a hashtable for caching Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 15/25] perf tools: Add member to struct dso for an instruction cache Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 16/25] perf script: Add Instruction Tracing support Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 17/25] perf script: Always allow fields 'addr' and 'cpu' for auxtrace Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 18/25] perf report: Add Instruction Tracing support Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 19/25] perf inject: Re-pipe AUX area tracing events Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 20/25] perf inject: Add Instruction Tracing support Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 21/25] perf tools: Add AUX area tracing index Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 22/25] perf tools: Hit all build ids when AUX area tracing Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 23/25] perf tools: Add build option NO_AUXTRACE to exclude " Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 24/25] perf auxtrace: Add option to synthesize events for transactions Adrian Hunter
2015-03-16 12:41 ` [PATCH V6 25/25] perf script: Add field option 'flags' to print sample flags Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426509707-24961-1-git-send-email-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).