From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754012AbcIBN7u (ORCPT ); Fri, 2 Sep 2016 09:59:50 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:59290 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbcIBN7s (ORCPT ); Fri, 2 Sep 2016 09:59:48 -0400 Date: Fri, 2 Sep 2016 15:59:36 +0200 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 v2 1/2] perf: add container identifier entry in perf sample data Message-ID: <20160902135936.GH10153@twins.programming.kicks-ass.net> References: <147257440426.24873.5447719305627561023.stgit@hbathini.in.ibm.com> <20160901090941.GO10153@twins.programming.kicks-ass.net> <58edcf4e-80d4-3b0e-773d-29d28070392d@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58edcf4e-80d4-3b0e-773d-29d28070392d@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 On Fri, Sep 02, 2016 at 07:25:31PM +0530, Hari Bathini wrote: > >I'm thinking this value is mostly the same for tasks, just like COMM and > > I think so, too. Namespaces aren't changed that often for tasks... > > >MMAP. Could we therefore not emit (sideband) events whenever a task > >changes namespace and get the same information but with tons less data? > > You mean, something like PERF_RECORD_NAMESPACE that > emits events on fork, clone, setns..? Yep. > > >That also gives the possibility of recording all namespaces, not just > >the one. > > True. If we record all namespaces, container identifier interpretation > can be left to the userspace to decide, which is much more flexible... The only complication is initial state, on record start you'd have to trawl /proc and generate 'fake' namespace records for all (relevant) tasks. We do the same with MMAP records, we parse /proc/$pid/maps for that. Is this namespace stuff available in /proc somewhere?