All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com,
	acme@redhat.com, jolsa@redhat.com, namhyung.kim@lge.com,
	dsahern@gmail.com
Subject: [PATCH v1 0/2] perf: add new PERF_RECORD_MMAP2 record type
Date: Tue, 13 Aug 2013 13:55:55 +0200	[thread overview]
Message-ID: <1376394957-31691-1-git-send-email-eranian@google.com> (raw)

This patch series introduces a new record type for mmaps. This
new record is called PERF_RECORD_MMAP2. It provides more information
than the existing PERF_RECORD_MMAP. For each file-backed or
shared memory segment mapping, the device major, minor and the
inode numbers are recorded. This triplet may be used to
disambiguate virtual file-backed mappings between processes.

The triplet could not be fitted into the existing PERF_RECORD_MMAP
record without breaking backward compatibility. This is why we
introduce this new record type.

To activate this new record type, the mmap2 bit must be set
in perf_event_attr struct. It supersedes the mmap bit, but is
distinct from mmap_data. For mmap2 data records, both mmap2 and
mmap_data must be set. For code, only mmap2 must be set.

The series also provides the perf tool support for this new
MMAP2 record type. Perf record activates this mode by default.
The maj, min, ino are not yet exploited by perf report but
will be in subsequent perf tools.

Patch is relative to tip.git

Signed-off-by: Stephane Eranian <eranian@google.com>
---

Stephane Eranian (2):
  perf: add attr->mmap2 attribute to an event
  perf tools: add attr->mmap2 support

 include/uapi/linux/perf_event.h |   22 +++++++++++++++-
 kernel/events/core.c            |   41 ++++++++++++++++++++++++++---
 tools/perf/builtin-annotate.c   |    1 +
 tools/perf/builtin-inject.c     |   15 +++++++++++
 tools/perf/builtin-mem.c        |    1 +
 tools/perf/builtin-report.c     |    1 +
 tools/perf/builtin-script.c     |    1 +
 tools/perf/util/build-id.c      |    1 +
 tools/perf/util/event.c         |   55 ++++++++++++++++++++++++++++++---------
 tools/perf/util/event.h         |   18 +++++++++++++
 tools/perf/util/evsel.c         |    5 ++--
 tools/perf/util/header.c        |    3 +++
 tools/perf/util/machine.c       |   51 +++++++++++++++++++++++++++++++++++-
 tools/perf/util/machine.h       |    1 +
 tools/perf/util/map.c           |    7 ++++-
 tools/perf/util/map.h           |    6 +++--
 tools/perf/util/session.c       |   25 +++++++++++++++++-
 tools/perf/util/tool.h          |    1 +
 18 files changed, 231 insertions(+), 24 deletions(-)

-- 
1.7.9.5


             reply	other threads:[~2013-08-13 11:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 11:55 Stephane Eranian [this message]
2013-08-13 11:55 ` [PATCH v1 1/2] perf: add attr->mmap2 attribute to an event Stephane Eranian
2013-08-15 10:26   ` Peter Zijlstra
2013-08-19  9:14     ` Stephane Eranian
2013-08-21  9:56       ` Stephane Eranian
2013-08-21  9:55     ` Stephane Eranian
2013-08-13 11:55 ` [PATCH v1 2/2] perf tools: add attr->mmap2 support Stephane Eranian
2013-08-13 23:34   ` Andi Kleen
2013-08-14 10:30     ` Stephane Eranian
2013-08-14 16:43       ` Andi Kleen

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=1376394957-31691-1-git-send-email-eranian@google.com \
    --to=eranian@google.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung.kim@lge.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.