- TP_STRUCT__entry(
- __array( char, parent_comm, TASK_COMM_LEN )
- __field( pid_t, parent_pid )
- __array( char, child_comm, TASK_COMM_LEN )
- __field( pid_t, child_pid )
- ),
-
- TP_fast_assign(
- tp_memcpy(parent_comm, parent->comm, TASK_COMM_LEN)
- tp_assign(parent_pid, parent->pid)
- tp_memcpy(child_comm, child->comm, TASK_COMM_LEN)
- tp_assign(child_pid, child->pid)
- ),
-
- TP_printk("comm=%s pid=%d child_comm=%s child_pid=%d",
- __entry->parent_comm, __entry->parent_pid,
- __entry->child_comm, __entry->child_pid)
+ TP_FIELDS(
+ ctf_array_text(char, parent_comm, parent->comm, TASK_COMM_LEN)
+ ctf_integer(pid_t, parent_tid, parent->pid)
+ ctf_integer(pid_t, parent_pid, parent->tgid)
+ ctf_array_text(char, child_comm, child->comm, TASK_COMM_LEN)
+ ctf_integer(pid_t, child_tid, child->pid)
+ ctf_integer(pid_t, child_pid, child->tgid)
+ )
+)
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
+/*
+ * Tracepoint for sending a signal:
+ */
+LTTNG_TRACEPOINT_EVENT(sched_signal_send,
+
+ TP_PROTO(int sig, struct task_struct *p),
+
+ TP_ARGS(sig, p),
+
+ TP_FIELDS(
+ ctf_integer(int, sig, sig)
+ ctf_array_text(char, comm, p->comm, TASK_COMM_LEN)
+ ctf_integer(pid_t, tid, p->pid)
+ )
+)
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+/*
+ * Tracepoint for exec:
+ */
+LTTNG_TRACEPOINT_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_FIELDS(
+ ctf_string(filename, bprm->filename)
+ ctf_integer(pid_t, tid, p->pid)
+ ctf_integer(pid_t, old_tid, old_pid)
+ )