[lttng-dev] sched_process_exec

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Oct 11 12:07:29 EDT 2012


* Woegerer, Paul (Paul_Woegerer at mentor.com) wrote:
> On 10/11/2012 04:58 PM, Mathieu Desnoyers wrote:
> > A couple a details to fix before I can merge this patch though:
> > 
> > Please also update instrumentation/events/mainline/sched.h to add the
> > original mainline TRACE_EVENT, so we can keep the files in sync.
> 
> Ok, reconfigured Thunderbird, removed semicolon, updated mainline:

Still an issue:

compudj at thinkos:~/work/lttng-modules$ patch -p1 < ~/.swp
patching file instrumentation/events/lttng-module/sched.h
patch: **** malformed patch at line 45: SCHED_OTHER/BATCH/IDLE

it seems to be an issue with line-wrapping of your mail client.

Thanks,

Mathieu

> 
> diff --git a/instrumentation/events/lttng-module/sched.h
> b/instrumentation/events/lttng-module/sched.h
> index b68616e..23e4955 100644
> --- a/instrumentation/events/lttng-module/sched.h
> +++ b/instrumentation/events/lttng-module/sched.h
> @@ -314,6 +314,32 @@ TRACE_EVENT(sched_process_fork,
>  )
> 
>  /*
> + * 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)
> +)
> +
> +/*
>   * XXX the below sched_stat tracepoints only apply to
> SCHED_OTHER/BATCH/IDLE
>   *     adding sched_stat support to SCHED_FIFO/RR would be welcome.
>   */
> diff --git a/instrumentation/events/mainline/sched.h
> b/instrumentation/events/mainline/sched.h
> index f633478..6700ecc 100644
> --- a/instrumentation/events/mainline/sched.h
> +++ b/instrumentation/events/mainline/sched.h
> @@ -275,6 +275,32 @@ TRACE_EVENT(sched_process_fork,
>  );
> 
>  /*
> + * 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	= old_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.
>   */
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list