Thread (2 messages) 2 messages, 2 authors, 2025-06-23

Re: [PATCH v3 RESEND] x86/tracing: introduce enter/exit tracepoint pairs for page faults

From: Nam Cao <hidden>
Date: 2025-06-23 13:57:25
Also in: lkml

On Sun, Jun 15, 2025 at 07:32:00PM -0500, Junxuan Liao wrote:
Merge page_fault_{user,kernel}, rename it page_fault_enter, and add
page_fault_exit. This pair is useful for measuring page fault handling
latencies.

Add a new field to the merged tracepoints to indicate whether the page
fault happened in userspace. We no longer need the static key associated,
since it was used just to avoid checking user_mode when the tracepoints
were disabled.
(I think) this breaks lttng which uses the old tracepoint names [1]. But
I'm not sure if we should worry about that.

Do you plan to add this to other architectures?

Perhaps it is better to implement the other approach suggested by Frederic
[2], using trace_user_exit/trace_user_enter? So that more architectures are
covered, and avoid breaking user tools?

(Btw, you would need to rebase this patch. The tracepoint has been moved,
and the static key has been deleted.)

Best regards,
Nam

[1] https://github.com/lttng/lttng-modules/blob/master/include/instrumentation/events/arch/x86/exceptions.h#L88C48-L88C63
[2] https://lore.kernel.org/lkml/Z_mO6_m0bV-Q8NEa@pavilion.home/#t (local)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help