From patchwork Sat Sep 6 05:06:03 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 191 Return-Path: X-Original-To: patchwork@ozlabs.org Delivered-To: patchwork@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 44D49DE048 for ; Sat, 6 Sep 2008 15:09:43 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.125]) by ozlabs.org (Postfix) with ESMTP id 5D262DDDDF for ; Sat, 6 Sep 2008 15:09:08 +1000 (EST) Received: from gandalf.stny.rr.com ([74.74.65.243]) by hrndva-omta02.mail.rr.com with ESMTP id <20080906050906.HTG20228.hrndva-omta02.mail.rr.com@gandalf.stny.rr.com>; Sat, 6 Sep 2008 05:09:06 +0000 Received: from rostedt by gandalf.stny.rr.com with local (Exim 4.69) (envelope-from ) id 1Kbq2k-0001i3-1n; Sat, 06 Sep 2008 01:09:06 -0400 Message-Id: <20080906050905.931087594@goodmis.org> References: <20080906050602.409299112@goodmis.org> User-Agent: quilt/0.46-1 Date: Sat, 06 Sep 2008 01:06:03 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ftrace: use ftrace_release for all dynamic ftrace functions Content-Disposition: inline; filename=ftrace-release-depend-on-ftrace.patch Cc: Andrew Morton , Peter Zijlstra , David Miller , linuxppc-dev@ozlabs.org, Steven Rostedt , Ingo Molnar , Thomas Gleixner X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org ftrace_release is necessary for all uses of dynamic ftrace and not just the archs that have CONFIG_FTRACE_MCOUNT_RECORD defined. Signed-off-by: Steven Rostedt Index: linux-tip.git/include/linux/ftrace.h =================================================================== --- linux-tip.git.orig/include/linux/ftrace.h 2008-09-05 16:04:34.000000000 -0700 +++ linux-tip.git/include/linux/ftrace.h 2008-09-05 20:10:47.000000000 -0700 @@ -77,8 +77,10 @@ extern void mcount_call(void); extern int skip_trace(unsigned long ip); -void ftrace_disable_daemon(void); -void ftrace_enable_daemon(void); +extern void ftrace_release(void *start, unsigned long size); + +extern void ftrace_disable_daemon(void); +extern void ftrace_enable_daemon(void); #else # define skip_trace(ip) ({ 0; }) @@ -86,6 +88,7 @@ void ftrace_enable_daemon(void); # define ftrace_set_filter(buf, len, reset) do { } while (0) # define ftrace_disable_daemon() do { } while (0) # define ftrace_enable_daemon() do { } while (0) +static inline void ftrace_release(void *start, unsigned long size) { } #endif /* CONFIG_DYNAMIC_FTRACE */ /* totally disable ftrace - can not re-enable after this */ @@ -199,12 +202,10 @@ static inline void ftrace_dump(void) { } #ifdef CONFIG_FTRACE_MCOUNT_RECORD extern void ftrace_init(void); extern void ftrace_init_module(unsigned long *start, unsigned long *end); -extern void ftrace_release(void *start, unsigned long size); #else static inline void ftrace_init(void) { } static inline void ftrace_init_module(unsigned long *start, unsigned long *end) { } -static inline void ftrace_release(void *start, unsigned long size) { } #endif