From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50AD3DDC3; Wed, 7 May 2025 21:48:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746654483; cv=none; b=rGFDjUuzdEoOBJKm9Hg3QKgH2SWux9JTKJ/1Ay6LTD1M8Hk+S/+O8O/EgIzK+pwoXwUQx1wtCltfhBTyb/jVA57EILXisOlLG/8GzXKIYnf2G+YJxqMaANh8mWNqHioZMe0xguViS8WpDkMG/H+vI01PcpmG7rcM1g7kd9mbPzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746654483; c=relaxed/simple; bh=nfqBh82m0tQXIWKaHq3eRRzESiJPd4iCDQ+UVW1fl5E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jX7tgegHmsg0Qf0QHAnRw2U3fO/9f1j8zAn6hDSgCq9dKVZEPmZDfctjKJ/R7OApGFoNpceeNv4TOLouNBHL6QsSByKWbyzFu6KwjShOWCOweLawYkjzKsTKoMi4FMx6LgvnwPiNAzIx7qWcUWGvuXq5rAbJT0CLkpXLuTT1IMg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 881F5C4CEE2; Wed, 7 May 2025 21:47:58 +0000 (UTC) Date: Wed, 7 May 2025 17:48:09 -0400 From: Steven Rostedt To: Sohil Mehta Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Xin Li , "H . Peter Anvin" , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Peter Zijlstra , Sean Christopherson , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Tony Luck , Paolo Bonzini , Vitaly Kuznetsov , "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Masami Hiramatsu , Mathieu Desnoyers , Brian Gerst , Andrew Cooper , "Kirill A . Shutemov" , Jacob Pan , Andi Kleen , Kai Huang , Nikolay Borisov , linux-perf-users@vger.kernel.org, linux-edac@vger.kernel.org, kvm@vger.kernel.org, linux-pm@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH v5 9/9] x86/nmi: Include NMI-source information in tracepoint and debug prints Message-ID: <20250507174809.10cfc5ac@gandalf.local.home> In-Reply-To: <20250507012145.2998143-10-sohil.mehta@intel.com> References: <20250507012145.2998143-1-sohil.mehta@intel.com> <20250507012145.2998143-10-sohil.mehta@intel.com> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 6 May 2025 18:21:45 -0700 Sohil Mehta wrote: > diff --git a/include/trace/events/nmi.h b/include/trace/events/nmi.h > index 18e0411398ba..6e4a1ff70a44 100644 > --- a/include/trace/events/nmi.h > +++ b/include/trace/events/nmi.h > @@ -10,29 +10,32 @@ > > TRACE_EVENT(nmi_handler, > > - TP_PROTO(void *handler, s64 delta_ns, int handled), > + TP_PROTO(void *handler, s64 delta_ns, int handled, unsigned long source_bitmap), Even though x86 is currently the only architecture using the nmi tracepoint, this "source_bitmap" makes it become very x86 specific. This file should be moved into arch/x86/include/asm/trace/ And that would require adding to the Makefile: CFLAGS_nmi.o := -I $(src)/../include/asm/trace > > - TP_ARGS(handler, delta_ns, handled), > + TP_ARGS(handler, delta_ns, handled, source_bitmap), > > TP_STRUCT__entry( > __field( void *, handler ) > __field( s64, delta_ns) > __field( int, handled ) > + __field( unsigned long, source_bitmap) > ), > > TP_fast_assign( > __entry->handler = handler; > __entry->delta_ns = delta_ns; > __entry->handled = handled; > + __entry->source_bitmap = source_bitmap; > ), > > - TP_printk("%ps() delta_ns: %lld handled: %d", > + TP_printk("%ps() delta_ns: %lld handled: %d source_bitmap: 0x%lx", > __entry->handler, > __entry->delta_ns, > - __entry->handled) > + __entry->handled, > + __entry->source_bitmap) > ); > > #endif /* _TRACE_NMI_H */ > > -/* This part ust be outside protection */ > +/* This part must be outside protection */ And this would need to have: #undef TRACE_INCLUDE_PATH #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_PATH . #define TRACE_INCLUDE_FILE nmi -- Steve > #include