From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946044AbbGQM0Y (ORCPT ); Fri, 17 Jul 2015 08:26:24 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:33978 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbbGQM0X (ORCPT ); Fri, 17 Jul 2015 08:26:23 -0400 Date: Fri, 17 Jul 2015 14:26:17 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: Aravinda Prasad , linux-kernel@vger.kernel.org, rostedt@goodmis.org, mingo@redhat.com, paulus@samba.org, acme@kernel.org, hbathini@linux.vnet.ibm.com, ananth@in.ibm.com Subject: Re: [RFC PATCH] perf: Container-aware tracing support Message-ID: <20150717122617.GA18916@gmail.com> References: <20150715090836.16376.80760.stgit@aravindap> <20150715124741.GL2859@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150715124741.GL2859@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > On Wed, Jul 15, 2015 at 02:38:36PM +0530, Aravinda Prasad wrote: > > Current tracing infrastructure such as perf and ftrace reports system > > wide data when invoked inside a container. It is required to restrict > > events specific to a container context when such tools are invoked > > inside a container. > > > > This RFC patch supports filtering container specific events, without > > any change in the user interface, when invoked within a container for > > the perf utility; such support needs to be extended to ftrace. This > > patch assumes that the debugfs is available within the container and > > all the processes running inside a container are grouped into a single > > perf_event subsystem of cgroups. This patch piggybacks on the existing > > support available for tracing with cgroups [1] by setting the cgrp > > member of the event structure to the cgroup of the context perf tool > > is invoked from. > > > > However, this patch is not complete and requires more work to fully > > support tracing inside a container. This patch is intended to initiate > > the discussion on having container-aware tracing support. A detailed > > explanation on what is supported and pending issues are mentioned > > below. > > tracing is outside the scope of perf; I suspect you want tracefs to be > sensitive to filesystem namespaces and all that that entails. I'd correct that to: > ftrace is outside the scope of perf; I suspect you want tracefs to be > sensitive to filesystem namespaces and all that that entails. because perf very much does tracing as well, we have 'perf trace' for example, and obviously the whole ring-buffer is a trace buffer and perf.data is a trace dump of that. Thanks, Ingo