Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757304AbZCYDsh (ORCPT ); Tue, 24 Mar 2009 23:48:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755172AbZCYDsS (ORCPT ); Tue, 24 Mar 2009 23:48:18 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:47272 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755245AbZCYDsR (ORCPT ); Tue, 24 Mar 2009 23:48:17 -0400 Date: Tue, 24 Mar 2009 23:48:14 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: "K.Prasad" cc: Ingo Molnar , Linux Kernel Mailing List , Alan Stern , Andrew Morton , Benjamin Herrenschmidt , Frederic Weisbecker , maneesh@linux.vnet.ibm.com, Roland McGrath Subject: Re: [Patch 11/11] ftrace plugin for kernel symbol tracing using HW Breakpoint interfaces - v2 In-Reply-To: <20090325033001.GA20411@in.ibm.com> Message-ID: References: <20090324152028.754123712@K.Prasad> <20090324152811.GL17918@in.ibm.com> <20090325033001.GA20411@in.ibm.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1257 Lines: 33 On Wed, 25 Mar 2009, K.Prasad wrote: > > Thanks for pointing that out. I will make those changes and send out a > new patchset. > > However, looking at some of the existing plugins I find that many of > them do this check after trace_assign_type() or not do at all (e.g. > trace_branch_print()). They may need similar changes too. Ah, that was the other option I was going to mention. The trace_branch_print is not called by tracer->print_line, like you have. What you did is not wrong, but there are other options. The other option is to register an event callback. That is, the ftrace infrastructure will call the event registered to an id. I register the trace_branch_event with the TRACE_BRANCH id. Then the ftrace infrastructure will call the trace_branch_print if it encounters the TRACE_BRANCH entry. This means you can do the UNHANDLED return as I suggested. Or you remove the print_line from you tracer and register an event for TRACE_KSYM instead. The choice is up to you ;-) -- Steve -- 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/