Re: [PATCH 0/7] perf/x86-ibs and tools: Add support for AMD IBS

From: Stephane Eranian
Date: Thu May 31 2012 - 11:24:59 EST


Robert,

I think the script ibs.pl would be more useful if it were to offer the
option to decrypt
each IBS register. I am not a Perl programmer, so I had a hard time
understanding
the way one can use pack()/unpack() to extract bitfields from a u64 value.

On Wed, May 2, 2012 at 8:26 PM, Robert Richter <robert.richter@xxxxxxx> wrote:
> 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
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/