linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] [RFC] init, tracing: Add initcall trace events
@ 2018-03-23 15:02 Steven Rostedt
  2018-03-23 15:02 ` [PATCH 1/3] init: Fix initcall0 name as it is "pure" not "early" Steven Rostedt
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Steven Rostedt @ 2018-03-23 15:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Thomas Gleixner,
	Abderrahmane Benbachir, Américo Wang, Peter Zijlstra

A while ago we had a boot tracer. But it was eventually removed:
 commit 30dbb20e68e6f ("tracing: Remove boot tracer").

The rational was because there is already a initcall_debug boot option
that causes printk()s of all the initcall functions.

The problem with the initcall_debug option is that printk() is awfully slow,
and makes it difficult to see the real impact of initcalls. Mainly because
a single printk() is usually slower than most initcall functions.

Instead of bringing back the boot tracer, adding trace events around the
initcall functions, and even one to denote which level the initcall
functions are being called from, adds the necessary information to
analyze the initcalls without the high overhead of printk()s, that
can substantially slow down the boot process.

Another positive, is that the console initcall functions themselves
can also be traced. The timestamps are not operational at that time
but you can see which consoles are being registered. I saw this on
one of my test boxes:

<idle>-0     [000] ...1     0.000000: initcall_level: level=console
<idle>-0     [000] ...1     0.000000: initcall_start: func=con_init+0x0/0x224
<idle>-0     [000] ...1     0.000000: initcall_finish: func=con_init+0x0/0x224 ret=0
<idle>-0     [000] ...1     0.000000: initcall_start: func=hvc_console_init+0x0/0x19
<idle>-0     [000] ...1     0.000000: initcall_finish: func=hvc_console_init+0x0/0x19 ret=0
<idle>-0     [000] ...1     0.000000: initcall_start: func=xen_cons_init+0x0/0x60
<idle>-0     [000] ...1     0.000000: initcall_finish: func=xen_cons_init+0x0/0x60 ret=0
<idle>-0     [000] ...1     0.000000: initcall_start: func=univ8250_console_init+0x0/0x2d
<idle>-0     [000] ...1     0.000000: initcall_finish: func=univ8250_console_init+0x0/0x2d ret=0

I didn't even realize that I had some of those consoles configured.

Anyone have any issues with me adding this?

-- Steve
 

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
ftrace/initcall

Head SHA1: d79328aaa2173bc72c938fa6f33ff6142ad79336


Abderrahmane Benbachir (1):
      init, tracing: instrument security and console initcall trace events

Steven Rostedt (VMware) (2):
      init: Fix initcall0 name as it is "pure" not "early"
      init, tracing: Add initcall trace events

----
 include/trace/events/initcall.h | 66 +++++++++++++++++++++++++++++++++++++++++
 init/main.c                     |  9 +++++-
 kernel/printk/printk.c          |  7 ++++-
 security/security.c             |  8 ++++-
 4 files changed, 87 insertions(+), 3 deletions(-)
 create mode 100644 include/trace/events/initcall.h

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-03-27  3:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 15:02 [PATCH 0/3] [RFC] init, tracing: Add initcall trace events Steven Rostedt
2018-03-23 15:02 ` [PATCH 1/3] init: Fix initcall0 name as it is "pure" not "early" Steven Rostedt
2018-03-23 15:02 ` [PATCH 2/3] init, tracing: Add initcall trace events Steven Rostedt
2018-03-23 15:02 ` [PATCH 3/3] init, tracing: instrument security and console " Steven Rostedt
2018-03-23 19:50 ` [PATCH 0/3] [RFC] init, tracing: Add " Andrew Morton
2018-03-23 20:04   ` Steven Rostedt
2018-03-26  8:42     ` Peter Zijlstra
2018-03-26 14:34       ` Steven Rostedt
2018-03-26 17:47 ` [PATCH 4/3] init, tracing: Have printk come through the trace events for initcall_debug Steven Rostedt
2018-03-27  1:50 ` [PATCH 0/3] [RFC] init, tracing: Add initcall trace events Joel Fernandes (Google)
2018-03-27  3:02   ` Steven Rostedt

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).