kdb_enhance.c 543 B

1234567891011121314151617181920212223242526272829
  1. #include <linux/sched.h>
  2. #include <linux/utsname.h>
  3. #include <linux/kdb.h>
  4. #ifdef CONFIG_SCHED_DEBUG
  5. DEFINE_PER_CPU(int, kdb_in_use) = 0;
  6. /*
  7. * Display sched_debug information
  8. */
  9. static int kdb_sched_debug(int argc, const char **argv)
  10. {
  11. sysrq_sched_debug_show();
  12. return 0;
  13. }
  14. #endif
  15. static __init int kdb_enhance_register(void)
  16. {
  17. #ifdef CONFIG_SCHED_DEBUG
  18. kdb_register_repeat("sched_debug", kdb_sched_debug, "",
  19. "Display sched_debug information", 0, KDB_REPEAT_NONE);
  20. #endif
  21. return 0;
  22. }
  23. device_initcall(kdb_enhance_register);