Skip to content
  1. Jan 30, 2020
  2. Jan 29, 2020
  3. Jan 25, 2020
  4. Jan 22, 2020
  5. Jan 16, 2020
    • Steven Rostedt (VMware)'s avatar
      tracing: Allow trace_printk() to nest in other tracing code · 82d1b815
      Steven Rostedt (VMware) authored
      
      
      trace_printk() is used to debug the kernel which includes the tracing
      infrastructure. But because it writes to the ring buffer, and so does much
      of the tracing infrastructure, the ring buffer's recursive detection will
      drop writes to the ring buffer that is in the same context as the current
      write is happening (it allows interrupts to write when normal context is
      writing, but wont let normal context write while normal context is writing).
      
      This can cause confusion and think that the code is where the trace_printk()
      exists is not hit. To solve this, up the recursive nesting of the ring
      buffer when trace_printk() is called before it writes to the buffer itself.
      
      Note, this does make it dangerous to use trace_printk() in the ring buffer
      code itself, because this basically disables the recursion protection of
      trace_printk() buffer writes. But as trace_printk() is only used for
      debugging, and if this does occur, the developer will see the cause real
      quick (recursive blowing up of the stack). Thus the developer can deal with
      that. But having trace_printk() silently ignored is a much bigger problem,
      and disabling recursive protection is a small price to pay to fix it.
      
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      82d1b815
  6. Jan 15, 2020