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: 34320 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB7E4235AB for ; Fri, 25 Jul 2014 20:08:52 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 142sf9967003ykq.0 for ; Fri, 25 Jul 2014 13:08:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe :content-transfer-encoding; bh=vJnzm8vkCtSAZg0wmS8Bg0c80dzEjMFBcEtWTuXipXc=; b=UB7ui4fwaxP5OODJ4V4aKGT2CPGdth89Pr84BnQUS2cuDF/0QrH9wE21T0fbYiHDD7 HY2UsaBpc3veJdr3xKYlPD42KRA9VLfrXnZ0o7BwN5O+NxamcdJGfNBzo6IsuTskGAeu R6i2jDr5KjVU5cy2GC6XXiTRBWqpUXYWmpSMZibaNPzeU6G2z/b0jrkxhXCv9zDwFnyh Lgtwqgb5SYK8PAdiFZbYxLLrTdU1EmAdlvgKmV5C5xZWHCE7D/IH2ZvW7mXEiS20kHfs LGJTAnvkXsm0AEgLhKmmpZRkUhqypk7o6Hey7WFPanTqEwHYyy7i2xlKpOxnjE0lTisi uljg== X-Gm-Message-State: ALoCoQm9iGe6V0URg8nJSGuic+7k323xsKo/g5G1raGwJeT+we8UYVBtZZ4fU+JtintNFo4UICqF X-Received: by 10.52.114.42 with SMTP id jd10mr7672162vdb.0.1406318932355; Fri, 25 Jul 2014 13:08:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.134 with SMTP id e6ls1420649qgf.34.gmail; Fri, 25 Jul 2014 13:08:52 -0700 (PDT) X-Received: by 10.220.1.198 with SMTP id 6mr23818681vcg.31.1406318932249; Fri, 25 Jul 2014 13:08:52 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id j20si8248334ver.69.2014.07.25.13.08.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 13:08:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so8171604vcb.30 for ; Fri, 25 Jul 2014 13:08:52 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr24226154vcb.0.1406318932096; Fri, 25 Jul 2014 13:08:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp63089vcb; Fri, 25 Jul 2014 13:08:51 -0700 (PDT) X-Received: by 10.68.223.1 with SMTP id qq1mr21401496pbc.62.1406318931260; Fri, 25 Jul 2014 13:08:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id eh7si10209299pac.236.2014.07.25.13.08.50 for ; Fri, 25 Jul 2014 13:08:51 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935334AbaGYUIs (ORCPT + 16 others); Fri, 25 Jul 2014 16:08:48 -0400 Received: from relais.videotron.ca ([24.201.245.36]:13726 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932686AbaGYUHf (ORCPT ); Fri, 25 Jul 2014 16:07:35 -0400 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-kernel@vger.kernel.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 Cc: Daniel Lezcano , Russell King - ARM Linux , Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-transfer-encoding: 7BIT 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;