* [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS
@ 2015-07-27 13:11 yangoliver
2015-08-03 17:34 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: yangoliver @ 2015-07-27 13:11 UTC (permalink / raw)
To: rostedt; +Cc: mingo, linux-kernel, Yong Yang
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
/*
* 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
--
2.4.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS
2015-07-27 13:11 [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS yangoliver
@ 2015-08-03 17:34 ` Steven Rostedt
2015-08-04 7:05 ` Oliver Yang
0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2015-08-03 17:34 UTC (permalink / raw)
To: yangoliver; +Cc: mingo, linux-kernel, Yong Yang, Peter Zijlstra
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS
2015-08-03 17:34 ` Steven Rostedt
@ 2015-08-04 7:05 ` Oliver Yang
2015-10-11 3:33 ` yangoliver
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Yang @ 2015-08-04 7:05 UTC (permalink / raw)
To: Steven Rostedt; +Cc: mingo, linux-kernel, Yong Yang, Peter Zijlstra
On 2015/8/4 1:34, Steven Rostedt wrote:
> 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,
Because the sched_stat_template is used by sched_stat_runtime.
The sched_stat_runtime is used event without SCHEDSTATS option enabled.
And the se.sum_exec_runtime counter is also similar. I don't think this counter is
defined for SCHEDSTATS.
Yes. I just try to make our trace points design be similar with SCHEDSTATS counters
design.
> -- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS
2015-08-04 7:05 ` Oliver Yang
@ 2015-10-11 3:33 ` yangoliver
0 siblings, 0 replies; 4+ messages in thread
From: yangoliver @ 2015-10-11 3:33 UTC (permalink / raw)
To: Oliver Yang
Cc: Steven Rostedt, mingo, linux-kernel, Yong Yang, Peter Zijlstra
Steve,
Any comments about this patch?
I think I addressed your question about why sched_stat_template is still
required. Because another tracepoint depends on it, and that tracepoint
doesn't depend on SCHEDSTATS.
If you thought this patch is valid, I could re-submit it with a separte
patch.
On Tue, 4 Aug 2015, Oliver Yang wrote:
>
>
> On 2015/8/4 1:34, Steven Rostedt wrote:
> > 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,
>
> Because the sched_stat_template is used by sched_stat_runtime.
> The sched_stat_runtime is used event without SCHEDSTATS option enabled.
>
> And the se.sum_exec_runtime counter is also similar. I don't think this counter is
> defined for SCHEDSTATS.
>
> Yes. I just try to make our trace points design be similar with SCHEDSTATS counters
> design.
>
> > -- 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
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-11 3:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 13:11 [PATCH 1/2] sched: Some sched trace points should depend on SCHEDSTATS yangoliver
2015-08-03 17:34 ` Steven Rostedt
2015-08-04 7:05 ` Oliver Yang
2015-10-11 3:33 ` yangoliver
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®