[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220510103152.68b8b66d@gandalf.local.home>
Date: Tue, 10 May 2022 10:31:52 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Andrii Nakryiko <andrii.nakryiko@...il.com>,
Qais Yousef <qais.yousef@....com>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
Delyan Kratunov <delyank@...com>,
Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
"bigeasy@...utronix.de" <bigeasy@...utronix.de>,
"dietmar.eggemann@....com" <dietmar.eggemann@....com>,
"keescook@...omium.org" <keescook@...omium.org>,
"x86@...nel.org" <x86@...nel.org>,
"andrii@...nel.org" <andrii@...nel.org>,
"u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
"vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"mingo@...nel.org" <mingo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rdunlap@...radead.org" <rdunlap@...radead.org>,
"Kenta.Tada@...y.com" <Kenta.Tada@...y.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"bristot@...hat.com" <bristot@...hat.com>,
"ebiederm@...ssion.com" <ebiederm@...ssion.com>,
"ast@...nel.org" <ast@...nel.org>,
"legion@...nel.org" <legion@...nel.org>,
"adharmap@...cinc.com" <adharmap@...cinc.com>,
"valentin.schneider@....com" <valentin.schneider@....com>,
"ed.tsai@...iatek.com" <ed.tsai@...iatek.com>,
"juri.lelli@...hat.com" <juri.lelli@...hat.com>
Subject: Re: [PATCH] sched/tracing: append prev_state to tp args instead
On Tue, 10 May 2022 10:29:40 +0200
Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, May 10, 2022 at 09:01:22AM +0200, Peter Zijlstra wrote:
> > On Mon, May 09, 2022 at 12:32:31PM -0700, Andrii Nakryiko wrote:
> > > So can this patch be applied, please, or it's a hard no?
> >
> > Sorry; I got distracted with other work. I'll grudingly apply the patch.
>
> gcc-11-i386-allmodconfig [15:35] FAILED
> | In file included from ../include/trace/define_custom_trace.h:55,
> | from ../samples/trace_events/trace_custom_sched.h:96,
> | from ../samples/trace_events/trace_custom_sched.c:24:
> | ../samples/trace_events/./trace_custom_sched.h: In function ‘ftrace_test_custom_probe_sched_switch’:
> | ../include/trace/trace_custom_events.h:178:42: error: passing argument 1 of ‘check_trace_callback_type_sched_switch’ from incompatible pointer type [-Werror=incompatible-pointer-types]
> | 178 | check_trace_callback_type_##call(trace_custom_event_raw_event_##template); \
> | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | | |
> | | void (*)(void *, bool, unsigned int, struct task_struct *, struct task_struct *) {aka void (*)(void *, _Bool, unsigned int, struct task_struct *, struct task_struct *)}
> | ../include/trace/trace_custom_events.h:34:9: note: in expansion of macro ‘DEFINE_CUSTOM_EVENT’
> | 34 | DEFINE_CUSTOM_EVENT(name, name, PARAMS(proto), PARAMS(args));
Yes, the custom tracepoint sample code uses the sched_switch tracepoint as
an example. That sample code needs to be updated:
In samples/trace_events/trace_custom_sched.h:
TRACE_CUSTOM_EVENT(sched_switch,
/*
* The TP_PROTO() and TP_ARGS must match the trace event
* that the custom event is using.
*/
TP_PROTO(bool preempt,
unsigned int prev_state,
struct task_struct *prev,
struct task_struct *next),
TP_ARGS(preempt, prev_state, prev, next),
The arguments need to be updated.
-- Steve
Powered by blists - more mailing lists