Skip to content
  • Steven Rostedt (Red Hat)'s avatar
    tracing: Add snapshot feature to instances · ce9bae55
    Steven Rostedt (Red Hat) authored
    
    
    Add the "snapshot" file to the the multi-buffer instances.
    
      cd /sys/kernel/debug/tracing/instances
      mkdir foo
      ls foo
    buffer_size_kb  buffer_total_size_kb  events  free_buffer  set_event
    snapshot  trace  trace_clock  trace_marker  trace_options  trace_pipe
    tracing_on
      cat foo/snapshot
     # tracer: nop
     #
     #
     # * Snapshot is freed *
     #
     # Snapshot commands:
     # echo 0 > snapshot : Clears and frees snapshot buffer
     # echo 1 > snapshot : Allocates snapshot buffer, if not already allocated.
     #                      Takes a snapshot of the main buffer.
     # echo 2 > snapshot : Clears snapshot buffer (but does not allocate)
     #                      (Doesn't have to be '2' works with any number that
     #                       is not a '0' or '1')
    
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    ce9bae55