oom.h 717 B

123456789101112131415161718192021222324252627282930313233
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM oom
  3. #if !defined(_TRACE_OOM_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_OOM_H
  5. #include <linux/tracepoint.h>
  6. TRACE_EVENT(oom_score_adj_update,
  7. TP_PROTO(struct task_struct *task),
  8. TP_ARGS(task),
  9. TP_STRUCT__entry(
  10. __field( pid_t, pid)
  11. __array( char, comm, TASK_COMM_LEN )
  12. __field( short, oom_score_adj)
  13. ),
  14. TP_fast_assign(
  15. __entry->pid = task->pid;
  16. memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
  17. __entry->oom_score_adj = task->signal->oom_score_adj;
  18. ),
  19. TP_printk("pid=%d comm=%s oom_score_adj=%hd",
  20. __entry->pid, __entry->comm, __entry->oom_score_adj)
  21. );
  22. #endif
  23. /* This part must be outside protection */
  24. #include <trace/define_trace.h>