Welcome to the Linux Foundation Forum!

Why do I see a lot of trace output in the /sys/kernel/trace file even though nop is set

# pwd
/sys/kernel/tracing

# cat current_tracer
nop

# echo sched_wakeup > /sys/kernel/tracing/set_event

# cat trace
< a lot of output related to sched_wakeup >


Here, although I manually set sched_wakeup in the set_event file, I was expecting no traces to be captured because the current_tracer still has "nop". It's evident that, that isn't the case.

Can someone please provide an answer or a link related to this? Thank you very much in advance.

Best Answer

  • picoteando
    picoteando Posts: 6
    Answer ✓

    the "nop" tracer does not block trace_printk() calls and they will be traced unless you set tracing_on to 0. If you have a look at the commit where "nop" was implemented, you will find that one of the reasons to implement this tracer was exactly to get the trace_printk() logs without noise from other events.

Answers

  • @picoteando said:
    the "nop" tracer does not block trace_printk() calls and they will be traced unless you set tracing_on to 0. If you have a look at the commit where "nop" was implemented, you will find that one of the reasons to implement this tracer was exactly to get the trace_printk() logs without noise from other events.

    That helps. Thank you very much.

Categories

Upcoming Training