From nobody Tue Apr 7 00:25:48 2026 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 C6AC4C433FE for ; Fri, 7 Oct 2022 15:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbiJGPqI (ORCPT ); Fri, 7 Oct 2022 11:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbiJGPp6 (ORCPT ); Fri, 7 Oct 2022 11:45:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D9896170B for ; Fri, 7 Oct 2022 08:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665157556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LMgaXogbXPhOabUcxt7UADYdICMU0udr545Ze04p+j4=; b=Xqll45XYheEyZWjDuO4602uueS1d5FZu/M8BAxnRmB7gSBn9PQ/mzjNPOExk4gx7Jdcx3h bRk67JWT13TvhrnRNyDFujsSZNa8GU1Pzi2xxwfKO8Zv5gAEpFiy5rbu9/5ukgDTvLuEDm b4C+N9aQlz7QDACdEpegPV/z55kVz2Y= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-646-x4vF5IfPMYK17C7RQGgX1w-1; Fri, 07 Oct 2022 11:45:55 -0400 X-MC-Unique: x4vF5IfPMYK17C7RQGgX1w-1 Received: by mail-wr1-f69.google.com with SMTP id t1-20020adfba41000000b0022cc6bcd8dbso1556116wrg.4 for ; Fri, 07 Oct 2022 08:45:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LMgaXogbXPhOabUcxt7UADYdICMU0udr545Ze04p+j4=; b=HDaIBtXabzrStwRYQBvqI4xOlkKib4RJpjYiSKN8yysLwxFPoDk4h9WnNakqZPx+KO kQTax8Ij1cT+CLLkoELit43G5cOKLXzAi5dc2zo1oGf04AAhUQzU3yshukwNRony18U1 8rCM9zZhb1qfDpMwUsLfLzYdr3LmN+Nf0v0Ddegb9WFjag485HSVlMSmDgAOCKARLNdP gbAa+aHHi5u/oX1Uf5pMFzaMYdOlF9y7O/vnJp1KqkETI3nHrV5KOYRAIC1j9J48cUwn DZhKn/3cGVM43DDp+Yh7iKcQdy9/TJRh4zeVKLGEns4mCkaqlOTaUyoDpY0ZiZ8/Dn1i 2GsA== X-Gm-Message-State: ACrzQf1Fht8jGn4DPvLM2LxZtCZOoapZtre5PIy8LccJODEGR2Hw7Fhb 555wW/k2bWra9Qih/8Ju39+PBSnhedJap7MPJ3ycTCt+ZmMqUzZ0Jhpsi7Ctet8eM/0m4kz7lgg PJny1WS19YnMr+5W8Jl/JDGok X-Received: by 2002:a05:600c:458d:b0:3c3:bf4e:5c60 with SMTP id r13-20020a05600c458d00b003c3bf4e5c60mr1331388wmo.189.1665157552456; Fri, 07 Oct 2022 08:45:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM53pm8pDMF8tAvcpsQYCd9DEpAeQROExvsQCCHMjVMrngwHmXq+ii3h5Ne2OaugbAyINh7v6Q== X-Received: by 2002:a05:600c:458d:b0:3c3:bf4e:5c60 with SMTP id r13-20020a05600c458d00b003c3bf4e5c60mr1331352wmo.189.1665157552172; Fri, 07 Oct 2022 08:45:52 -0700 (PDT) Received: from vschneid.remote.csb ([149.71.65.94]) by smtp.gmail.com with ESMTPSA id i18-20020adfb652000000b0022e38c93195sm2339428wre.34.2022.10.07.08.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 08:45:51 -0700 (PDT) From: Valentin Schneider To: 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 Cc: "Paul E. McKenney" , Steven Rostedt , 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: [RFC PATCH 1/5] trace: Add trace_ipi_send_{cpu, cpumask} Date: Fri, 7 Oct 2022 16:45:29 +0100 Message-Id: <20221007154533.1878285-1-vschneid@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221007154145.1877054-1-vschneid@redhat.com> References: <20221007154145.1877054-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" trace_ipi_raise is unsuitable for generically tracing IPI sources; add a variant of it that takes a callsite and a CPU. Define a macro helper for handling IPIs sent to multiple CPUs. Signed-off-by: Valentin Schneider --- include/trace/events/ipi.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/trace/events/ipi.h b/include/trace/events/ipi.h index 0be71dad6ec0..fd2f2aeb36fe 100644 --- a/include/trace/events/ipi.h +++ b/include/trace/events/ipi.h @@ -35,6 +35,33 @@ TRACE_EVENT(ipi_raise, TP_printk("target_mask=3D%s (%s)", __get_bitmask(target_cpus), __entry->r= eason) ); =20 +TRACE_EVENT(ipi_send_cpu, + + TP_PROTO(unsigned long callsite, unsigned int cpu), + + TP_ARGS(callsite, cpu), + + TP_STRUCT__entry( + __field(unsigned long, callsite) + __field(unsigned int, cpu) + ), + + TP_fast_assign( + __entry->callsite =3D callsite; + __entry->cpu =3D cpu; + ), + + TP_printk("callsite=3D%pS target_cpu=3D%d", (void *)__entry->callsite, __= entry->cpu) +); + +#define trace_ipi_send_cpumask(callsite, mask) do { \ + if (static_key_false(&__tracepoint_ipi_send_cpu.key)) { \ + int cpu; \ + for_each_cpu(cpu, mask) \ + trace_ipi_send_cpu(callsite, cpu); \ + } \ +} while (0) + DECLARE_EVENT_CLASS(ipi_handler, =20 TP_PROTO(const char *reason), --=20 2.31.1