From: KOSAKI Motohiro Subject: Re: [PATCH] vfs: Add a trace point in the mark_inode_dirty function Date: Tue, 30 Nov 2010 09:37:30 +0900 (JST) Message-ID: <20101130093450.82DD.A69D9226@jp.fujitsu.com> References: <20101129141513.82BA.A69D9226@jp.fujitsu.com> <1291040469.30543.715.camel@gandalf.stny.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: kosaki.motohiro@jp.fujitsu.com, Arjan van de Ven , Christoph Hellwig , linux-fsdevel@vger.kernel.org, Al Viro , Ingo Molnar , Peter Zijlstra , Mathieu Desnoyers To: Steven Rostedt Return-path: Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:35241 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753337Ab0K3Ahe (ORCPT ); Mon, 29 Nov 2010 19:37:34 -0500 Received: from m3.gw.fujitsu.co.jp ([10.0.50.73]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id oAU0bWNX031074 for (envelope-from kosaki.motohiro@jp.fujitsu.com); Tue, 30 Nov 2010 09:37:32 +0900 Received: from smail (m3 [127.0.0.1]) by outgoing.m3.gw.fujitsu.co.jp (Postfix) with ESMTP id E9A6145DE56 for ; Tue, 30 Nov 2010 09:37:31 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by m3.gw.fujitsu.co.jp (Postfix) with ESMTP id BEDEB45DE58 for ; Tue, 30 Nov 2010 09:37:31 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id AD932E08003 for ; Tue, 30 Nov 2010 09:37:31 +0900 (JST) Received: from m105.s.css.fujitsu.com (m105.s.css.fujitsu.com [10.249.87.105]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 7581D1DB8038 for ; Tue, 30 Nov 2010 09:37:31 +0900 (JST) In-Reply-To: <1291040469.30543.715.camel@gandalf.stny.rr.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > Yes, this came up before. Currently, if you add the if statement in the > trcacepoint, you just wasted space. But if we can add a discard_entry, > or better yet, I can add a TRACE_EVENT_CONDITION() that adds an if > statement to check. Something like: > > TRACE_EVENT_CONDITION(name, > [...] > TP_condition( > if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC | > I_DIRTY_PAGES)) > return 1; > else > return 0; > ), I love this idea. :) For MM, struct page has a lot of union hack. then, page tracer strongly need conditional trace point. > > Have this run on the parameters and not the entry fields (because the > entry fields are from the ring buffer, and to use them, we must first > write to the ring buffer (something we want to avoid). > > We could also make this code work with "pre-filters". That is, filters > on the tracepoints that access the parameters and not the final entries. > This would let us circumvent allocating ring buffer space when the > filter states to skip the entry. > > -- Steve > > > >