public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wang Nan <wangnan0@huawei.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	<mingo@kernel.org>, Andrew Morton <akpm@linux-foundation.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	<paulmck@linux.vnet.ibm.com>, <mathieu.desnoyers@efficios.com>,
	xiakaixu 00238161 <xiakaixu@huawei.com>
Subject: Re: [PATCH 1/2] tracing: Move enabling tracepoints to just after rcu_init()
Date: Fri, 9 Jan 2015 12:06:21 +0800	[thread overview]
Message-ID: <54AF53BD.5070303@huawei.com> (raw)
In-Reply-To: 20141215153743.427704960@goodmis.org

Hi Steven Rostedt,

During studying your code we find a problem, please see below.

> 
> From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> 
> Enabling tracepoints at boot up can be very useful. The tracepoint
> can be initialized right after RCU has been. There's no need to
> wait for the early_initcall() to be called. That's too late for some
> things that can use tracepoints for debugging. Move the logic to
> enable tracepoints out of the initcalls and into init/main.c to
> right after rcu_init().
> 
> This also allows trace_printk() to be used early too.
> 
> Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412121539300.16494@nanos
> Link: http://lkml.kernel.org/r/20141214164104.307127356@goodmis.org
> 
> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Suggested-by: Thomas Gleixner <tglx@linutronix.de>
> Tested-by: Thomas Gleixner <tglx@linutronix.de>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

[...]

> +void __init trace_init(void)
> +{
> +	tracer_alloc_buffers();
> +	init_ftrace_syscalls();
> +	trace_event_init();	
> +}
> +

[...]

> +
> +void __init trace_event_init(void)
> +{
> +	event_trace_memsetup();
> +	init_ftrace_syscalls();
> +	event_trace_enable();
> +}
> +

init_ftrace_syscalls() get called twice by trace_init() and trace_event_init(), some resources are wasted.
At lease one of them can be removed.

In addition, could you please have a look at my early kprobe patch series?

http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/313835.html

Which enables kprobe very early, even before memory initialized. I think it is possible to combine these
early tracing facilities together.

Thank you!



       reply	other threads:[~2015-01-09  4:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1Y9QLr-0000h7-Qw@feisty.vs19.net>
2015-01-09  4:06 ` Wang Nan [this message]
2015-01-14  0:12   ` [PATCH 1/2] tracing: Move enabling tracepoints to just after rcu_init() Wang Nan
2015-01-14  1:09     ` Namhyung Kim
2015-01-14 17:23       ` Steven Rostedt
2014-12-15 15:36 [PATCH 0/2] [GIT PULL] tracing: Enable tracepoints early and allow printk to use them Steven Rostedt
2014-12-15 15:36 ` [PATCH 1/2] tracing: Move enabling tracepoints to just after rcu_init() 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=54AF53BD.5070303@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=xiakaixu@huawei.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