tracing/rseq: Add mm_cid field to rseq_update
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 22 Nov 2022 20:39:23 +0000 (15:39 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 27 Dec 2022 11:52:15 +0000 (12:52 +0100)
Add the mm_cid field to the rseq_update event, allowing tracers to
follow which mm_cid is observed by user-space, and whether negative
mm_cid values are visible in case of internal scheduler implementation
issues.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221122203932.231377-22-mathieu.desnoyers@efficios.com
include/trace/events/rseq.h

index dde7a359b4ef1f2f3ef2774ec1086e63b50bc20c..823b47d1ba1e14801ac687566d34c23b088786ba 100644 (file)
@@ -17,14 +17,17 @@ TRACE_EVENT(rseq_update,
        TP_STRUCT__entry(
                __field(s32, cpu_id)
                __field(s32, node_id)
+               __field(s32, mm_cid)
        ),
 
        TP_fast_assign(
                __entry->cpu_id = raw_smp_processor_id();
                __entry->node_id = cpu_to_node(__entry->cpu_id);
+               __entry->mm_cid = task_mm_cid(t);
        ),
 
-       TP_printk("cpu_id=%d node_id=%d", __entry->cpu_id, __entry->node_id)
+       TP_printk("cpu_id=%d node_id=%d mm_cid=%d", __entry->cpu_id,
+                 __entry->node_id, __entry->mm_cid)
 );
 
 TRACE_EVENT(rseq_ip_fixup,