Skip to content

ftrace: kill the dead code in trace_sched_switch.c

Oleg Nesterov lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ftrace: Kill tracing_{start,stop}_sched_switch_record() and tracing_sched_switch_assign_trace()kernel/trace/trace.h kernel/trace/trace_sched_switch.c+0 -510 replies
2/2ftrace: Kill the dead code in probe_sched_switch() and probe_sched_wakeup()kernel/trace/trace_sched_switch.c+0 -400 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] ftrace: kill the dead code in trace_sched_switch.c
Quoted 4 lines · Oleg Nesterov

This motivated me to try to find something else unused. And it seems that almost all code in kernel/trace/trace_sched_switch.c is dead? Hmm, and probably even event_context_switch... I'll recheck and send the patch.

No, event_context_switch can't simply go away. But afaics the only user is tracing_sched_switch_trace(), and the only caller of this function is probe_wakeup_sched_switch(). Looks a bit strange.

After this patch we should probably move tracing_sched_switch_trace() and tracing_sched_wakeup_trace() from trace_sched_switch.c to trace_sched_wakeup.c and make them static. And perhaps we can also move the rest of this code somewhere else and rm this file...

Oleg.

 kernel/trace/trace.h              |    3 -
 kernel/trace/trace_sched_switch.c |   88 -------------------------------------
 2 files changed, 0 insertions(+), 91 deletions(-)