X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fsched.h;h=eb3446b26f5c33247b7440aeb0d054b2a714ca49;hb=947cb9afd2d36d00167484183c9a866274f92516;hp=b68616e068111af4b67aa46ac91ef2fae4615ec9;hpb=3a523f5b6b4f8ca82412cb45f2d2ad9c44e7d249;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h index b68616e0..eb3446b2 100644 --- a/instrumentation/events/lttng-module/sched.h +++ b/instrumentation/events/lttng-module/sched.h @@ -6,6 +6,9 @@ #include #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) +#include +#endif #ifndef _TRACE_SCHED_DEF_ #define _TRACE_SCHED_DEF_ @@ -313,6 +316,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, pid ) + __field( pid_t, old_pid ) + ), + + TP_fast_assign( + tp_strcpy(filename, bprm->filename) + tp_assign(pid, p->pid) + tp_assign(old_pid, old_pid) + ), + + TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), + __entry->pid, __entry->old_pid) +) +#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.