From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Stephane Eranian <eranian@google.com>,
Namhyung Kim <namhyung@gmail.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"ak@linux.intel.com" <ak@linux.intel.com>
Subject: Re: [RFC] perf record: missing buildid for callstack modules
Date: Thu, 14 Jan 2016 12:27:34 +0100 [thread overview]
Message-ID: <20160114112733.GB17869@gmail.com> (raw)
In-Reply-To: <20160113124039.GA3421@worktop>
* Peter Zijlstra <peterz@infradead.org> wrote:
> The current problem with that is that we use the 'remaining' size as
> the length field for a string (with the PERF_RECORD_MMAP* records).
>
> We could of course fix that no problem.
>
>
> ---
> include/uapi/linux/perf_event.h | 27 ++++++++++++++++++++++++++-
> kernel/events/core.c | 35 ++++++++++++++++++++++++-----------
> 2 files changed, 50 insertions(+), 12 deletions(-)
>
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index 1afe9623c1a7..b7b673387581 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -340,7 +340,8 @@ struct perf_event_attr {
> comm_exec : 1, /* flag comm events that are due to an exec */
> use_clockid : 1, /* use @clockid for time fields */
> context_switch : 1, /* context switch data */
> - __reserved_1 : 37;
> + mmap3 : 1, /* include mmap with mtime */
> + __reserved_1 : 36;
>
> union {
> __u32 wakeup_events; /* wakeup every n events */
> @@ -856,6 +857,30 @@ enum perf_event_type {
> */
> PERF_RECORD_SWITCH_CPU_WIDE = 15,
>
> + /*
> + * The MMAP3 records are an augmented version of MMAP2, they add
> + * mtime and filename_len, allowing for size based extensions.
> + *
> + * struct {
> + * struct perf_event_header header;
> + *
> + * u32 pid, tid;
> + * u64 addr;
> + * u64 len;
> + * u64 pgoff;
> + * u32 maj;
> + * u32 min;
> + * u64 ino;
> + * u64 ino_generation;
> + * u32 prot, flags;
> + * u64 mtime;
> + * u32 filename_len;
> + * char filename[2+];
> + * struct sample_id sample_id;
> + * }
> + */
> + PERF_RECORD_MMAP3 = 16,
> +
> PERF_RECORD_MAX, /* non-ABI */
> };
Yeah, very nice!
And this means v3 should be the last ever version - all future extensions can
happen via the length field.
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
next prev parent reply other threads:[~2016-01-14 11:27 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 21:56 [RFC] perf record: missing buildid for callstack modules Stephane Eranian
2016-01-07 21:57 ` Andi Kleen
2016-01-07 22:00 ` Stephane Eranian
2016-01-07 21:59 ` Arnaldo Carvalho de Melo
2016-01-07 22:00 ` Stephane Eranian
2016-01-07 22:47 ` Namhyung Kim
2016-01-07 23:47 ` Arnaldo Carvalho de Melo
2016-01-08 18:01 ` Stephane Eranian
2016-01-08 18:19 ` Arnaldo Carvalho de Melo
2016-01-11 17:30 ` Peter Zijlstra
2016-01-11 18:22 ` Arnaldo Carvalho de Melo
2016-01-11 20:06 ` Stephane Eranian
2016-01-12 10:39 ` Ingo Molnar
2016-01-12 11:35 ` Peter Zijlstra
2016-01-12 12:18 ` Ingo Molnar
2016-01-12 13:40 ` Peter Zijlstra
2016-01-12 14:38 ` Arnaldo Carvalho de Melo
2016-01-12 15:34 ` Peter Zijlstra
2016-01-12 15:48 ` Arnaldo Carvalho de Melo
2016-01-12 16:10 ` Peter Zijlstra
2016-01-12 16:27 ` Peter Zijlstra
2016-01-12 17:15 ` Arnaldo Carvalho de Melo
2016-01-13 10:21 ` Ingo Molnar
2016-01-13 12:40 ` Peter Zijlstra
2016-01-14 11:27 ` Ingo Molnar [this message]
2016-01-14 11:36 ` Peter Zijlstra
2016-01-15 1:59 ` Stephane Eranian
2016-01-15 9:34 ` Peter Zijlstra
2016-01-15 18:58 ` Stephane Eranian
2016-01-15 19:49 ` Arnaldo Carvalho de Melo
2016-01-15 21:49 ` Stephane Eranian
2016-01-15 21:36 ` Peter Zijlstra
2016-01-12 21:02 ` Stephane Eranian
2016-01-12 13:08 ` One Thousand Gnomes
2016-01-12 14:34 ` Arnaldo Carvalho de Melo
2016-01-12 15:37 ` Peter Zijlstra
2016-01-13 10:25 ` Ingo Molnar
2016-01-12 14:23 ` Arnaldo Carvalho de Melo
2016-01-13 9:57 ` Ingo Molnar
2016-01-13 15:27 ` Arnaldo Carvalho de Melo
2016-01-19 14:56 ` Namhyung Kim
2016-01-19 15:27 ` Peter Zijlstra
2016-01-19 15:48 ` Arnaldo Carvalho de Melo
2016-01-09 10:31 ` Namhyung Kim
2016-01-11 9:27 ` Adrian Hunter
2016-01-11 11:02 ` Namhyung Kim
2016-01-11 11:54 ` 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=20160114112733.GB17869@gmail.com \
--to=mingo@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
--cc=namhyung@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 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.