From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752004AbdCCLZR (ORCPT ); Fri, 3 Mar 2017 06:25:17 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47289 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751449AbdCCLZN (ORCPT ); Fri, 3 Mar 2017 06:25:13 -0500 Subject: Re: [PATCH v7 8/8] perf tool: add cgroup identifier entry in perf report To: Arnaldo Carvalho de Melo References: <148768564246.30285.16450228018975882950.stgit@hbathini.in.ibm.com> <148768579375.30285.4755821132989024168.stgit@hbathini.in.ibm.com> <20170301211601.GN15145@kernel.org> Cc: ast@fb.com, peterz@infradead.org, lkml , alexander.shishkin@linux.intel.com, Ingo Molnar , daniel@iogearbox.net, rostedt@goodmis.org, Ananth N Mavinakayanahalli , ebiederm@xmission.com, sargun@sargun.me, Aravinda Prasad , brendan.d.gregg@gmail.com, jolsa@redhat.com From: Hari Bathini Date: Fri, 3 Mar 2017 14:29:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170301211601.GN15145@kernel.org> 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: 17030308-0024-0000-0000-000003AC1FEE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030308-0025-0000-0000-000011286425 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-03_06:,, 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-1702020001 definitions=main-1703030088 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 02 March 2017 02:46 AM, Arnaldo Carvalho de Melo wrote: > Em Tue, Feb 21, 2017 at 07:33:13PM +0530, Hari Bathini escreveu: >> This patch introduces a cgroup identifier entry field in perf report to >> identify or distinguish data of different cgroups. It uses the device >> number and inode number of cgroup namespace, included in perf data with >> the new PERF_RECORD_NAMESPACES event, as cgroup identifier. With the >> assumption that each container is created with it's own cgroup namespace, >> this allows assessment/analysis of multiple containers at once. > Could you try to do this with some real world example? I.e. telling that > systemd creates some cgroups and then how to map the perf report output > you show below with what systemd puts in place. > > Doing it with docker would be handy as well, no? Cgroup namespace is a relatively new thing in the kernel (v4.9). So, I am not sure if there is a real world example for this yet. A simple test in the meanwhile would be to clone() multiple processes by passing CLONE_NEWCROUP & SIGCHLD flags to each process, executing a shell and running different workloads on each of them while tracing. > You also forgot to update the documentation with this new sort key, > please add it in the --sort part of > tools/perf/Documentation/perf-report.txt. Sure. Will update. > Ah, and just another minor request: please format the changeset > summaries as: > > perf tools: Add cgroup identifier sort order keyword > > > First the component, that in this case is the generic one, as it affects > multiple tools (top, report), and then start with a capital letter after > the colon. > Sorry. I will take of this in next spin. Thanks Hari