mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: yangoliver <yang_oliver@hotmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	Yong Yang <yangoliver@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS
Date: Mon, 3 Aug 2015 13:34:28 -0400	[thread overview]
Message-ID: <20150803133428.5fd137ec@gandalf.local.home> (raw)
In-Reply-To: <BLU436-SMTP1213D964BD9EFC5CF8A34D08A8E0@phx.gbl>

On Mon, 27 Jul 2015 09:11:51 -0400
yangoliver <yang_oliver@hotmail.com> wrote:

> When SCHEDSTATS is not enabled, follow trace points shouldn't be
> accessed by default,
> 
> 	sched:sched_stat_wait
> 	sched:sched_stat_sleep
> 	sched:sched_stat_iowait
> 	sched:sched_stat_blocked
> 
> These trace points should only be available when SCHEDSTATS is
> enabled.
> 
> Signed-off-by: Yong Yang <yangoliver@gmail.com>
> ---
>  include/trace/events/sched.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> index d57a575..5b34309 100644
> --- a/include/trace/events/sched.h
> +++ b/include/trace/events/sched.h
> @@ -334,6 +334,7 @@ DECLARE_EVENT_CLASS(sched_stat_template,
>  );
>  
>  
> +#ifdef CONFIG_SCHEDSTATS

Why not also surround the sched_stat_template too? That also creates
code even if no event uses it.

-- Steve

>  /*
>   * Tracepoint for accounting wait time (time the task is runnable
>   * but not actually running due to scheduler contention).
> @@ -364,6 +365,7 @@ DEFINE_EVENT(sched_stat_template, sched_stat_iowait,
>  DEFINE_EVENT(sched_stat_template, sched_stat_blocked,
>  	     TP_PROTO(struct task_struct *tsk, u64 delay),
>  	     TP_ARGS(tsk, delay));
> +#endif
>  
>  /*
>   * Tracepoint for accounting runtime (time the task is executing


  reply	other threads:[~2015-08-03 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 13:11 yangoliver
2015-08-03 17:34 ` Steven Rostedt [this message]
2015-08-04  7:05   ` Oliver Yang
2015-10-11  3:33     ` yangoliver

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=20150803133428.5fd137ec@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yang_oliver@hotmail.com \
    --cc=yangoliver@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®