Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582450

Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info

Path csiph.com!1.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!news.unit0.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info
Date Thu, 16 Feb 2017 11:40:02 +0100
Message-ID <tbrDI-4Tz-27@gated-at.bofh.it> (permalink)
References <t8vXc-6oU-27@gated-at.bofh.it> <t8vXd-6oU-49@gated-at.bofh.it> <tbru2-4Oj-9@gated-at.bofh.it>
X-Original-To Hari Bathini <hbathini@linux.vnet.ibm.com>
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=itXHChC6u0/N5gwx+vb+SDfeo1puuqTf9110q+w2D08=; b=N9tSlStFojfKQIrGh5TgLxcD8 Xw4jFYYm6S1FIAdXQMng4y8XoXEUAqDPpFK3VJ63QqzhIqzob/oEIlWTyXjyPsGL78JysWiZF/FB9 Ei9/1PHTaaoJS5Yo3sZKDBnasdz9wVfXJ2pmyvt/iXWxNAGmYZY5RciC7niG3XglfSRkBTaZUolLH g01/XyqXe0LZuiI2suYcNaCoHXvQ/YU9vEzJdiaBqBV6cfvgzgcZ0oynS9lF9+JCNq8ZMYK1BwB3B h3Ii4QNxBqB39z2VpA+Qtq0gEejmIL9BL1XohEypnTgEhC69xky8x9PYOI+ginfTM7FlQ2faGKvyG oogcn7KHA==;
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.23.1 (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 29
Organization linux.* mail to news gateway
X-Original-Cc 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>, ebiederm@xmission.com, sargun@sargun.me, Aravinda Prasad <aravinda@linux.vnet.ibm.com>, brendan.d.gregg@gmail.com, jolsa@redhat.com
X-Original-Date Thu, 16 Feb 2017 11:36:37 +0100
X-Original-Message-ID <20170216103637.GL6536@twins.programming.kicks-ass.net>
X-Original-References <148654265580.27983.8822211570127163843.stgit@hbathini.in.ibm.com> <148654268436.27983.5340774362600828412.stgit@hbathini.in.ibm.com> <20170216102824.GZ6515@twins.programming.kicks-ass.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1582450

Show key headers only | View raw


On Thu, Feb 16, 2017 at 11:28:24AM +0100, Peter Zijlstra wrote:
> On Wed, Feb 08, 2017 at 02:01:24PM +0530, Hari Bathini wrote:
> > @@ -862,6 +886,18 @@ enum perf_event_type {
> >  	 */
> >  	PERF_RECORD_SWITCH_CPU_WIDE		= 15,
> >  
> > +	/*
> > +	 * struct {
> > +	 *	struct perf_event_header	header;
> > +	 *	u32				pid;
> > +	 *	u32				tid;
> > +	 *	u32				nr_namespaces;
> > +	 *	struct namespace_link_info	link_info[NAMESPACES_MAX];
> > +	 *	struct sample_id		sample_id;
> > +	 * };
> > +	 */
> > +	PERF_RECORD_NAMESPACES			= 16,
> 
> This thing works by accident, there's a u32 hole in that structure.
> Also, the array isn't NAMESPACES_MAX long, its nr_namespaces, that's
> what its there for. The entries should be internally consistent.

Also, namespace_link_info isn't specified.

Easies would be to write something like:

	{ char name[8];
	  u64  inode;
	  u64  dev;    }[nr_namespace];

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2017-02-16 11:30 +0100
  Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2017-02-16 11:40 +0100
  Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-02-20 05:20 +0100

csiph-web