All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>,
	ast@fb.com, lkml <linux-kernel@vger.kernel.org>,
	acme@kernel.org, alexander.shishkin@linux.intel.com,
	mingo@redhat.com, daniel@iogearbox.net, rostedt@goodmis.org,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	sargun@sargun.me, Aravinda Prasad <aravinda@linux.vnet.ibm.com>,
	brendan.d.gregg@gmail.com
Subject: Re: [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info
Date: Thu, 22 Dec 2016 14:24:49 +0100	[thread overview]
Message-ID: <20161222132449.GL3107@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <87r350gtay.fsf@xmission.com>

On Thu, Dec 22, 2016 at 11:19:17PM +1300, Eric W. Biederman wrote:
> Peter Zijlstra <peterz@infradead.org> writes:
> 
> > On Thu, Dec 22, 2016 at 08:21:23PM +1300, Eric W. Biederman wrote:
> >> 
> >> And please make the array the last item in the structure so that
> >> expanding or contracting it does not affect the ability to read the rest
> >> of the structure.
> >
> > Sorry, sample_id must be last, because hysterical crud :/
> >
> > (basically because that was the only way to add a field to records like
> > PERF_RECORD_MMAP which used the record length to determine the
> > filename[] length, yes I know, we won't ever do that again).
> 
> Why does historical crud need to affect new records?

Because now the userspace parser expects sample_id to be the tail
field. Basically decoding a record now looks like:

	if (sample_id_all) {
		sample_id = (sample_id *)((char *)record + record->size - sizeof(sample_id));
		record->size -= sizeof(sample_id);
	}
	/* process record */

We could of course create more exceptions..

> Totally confused.  This looks like a major mess.

Not major, but yes, its ugly, but its also ABI :-(

  reply	other threads:[~2016-12-22 13:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 18:36 [PATCH v4 0/3] perf: add support for analyzing events for containers Hari Bathini
2016-12-15 18:37 ` [PATCH v4 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini
2016-12-15 18:46   ` Peter Zijlstra
2016-12-16  6:27     ` Hari Bathini
2016-12-16  7:57       ` Peter Zijlstra
2016-12-16 18:21         ` Hari Bathini
2016-12-16 20:05           ` Peter Zijlstra
2016-12-21 13:09             ` Hari Bathini
2016-12-21 13:24               ` Peter Zijlstra
2016-12-21 15:56                 ` Hari Bathini
2016-12-22  7:21                   ` Eric W. Biederman
2016-12-22  7:53                     ` Peter Zijlstra
2016-12-22 10:19                       ` Eric W. Biederman
2016-12-22 13:24                         ` Peter Zijlstra [this message]
2016-12-22 18:20                           ` Eric W. Biederman
2016-12-15 18:37 ` [PATCH v4 2/3] perf tool: " Hari Bathini
2016-12-17 17:40   ` Jiri Olsa
2016-12-21 13:18     ` Hari Bathini
2016-12-15 18:37 ` [PATCH v4 3/3] perf tool: add cgroup identifier entry in perf report Hari Bathini
2016-12-29  1:41 ` [PATCH v4 0/3] perf: add support for analyzing events for containers Krister Johansen
2017-01-03 11:27   ` Hari Bathini
2017-01-04  9:04     ` Krister Johansen
2017-01-04 11:45       ` Hari Bathini
2017-01-11 11:16       ` Aravinda Prasad
2017-01-11 14:45         ` Eric W. Biederman

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=20161222132449.GL3107@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=aravinda@linux.vnet.ibm.com \
    --cc=ast@fb.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=ebiederm@xmission.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=sargun@sargun.me \
    /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.