sched instrumentation: rename "pid" fields in sched_process_exec
[lttng-modules.git] / instrumentation / events / lttng-module / sched.h
index b68616e068111af4b67aa46ac91ef2fae4615ec9..005f3d141e1f7bca6d6ccfe83dd29d94986c6057 100644 (file)
@@ -313,6 +313,34 @@ TRACE_EVENT(sched_process_fork,
                __entry->child_comm, __entry->child_tid)
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+/*
+ * Tracepoint for exec:
+ */
+TRACE_EVENT(sched_process_exec,
+
+       TP_PROTO(struct task_struct *p, pid_t old_pid,
+                struct linux_binprm *bprm),
+
+       TP_ARGS(p, old_pid, bprm),
+
+       TP_STRUCT__entry(
+               __string(       filename,       bprm->filename  )
+               __field(        pid_t,          tid             )
+               __field(        pid_t,          old_tid         )
+       ),
+
+       TP_fast_assign(
+               tp_strcpy(filename, bprm->filename)
+               tp_assign(tid, p->pid)
+               tp_assign(old_tid, old_pid)
+       ),
+
+       TP_printk("filename=%s tid=%d old_tid=%d", __get_str(filename),
+                 __entry->tid, __entry->old_tid)
+)
+#endif
+
 /*
  * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
  *     adding sched_stat support to SCHED_FIFO/RR would be welcome.
This page took 0.024505 seconds and 4 git commands to generate.