From patchwork Fri Jul 25 20:05:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 4625721 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 72B7F9F36A for ; Fri, 25 Jul 2014 20:10:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B01EA200ED for ; Fri, 25 Jul 2014 20:10:26 +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 E013C2011B for ; Fri, 25 Jul 2014 20:10:25 +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 1XAlnI-00042Z-BL; Fri, 25 Jul 2014 20:08:44 +0000 Received: from relais.videotron.ca ([24.201.245.36]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAlmg-0003eC-Ks for linux-arm-kernel@lists.infradead.org; Fri, 25 Jul 2014 20:08:07 +0000 Received: from yoda.home ([66.130.143.177]) by VL-VM-MR003.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0N9A00LZVAKLDMA0@VL-VM-MR003.ip.videotron.ca> for linux-arm-kernel@lists.infradead.org; Fri, 25 Jul 2014 16:07:33 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 4F7FB2DA0904; Fri, 25 Jul 2014 16:07:33 -0400 (EDT) From: Nicolas Pitre To: Steven Rostedt , Ingo Molnar Subject: [PATCH v2 1/5] tracing: Do not do anything special with tracepoint_string when tracing is disabled Date: Fri, 25 Jul 2014 16:05:29 -0400 Message-id: <1406318733-26754-2-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 1.8.4.108.g55ea5f6 In-reply-to: <1406318733-26754-1-git-send-email-nicolas.pitre@linaro.org> References: <1406318733-26754-1-git-send-email-nicolas.pitre@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140725_130806_756112_62D46ED4 X-CRM114-Status: GOOD ( 13.26 ) X-Spam-Score: -0.0 (/) Cc: linaro-kernel@lists.linaro.org, Russell King - ARM Linux , Catalin Marinas , Daniel Lezcano , linux-kernel@vger.kernel.org, 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: , MIME-Version: 1.0 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 From: Steven Rostedt 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 Signed-off-by: Nicolas Pitre --- include/linux/ftrace_event.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index cff3106ffe..b29636327d 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;