public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>, Jonathan Corbet <corbet@lwn.net>
Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: [PATCH 0/6] tracing/boot: Start boot-time tracing in earlier stage
Date: Thu, 10 Sep 2020 21:38:29 +0900	[thread overview]
Message-ID: <159974150897.478751.17933810682730471522.stgit@devnote2> (raw)

Hi,

Here is a series of patches which starts the boot-time tracing earlier,
core_initcall_sync, so that we can start tracing from postcore_initcall
instead of device_initcall.

The boot-time tracing is useful for debugging kernel drivers which are
embedded in the kernel. Since most of the drivers are initialized in the
device_initcall, the boot-time tracing which starts in fs_initcall, can
trace them. However, many frameworks and platform drivers are initialized
in subsys_initcall or arch_initcall and the boot-time tracing still
misses it.

This series will improve the boot-time tracing to trace those events.

- Move kprobes initialization into early_initcall from subsys_initcall
  as same as jump_label and dynamic_debug.
  Previously arm64 didn't allow it, but commit b322c65f8ca3 ("arm64:
  Call debug_traps_init() from trap_init() to help early kgdb") fixed it.
- Fixes tracing init routines to decouple the tracefs entry creation
  and the data-structure allocation/initialization.
- Move dynamic-events initialization to core_initcall and call boot-time
  tracing in core_initcall_sync (the core_initcall_sync is called after
  all core_initcall functions are done).

Thank you,

---

Masami Hiramatsu (6):
      kprobes: Init kprobes in early_initcall
      tracing: Define event fields early stage
      tracing: Enable adding dynamic events early stage
      tracing: Enable creating new instance early boot
      tracing/boot,kprobe,synth: Initialize boot-time tracing earlier
      Documentation: tracing: Add the startup timing of boot-time tracing


 Documentation/trace/boottime-trace.rst |   14 ++++
 kernel/kprobes.c                       |    2 -
 kernel/trace/trace.c                   |   53 +++++++++++++----
 kernel/trace/trace.h                   |    7 ++
 kernel/trace/trace_boot.c              |    7 ++
 kernel/trace/trace_events.c            |  101 ++++++++++++++++++++------------
 kernel/trace/trace_events_synth.c      |   22 +++++--
 kernel/trace/trace_functions.c         |   22 ++++---
 kernel/trace/trace_kprobe.c            |    6 +-
 9 files changed, 165 insertions(+), 69 deletions(-)

--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>

             reply	other threads:[~2020-09-10 21:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 12:38 Masami Hiramatsu [this message]
2020-09-10 12:38 ` [PATCH 1/6] kprobes: Init kprobes in early_initcall Masami Hiramatsu
2020-09-10 12:38 ` [PATCH 2/6] tracing: Define event fields early stage Masami Hiramatsu
2020-09-10 12:38 ` [PATCH 3/6] tracing: Enable adding dynamic events " Masami Hiramatsu
2020-09-10 12:39 ` [PATCH 4/6] tracing: Enable creating new instance early boot Masami Hiramatsu
2020-09-10 12:39 ` [PATCH 5/6] tracing/boot,kprobe,synth: Initialize boot-time tracing earlier Masami Hiramatsu
2020-09-10 12:39 ` [PATCH 6/6] Documentation: tracing: Add the startup timing of boot-time tracing Masami Hiramatsu

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=159974150897.478751.17933810682730471522.stgit@devnote2 \
    --to=mhiramat@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    /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