mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	Robert Richter <robert.richter@amd.com>
Subject: [PATCH 0/7] perf/x86-ibs and tools: Add support for AMD IBS
Date: Wed, 2 May 2012 20:26:25 +0200	[thread overview]
Message-ID: <1335983192-23731-1-git-send-email-robert.richter@amd.com> (raw)

This patch set adds perf tool support for AMD IBS. Mostly perf tool
patches, but

 perf/x86-ibs: Add support for IBS pseudo events

includes kernel changes.

It basically implements:

 * General perf tool support for dynamically allocated pmus,
 * Support for IBS pseudo events,
 * perf-script support for IBS (updated version).

With this patches there is the possibility to add pmu handler code for
a specific pmu. If a pmu with handler code is listed in sysfs, it is
activated and can be used with perf tools. E.g. perf-list shows
available events of this pmu and the event parser of perf-record is
able to setup profiling for that particular pmu. This mechanism is
used to implement pmus for ibs (ibs_op/ibs_fetch).

IBS pseudo events are derived from an IBS sample and determined
through a combination of one or more IBS event flags or values.
E.g. one could profile mispredicted branches with ibs using such
pseudo events:

 # perf record -a -e ibs_op:MISPREDICTED_BRANCH ...

This is implemented with kernel side filtering of ibs samples by
passing filter settings to the kernel (attr.config1/config2).

I also attached an updated version of my previously posted patch that
implements perf-script support for ibs. This is usefull for a user to
dump raw ibs samples. The script can be used by the user as a basis
for a script that post-processes ibs samples.

Changes can be pulled from kernel.org and are available in the git
repository at:

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

-Robert


Robert Richter (7):
  perf tools: Fix generation of pmu list
  perf tools: Add basic dynamic PMU support
  perf tools: Add parser for dynamic PMU events
  perf/x86-ibs: Add support for IBS pseudo events
  perf, tools: Add raw event support for dynamic allocated pmus
  perf tools: Add pmu mappings to header information
  perf script: Add script to collect and display IBS samples

 arch/x86/kernel/cpu/perf_event_amd_ibs.c |   83 ++++++-
 tools/perf/Makefile                      |    1 +
 tools/perf/scripts/perl/bin/ibs-record   |   23 ++
 tools/perf/scripts/perl/bin/ibs-report   |    6 +
 tools/perf/scripts/perl/ibs.pl           |   47 ++++
 tools/perf/util/header.c                 |   78 ++++++
 tools/perf/util/header.h                 |    1 +
 tools/perf/util/parse-events.c           |   45 +++-
 tools/perf/util/parse-events.h           |    4 +-
 tools/perf/util/parse-events.y           |   11 +-
 tools/perf/util/pmu-ibs.c                |  419 ++++++++++++++++++++++++++++++
 tools/perf/util/pmu.c                    |  102 +++++++-
 tools/perf/util/pmu.h                    |   19 ++
 13 files changed, 828 insertions(+), 11 deletions(-)
 create mode 100644 tools/perf/scripts/perl/bin/ibs-record
 create mode 100644 tools/perf/scripts/perl/bin/ibs-report
 create mode 100644 tools/perf/scripts/perl/ibs.pl
 create mode 100644 tools/perf/util/pmu-ibs.c

-- 
1.7.8.4



             reply	other threads:[~2012-05-02 18:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 18:26 Robert Richter [this message]
2012-05-02 18:26 ` [PATCH 1/7] perf tools: Fix generation of pmu list Robert Richter
2012-05-02 18:26 ` [PATCH 2/7] perf tools: Add basic dynamic PMU support Robert Richter
2012-05-02 18:26 ` [PATCH 3/7] perf tools: Add parser for dynamic PMU events Robert Richter
2012-05-07 11:01   ` Peter Zijlstra
2012-05-07 17:05     ` Robert Richter
2012-05-07 17:10       ` Peter Zijlstra
2012-05-02 18:26 ` [PATCH 4/7] perf/x86-ibs: Add support for IBS pseudo events Robert Richter
2012-05-07 11:00   ` Peter Zijlstra
2012-05-07 14:47     ` Robert Richter
2012-05-07 15:15       ` Peter Zijlstra
2012-05-07 16:03         ` Robert Richter
2012-05-07 12:08   ` Peter Zijlstra
2012-05-07 13:03   ` Peter Zijlstra
2012-05-07 15:44     ` Robert Richter
2012-05-07 15:51       ` Peter Zijlstra
2012-05-07 15:58         ` Robert Richter
2012-05-07 15:21   ` Stephane Eranian
2012-05-07 15:29     ` Peter Zijlstra
2012-05-07 15:52       ` Robert Richter
2012-05-02 18:26 ` [PATCH 5/7] perf, tools: Add raw event support for dynamic allocated pmus Robert Richter
2012-05-07 13:05   ` Peter Zijlstra
2012-05-07 14:20     ` Peter Zijlstra
2012-05-02 18:26 ` [PATCH 6/7] perf tools: Add pmu mappings to header information Robert Richter
2012-05-02 18:26 ` [PATCH 7/7] perf script: Add script to collect and display IBS samples Robert Richter
2012-05-31 15:24 ` [PATCH 0/7] perf/x86-ibs and tools: Add support for AMD IBS Stephane Eranian
2012-05-31 15:51   ` Robert Richter

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=1335983192-23731-1-git-send-email-robert.richter@amd.com \
    --to=robert.richter@amd.com \
    --cc=acme@redhat.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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

Powered by JetHome