Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_SCHED_DEBUG_H
0003 #define _LINUX_SCHED_DEBUG_H
0004 
0005 /*
0006  * Various scheduler/task debugging interfaces:
0007  */
0008 
0009 struct task_struct;
0010 struct pid_namespace;
0011 
0012 extern void dump_cpu_task(int cpu);
0013 
0014 /*
0015  * Only dump TASK_* tasks. (0 for all tasks)
0016  */
0017 extern void show_state_filter(unsigned int state_filter);
0018 
0019 static inline void show_state(void)
0020 {
0021     show_state_filter(0);
0022 }
0023 
0024 struct pt_regs;
0025 
0026 extern void show_regs(struct pt_regs *);
0027 
0028 /*
0029  * TASK is a pointer to the task whose backtrace we want to see (or NULL for current
0030  * task), SP is the stack pointer of the first frame that should be shown in the back
0031  * trace (or NULL if the entire call-chain of the task should be shown).
0032  */
0033 extern void show_stack(struct task_struct *task, unsigned long *sp,
0034                const char *loglvl);
0035 
0036 extern void sched_show_task(struct task_struct *p);
0037 
0038 #ifdef CONFIG_SCHED_DEBUG
0039 struct seq_file;
0040 extern void proc_sched_show_task(struct task_struct *p,
0041                  struct pid_namespace *ns, struct seq_file *m);
0042 extern void proc_sched_set_task(struct task_struct *p);
0043 #endif
0044 
0045 /* Attach to any functions which should be ignored in wchan output. */
0046 #define __sched     __section(".sched.text")
0047 
0048 /* Linker adds these: start and end of __sched functions */
0049 extern char __sched_text_start[], __sched_text_end[];
0050 
0051 /* Is this address in the __sched functions? */
0052 extern int in_sched_functions(unsigned long addr);
0053 
0054 #endif /* _LINUX_SCHED_DEBUG_H */