[lttng-dev] [PATCH lttng-modules 2.6 1/2] Fix: make sched instrumentation build for 4.3 kernel

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Oct 26 14:40:09 EDT 2015


Both patches merged into stable-2.6, thanks!

Mathieu

----- On Oct 26, 2015, at 7:40 AM, Rabin Vincent rabin.vincent at axis.com wrote:

> The backported patch "Fix: update sched wakeup instrumentation for 4.3
> kernel" (c93180196ea8) used a newer definition of
> LTTNG_TRACEPOINT_EVENT_CLASS which is not available in v2.6.
> 
> Signed-off-by: Rabin Vincent <rabinv at axis.com>
> ---
> instrumentation/events/lttng-module/sched.h |   24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/instrumentation/events/lttng-module/sched.h
> b/instrumentation/events/lttng-module/sched.h
> index f6b65ae..d2e03f9 100644
> --- a/instrumentation/events/lttng-module/sched.h
> +++ b/instrumentation/events/lttng-module/sched.h
> @@ -142,12 +142,26 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
> 
> 	TP_ARGS(p),
> 
> -	TP_FIELDS(
> -		ctf_array_text(char, comm, p->comm, TASK_COMM_LEN)
> -		ctf_integer(pid_t, tid, p->pid)
> -		ctf_integer(int, prio, p->prio)
> -		ctf_integer(int, target_cpu, task_cpu(p))
> +	TP_STRUCT__entry(
> +		__array_text(	char,	comm,	TASK_COMM_LEN	)
> +		__field(	pid_t,	tid			)
> +		__field(	int,	prio			)
> +		__field(	int,	target_cpu		)
> +	),
> +
> +	TP_fast_assign(
> +		tp_memcpy(comm, p->comm, TASK_COMM_LEN)
> +		tp_assign(tid, p->pid)
> +		tp_assign(prio, p->prio)
> +		tp_assign(target_cpu, task_cpu(p))
> 	)
> +	TP_perf_assign(
> +		__perf_task(p)
> +	),
> +
> +	TP_printk("comm=%s tid=%d prio=%d target_cpu=%03d",
> +		  __entry->comm, __entry->tid, __entry->prio,
> +		  __entry->target_cpu)
> )
> #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
> LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
> --
> 1.7.10.4
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list