Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576881

[PATCH 29/53] sched/headers: Move debugging functions from <linux/sched.h> to <linux/sched/debug.h>

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 29/53] sched/headers: Move debugging functions from <linux/sched.h> to <linux/sched/debug.h>
Date 2017-02-08 20:00 +0100
Message-ID <t8FDd-3VT-51@gated-at.bofh.it> (permalink)
References <t8Ftw-3Sf-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Collect the various scheduler and task state debugging APIs scattered
around <linux/sched.h> into the new <linux/sched/debug.h> header.

In particular the show_regs() and show_stack() prototype affects many files,
update them.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h       | 36 ------------------------------------
 include/linux/sched/debug.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 36 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index c83424b1e1ac..ebba1eaeacf8 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -46,15 +46,9 @@ struct nameidata;
 struct signal_struct;
 struct sighand_struct;
 
-extern void dump_cpu_task(int cpu);
-
 struct seq_file;
 struct cfs_rq;
 struct task_group;
-#ifdef CONFIG_SCHED_DEBUG
-extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m);
-extern void proc_sched_set_task(struct task_struct *p);
-#endif
 
 /*
  * Task state bitmask. NOTE! These bits are also
@@ -196,25 +190,6 @@ extern cpumask_var_t cpu_isolated_map;
 
 extern int runqueue_is_locked(int cpu);
 
-/*
- * Only dump TASK_* tasks. (0 for all tasks)
- */
-extern void show_state_filter(unsigned long state_filter);
-
-static inline void show_state(void)
-{
-	show_state_filter(0);
-}
-
-extern void show_regs(struct pt_regs *);
-
-/*
- * TASK is a pointer to the task whose backtrace we want to see (or NULL for current
- * task), SP is the stack pointer of the first frame that should be shown in the back
- * trace (or NULL if the entire call-chain of the task should be shown).
- */
-extern void show_stack(struct task_struct *task, unsigned long *sp);
-
 extern void cpu_init (void);
 extern void trap_init(void);
 extern void update_process_times(int user);
@@ -229,17 +204,6 @@ extern int sched_cpu_dying(unsigned int cpu);
 # define sched_cpu_dying	NULL
 #endif
 
-extern void sched_show_task(struct task_struct *p);
-
-/* Attach to any functions which should be ignored in wchan output. */
-#define __sched		__attribute__((__section__(".sched.text")))
-
-/* Linker adds these: start and end of __sched functions */
-extern char __sched_text_start[], __sched_text_end[];
-
-/* Is this address in the __sched functions? */
-extern int in_sched_functions(unsigned long addr);
-
 #define	MAX_SCHEDULE_TIMEOUT	LONG_MAX
 extern signed long schedule_timeout(signed long timeout);
 extern signed long schedule_timeout_interruptible(signed long timeout);
diff --git a/include/linux/sched/debug.h b/include/linux/sched/debug.h
index 55bc0cd35fd5..853bbef0b47b 100644
--- a/include/linux/sched/debug.h
+++ b/include/linux/sched/debug.h
@@ -3,4 +3,50 @@
 
 #include <linux/sched.h>
 
