Skip to contentSkip to conversation

exit: document sched_process_exit and sched_process_template relation

PATCH In review Andrii Nakryiko 2 participants 2 messages Apr 3, 2025 – Apr 4, 2025

Subsystems (2)
lore
Share & tools
lore

Andrii Nakryiko

author maintainer
#0 lore raw

PATCH 1/1 exit: document sched_process_exit and sched_process_template relation

Add an explicit note pointing out that sched_process_exit tracepoint is, conceptually, related to sched_process_template and should be kept in sync (though, on the best effort basis).

This is a follow-up to [0], and can hopefully be just folded in when applying.

[0] https://lore.kernel.org/linux-trace-kernel/[email protected]/

---
 include/trace/events/sched.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/trace/events/sched.h +5 -1
index 05a14f2b35c3..3bec9fb73a36 100644
@@ -326,7 +326,11 @@ DEFINE_EVENT(sched_process_template, sched_process_free,
 	     TP_ARGS(p));
 
 /*
- * Tracepoint for a task exiting:
+ * Tracepoint for a task exiting.
+ * Note, it's a superset of sched_process_template and should be kept
+ * compatible as much as possible. sched_process_exits has an extra
+ * `group_dead` argument, so sched_process_template can't be used,
+ * unfortunately, just like sched_migrate_task above.
  */
 TRACE_EVENT(sched_process_exit,
 
Signature · 1 line
2.47.1
#1 lore raw
Quoted 19 lines · Andrii Nakryiko

Add an explicit note pointing out that sched_process_exit tracepoint is, conceptually, related to sched_process_template and should be kept in sync (though, on the best effort basis).

This is a follow-up to [0], and can hopefully be just folded in when applying.

[0] https://lore.kernel.org/linux-trace-kernel/[email protected]/

---
 include/trace/events/sched.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/trace/events/sched.h +0 -0
index 05a14f2b35c3..3bec9fb73a36 100644

include/trace/events/sched.h DEFINE_EVENT(sched_process_template, sched_process_free, · line 333

Quoted 9 lines
include/trace/events/sched.h +5 -1
@@ -326,7 +326,11 @@ DEFINE_EVENT(sched_process_template, sched_process_free,
 	     TP_ARGS(p));
 
 /*
- * Tracepoint for a task exiting:
+ * Tracepoint for a task exiting.
+ * Note, it's a superset of sched_process_template and should be kept
+ * compatible as much as possible. sched_process_exits has an extra
+ * `group_dead` argument, so sched_process_template can't be used,
+ * unfortunately, just like sched_migrate_task above.

Thanks, I've folded this into the tracepoint patch, with this small edit:

s/sched_process_exits
/sched_process_exit

Ingo