Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752422Ab0BWRyN (ORCPT ); Tue, 23 Feb 2010 12:54:13 -0500 Received: from fg-out-1718.google.com ([72.14.220.153]:13432 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086Ab0BWRyL (ORCPT ); Tue, 23 Feb 2010 12:54:11 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Q9+J0OSjPGGo7cg8py52nwRQa18hOFyA2Dv6p3R9EutYzgoO526QqHfszgmU46hb11 HtDdQGm3xV9KjzWaOcYszLuhsOkPZkZDjSmBr3CMtK7b5ciuU7qDV1HwsPkO+8wnjrO2 gT3Yk1NpJJT6HQGHjHPFQCf/vnvk6RJ/Vru00= Date: Tue, 23 Feb 2010 18:54:06 +0100 From: Frederic Weisbecker To: Tom Zanussi , Ingo Molnar , Peter Zijlstra , Paul Mackerras , Arnaldo Carvalho de Melo Cc: Keiichi KII , linux-kernel@vger.kernel.org, lwoodman@redhat.com, linux-mm@kvack.org, mingo@elte.hu, riel@redhat.com, rostedt@goodmis.org, akpm@linux-foundation.org, Munehiro Ikeda , Atsushi Tsuji Subject: Re: [RFC PATCH -tip 2/2 v2] add a scripts for pagecache usage per process Message-ID: <20100223175402.GE5357@nowhere> References: <4B5A3D00.8080901@bx.jp.nec.com> <4B5A3E19.6060502@bx.jp.nec.com> <1264234865.6595.75.camel@tropicana> <4B5E1855.4090809@bx.jp.nec.com> <1265012255.6526.18.camel@tropicana> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1265012255.6526.18.camel@tropicana> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2524 Lines: 58 On Mon, Feb 01, 2010 at 02:17:35AM -0600, Tom Zanussi wrote: > Here's one way, using the tracepoint filters - it does make a big > difference in this case. > > Before (using the new -P option, which includes perf in the trace > data): > > root@tropicana:~# perf record -c 1 -f -a -M -R -e filemap:add_to_page_cache -e filemap:find_get_page -e filemap:remove_from_page_cache -P sleep 5 > [ perf record: Woken up 0 times to write data ] > [ perf record: Captured and wrote 71.201 MB perf.data (~3110815 samples) ] > > After (filters out events generated by perf): > > root@tropicana:~# perf record -c 1 -f -a -M -R -e filemap:add_to_page_cache -e filemap:find_get_page -e filemap:remove_from_page_cache sleep 5 > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.309 MB perf.data (~13479 samples) ] > > Tom > > [PATCH] perf record: filter out perf process tracepoint events > > The perf process itself can generate a lot of trace data, which most > of the time isn't of any interest. This patch adds a predicate to the > kernel tracepoint filter of each recorded event type which effectively > screens out any event generated by perf. > > Assuming the common case would be to ignore perf, this makes it the > default; the old behavior can be selected by using 'perf record -P'. I think filtering out perf from the instrumentation is a very desirable features. But I see two drawbacks with this patch. First of all, we want to keep perf as a part of the instrumentation as a default behaviour I think, as it is a true part of the system wide load. So I would rather suggest to keep it as a default and have an exclude_perf option instead of include_perf. The other downside is that this filtering only applies to ftrace events and not to other perf events. I would expect an exclude_perf option to apply to every events, not just a family of them. This is not that easy though. It's trivial for a process bound instrumentation as we only need to use enable_on_exec for that (assuming we create the targeted process from perf). Otherwise we need the cpu events to filter out a given context, which needs to be done from the kernel, on events scheduling time. It's just an idea, I'm adding more interested parties in Cc. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/