linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] perf intel-pt: Add PEBS-via-PT side-band
@ 2021-06-09 14:20 Adrian Hunter
  2021-06-09 14:20 ` [PATCH 1/3] perf/x86: Add new event for AUX output counter index Adrian Hunter
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Adrian Hunter @ 2021-06-09 14:20 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Leo Yan, Kan Liang, x86,
	linux-perf-users, linux-kernel

Hi

PEBS output to Intel Processor Trace was introduced with Atom
processors based on Tremont.  Currently there is software support
only for a single PEBS-via-PT event.

Here is support for multiple PEBS-via-PT events.

The first patch is the kernel change which adds a new event,
namely PERF_RECORD_AUX_OUTPUT_HW_ID which contains the counter
index.  That is output when the PEBS-via-PT event is enabled in hardware.
There is an optimization, to report the index only when it changes
for the event.  That will work only so long as all PEBS-via-PT
events are scheduled together, which they are for a recording
session because they are in a single group.

Also no attribute bit is used to select the new event, so a new
kernel is not compatible with older perf tools.  The assumption
being that PEBS-via-PT is sufficiently esoteric that users will not
be troubled by this.

The second patch adds the usual boiler plate to perf tools for
a new event.

The third patch adds support for processing the new event by
perf tool's Intel PT decoder.


Adrian Hunter (3):
      perf/x86: Add new event for AUX output counter index
      perf tools: Add support for PERF_RECORD_AUX_OUTPUT_HW_ID
      perf intel-pt: Add support for PERF_RECORD_AUX_OUTPUT_HW_ID

 arch/x86/events/core.c                     |  1 +
 arch/x86/events/intel/ds.c                 | 16 ++++++
 include/linux/perf_event.h                 |  2 +
 include/uapi/linux/perf_event.h            | 15 ++++++
 kernel/events/core.c                       | 30 +++++++++++
 tools/include/uapi/linux/perf_event.h      | 15 ++++++
 tools/lib/perf/include/perf/event.h        |  6 +++
 tools/perf/Documentation/perf-intel-pt.txt |  7 ++-
 tools/perf/builtin-inject.c                |  4 +-
 tools/perf/builtin-record.c                |  2 +-
 tools/perf/util/event.c                    | 18 +++++++
 tools/perf/util/event.h                    |  5 ++
 tools/perf/util/intel-pt.c                 | 85 ++++++++++++++++++++++++++++--
 tools/perf/util/machine.c                  | 10 ++++
 tools/perf/util/machine.h                  |  2 +
 tools/perf/util/session.c                  |  5 ++
 tools/perf/util/tool.h                     |  1 +
 17 files changed, 217 insertions(+), 7 deletions(-)


Regards
Adrian

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

end of thread, other threads:[~2021-06-30 11:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 14:20 [PATCH 0/3] perf intel-pt: Add PEBS-via-PT side-band Adrian Hunter
2021-06-09 14:20 ` [PATCH 1/3] perf/x86: Add new event for AUX output counter index Adrian Hunter
2021-06-25 12:06   ` Peter Zijlstra
2021-06-25 13:15   ` Peter Zijlstra
2021-06-30  9:21     ` Adrian Hunter
2021-06-30 11:04       ` Peter Zijlstra
2021-06-09 14:20 ` [PATCH 2/3] perf tools: Add support for PERF_RECORD_AUX_OUTPUT_HW_ID Adrian Hunter
2021-06-09 14:20 ` [PATCH 3/3] perf intel-pt: " Adrian Hunter
2021-06-21  6:15 ` [PATCH 0/3] perf intel-pt: Add PEBS-via-PT side-band 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).