All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: kernel test robot <lkp@intel.com>,
	David Howells <dhowells@redhat.com>,
	oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trace: Fix some checker warnings
Date: Mon, 5 Dec 2022 12:29:48 +0900	[thread overview]
Message-ID: <20221205122948.809cb1dcbc5c0fa7ed61b415@kernel.org> (raw)
In-Reply-To: <20221204213929.2edc730b@rorschach.local.home>

On Sun, 4 Dec 2022 21:39:29 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Mon, 5 Dec 2022 11:22:36 +0900
> Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> 
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 5cfc95a52bc3..14f18edfe5bc 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -6572,7 +6572,8 @@ tracing_thresh_write(struct file *filp, const char __user *ubuf,
> >  	return ret;
> >  }
> >  
> > -#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)
> > +#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
> > +	|| defined(CONFIG_OSNOISE_TRACER)
> >  
> 
> When it gets this much, we need to put it into the trace.h header and
> define it. Actually, we have something that handles this too.
> 
> #if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
>         || defined(CONFIG_OSNOISE_TRACER)) && defined(CONFIG_FSNOTIFY)
> #define LATENCY_FS_NOTIFY
> #endif
> 
> 
> We can add:
> 
>  #if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
> 	|| defined(CONFIG_OSNOISE_TRACER)) && defined(CONFIG_FSNOTIFY)
>  #define LATENCY_FS_NOTIFY
> +#define USES_MAX_TRACE
>  #endif

No, that including defined(CONFIG_FSNOTIFY) :)

So it must be something like 

  #if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
          || defined(CONFIG_OSNOISE_TRACER)
  #define USE_MAX_TRACE_OPS
  #endif

  #if defined(USE_MAX_TRACE_OPS) && defined(CONFIG_FSNOTIFY)
  #define LATENCY_FS_NOTIFY
  #endif


But this introduces a hidden dependency which is not tracked by
kconfig. So I think it is better to make those kconfig (non-menu)
items. (and the question came up, why can't those use (depend on)
CONFIG_TRACER_MAX_TRACE instead of introducing the USE_MAX_TRACE_OPS.)

Thank you,

-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  parent reply	other threads:[~2022-12-05  3:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 20:07 [PATCH] trace: Fix some checker warnings David Howells
2022-12-02 12:43 ` kernel test robot
2022-12-05  2:22   ` Masami Hiramatsu
2022-12-05  2:39     ` Steven Rostedt
2022-12-05  3:11       ` Masami Hiramatsu
2022-12-05  3:29         ` Steven Rostedt
2022-12-05  3:29       ` Masami Hiramatsu [this message]
2022-12-05  3:33         ` Steven Rostedt
2022-12-02 14:24 ` kernel test robot
2022-12-05  3:32 ` Masami Hiramatsu
2022-12-05  8:28   ` David Howells
2022-12-05  9:06     ` Masami Hiramatsu
2022-12-05 10:22       ` David Howells
2022-12-05 10:29       ` David Howells
2022-12-06 13:59         ` Masami Hiramatsu
2022-12-05 14:40       ` [PATCH] tracing: Fix complicated dependency of kernel test robot
2022-12-05 15:10       ` kernel test robot
2022-12-06 12:56         ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221205122948.809cb1dcbc5c0fa7ed61b415@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.