From patchwork Wed Nov 2 18:33:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 13028805 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 5AC42C4332F for ; Wed, 2 Nov 2022 18:34:37 +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=w5PHKX3kSwMxQRxpn+DziILXMJkeqUKME7nKTJVLEXU=; b=kXB5ODbqZC3XuZ CnCFF1hVTn13eUyhbNUNT00M/phInZUD25dgAjr9ya7QY3zQKTWUa4ADAEe1hn3QOXMXdk+VLwr6I UvAh/GUPFcesp0PKQrNkpFEMN+tqmATZyzHI1qmeKu0NjfKf8k7Mb0p/ylhNcHLRt3G8H8gRy7D+1 BtBTNJ/PiREeTGSTYeyDKxbN11oe9hfeba8MXNsDMnvC8gXoF/wBvW7g+iQRJ8LBoI1LiLyHJxmga PkUTdT8+hQUcJZAea9UgtrlkEuqHRXgEbsZfgcjceDbeEdl8IxsVGg+BMq5YtDfINeRYSFteQygpb CKhgVSjQrhE6y1n+HvWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqIZF-00D6Nu-G8; Wed, 02 Nov 2022 18:34:25 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqIZ1-00D6ED-HE for linux-riscv@lists.infradead.org; Wed, 02 Nov 2022 18:34:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667414050; 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=iOwZQK5qeETgL3wqlfHaHMAHqEn7+FhbLCJ4P7hdM2o=; b=VH7fhpRT52El/0lvWv+HsJ2odZH/8YhPa78TW0X7Lb9XRXEhvSYQfglGw3PiLKTciPFvw3 N7prSB9g6KvEUaJLuxGQrKri15NU13SG8Ir/jhY5/yZOFOey6NOB6hWT9L38o8z+jGu2OC NqW5JWKwRK2y5RplJqhKcRNXRdZfNFw= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-299-2tbmE-RaNIWm_7wnN_14xQ-1; Wed, 02 Nov 2022 14:34:09 -0400 X-MC-Unique: 2tbmE-RaNIWm_7wnN_14xQ-1 Received: by mail-qk1-f200.google.com with SMTP id f12-20020a05620a408c00b006ced53b80e5so15987895qko.17 for ; Wed, 02 Nov 2022 11:34:09 -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=iOwZQK5qeETgL3wqlfHaHMAHqEn7+FhbLCJ4P7hdM2o=; b=dMDy4QYCPQQ6o9FgjQqgoHNGCnbqhmc++gtOug74jB0OOlEFkqK+IFo/d4T/4LFK0A 6T6OG/L7d8SZonszPGsl5lPHAfl0kBzywD7/eZNHZASiIbXri5UAxYd13OztT2GtriCb iSrksa7fC7egoLNjZAWQNfHo2jzIaAxfaB9+sLNSJ9HpIYbVSwCN+iIzjI1VTj9qnvXm 0Hc6/viaF4VO5le1r3blKx0H6l7cUVJPr406c/JVJDjkEUTC73pQHsFvQo1kOp44PIxD Qc+1uJjRPKYTZAgPQ3SSZMWtMRq9jv2jSRru9jSYdc4fyk/v8Bcazmf6Msq44uFUoUgv UhZA== X-Gm-Message-State: ACrzQf1WtHl97nkOVcZWItV70SfZ1AcXrvqJvFtXl8O2dG2tLePvBZBi cWJbuULckfiPVMGIVLnzraTT2K86KU4FYmiJQeKw2G1wuenHPtyjfIarwy0lh9oMDR58wsM423I KjYKjbD3R1BQDDli6rCeva9eUKMrD X-Received: by 2002:a05:622a:183:b0:3a5:4255:a0fe with SMTP id s3-20020a05622a018300b003a54255a0femr5122054qtw.441.1667414048642; Wed, 02 Nov 2022 11:34:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM513iTu4ts5GTQjgBcRtTQiZ5hV5vnGyMiejNr5eqgULDfvGkfyMfW7xqa9AO3zDpp+iTddyQ== X-Received: by 2002:a05:622a:183:b0:3a5:4255:a0fe with SMTP id s3-20020a05622a018300b003a54255a0femr5122009qtw.441.1667414048423; Wed, 02 Nov 2022 11:34:08 -0700 (PDT) Received: from vschneid.remote.csb ([149.71.65.94]) by smtp.gmail.com with ESMTPSA id w187-20020a3794c4000000b006eed47a1a1esm8757820qkd.134.2022.11.02.11.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 11:34:06 -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 v2 2/8] trace: Add trace_ipi_send_cpumask() Date: Wed, 2 Nov 2022 18:33:30 +0000 Message-Id: <20221102183336.3120536-1-vschneid@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221102182949.3119584-1-vschneid@redhat.com> References: <20221102182949.3119584-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-20221102_113411_784563_60F97838 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org trace_ipi_raise() is unsuitable for generically tracing IPI sources due to its "reason" argument being an uninformative string (on arm64 all you get is "Function call interrupts" for SMP calls). Add a variant of it that takes a exports a target CPU, a callsite and a callback. Signed-off-by: Valentin Schneider --- include/trace/events/ipi.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/trace/events/ipi.h b/include/trace/events/ipi.h index 0be71dad6ec03..b1125dc27682c 100644 --- a/include/trace/events/ipi.h +++ b/include/trace/events/ipi.h @@ -35,6 +35,28 @@ TRACE_EVENT(ipi_raise, TP_printk("target_mask=%s (%s)", __get_bitmask(target_cpus), __entry->reason) ); +TRACE_EVENT(ipi_send_cpumask, + + TP_PROTO(const struct cpumask *cpumask, unsigned long callsite, void *callback), + + TP_ARGS(cpumask, callsite, callback), + + TP_STRUCT__entry( + __cpumask(cpumask) + __field(void *, callsite) + __field(void *, callback) + ), + + TP_fast_assign( + __assign_cpumask(cpumask, cpumask_bits(cpumask)); + __entry->callsite = (void *)callsite; + __entry->callback = callback; + ), + + TP_printk("cpumask=%s callsite=%pS callback=%pS", + __get_cpumask(cpumask), __entry->callsite, __entry->callback) +); + DECLARE_EVENT_CLASS(ipi_handler, TP_PROTO(const char *reason),