From patchwork Fri Jul 18 21:22:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 4587901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2F2209F1D6 for ; Fri, 18 Jul 2014 21:24:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E85B2011E for ; Fri, 18 Jul 2014 21:24:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71B2B200F0 for ; Fri, 18 Jul 2014 21:24:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X8FcG-0003Ot-2Z; Fri, 18 Jul 2014 21:22:56 +0000 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.228] helo=cdptpa-oedge-vip.email.rr.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X8FcB-00033N-PH for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 21:22:53 +0000 Received: from [67.246.153.56] ([67.246.153.56:50946] helo=gandalf.local.home) by cdptpa-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 42/5E-27317-41099C35; Fri, 18 Jul 2014 21:22:29 +0000 Date: Fri, 18 Jul 2014 17:22:21 -0400 From: Steven Rostedt To: Nicolas Pitre Subject: Re: [PATCH 2/4] ARM: add IPI tracepoints Message-ID: <20140718172221.6dbe83e4@gandalf.local.home> In-Reply-To: References: <1405660735-13408-1-git-send-email-nicolas.pitre@linaro.org> <1405660735-13408-3-git-send-email-nicolas.pitre@linaro.org> <20140718160418.54d11f6a@gandalf.local.home> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.24; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-RR-Connecting-IP: 107.14.168.142:25 X-Cloudmark-Score: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_142251_919726_42A3D8FA X-CRM114-Status: GOOD ( 14.20 ) X-Spam-Score: -0.0 (/) Cc: linaro-kernel@lists.linaro.org, Russell King - ARM Linux , Catalin Marinas , Daniel Lezcano , linux-kernel@vger.kernel.org, Ingo Molnar , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 18 Jul 2014 16:55:42 -0400 (EDT) Nicolas Pitre wrote: > > Here's the patch I have at the head of the series now, with the above > ugliness changed to an unconditional __tracepoint_string attribute. > I was thinking of something like this. Feel free to add this to your series. -- Steve From: Steven Rostedt Subject: [PATCH] tracing: Do not do anything special with tracepoint_string when tracing is disabled When CONFIG_TRACING is not enabled, there's no reason to save the trace strings either by the linker or as a static variable that can be referenced later. Simply pass back the string that is given to tracepoint_string(). Signed-off-by: Steven Rostedt diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index cff3106..b296363 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h @@ -574,6 +574,7 @@ do { \ __trace_printk(ip, fmt, ##args); \ } while (0) +#ifdef CONFIG_TRACING /** * tracepoint_string - register constant persistent string to trace system * @str - a constant persistent string that will be referenced in tracepoints @@ -607,6 +608,15 @@ do { \ ___tp_str; \ }) #define __tracepoint_string __attribute__((section("__tracepoint_str"))) +#else +/* + * tracepoint_string() is used to save the string address for userspace + * tracing tools. When tracing isn't configured, there's no need to save + * anything. + */ +# define tracepoint_string(str) str +# define __tracepoint_string +#endif #ifdef CONFIG_PERF_EVENTS struct perf_event;