+/*
+ * Various scheduler/task debugging interfaces:
+ */
+
+struct task_struct;
+
+extern void dump_cpu_task(int cpu);
+
+/*
+ * Only dump TASK_* tasks. (0 for all tasks)
+ */
+extern void show_state_filter(unsigned long state_filter);
+
+static inline void show_state(void)
+{
+	show_state_filter(0);
+}
+
+struct pt_regs;
+
+extern void show_regs(struct pt_regs *);
+
+/*
+ * TASK is a pointer to the task whose backtrace we want to see (or NULL for current
+ * task), SP is the stack pointer of the first frame that should be shown in the back
+ * trace (or NULL if the entire call-chain of the task should be shown).
+ */
+extern void show_stack(struct task_struct *task, unsigned long *sp);
+
+extern void sched_show_task(struct task_struct *p);
+
+#ifdef CONFIG_SCHED_DEBUG
+struct seq_file;
+extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m);
+extern void proc_sched_set_task(struct task_struct *p);
+#endif
+
+/* Attach to any functions which should be ignored in wchan output. */
+#define __sched		__attribute__((__section__(".sched.text")))
+
+/* Linker adds these: start and end of __sched functions */
+extern char __sched_text_start[], __sched_text_end[];
+
+/* Is this address in the __sched functions? */
+extern int in_sched_functions(unsigned long addr);
+
 #endif /* _LINUX_SCHED_DEBUG_H */
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/53] sched.h modernization -v2, phase #3: "Move definitions between headers" Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 04/53] sched/headers: Move idle polling methods to <linux/sched/idle.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 16/53] sched/headers: Move 'struct pacct_struct' and 'struct cpu_itimer' form <linux/sched.h> to <linux/sched/signal.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 05/53] sched/headers: Move the wake-queue types and interfaces from sched.h into <linux/sched/wake_q.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 26/53] sched/headers: Move the memalloc_noio_*() APIs to <linux/sched/mm.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 28/53] sched/headers: Move the NOHZ APIs from <linux/sched.h> to <linux/sched/nohz.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 34/53] sched/headers, RCU: Move rcu_copy_process() from <linux/sched/task.h> to kernel/fork.c Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 30/53] sched/headers, time/timekeeping: Move the xtime_update() prototype from <linux/sched.h> to <linux/time.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 19:50 +0100
  [PATCH 17/53] sched/headers: Move the cpufreq interfaces to <linux/sched/cpufreq.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 11/53] sched/headers: Move task->mm handling methods to <linux/sched/mm.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 48/53] sched/headers: Move exit_files() and exit_itimers() from <linux/sched.h> to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 08/53] sched/headers: Move various ABI definitions to <uapi/linux/sched/types.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 19/53] sched/headers: Move the 'init_mm' declaration from <linux/sched.h> to <linux/mm_types.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 25/53] sched/headers: Move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 02/53] sched/headers: Move the 'cpu_idle_type' enum from <linux/sched.h> to <linux/sched/idle.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 50/53] sched/headers, timekeeping: Move the timer tick function prototypes to <linux/timekeeping.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 21/53] sched/headers: Move the NUMA balancing interfaces from <linux/sched.h> to <linux/sched/numa_balancing.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 31/53] sched/headers: Move <asm/current.h> include from the middle of <linux/sched.h> to the header portion Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 15/53] sched/headers: Move softlockup detector watchdog methods to <linux/nmi.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 29/53] sched/headers: Move debugging functions from <linux/sched.h> to <linux/sched/debug.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 27/53] sched/headers: Move task statistics APIs from <linux/sched.h> to <linux/sched/stat.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 23/53] sched/headers: Remove various unrelated headers from <linux/sched.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 13/53] sched/headers: Move task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 18/53] sched/headers: Move more mm_struct related functionality from <linux/sched.h> to <linux/sched/mm.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 01/53] sched/headers: Move scheduler topology interfaces to <linux/sched/topology.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100
  [PATCH 42/53] sched/headers: Move 'init_task' and 'init_thread_union' from <linux/sched.h> to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100
  [PATCH 49/53] sched/headers: Move _init() prototypes from <linux/sched.h> to <linux/sched/init.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100
  [PATCH 41/53] sched/headers: Remove the <linux/mm_types.h> dependency from <linux/sched.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100
  [PATCH 44/53] sched/headers: Move cputime functionality from <linux/sched.h> and <linux/cputime.h> into <linux/sched/cputime.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100
  [PATCH 40/53] mm/headers, sched/headers: Move task related MM types from <linux/mm_types.> to <linux/mm_types_task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100
  [PATCH 43/53] sched/headers: Move the task_lock()/unlock() APIs to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:20 +0100
  [PATCH 46/53] sched/headers, vfs/execve: Move the do_execve*() prototypes from <linux/sched.h> to <linux/binfmts.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:50 +0100
  [PATCH 53/53] sched/headers: Move the sched_exec() prototype to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:50 +0100
  [PATCH 45/53] sched/headers: Move sched_info_on() and force_schedstat_enabled() from <linux/sched.h> to <linux/sched/stat.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 21:40 +0100
  [PATCH 51/53] sched/headers, mm: Move 'struct tlbflush_unmap_batch' from <linux/sched.h> to <linux/mm_types_task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 21:40 +0100
  [PATCH 37/53] sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 21:50 +0100
  [PATCH 47/53] sched/headers: Move kstack_end() from <linux/sched.h> to <linux/sched/task_stack.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 22:40 +0100
  [PATCH 52/53] sched/headers: Move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> Ingo Molnar <mingo@kernel.org> - 2017-02-09 00:10 +0100

csiph-web