[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250414194346.060f96c6@gandalf.local.home>
Date: Mon, 14 Apr 2025 19:43:46 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Junxuan Liao <ljx@...wisc.edu>, linux-trace-kernel@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org, Thomas Gleixner
<tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov
<bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin"
<hpa@...or.com>, Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, "Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: [PATCH] x86/tracing: introduce enter/exit tracepoint pairs for
page faults
On Mon, 14 Apr 2025 16:37:19 -0700
Dave Hansen <dave.hansen@...el.com> wrote:
> On 4/14/25 16:22, Junxuan Liao wrote:
> > On 4/14/25 6:14 PM, Junxuan Liao wrote:
> >> Do people find separate user/kernel tracepoints useful? For me, I can
> >> check regs in eBPF tracing code instead.
> > I think it might be good to add a field to the tracepoints to indicate
> > whether it's in user space or not.
>
> Sounds sane to me. Doing something like this:
>
> TP_STRUCT__entry(
> __field( unsigned long, address )
> __field( unsigned long, ip )
> + __field( bool , user_mode)
> __field( unsigned long, error_code )
> ),
>
> TP_fast_assign(
> __entry->address = address;
> __entry->ip = regs->ip;
> + __entry->user_mode = user_mode(regs);
> __entry->error_code = error_code;
> ),
>
> seems highly superior to having two sets of tracepoints and static keys.
I agree.
Acked-by: Steven Rostedt (Google) <rostedt@...dmis.org>
-- Steve
Powered by blists - more mailing lists