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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5E9DC43217 for ; Fri, 7 Oct 2022 15:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9/vEmHzRb/pL6ljCDlZ7SGc8x1zNsRWGNybkDjaGAb8=; b=3pqfrnKAj6g35F RaVYjszSKOhZcY7Maun9lqSSt8fwyPAPc/nfTGVQNIPuIirKXxoFw/v5eXdrg9RtaKfmw3EDz66kM SaG4MzRWwiASiU6lo7EfBEKuAmCVVnZz90oZBp+Y96bVfNPCk0V/8SFXTelTBGcnbYfFMfjkqd4AA on5DnPb4nEZwTVs48MwgJHkxS1vhBKEwWigv6hV8JaJ/svZth1jOcNr6iQ8WTSl8bCkesanE3zlm1 8f+17IIhPmUKjothc77IrJklNq37fHXBV5m99ADLOGf0CLPTh7YoCJ3shwO5UjfHjSGycdPdgsIhm CEGj9gX044a9cpdi063g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogpYA-009YTB-KX; Fri, 07 Oct 2022 15:46:10 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ogpY0-009YLd-Pf for linux-snps-arc@lists.infradead.org; Fri, 07 Oct 2022 15:46:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665157560; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LMgaXogbXPhOabUcxt7UADYdICMU0udr545Ze04p+j4=; b=A37HilSorpi269Yvh0SXc3YaDBvxxFPU/mcZkkivSV38aRB/KFR84y+ESQT8A8n3orgiRS N1vvM/s2cr9xQ7wy/19yVt/hA2lXx2nDCc2WuMIyrXCG76Bf6gMVFWciVMi3XIpOKw2dPt IAGZINAPSZjOYuaKW/ie06pGHloJIuU= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-184-j7MUakXHNUigq67ENTlaVQ-1; Fri, 07 Oct 2022 11:45:53 -0400 X-MC-Unique: j7MUakXHNUigq67ENTlaVQ-1 Received: by mail-wr1-f72.google.com with SMTP id h4-20020adfa4c4000000b0022ec3966c3aso604380wrb.6 for ; Fri, 07 Oct 2022 08:45:53 -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=H3kryntWIAFU4Hbr/B68K/6WRiIKsVcWshgT3nXpWfs3wP8MLCaPT/JtstlYGd9UQY L8l7as8/Mah8AVvEAkMLlO6zFZRI37bMPq5e7jK9wha0y5j2PjCw8mliWylk7uhKCa2u mj257QLhsUVuogHl1ilkUORrASTP4m4v+mGQGhFFAhsPFQnh+38ATo+qAqSumXLcThpF mTclt7rLTs4S94HoGmBAtftkD72+efKekYVFnA0eJY/d5Y8nLevWx8Qddjo6Kvtyhs01 8X5zCGFktrKmua2Jv8JO3SYjRTVtuq50OcImceaTDQn19Zs42O711zbHSLoKTj1V5LLD jqcA== X-Gm-Message-State: ACrzQf0c3hv2eUy4Tp0SfaYVQPSZGEByJ4+7IiIoecht8BBjCJQF/2dW hQHLuVHy+FNmSneRp9h3A+PRufquHUq/UmTA48kR3PTquH+ssLzPn3wlQsEk2XP9rkRWxvB449V i2oU9NDl9Z7jsgSyNdnxOlD4nHk5cuw/I X-Received: by 2002:a05:600c:458d:b0:3c3:bf4e:5c60 with SMTP id r13-20020a05600c458d00b003c3bf4e5c60mr1331391wmo.189.1665157552485; 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 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221007_084600_937662_4421DF14 X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org 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=%s (%s)", __get_bitmask(target_cpus), __entry->reason) ); +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 = callsite; + __entry->cpu = cpu; + ), + + TP_printk("callsite=%pS target_cpu=%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, TP_PROTO(const char *reason), -- 2.31.1 _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc