|
@@ -6,6 +6,7 @@
|
|
|
|
|
|
#include <linux/sched.h>
|
|
|
#include <linux/tracepoint.h>
|
|
|
+#include <linux/binfmts.h>
|
|
|
|
|
|
/*
|
|
|
* Tracepoint for calling kthread_stop, performed to end a kthread:
|
|
@@ -275,6 +276,32 @@ TRACE_EVENT(sched_process_fork,
|
|
|
__entry->child_comm, __entry->child_pid)
|
|
|
);
|
|
|
|
|
|
+/*
|
|
|
+ * 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, pid )
|
|
|
+ __field( pid_t, old_pid )
|
|
|
+ ),
|
|
|
+
|
|
|
+ TP_fast_assign(
|
|
|
+ __assign_str(filename, bprm->filename);
|
|
|
+ __entry->pid = p->pid;
|
|
|
+ __entry->old_pid = p->pid;
|
|
|
+ ),
|
|
|
+
|
|
|
+ TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename),
|
|
|
+ __entry->pid, __entry->old_pid)
|
|
|
+);
|
|
|
+
|
|
|
/*
|
|
|
* XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
|
|
|
* adding sched_stat support to SCHED_FIFO/RR would be welcome.
|