aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched_debug.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-02 11:15:27 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-02 11:15:27 -0700
commit370504cf7c68b953de55c41d5e0be97d30f3cf00 (patch)
tree1941a38f78083dca4852070c229363d81bbb9aae /kernel/sched_debug.c
parent160d6aaf60d75b71a48223b5bdc29285e18cff07 (diff)
parent94c18227d1e3f02de5b345bd3cd5c960214dc9c8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: [PATCH] sched: reduce task_struct size [PATCH] sched: reduce debug code [PATCH] sched: use schedstat_set() API [PATCH] sched: add schedstat_set() API [PATCH] sched: move load-calculation functions [PATCH] sched: ->task_new cleanup [PATCH] sched: uninline inc/dec_nr_running() [PATCH] sched: uninline calc_delta_mine() [PATCH] sched: calc_delta_mine(): use fixed limit [PATCH] sched: tidy up left over smpnice code [PATCH] sched: remove cache_hot_time
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r--kernel/sched_debug.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 0eca442b779..1c61e5315ad 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -44,11 +44,16 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p, u64 now)
(long long)p->se.wait_runtime,
(long long)(p->nvcsw + p->nivcsw),
p->prio,
+#ifdef CONFIG_SCHEDSTATS
(long long)p->se.sum_exec_runtime,
(long long)p->se.sum_wait_runtime,
(long long)p->se.sum_sleep_runtime,
(long long)p->se.wait_runtime_overruns,
- (long long)p->se.wait_runtime_underruns);
+ (long long)p->se.wait_runtime_underruns
+#else
+ 0LL, 0LL, 0LL, 0LL, 0LL
+#endif
+ );
}
static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu, u64 now)
@@ -171,7 +176,7 @@ static int sched_debug_show(struct seq_file *m, void *v)
u64 now = ktime_to_ns(ktime_get());
int cpu;
- SEQ_printf(m, "Sched Debug Version: v0.05, %s %.*s\n",
+ SEQ_printf(m, "Sched Debug Version: v0.05-v20, %s %.*s\n",
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
@@ -235,21 +240,24 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
#define P(F) \
SEQ_printf(m, "%-25s:%20Ld\n", #F, (long long)p->F)
- P(se.wait_start);
+ P(se.wait_runtime);
P(se.wait_start_fair);
P(se.exec_start);
- P(se.sleep_start);
P(se.sleep_start_fair);
+ P(se.sum_exec_runtime);
+
+#ifdef CONFIG_SCHEDSTATS
+ P(se.wait_start);
+ P(se.sleep_start);
P(se.block_start);
P(se.sleep_max);
P(se.block_max);
P(se.exec_max);
P(se.wait_max);
- P(se.wait_runtime);
P(se.wait_runtime_overruns);
P(se.wait_runtime_underruns);
P(se.sum_wait_runtime);
- P(se.sum_exec_runtime);
+#endif
SEQ_printf(m, "%-25s:%20Ld\n",
"nr_switches", (long long)(p->nvcsw + p->nivcsw));
P(se.load.weight);
@@ -269,7 +277,9 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
void proc_sched_set_task(struct task_struct *p)
{
+#ifdef CONFIG_SCHEDSTATS
p->se.sleep_max = p->se.block_max = p->se.exec_max = p->se.wait_max = 0;
p->se.wait_runtime_overruns = p->se.wait_runtime_underruns = 0;
+#endif
p->se.sum_exec_runtime = 0;
}