Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6274201iob; Tue, 10 May 2022 14:36:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuFpJLgOzDl9kqq+tjGNsipBdq6ewjZEdOUYGxmBh9NINhDeTHAMyzd84R2ENv6MouvRMf X-Received: by 2002:a17:903:2406:b0:158:f6f0:6c44 with SMTP id e6-20020a170903240600b00158f6f06c44mr22278099plo.88.1652218607892; Tue, 10 May 2022 14:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652218607; cv=none; d=google.com; s=arc-20160816; b=CPfQ9pThGSY8rlj/y/j75mK5WTPrWPNVqS3fH6Ig1OIbNH3S50fLjenq/LTzOYnhkH Xlp0BBjcKXP77eRubBMB08Qs/1XsG1uitBfYuMbPVUhxEGhP09RWjokGcaU+MDXm6mO3 wjF4Ds/7m1ZHJAEsDO0HLBRip3mDEZo7wEy49dd0+i1pzP+FNRf6ty56eLJXtUXnvBtS sfROUkKIMmZsk0Az5j6VzKTlx7nyvntavGpRcdB5v8yegHbyXVb2NRwFfe1dq8pvC+g+ 7gdF+boLyAU5Y7bZ/ciI3V60B/sOBnHhYtxrvfc3ExgZgFOMF4DLHbFCUGZ63/CuhNcP UGkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=lM5QGcnCaw8cpYvJXP7Bq6YIMMOWgeGG9z2mCU9lcVk=; b=b+gwPjsc+23dXlCIdbRiEmACmMSMFXkw//djHQo7+lZM64o987Oh06sCPjffoik4J0 m9HYL4J5/zmFcuy3gO7yG0aXi/DxIrwaDZudq1jUxUEj0UoNpZr9bHIAIjIRR7yt3+dR UInApy8Wl9u2PmDGEsvDzPCWMElD8ZxSB+ijaxx9mExmTg8ZLXBOQmlRUB8xDGREJkTn +qvFYsBjleQheAPE4d3pczTjZ4iFul1Ko37NyZVPNknl7NcoEoNcAZl+ekBxY/a7MIac Oz5K5popMC9kQKLjq/c5PczrqmZqFq36OkEfMugRAEIV27Wa6ANhLZc/Bhlpoprcn0Jr LBFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a170902ef4600b0015e7d5502a8si156178plx.612.2022.05.10.14.36.32; Tue, 10 May 2022 14:36:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345459AbiEJPJt convert rfc822-to-8bit (ORCPT + 99 others); Tue, 10 May 2022 11:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345886AbiEJPGf (ORCPT ); Tue, 10 May 2022 11:06:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA4492944BC for ; Tue, 10 May 2022 07:32:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 38A90B81DC3 for ; Tue, 10 May 2022 14:31:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12C07C385C2; Tue, 10 May 2022 14:31:53 +0000 (UTC) Date: Tue, 10 May 2022 10:31:52 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Andrii Nakryiko , Qais Yousef , Alexei Starovoitov , Delyan Kratunov , Namhyung Kim , Arnaldo Carvalho de Melo , "bigeasy@linutronix.de" , "dietmar.eggemann@arm.com" , "keescook@chromium.org" , "x86@kernel.org" , "andrii@kernel.org" , "u.kleine-koenig@pengutronix.de" , "vincent.guittot@linaro.org" , "akpm@linux-foundation.org" , "mingo@kernel.org" , "linux-kernel@vger.kernel.org" , "rdunlap@infradead.org" , "Kenta.Tada@sony.com" , "tglx@linutronix.de" , "bristot@redhat.com" , "ebiederm@xmission.com" , "ast@kernel.org" , "legion@kernel.org" , "adharmap@quicinc.com" , "valentin.schneider@arm.com" , "ed.tsai@mediatek.com" , "juri.lelli@redhat.com" Subject: Re: [PATCH] sched/tracing: append prev_state to tp args instead Message-ID: <20220510103152.68b8b66d@gandalf.local.home> In-Reply-To: <20220510082940.GA100765@worktop.programming.kicks-ass.net> References: <056e9bb0d0e3fc20572d42db7386face1d0665d6.camel@fb.com> <20220426140959.op6u5m7id57aq7yc@wubuntu> <20220427103458.ecnqtaj3af63625h@wubuntu> <20220428100235.sqoxunbylqk2surk@wubuntu> <20220510070122.GJ76023@worktop.programming.kicks-ass.net> <20220510082940.GA100765@worktop.programming.kicks-ass.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 May 2022 10:29:40 +0200 Peter Zijlstra 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