OSDN Git Service

ANDROID: sched/autogroup: Define autogroup_path() for !CONFIG_SCHED_DEBUG
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Fri, 17 Mar 2017 19:09:03 +0000 (19:09 +0000)
committerChris Redpath <chris.redpath@arm.com>
Tue, 19 Dec 2017 16:50:54 +0000 (16:50 +0000)
Define autogroup_path() even in the !CONFIG_SCHED_DEBUG case. If
CONFIG_SCHED_AUTOGROUP is enabled the path of an autogroup has to be
available to be printed in the load tracking trace events provided by
this patch-stack regardless whether CONFIG_SCHED_DEBUG is set or not.

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Change-Id: I6f59783a83e0965d96e84446f64b29ad0c4dc35a
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
kernel/sched/autogroup.c
kernel/sched/autogroup.h

index a43df51..c80a47a 100644 (file)
@@ -260,7 +260,6 @@ out:
 }
 #endif /* CONFIG_PROC_FS */
 
-#ifdef CONFIG_SCHED_DEBUG
 int autogroup_path(struct task_group *tg, char *buf, int buflen)
 {
        if (!task_group_is_autogroup(tg))
@@ -268,4 +267,3 @@ int autogroup_path(struct task_group *tg, char *buf, int buflen)
 
        return snprintf(buf, buflen, "%s-%ld", "/autogroup", tg->autogroup->id);
 }
-#endif /* CONFIG_SCHED_DEBUG */
index 27cd22b..590184b 100644 (file)
@@ -56,11 +56,9 @@ autogroup_task_group(struct task_struct *p, struct task_group *tg)
        return tg;
 }
 
-#ifdef CONFIG_SCHED_DEBUG
 static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
 {
        return 0;
 }
-#endif
 
 #endif /* CONFIG_SCHED_AUTOGROUP */