Re: linux-next: Tree for Nov 2
From: Stephen Rothwell
Date: Mon Nov 02 2015 - 01:30:33 EST
Hi Sergey,
[Excess quoted for new cc's]
On Mon, 2 Nov 2015 14:58:16 +0900 Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx> wrote:
>
> unregister_trace_sched_switch/register_trace_prio_sched_switch/etc.
> (see the log below. 80-cols unfriendly. sorry.)
> expect proto to contain 'bool preempt'
>
> TRACE_EVENT(sched_switch,
>
> TP_PROTO(bool preempt,
> struct task_struct *prev,
> struct task_struct *next),
>
>
> event_filter_pid_sched_switch_probe_post() and
> event_filter_pid_sched_switch_probe_pre() are missing it.
> which results in:
>
> kernel/trace/trace_events.c: In function â__ftrace_clear_event_pidsâ:
> kernel/trace/trace_events.c:579:32: warning: passing argument 1 of âunregister_trace_sched_switchâ from incompatible pointer type [-Wincompatible-pointer-types]
> unregister_trace_sched_switch(event_filter_pid_sched_switch_probe_pre, tr);
> ^
> In file included from include/trace/events/sched.h:8:0,
> from kernel/trace/trace_events.c:25:
> include/linux/tracepoint.h:223:2: note: expected âvoid (*)(void *, bool, struct task_struct *, struct task_struct *) {aka void (*)(void *, _Bool, struct task_struct *, struct task_struct *)}â but argument is of type âvoid (*)(void *, struct task_struct *, struct task_struct *)â
> unregister_trace_##name(void (*probe)(data_proto), void *data) \
> ^
> include/linux/tracepoint.h:357:3: note: in expansion of macro â__DECLARE_TRACEâ
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
> ^
> include/linux/tracepoint.h:491:2: note: in expansion of macro âDECLARE_TRACEâ
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^
> include/trace/events/sched.h:124:1: note: in expansion of macro âTRACE_EVENTâ
> TRACE_EVENT(sched_switch,
> ^
> kernel/trace/trace_events.c:580:32: warning: passing argument 1 of âunregister_trace_sched_switchâ from incompatible pointer type [-Wincompatible-pointer-types]
> unregister_trace_sched_switch(event_filter_pid_sched_switch_probe_post, tr);
> ^
> In file included from include/trace/events/sched.h:8:0,
> from kernel/trace/trace_events.c:25:
> include/linux/tracepoint.h:223:2: note: expected âvoid (*)(void *, bool, struct task_struct *, struct task_struct *) {aka void (*)(void *, _Bool, struct task_struct *, struct task_struct *)}â but argument is of type âvoid (*)(void *, struct task_struct *, struct task_struct *)â
> unregister_trace_##name(void (*probe)(data_proto), void *data) \
> ^
> include/linux/tracepoint.h:357:3: note: in expansion of macro â__DECLARE_TRACEâ
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
> ^
> include/linux/tracepoint.h:491:2: note: in expansion of macro âDECLARE_TRACEâ
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^
> include/trace/events/sched.h:124:1: note: in expansion of macro âTRACE_EVENTâ
> TRACE_EVENT(sched_switch,
> ^
> kernel/trace/trace_events.c: In function âftrace_event_pid_writeâ:
> kernel/trace/trace_events.c:1723:36: warning: passing argument 1 of âregister_trace_prio_sched_switchâ from incompatible pointer type [-Wincompatible-pointer-types]
> register_trace_prio_sched_switch(event_filter_pid_sched_switch_probe_pre,
> ^
> In file included from include/trace/events/sched.h:8:0,
> from kernel/trace/trace_events.c:25:
> include/linux/tracepoint.h:216:2: note: expected âvoid (*)(void *, bool, struct task_struct *, struct task_struct *) {aka void (*)(void *, _Bool, struct task_struct *, struct task_struct *)}â but argument is of type âvoid (*)(void *, struct task_struct *, struct task_struct *)â
> register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> ^
> include/linux/tracepoint.h:357:3: note: in expansion of macro â__DECLARE_TRACEâ
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
> ^
> include/linux/tracepoint.h:491:2: note: in expansion of macro âDECLARE_TRACEâ
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^
> include/trace/events/sched.h:124:1: note: in expansion of macro âTRACE_EVENTâ
> TRACE_EVENT(sched_switch,
> ^
> kernel/trace/trace_events.c:1725:36: warning: passing argument 1 of âregister_trace_prio_sched_switchâ from incompatible pointer type [-Wincompatible-pointer-types]
> register_trace_prio_sched_switch(event_filter_pid_sched_switch_probe_post,
> ^
> In file included from include/trace/events/sched.h:8:0,
> from kernel/trace/trace_events.c:25:
> include/linux/tracepoint.h:216:2: note: expected âvoid (*)(void *, bool, struct task_struct *, struct task_struct *) {aka void (*)(void *, _Bool, struct task_struct *, struct task_struct *)}â but argument is of type âvoid (*)(void *, struct task_struct *, struct task_struct *)â
> register_trace_prio_##name(void (*probe)(data_proto), void *data,\
> ^
> include/linux/tracepoint.h:357:3: note: in expansion of macro â__DECLARE_TRACEâ
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
> ^
> include/linux/tracepoint.h:491:2: note: in expansion of macro âDECLARE_TRACEâ
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^
> include/trace/events/sched.h:124:1: note: in expansion of macro âTRACE_EVENTâ
> TRACE_EVENT(sched_switch,
Presumably caused by the interaction of commit
3fdaf80f4a83 ("tracing: Implement event pid filtering")
from the trace tree and commit
c73464b1c843 ("sched/core: Fix trace_sched_switch()")
from the tip tree.
> something like this, I guess.
>
> ===8<===8<===8<===8<===
>
> Add missing 'bool preempt' argument as required by
> sched_switch's trace event proto:
>
> : TRACE_EVENT(sched_switch,
> :
> : TP_PROTO(bool preempt,
> : struct task_struct *prev,
> : struct task_struct *next),
> ...
>
> to event_filter_pid_sched_switch_probe_post() and
> event_filter_pid_sched_switch_probe_pre() functions.
>
> kernel/trace/trace_events.c: In function â__ftrace_clear_event_pidsâ:
> kernel/trace/trace_events.c:579:32: warning: passing argument 1 of
> âunregister_trace_sched_switchâ from incompatible pointer type
> [-Wincompatible-pointer-types]
> unregister_trace_sched_switch(event_filter_pid_sched_switch_probe_pre, tr);
> ^
> In file included from include/trace/events/sched.h:8:0,
> from kernel/trace/trace_events.c:25:
> include/linux/tracepoint.h:223:2: note: expected
> âvoid (*)(void *, bool, struct task_struct *, struct task_struct *)
> {aka void (*)(void *, _Bool, struct task_struct *, struct task_struct *)}â
> but argument is of type
> âvoid (*)(void *, struct task_struct *, struct task_struct *)â
> unregister_trace_##name(void (*probe)(data_proto), void *data) \
> ^
> include/linux/tracepoint.h:357:3: note: in expansion of macro â__DECLARE_TRACEâ
> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
> ^
> include/linux/tracepoint.h:491:2: note: in expansion of macro âDECLARE_TRACEâ
> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
> ^
> include/trace/events/sched.h:124:1: note: in expansion of macro âTRACE_EVENTâ
> TRACE_EVENT(sched_switch,
> ^
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
> ---
> kernel/trace/trace_events.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index fb0261e..0d86f0c 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -506,7 +506,7 @@ check_ignore_pid(struct trace_pid_list *filtered_pids, struct task_struct *task)
> }
>
> static void
> -event_filter_pid_sched_switch_probe_pre(void *data,
> +event_filter_pid_sched_switch_probe_pre(void *data, bool preempt,
> struct task_struct *prev, struct task_struct *next)
> {
> struct trace_array *tr = data;
> @@ -520,7 +520,7 @@ event_filter_pid_sched_switch_probe_pre(void *data,
> }
>
> static void
> -event_filter_pid_sched_switch_probe_post(void *data,
> +event_filter_pid_sched_switch_probe_post(void *data, bool preempt,
> struct task_struct *prev, struct task_struct *next)
> {
> struct trace_array *tr = data;
> --
> 2.6.2.402.g2635c2b
So I guess I need that (or something similar) in linux-next until these
trees are merged.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/