From patchwork Fri Apr 5 19:46:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 1078696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44bVgV6N7yz9sR2 for ; Sat, 6 Apr 2019 06:46:30 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731745AbfDETq3 (ORCPT ); Fri, 5 Apr 2019 15:46:29 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:55773 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731183AbfDETq2 (ORCPT ); Fri, 5 Apr 2019 15:46:28 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hCUn8-0000FG-0D; Fri, 05 Apr 2019 21:46:22 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hCUn6-0005wS-7F; Fri, 05 Apr 2019 21:46:20 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Steven Rostedt , Ingo Molnar , Linus Walleij Cc: linux-gpio@vger.kernel.org, kernel@pengutronix.de, Tal Shorer Subject: [PATCH 1/2] tracing: stop making gpio tracing configurable Date: Fri, 5 Apr 2019 21:46:12 +0200 Message-Id: <20190405194613.19578-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-gpio@vger.kernel.org Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org gpio tracing was made configurable in 4.4-rc1 (commit ddd70280bf0e ("tracing: gpio: Add Kconfig option for enabling/disabling trace events")). Since then it is the only event type that can be compiled conditionally. Given that there is only little overhead I don't understand the reasoning and I was annoyed more than once that gpio events were not available without recompiling. So drop the Kconfig symbol and make gpio events available unconditionally. Signed-off-by: Uwe Kleine-König --- arch/arm/configs/aspeed_g4_defconfig | 1 - arch/arm/configs/aspeed_g5_defconfig | 1 - include/trace/events/gpio.h | 4 ---- kernel/trace/Kconfig | 7 ------- 4 files changed, 13 deletions(-) diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig index 1446262921b4..0f3638dd576b 100644 --- a/arch/arm/configs/aspeed_g4_defconfig +++ b/arch/arm/configs/aspeed_g4_defconfig @@ -248,7 +248,6 @@ CONFIG_PANIC_TIMEOUT=-1 # CONFIG_SCHED_DEBUG is not set CONFIG_SCHED_STACK_END_CHECK=y CONFIG_FUNCTION_TRACER=y -# CONFIG_TRACING_EVENTS_GPIO is not set # CONFIG_RUNTIME_TESTING_MENU is not set CONFIG_DEBUG_WX=y CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig index 02fa3a41add5..eaab776c4ac2 100644 --- a/arch/arm/configs/aspeed_g5_defconfig +++ b/arch/arm/configs/aspeed_g5_defconfig @@ -248,7 +248,6 @@ CONFIG_PANIC_TIMEOUT=-1 # CONFIG_SCHED_DEBUG is not set CONFIG_SCHED_STACK_END_CHECK=y CONFIG_FUNCTION_TRACER=y -# CONFIG_TRACING_EVENTS_GPIO is not set # CONFIG_RUNTIME_TESTING_MENU is not set CONFIG_DEBUG_WX=y CONFIG_DEBUG_USER=y diff --git a/include/trace/events/gpio.h b/include/trace/events/gpio.h index 5c189a22c489..3aa9fd86d748 100644 --- a/include/trace/events/gpio.h +++ b/include/trace/events/gpio.h @@ -2,10 +2,6 @@ #undef TRACE_SYSTEM #define TRACE_SYSTEM gpio -#ifndef CONFIG_TRACING_EVENTS_GPIO -#define NOTRACE -#endif - #if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_GPIO_H diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 8bd1d6d001d7..5d965cef6c77 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -774,13 +774,6 @@ config TRACE_EVAL_MAP_FILE If unsure, say N -config TRACING_EVENTS_GPIO - bool "Trace gpio events" - depends on GPIOLIB - default y - help - Enable tracing events for gpio subsystem - config GCOV_PROFILE_FTRACE bool "Enable GCOV profiling on ftrace subsystem" depends on GCOV_KERNEL From patchwork Fri Apr 5 19:46:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 1078695 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44bVgT5pW1z9sPc for ; Sat, 6 Apr 2019 06:46:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731746AbfDETq2 (ORCPT ); Fri, 5 Apr 2019 15:46:28 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:33859 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731745AbfDETq2 (ORCPT ); Fri, 5 Apr 2019 15:46:28 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hCUn8-0000FP-IS; Fri, 05 Apr 2019 21:46:22 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hCUn8-0005wV-AU; Fri, 05 Apr 2019 21:46:22 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Steven Rostedt , Ingo Molnar , Linus Walleij Cc: linux-gpio@vger.kernel.org, kernel@pengutronix.de, Tal Shorer Subject: [PATCH 2/2] tracing: drop handling of NOTRACE symbol Date: Fri, 5 Apr 2019 21:46:13 +0200 Message-Id: <20190405194613.19578-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190405194613.19578-1-u.kleine-koenig@pengutronix.de> References: <20190405194613.19578-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-gpio@vger.kernel.org Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When a header defined the NOTRACE cpp symbol creation of tracepoints was skipped. Since this feature was introduced in 4.4-rc1 it was only ever used by the gpio events and this was dropped in the previous commit. So remove this now unused knob, also to not encourage a new usage. Signed-off-by: Uwe Kleine-König Acked-by: Steven Rostedt (VMware) Signed-off-by: Uwe Kleine-König --- include/linux/tracepoint.h | 17 +++-------------- init/main.c | 6 +++--- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 9c3186578ce0..6737df383fe1 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -138,18 +138,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) #define TP_ARGS(args...) args #define TP_CONDITION(args...) args -/* - * Individual subsystem my have a separate configuration to - * enable their tracepoints. By default, this file will create - * the tracepoints if CONFIG_TRACEPOINT is defined. If a subsystem - * wants to be able to disable its tracepoints from being created - * it can define NOTRACE before including the tracepoint headers. - */ -#if defined(CONFIG_TRACEPOINTS) && !defined(NOTRACE) -#define TRACEPOINTS_ENABLED -#endif - -#ifdef TRACEPOINTS_ENABLED +#ifdef CONFIG_TRACEPOINTS /* * it_func[0] is never NULL because there is at least one element in the array @@ -297,7 +286,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) #define EXPORT_TRACEPOINT_SYMBOL(name) \ EXPORT_SYMBOL(__tracepoint_##name) -#else /* !TRACEPOINTS_ENABLED */ +#else /* !CONFIG_TRACEPOINTS */ #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ static inline void trace_##name(proto) \ { } \ @@ -329,7 +318,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) #define EXPORT_TRACEPOINT_SYMBOL(name) -#endif /* TRACEPOINTS_ENABLED */ +#endif /* CONFIG_TRACEPOINTS */ #ifdef CONFIG_TRACING /** diff --git a/init/main.c b/init/main.c index 598e278b46f7..a2021f7c7879 100644 --- a/init/main.c +++ b/init/main.c @@ -507,7 +507,7 @@ void __init __weak mem_encrypt_init(void) { } bool initcall_debug; core_param(initcall_debug, initcall_debug, bool, 0644); -#ifdef TRACEPOINTS_ENABLED +#ifdef CONFIG_TRACEPOINTS static void __init initcall_debug_enable(void); #else static inline void initcall_debug_enable(void) @@ -860,7 +860,7 @@ trace_initcall_finish_cb(void *data, initcall_t fn, int ret) static ktime_t initcall_calltime; -#ifdef TRACEPOINTS_ENABLED +#ifdef CONFIG_TRACEPOINTS static void __init initcall_debug_enable(void) { int ret; @@ -886,7 +886,7 @@ static inline void do_trace_initcall_finish(initcall_t fn, int ret) return; trace_initcall_finish_cb(&initcall_calltime, fn, ret); } -#endif /* !TRACEPOINTS_ENABLED */ +#endif /* !CONFIG_TRACEPOINTS */ int __init_or_module do_one_initcall(initcall_t fn) {