debug.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_SCHED_DEBUG_H
  3. #define _LINUX_SCHED_DEBUG_H
  4. /*
  5. * Various scheduler/task debugging interfaces:
  6. */
  7. struct task_struct;
  8. struct pid_namespace;
  9. extern void dump_cpu_task(int cpu);
  10. /*
  11. * Only dump TASK_* tasks. (0 for all tasks)
  12. */
  13. extern void show_state_filter(unsigned long state_filter);
  14. static inline void show_state(void)
  15. {
  16. show_state_filter(0);
  17. }
  18. struct pt_regs;
  19. extern void show_regs(struct pt_regs *);
  20. /*
  21. * TASK is a pointer to the task whose backtrace we want to see (or NULL for current
  22. * task), SP is the stack pointer of the first frame that should be shown in the back
  23. * trace (or NULL if the entire call-chain of the task should be shown).
  24. */
  25. extern void show_stack(struct task_struct *task, unsigned long *sp,
  26. const char *loglvl);
  27. extern void sched_show_task(struct task_struct *p);
  28. #ifdef CONFIG_SCHED_DEBUG
  29. struct seq_file;
  30. extern void proc_sched_show_task(struct task_struct *p,
  31. struct pid_namespace *ns, struct seq_file *m);
  32. extern void proc_sched_set_task(struct task_struct *p);
  33. #endif
  34. /* Attach to any functions which should be ignored in wchan output. */
  35. #define __sched __section(".sched.text")
  36. /* Linker adds these: start and end of __sched functions */
  37. extern char __sched_text_start[], __sched_text_end[];
  38. /* Is this address in the __sched functions? */
  39. extern int in_sched_functions(unsigned long addr);
  40. #endif /* _LINUX_SCHED_DEBUG_H */