From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81F1CC76195 for ; Mon, 27 Mar 2023 21:51:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbjC0VvH (ORCPT ); Mon, 27 Mar 2023 17:51:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjC0VvF (ORCPT ); Mon, 27 Mar 2023 17:51:05 -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 BAFDCD9; Mon, 27 Mar 2023 14:51:04 -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 82E7CB81978; Mon, 27 Mar 2023 21:51:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AAB4C4339B; Mon, 27 Mar 2023 21:51:01 +0000 (UTC) Date: Mon, 27 Mar 2023 17:50:59 -0400 From: Steven Rostedt To: Uladzislau Rezki Cc: "Zhuo, Qiuxu" , "Paul E . McKenney" , RCU , "quic_neeraju@quicinc.com" , Boqun Feng , Joel Fernandes , LKML , Oleksiy Avramchenko , Frederic Weisbecker Subject: Re: [PATCH 1/1] Reduce synchronize_rcu() waiting time Message-ID: <20230327175059.1e8584cc@gandalf.local.home> In-Reply-To: <20230327174844.15305988@gandalf.local.home> References: <20230321102748.127923-1-urezki@gmail.com> <20230327174844.15305988@gandalf.local.home> 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=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Mar 2023 17:48:44 -0400 Steven Rostedt wrote: > struct my_info { > /* store state info here */ > }; > > int main(...) { > struct tracecmd_input *handle; > struct my_info info; > char *file = argv[1]; > > handle = tracecmd_open(file); > > tracecmd_follow_event(handle, "rcu", "rcu_batch_start", > batch_start, &info); > > tracecmd_follow_event(handle, "rcu", "rcu_batch_end", > batch_end, &info); > > tracecmd_follow_event(handle, "rcu", "rcu_invoke_callback", > invoke_callback, &info); > > tracecmd_iterate_events(handle, NULL, 0, NULL, NULL); > > tracecmd_close(handle); > } BTW, none of this code was actually tested, so I may have some syntax errors. I just did this straight from memory, as it's so easy ;-) -- Steve