Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753772AbcKNKqY (ORCPT ); Mon, 14 Nov 2016 05:46:24 -0500 Received: from merlin.infradead.org ([205.233.59.134]:33546 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbcKNKqX (ORCPT ); Mon, 14 Nov 2016 05:46:23 -0500 Date: Mon, 14 Nov 2016 11:46:12 +0100 From: Peter Zijlstra To: Hari Bathini Cc: ast@fb.com, lkml , acme@kernel.org, alexander.shishkin@linux.intel.com, mingo@redhat.com, daniel@iogearbox.net, rostedt@goodmis.org, Ananth N Mavinakayanahalli , ebiederm@xmission.com, sargun@sargun.me, Aravinda Prasad , brendan.d.gregg@gmail.com Subject: Re: [PATCH 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Message-ID: <20161114104612.GA3102@twins.programming.kicks-ass.net> References: <147877784354.29988.8570048236764105701.stgit@hbathini.in.ibm.com> <147877788475.29988.17221764769834489874.stgit@hbathini.in.ibm.com> <20161110131905.GU3117@twins.programming.kicks-ass.net> <334ecc4f-aacf-4cbe-8858-7ec674f98b24@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <334ecc4f-aacf-4cbe-8858-7ec674f98b24@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 35 On Mon, Nov 14, 2016 at 04:02:30PM +0530, Hari Bathini wrote: > >> PERF_RECORD_SWITCH_CPU_WIDE = 15, > >>+ /* > >>+ * struct { > >>+ * struct perf_event_header header; > >>+ * > >>+ * u32 pid, tid; > >>+ * u64 time; > >>+ * u32 uts_ns_inum; > >>+ * u32 ipc_ns_inum; > >>+ * u32 mnt_ns_inum; > >>+ * u32 pid_ns_inum; > >>+ * u32 net_ns_inum; > >>+ * u32 cgroup_ns_inum; > >>+ * u32 user_ns_inum; > >>+ * struct sample_id sample_id; > >>+ * }; > >>+ */ > >>+ PERF_RECORD_NAMESPACES = 16, > >So this format is not extensible, that is, if someone adds yet another > >namespace, we'll need to introduce PERF_RECORD_NAMESPACES2. > > > >Is there a 'natural' and exposed namespace index that we can use to > >change it like: > > > > u32 nr_nss; > > u32 namespace[nr_nss]; > > > >? > > Nothing of that sort exists, currently. > Maybe, time to introduce with this patch-set..? Would be good, but you'll have to sort that with the namespace folks.