linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ross Zwisler <zwisler@google.com>
Subject: [PATCH v2 0/4] tracing: Addition of tracing instances via kernel command line
Date: Tue, 07 Feb 2023 12:28:49 -0500	[thread overview]
Message-ID: <20230207172849.461894073@goodmis.org> (raw)

Instance creation can happen with the bootconfig but there's currently
no way to create and enable instances via the normal command line.

This series fixes that.

 trace_instance=foo,sched_switch,sched_waking ftrace_boot_snapshot=foo

The above creates a "foo" instance at early start up and enables
the sched_switch and sched_waking events. Then at the end of boot up
a snapshot is taken so that user space does not overwrite the boot
up data.

Changes since v1: https://lore.kernel.org/linux-trace-kernel/20230111145636.450953217@goodmis.org/
 - Fixed document grammar (Randy Dunlap)
 - Removed extra workqueue.h include (Ross Zwisler)
 - Use sizeof(boot_instance_info) than using COMMAND_LINE_SIZE)
 - Remove unneeded @ip in kernel-doc (Ross Zwisler)
 - Make stub function for do_allocate_snapshot() for !CONFIG_TRACER_MAX_TRACE (kernel test robot)
 - Compare strstr() to NULL and not zero (kernel test robot)
 - Use sizeof(boot_snapshot_info) instead of COMMAND_LINE_SIZE (Ross Zwisler)

Steven Rostedt (Google) (4):
      tracing: Add creation of instances at boot command line
      tracing: Add enabling of events to boot instances
      tracing: Add trace_array_puts() to write into instance
      tracing: Allow boot instances to have snapshot buffers

----
 Documentation/admin-guide/bootconfig.rst        |   6 +-
 Documentation/admin-guide/kernel-parameters.txt |  29 +++++
 include/linux/bootconfig.h                      |   2 +-
 include/linux/trace.h                           |  12 ++
 init/Kconfig                                    |  13 --
 init/main.c                                     |   2 +-
 kernel/trace/trace.c                            | 160 +++++++++++++++++++++---
 kernel/trace/trace.h                            |   2 +
 kernel/trace/trace_events.c                     |   9 +-
 9 files changed, 193 insertions(+), 42 deletions(-)

             reply	other threads:[~2023-02-07 17:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 17:28 Steven Rostedt [this message]
2023-02-07 17:28 ` [PATCH v2 1/4] tracing: Add creation of instances at boot command line Steven Rostedt
2023-02-07 17:28 ` [PATCH v2 2/4] tracing: Add enabling of events to boot instances Steven Rostedt
2023-02-07 17:28 ` [PATCH v2 3/4] tracing: Add trace_array_puts() to write into instance Steven Rostedt
2023-02-07 17:28 ` [PATCH v2 4/4] tracing: Allow boot instances to have snapshot buffers Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230207172849.461894073@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=zwisler@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).