From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valentin Schneider Subject: Re: [RFC PATCH 4/5] irq_work: Trace calls to arch_irq_work_raise() Date: Tue, 11 Oct 2022 16:02:06 +0100 Message-ID: References: <20221007154145.1877054-1-vschneid@redhat.com> <20221007154533.1878285-4-vschneid@redhat.com> <20221008153442.159b2f2d@rorschach.local.home> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665500532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ti1NCFCTzr5YPwBHvg45c+mfaiUwrR60uA7ep6lLZuA=; b=JBzjSpq+jRqqpD9oYTBWlNLyM7uj0Urqg1VYVfaKhguV+x0JV9H69UIQjThagjQkTspvj+ 95m9ek4KYWV6VxONycqhZwrWFkAs6UL4xLNqkNoEGcF4+3CEx/403GzBu7Ugoi9RyK0j/f MefmfEkLDgQZFp0D8u7h5+IxmbIEtVI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665500533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ti1NCFCTzr5YPwBHvg45c+mfaiUwrR60uA7ep6lLZuA=; b=bFlEr+6Kou7c1Uq+2pDZ9tDyqBmC6hB5Yz69cCDmjCiwJ0RYANSd+q7eqqXzIxNZlKmCsJ HK86uUjGeeiHsSK1V+RpVwq/virSvYwS4LVGk7CpdIk8VDl90w3NrN1PoMDqyymSkyYH6c x7t6hK8WAEMHQictmEFy0bW7/NiJmGY= In-Reply-To: <20221008153442.159b2f2d@rorschach.local.home> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane-mx.org@lists.ozlabs.org Sender: "Linuxppc-dev" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Steven Rostedt Cc: Juri Lelli , Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , Sebastian Andrzej Siewior , Dave Hansen , linux-mips@vger.kernel.org, Guo Ren , "H. Peter Anvin" , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, Marc Zyngier , linux-hexagon@vger.kernel.org, x86@kernel.org, Russell King , linux-csky@vger.kernel.org, Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, "Paul E. McKenney" , Frederic Weisbecker , Nicholas Piggin , l.com, , openrisc@lists.librecores.org, Borislav Petkov , loongarch@lists.linux.dev On 08/10/22 15:34, Steven Rostedt wrote: > 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. > Makes sense, thanks for the suggestion. > -- Steve > > >> + >> + arch_irq_work_raise(); >> +} >> + >> /* Enqueue on current CPU, work must already be claimed and preempt disabled */