Re: linux-next: manual merge of the ftrace tree with the nfsd tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stephen,

On Tue, 15 Mar 2022 14:58:28 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> However, my x86_64 allmodconfig build then failed like this:
> 
> In file included from include/trace/define_custom_trace.h:55,
>                  from samples/trace_events/trace_custom_sched.h:95,
>                  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,  struct task_struct *, struct task_struct *) {aka void (*)(void *, _Bool,  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));
>       |         ^~~~~~~~~~~~~~~~~~~
> samples/trace_events/./trace_custom_sched.h:21:1: note: in expansion of macro 'TRACE_CUSTOM_EVENT'
>    21 | TRACE_CUSTOM_EVENT(sched_switch,
>       | ^~~~~~~~~~~~~~~~~~
> In file included from include/linux/trace_events.h:11,
>                  from samples/trace_events/trace_custom_sched.c:10:
> include/linux/tracepoint.h:279:49: note: expected 'void (*)(void *, bool,  unsigned int,  struct task_struct *, struct task_struct *)' {aka 'void (*)(void *, _Bool,  unsigned int,  struct task_struct *, struct task_struct *)'} but argument is of type 'void (*)(void *, bool,  struct task_struct *, struct task_struct *)' {aka 'void (*)(void *, _Bool,  struct task_struct *, struct task_struct *)'}
>   279 |         check_trace_callback_type_##name(void (*cb)(data_proto))        \
>       |                                          ~~~~~~~^~~~~~~~~~~~~~~
> include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
>   419 |         __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),              \
>       |         ^~~~~~~~~~~~~~~
> include/linux/tracepoint.h:553:9: note: in expansion of macro 'DECLARE_TRACE'
>   553 |         DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
>       |         ^~~~~~~~~~~~~
> include/trace/events/sched.h:222:1: note: in expansion of macro 'TRACE_EVENT'
>   222 | TRACE_EVENT(sched_switch,
>       | ^~~~~~~~~~~
> 
> So I gave up and uses the ftrace tree from next-20220310 for today.
> 
> I am going to need some help with this mess, please.

Thanks for the example merge.  The extra merge resolution patch ended
up this:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Wed, 16 Mar 2022 14:01:59 +1100
Subject: [PATCH] fixup for "sched/tracing: Don't re-read p->state when emitting sched_switch event"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 samples/trace_events/trace_custom_sched.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/samples/trace_events/trace_custom_sched.h b/samples/trace_events/trace_custom_sched.h
index a3d14de6a2e5..9fdd8e7c2a45 100644
--- a/samples/trace_events/trace_custom_sched.h
+++ b/samples/trace_events/trace_custom_sched.h
@@ -25,10 +25,11 @@ TRACE_CUSTOM_EVENT(sched_switch,
 	 * 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, next),
+	TP_ARGS(preempt, prev_state, prev, next),
 
 	/*
 	 * The next fields are where the customization happens.
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

Attachment: pgpKfT5zWH5eD.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux