• Steven Rostedt's avatar
    tracing: Add "traceoff" flag to boot time tracing instances · b6fc31b6
    Steven Rostedt authored
    Add a "flags" delimiter (^) to the "trace_instance" kernel command line
    parameter, and add the "traceoff" flag. The format is:
    
       trace_instance=<name>[^<flag1>[^<flag2>]][@<memory>][,<events>]
    
    The code allows for more than one flag to be added, but currently only
    "traceoff" is done so.
    
    The motivation for this change came from debugging with the persistent
    ring buffer and having trace_printk() writing to it. The trace_printk
    calls are always enabled, and the boot after the crash was having the
    unwanted trace_printks from the current boot inject into the ring buffer
    with the trace_printks of the crash kernel, making the output very
    confusing.
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Vincent Donnefort <vdonnefort@google.com>
    Cc: Joel Fernandes <joel@joelfernandes.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vineeth Pillai <vineeth@bitbyteword.org>
    Cc: Beau Belgrave <beaub@linux.microsoft.com>
    Cc: Alexander Graf <graf@amazon.com>
    Cc: Baoquan He <bhe@redhat.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: "Paul E. McKenney" <paulmck@kernel.org>
    Cc: David Howells <dhowells@redhat.com>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: Ross Zwisler <zwisler@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Alexander Aring <aahringo@redhat.com>
    Cc: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
    Cc: Tomas Glozar <tglozar@redhat.com>
    Cc: John Kacur <jkacur@redhat.com>
    Cc: Clark Williams <williams@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: "Jonathan Corbet" <corbet@lwn.net>
    Link: https://lore.kernel.org/20240823014019.053229958@goodmis.orgSigned-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
    b6fc31b6
trace.c 264 KB