From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932786AbcIBQzR (ORCPT ); Fri, 2 Sep 2016 12:55:17 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46839 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932338AbcIBQzQ (ORCPT ); Fri, 2 Sep 2016 12:55:16 -0400 X-IBM-Helo: d28dlp03.in.ibm.com X-IBM-MailFrom: hbathini@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] perf: add container identifier entry in perf sample data To: Peter Zijlstra 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> <20160902135936.GH10153@twins.programming.kicks-ass.net> 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 From: Hari Bathini Date: Fri, 2 Sep 2016 22:25:02 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160902135936.GH10153@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16090216-0060-0000-0000-0000011FA9D4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16090216-0061-0000-0000-00000F4D2ED7 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-02_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1609020225 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 02 September 2016 07:29 PM, Peter Zijlstra wrote: > 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. Ok. Thanks! > >>> 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? > Yes, Peter. /proc/$pid/ns Will work on this and respin... Thanks Hari