Thread (34 messages) 34 messages, 3 authors, 2022-09-27
STALE1463d

[PATCH v4 25/25] tracing/rseq: Add mm_vcpu_id field to rseq_update

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2022-09-22 11:10:28
Also in: lkml
Subsystem: restartable sequences support, the rest, tracing · Maintainers: Mathieu Desnoyers, Peter Zijlstra, "Paul E. McKenney", Boqun Feng, Linus Torvalds, Steven Rostedt, Masami Hiramatsu

Add the mm_vcpu_id field to the rseq_update event, allowing tracers to
follow which vcpu_id is observed by user-space, and whether negative
vcpu_id values are visible in case of internal scheduler implementation
issues.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
 include/trace/events/rseq.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/trace/events/rseq.h b/include/trace/events/rseq.h
index 6bd442697354..10b236fc047a 100644
--- a/include/trace/events/rseq.h
+++ b/include/trace/events/rseq.h
@@ -17,14 +17,17 @@ TRACE_EVENT(rseq_update,
 	TP_STRUCT__entry(
 		__field(s32, cpu_id)
 		__field(s32, node_id)
+		__field(s32, mm_vcpu_id)
 	),
 
 	TP_fast_assign(
 		__entry->cpu_id = raw_smp_processor_id();
 		__entry->node_id = cpu_to_node(raw_smp_processor_id());
+		__entry->mm_vcpu_id = t->mm_vcpu;
 	),
 
-	TP_printk("cpu_id=%d node_id=%d", __entry->cpu_id, __entry->node_id)
+	TP_printk("cpu_id=%d node_id=%d mm_vcpu_id=%d", __entry->cpu_id,
+		  __entry->node_id, __entry->mm_vcpu_id)
 );
 
 TRACE_EVENT(rseq_ip_fixup,
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help