Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2311771rwb; Fri, 2 Dec 2022 08:08:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Go6oFPS3D+LU0F6OthnIiLDzbVe8kqUd+61Qxp9pZKozaf67tuHO90NCe6dnes1ZTvxZ7 X-Received: by 2002:a17:906:99d3:b0:78d:c7fd:f755 with SMTP id s19-20020a17090699d300b0078dc7fdf755mr4188387ejn.702.1669997321940; Fri, 02 Dec 2022 08:08:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669997321; cv=none; d=google.com; s=arc-20160816; b=mGsqtaxg5yoc1KHCiYFIc8ZVWDJFXh61eAVYO0skCMMo/06259/beb0OfZ6qQOvA+m LpLZUclQNmRJhrFzhrM93IpehszSowUfsY+KS7esIxQGXyBd1AONgLLbMslgeMT+1kKp zYoq1UNntlVjq8yF//RRKjziv8Ual1E0ICQGPdZS/0YUiltRHTQ6wNSGgpaVzmnl7V7c RhU8hW+ttj5PF2y2W1K2cO7xefRiRQgoSQ0bGr9W77oqBMrkrlCPIG2iK0a22FIXPO1Y Tg8at//hN0sU/KVVTPRps6iUc+z9Kh5g1f+DByqazlynJ51B5t0DE7FO5fN+pXgCFsxO GIUw== 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:date:subject:cc:to:from :dkim-signature; bh=zkIMvc7EhOE64u6GFhS7x1Bfp7Rm8YufbRtsmhjcZ2o=; b=ZlJsziBQj8KAtESLz7n2kCO9Uu9kbe2lbImY7la4bNea9nCHKPdPD8iUBcEzAwyLmx 1A+8S7lvGauYOf0UJiWs45hpU5z190+0YRL4nIHgxXVcuXiiL68VPZ2Dt0LeqJduGz+h 7Tc0qTFoCwTZA+GHInAokLIAnU1UeWqGTWiOtERPzb1stOwz+Ng4FkKPQWL0D8PuQCBv Hf7EieYstPwNTBTaXiShkT3zcEx+6bUl1zWSrdGv2dn1CbytuZ0h5ELUTWxoJ3hp3LSj fuxVpon/qkZpbly1KmSyFGYzkvj965bPohAizl8eaSmTDTkzjS8lsPc4jcTM6hkGY7y6 hgXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MJmVNIZe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd36-20020a1709076e2400b007ae814af6aasi7044639ejc.87.2022.12.02.08.08.15; Fri, 02 Dec 2022 08:08:41 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MJmVNIZe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233751AbiLBQAQ (ORCPT + 83 others); Fri, 2 Dec 2022 11:00:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233806AbiLBQAI (ORCPT ); Fri, 2 Dec 2022 11:00:08 -0500 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 718669A4E9 for ; Fri, 2 Dec 2022 07:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669996747; 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=zkIMvc7EhOE64u6GFhS7x1Bfp7Rm8YufbRtsmhjcZ2o=; b=MJmVNIZevE+AqqJ4fFkUyd4UzuWzI989NlXVgJLYRtlu0EqdUBm+Mf+W26ML/AVBQfM89D W/YR24XIgf67QLdXzKFNvaWv3boO6gb/PPmUtrzYRbxlFg6Q8PvI2IC9GF8M1zYXh6C3n0 qUJaWVo4qlRz/GYFe5HOPZak4fQICow= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-530-lYV170HcN-CcrO2NjCca_Q-1; Fri, 02 Dec 2022 10:59:04 -0500 X-MC-Unique: lYV170HcN-CcrO2NjCca_Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E4E05833A0E; Fri, 2 Dec 2022 15:59:02 +0000 (UTC) Received: from vschneid.remote.csb (unknown [10.33.36.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BFEE20290A5; Fri, 2 Dec 2022 15:58:58 +0000 (UTC) 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: Steven Rostedt , "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: [PATCH v3 2/8] trace: Add trace_ipi_send_cpumask() Date: Fri, 2 Dec 2022 15:58:11 +0000 Message-Id: <20221202155817.2102944-3-vschneid@redhat.com> In-Reply-To: <20221202155817.2102944-1-vschneid@redhat.com> References: <20221202155817.2102944-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 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 exports a target CPU, a callsite and a callback. Signed-off-by: Valentin Schneider Reviewed-by: Steven Rostedt (Google) --- 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), -- 2.31.1