[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190327161158.GA26067@taurus.defre.kleine-koenig.org>
Date: Wed, 27 Mar 2019 17:12:03 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Tal Shorer <tal.shorer@...il.com>,
Linus Walleij <linus.walleij@...aro.org>
Cc: rostedt@...dmis.org, mingo@...hat.com,
linux-kernel@...r.kernel.org, kernel@...gutronix.de,
linux-gpio@...r.kernel.org
Subject: Re: [Patch v3 2/2] tracing: gpio: add Kconfig option for
enabling/disabling trace events
On Sat, Aug 01, 2015 at 03:27:58PM +0300, Tal Shorer wrote:
> Add a new options to trace Kconfig, CONFIG_TRACING_EVENTS_GPIO, that is
> used for enabling/disabling compilation of gpio function trace events.
>
> Signed-off-by: Tal Shorer <tal.shorer@...il.com>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> ---
> include/trace/events/gpio.h | 4 ++++
> kernel/trace/Kconfig | 7 +++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/include/trace/events/gpio.h b/include/trace/events/gpio.h
> index 927a8ad..2da73b9 100644
> --- a/include/trace/events/gpio.h
> +++ b/include/trace/events/gpio.h
> @@ -1,6 +1,10 @@
> #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 3b9a48a..67a1731 100644
> --- a/kernel/trace/Kconfig
> +++ b/kernel/trace/Kconfig
> @@ -635,6 +635,13 @@ config TRACE_ENUM_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
> +
It happened a few times to me since this patch was merged (in 4.4-rc1)
that I worked on a system with tracing enabled but
/sys/kernel/debug/tracing/events/gpio were missing because of
CONFIG_TRACING_EVENTS_GPIO=n. This is annoying and I wonder what is the
motivating purpose of allowing to disable gpio events. There is no other
event type that can be disabled with kconfig symbols. Theoretically the
overhead should be so small, that having these events enabled
unconditionally should be fine, shouldn't it?
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists