latencytop.h 804 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * latencytop.h: Infrastructure for displaying latency
  3. *
  4. * (C) Copyright 2008 Intel Corporation
  5. * Author: Arjan van de Ven <arjan@linux.intel.com>
  6. *
  7. */
  8. #ifndef _INCLUDE_GUARD_LATENCYTOP_H_
  9. #define _INCLUDE_GUARD_LATENCYTOP_H_
  10. #ifdef CONFIG_LATENCYTOP
  11. #define LT_SAVECOUNT 32
  12. #define LT_BACKTRACEDEPTH 12
  13. struct latency_record {
  14. unsigned long backtrace[LT_BACKTRACEDEPTH];
  15. unsigned int count;
  16. unsigned long time;
  17. unsigned long max;
  18. };
  19. struct task_struct;
  20. void account_scheduler_latency(struct task_struct *task, int usecs, int inter);
  21. void clear_all_latency_tracing(struct task_struct *p);
  22. #else
  23. static inline void
  24. account_scheduler_latency(struct task_struct *task, int usecs, int inter)
  25. {
  26. }
  27. static inline void clear_all_latency_tracing(struct task_struct *p)
  28. {
  29. }
  30. #endif
  31. #endif