[Crash-utility] Re: [ANNOUNCE][RFC][PATCH] Crash-utility, tracing: enable crash to analyze tracing from core-file (make tracing can act as a flight recorder)

Dave Anderson anderson at redhat.com
Tue Aug 4 12:51:24 UTC 2009


----- Forwarded Message -----
From: "Peter Zijlstra" <peterz at infradead.org>
To: "Lai Jiangshan" <laijs at cn.fujitsu.com>
Cc: "Dave Anderson" <anderson at redhat.com>, "Ingo Molnar" <mingo at elte.hu>, "Frederic Weisbecker" <fweisbec at gmail.com>, "Thomas Gleixner" <tglx at linutronix.de>, "Arnaldo Carvalho de Melo" <acme at ghostprotocols.net>, "Luis Claudio R. Goncalves" <lclaudio at uudg.org>, "Clark Williams" <clark.williams at gmail.com>, "Jon Masters" <jonathan at jonmasters.org>, "Andrew Morton" <akpm at linux-foundation.org>, "Mathieu Desnoyers" <mathieu.desnoyers at polymtl.ca>, "Christoph Hellwig" <hch at infradead.org>, "Xiao Guangrong" <xiaoguangrong at cn.fujitsu.com>, "Zhaolei" <zhaolei at cn.fujitsu.com>, "kosaki motohiro" <kosaki.motohiro at jp.fujitsu.com>, "Li Zefan" <lizf at cn.fujitsu.com>, "Masami Hiramatsu" <mhiramat at redhat.com>, "Frank Ch. Eigler" <fche at redhat.com>, "Tom Zanussi" <tzanussi at gmail.com>, "Jason Baron" <jbaron at redhat.com>, srostedt at redhat.com, "LKML" <linux-kernel at vger.kernel.org>
Sent: Tuesday, August 4, 2009 6:36:52 AM GMT -05:00 US/Canada Eastern
Subject: Re: [ANNOUNCE][RFC][PATCH] Crash-utility, tracing: enable crash to analyze tracing from core-file (make tracing can act as a flight recorder)

On Tue, 2009-08-04 at 14:52 +0800, Lai Jiangshan wrote:
> Peter Zijlstra wrote:
> > On Mon, 2009-08-03 at 22:48 +0800, Lai Jiangshan wrote:
> >> + /* SIGH, we cann't get "print fmt" from core-file */
> > 
> > doesn't crash have a vmlinux around to look at?
> 
> 
> I don't known how to look at it:
> 
> static int								\
> ftrace_format_##call(struct trace_seq *s)				\
> {									\
> 	struct ftrace_raw_##call field __attribute__((unused));		\
> 	int ret = 0;							\
> 									\
> 	tstruct;							\
> 									\
> 	trace_seq_printf(s, "\nprint fmt: " print);			\
> 									\
> 	return ret;							\
> }
> 
> We need the address of the const string <"\nprint fmt: " print>,
> I don't know how to get it current from vmlinux.
> 
> I have sent a patch which try to reduce the size of .txt in kernel
> and reduce coupling. This patch has a little side-effect:
> the "print fmt"'s address is saved in struct ftrace_event_call.

Aah, right, I thought the fmt string was easily obtainable from the
_ftrace_events section, but now I see it is not, the patch you mention
below does indeed make it so.

> [
> http://lkml.org/lkml/2009/7/30/30
> 
> This patch is really useful for kernel. We don't change the kernel
> even a single line for the purpose of we can read the core-file easier.

Well, I see no harm in changing the kernel a little when it makes no
difference to the kernel but makes post-mortem analysis a little bit
easier.

> This patch is also helpful for crash more or less. So I mention it.
> ]




More information about the Crash-utility mailing list