From: Steven Rostedt <rostedt@goodmis.org>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: "Viktor Rosendahl (BMW)" <viktor.rosendahl@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 1/4] ftrace: Implement fs notification for tracing_max_latency
Date: Tue, 15 Oct 2019 21:17:41 -0400 [thread overview]
Message-ID: <20191015211741.3ff2f3a1@gandalf.local.home> (raw)
In-Reply-To: <20191016004120.GD89937@google.com>
On Tue, 15 Oct 2019 20:41:20 -0400
Joel Fernandes <joel@joelfernandes.org> wrote:
> > +static const struct file_operations tracing_max_lat_fops;
> > +
> > +#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
> > + defined(CONFIG_FSNOTIFY)
>
> Something bothers me. If you dropped support for HWLAT_TRACER as you
> mentioned in the cover letter, then why does this #if look for the CONFIG
> option?
>
> (and similar comment on the rest of the patch..)
Also, if you have a complex if statement like this, it is better to
create a new define to set it in a header file:
#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
defined(CONFIG_FSNOTIFY)
# define HAVE_TRACER_FSNOTIFY
#endif
And then just use that:
#ifdef HAVE_TRACER_FSNOTIFY
...
#endif
It keeps things a bit more manageable.
-- Steve
next prev parent reply other threads:[~2019-10-16 1:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 11:19 [PATCH v9 0/4] Some new features for the preempt/irqsoff tracers Viktor Rosendahl (BMW)
2019-10-15 11:19 ` [PATCH v9 1/4] ftrace: Implement fs notification for tracing_max_latency Viktor Rosendahl (BMW)
2019-10-16 0:41 ` Joel Fernandes
2019-10-16 1:17 ` Steven Rostedt [this message]
2019-10-16 15:10 ` Viktor Rosendahl (BMW)
2019-10-15 11:19 ` [PATCH v9 2/4] preemptirq_delay_test: Add the burst feature and a sysfs trigger Viktor Rosendahl (BMW)
2019-10-15 11:19 ` [PATCH v9 3/4] Add the latency-collector to tools Viktor Rosendahl (BMW)
2019-10-15 11:19 ` [PATCH v9 4/4] ftrace: Add an option for tracing console latencies Viktor Rosendahl (BMW)
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=20191015211741.3ff2f3a1@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=viktor.rosendahl@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®