diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-10 11:24:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-10 11:24:39 -0700 |
commit | 60e383037ba192d86fc0110b5b5a9a2013d83b13 (patch) | |
tree | 14618b9efcd260f1987fc8003228dd0838130a91 /kernel/sched/stats.h | |
parent | 7fcbc230c6f0ee96d397e30d061ef4995879b835 (diff) | |
parent | 4698f88c06b893f2acc0b443004a53bf490fde7c (diff) | |
download | lwn-60e383037ba192d86fc0110b5b5a9a2013d83b13.tar.gz lwn-60e383037ba192d86fc0110b5b5a9a2013d83b13.zip |
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar:
"Two scheduler debugging fixes"
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/debug: Fix 'schedstats=enable' cmdline option
sched/debug: Fix /proc/sched_debug regression
Diffstat (limited to 'kernel/sched/stats.h')
-rw-r--r-- | kernel/sched/stats.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h index 70b3b6a20fb0..78955cbea31c 100644 --- a/kernel/sched/stats.h +++ b/kernel/sched/stats.h @@ -33,6 +33,8 @@ rq_sched_info_dequeued(struct rq *rq, unsigned long long delta) # define schedstat_inc(rq, field) do { if (schedstat_enabled()) { (rq)->field++; } } while (0) # define schedstat_add(rq, field, amt) do { if (schedstat_enabled()) { (rq)->field += (amt); } } while (0) # define schedstat_set(var, val) do { if (schedstat_enabled()) { var = (val); } } while (0) +# define schedstat_val(rq, field) ((schedstat_enabled()) ? (rq)->field : 0) + #else /* !CONFIG_SCHEDSTATS */ static inline void rq_sched_info_arrive(struct rq *rq, unsigned long long delta) @@ -47,6 +49,7 @@ rq_sched_info_depart(struct rq *rq, unsigned long long delta) # define schedstat_inc(rq, field) do { } while (0) # define schedstat_add(rq, field, amt) do { } while (0) # define schedstat_set(var, val) do { } while (0) +# define schedstat_val(rq, field) 0 #endif #ifdef CONFIG_SCHED_INFO |