Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2713392rwb; Sat, 8 Oct 2022 12:49:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4dPRVKbsX6+GSZa8HH3bGX/OWi31zO3vrarsaG/Kc1fAr4/A3dkbFUHtlnp15aqrKpPJJ6 X-Received: by 2002:a17:907:968e:b0:78d:580:eb2e with SMTP id hd14-20020a170907968e00b0078d0580eb2emr8941865ejc.235.1665258599478; Sat, 08 Oct 2022 12:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665258599; cv=none; d=google.com; s=arc-20160816; b=QsZL/pAdXiYZuJ1w5lN9YxTmi13c8kh2Oo61CHXpeUvKTQXHXuX6TQES3075kWkTKG KWJ5jDdcx8xOIy4moIc6qw4vNJnhwQg1X/JpcJ4quJ2zJoWyEeHvG/V0J3xTJjvq9ioU p9iZA/+rxOqu94GLw0WPoebNpQkcu8tY0O46FP+SUmw9cme1CJH7EqkGsDAP/ugE2Tpg WGEaSKfvcX5DnAQXWkh0x111Q+zwJR5Nh809Ux+Mvvb5dJYhWOYyeiSNPURPJrU93DEU UhZuYmjMHDE5RJVdTo9jivBX26gJGRWj1ANo+C3Pc/NumHivgoDmIxCoUbQH9I9I2PwR 9pRQ== 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=orK61gM/STh8JAALRlfihesrPJvwWDiP/Z4L41gNJd8=; b=LflFAFvNKZouCghrmrN62tTb1e1N7PJVVsuj6TX0GJr1JEo32KuazDlA1a5F+px5MC wEWZ3bUxBNWSixNpjFVjRsv6fQQVK2yApNxqJ4r9beqHFZm0FHptkMeAW8wljicSHMPX fEIShQ+NmPOVGfV2b4M/Jt7zukNrXCb9bzbj9zwZw6XLgYu61ZIev/rzR4rQbQl041hs ofpXYPTcn/kCtv3Xvc8mbx/kDo8trh32DFZsI2R0OOusrveRTFRRzM03aYifD0axvRTh mZBkyOP0jeLWEm+/AiedOmkXPWMK6l4AWhqu6xp6/J2vAH2B13l5twfO5clqWxlpzPHC StBA== 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 sa25-20020a170906edb900b00781b277d931si4822110ejb.390.2022.10.08.12.49.33; Sat, 08 Oct 2022 12:49:59 -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 S229883AbiJHTfK (ORCPT + 99 others); Sat, 8 Oct 2022 15:35:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbiJHTfI (ORCPT ); Sat, 8 Oct 2022 15:35:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF32F27FDA; Sat, 8 Oct 2022 12:35:06 -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 77830B80BD9; Sat, 8 Oct 2022 19:35:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0348FC433C1; Sat, 8 Oct 2022 19:34:46 +0000 (UTC) Date: Sat, 8 Oct 2022 15:34:42 -0400 From: Steven Rostedt To: Valentin Schneider Cc: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org, "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Frederic Weisbecker , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Marc Zyngier , Mark Rutland , Russell King , Nicholas Piggin , Guo Ren , "David S. Miller" Subject: Re: [RFC PATCH 4/5] irq_work: Trace calls to arch_irq_work_raise() Message-ID: <20221008153442.159b2f2d@rorschach.local.home> In-Reply-To: <20221007154533.1878285-4-vschneid@redhat.com> References: <20221007154145.1877054-1-vschneid@redhat.com> <20221007154533.1878285-4-vschneid@redhat.com> 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 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 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 Fri, 7 Oct 2022 16:45:32 +0100 Valentin Schneider wrote: > } > > +static inline void irq_work_raise(void) > +{ > + if (arch_irq_work_has_interrupt()) > + trace_ipi_send_cpu(_RET_IP_, smp_processor_id()); To save on the branch, let's make the above: if (trace_ipi_send_cpu_enabled() && arch_irq_work_has_interrupt()) As the "trace_*_enabled()" is a static branch that will make it a nop when the tracepoint is not enabled. -- Steve > + > + arch_irq_work_raise(); > +} > + > /* Enqueue on current CPU, work must already be claimed and preempt disabled */