aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>2015-06-25 14:23:37 -0400
committerIngo Molnar <mingo@kernel.org>2015-07-04 04:04:30 -0400
commitf6db8347993256b58bd4746b0c4c5b935c32210d (patch)
tree07accf585bbf5c7cb5f167a11a4e713deabb6043 /include/linux
parent407a2c720556e8e340e06f6a7174f5d6d80cf9ea (diff)
sched/stat: Simplify the sched_info accounting dependency
Both CONFIG_SCHEDSTATS=y and CONFIG_TASK_DELAY_ACCT=y track task sched_info, which results in ugly #if clauses. Simplify the code by introducing a synthethic CONFIG_SCHED_INFO switch, selected by both. Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Balbir Singh <bsingharora@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: a.p.zijlstra@chello.nl Cc: ricklind@us.ibm.com Link: http://lkml.kernel.org/r/8d19eef800811a94b0f91bcbeb27430a884d7433.1435255405.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6633e83e608a..9bf4bc0e3b8b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -849,7 +849,7 @@ extern struct user_struct root_user;
849struct backing_dev_info; 849struct backing_dev_info;
850struct reclaim_state; 850struct reclaim_state;
851 851
852#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) 852#ifdef CONFIG_SCHED_INFO
853struct sched_info { 853struct sched_info {
854 /* cumulative counters */ 854 /* cumulative counters */
855 unsigned long pcount; /* # of times run on this cpu */ 855 unsigned long pcount; /* # of times run on this cpu */
@@ -859,7 +859,7 @@ struct sched_info {
859 unsigned long long last_arrival,/* when we last ran on a cpu */ 859 unsigned long long last_arrival,/* when we last ran on a cpu */
860 last_queued; /* when we were last queued to run */ 860 last_queued; /* when we were last queued to run */
861}; 861};
862#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ 862#endif /* CONFIG_SCHED_INFO */
863 863
864#ifdef CONFIG_TASK_DELAY_ACCT 864#ifdef CONFIG_TASK_DELAY_ACCT
865struct task_delay_info { 865struct task_delay_info {
@@ -1408,7 +1408,7 @@ struct task_struct {
1408 int rcu_tasks_idle_cpu; 1408 int rcu_tasks_idle_cpu;
1409#endif /* #ifdef CONFIG_TASKS_RCU */ 1409#endif /* #ifdef CONFIG_TASKS_RCU */
1410 1410
1411#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) 1411#ifdef CONFIG_SCHED_INFO
1412 struct sched_info sched_info; 1412 struct sched_info sched_info;
1413#endif 1413#endif
1414 1414