Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-17 Thread Jovi Zhang
>From cea5f76c3ad9f42b85a1a71b75035fe96317187a Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Tue, 17 Jul 2012 22:43:11 +0800 Subject: [PATCH] ftrace: using pr_fmt for better printk output There don't have subsystem name output in front ot ftrace related log entry, so use pr_fmt to ena

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-17 Thread Jovi Zhang
From cea5f76c3ad9f42b85a1a71b75035fe96317187a Mon Sep 17 00:00:00 2001 From: Jovi Zhang bookj...@gmail.com Date: Tue, 17 Jul 2012 22:43:11 +0800 Subject: [PATCH] ftrace: using pr_fmt for better printk output There don't have subsystem name output in front ot ftrace related log entry, so use

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 13:32 +0800, Jovi Zhang wrote: > On Tue, Jul 17, 2012 at 1:07 PM, Joe Perches wrote: > > On Tue, 2012-07-17 at 00:25 -0400, Steven Rostedt wrote: [] > >> Also, what is KBUILD_MODNAME defined as for non-modules? As ftrace is > >> not a module. > > > > It depends on the

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Jovi Zhang
On Tue, Jul 17, 2012 at 1:07 PM, Joe Perches wrote: > On Tue, 2012-07-17 at 00:25 -0400, Steven Rostedt wrote: >> On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: >> >> > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c >> > [] >> > > @@ -13,6 +13,8 @@ >> > > * Copyright (C)

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 13:23 +0800, Jovi Zhang wrote: > I don't make sure if there have some method or skill to let GCC knows > subsystem name automatically, > use built-in macro __FILE__? but this need condition of subsystem name > is same as file name, > not so easily to guarantee that. You

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 13:23 +0800, Jovi Zhang wrote: > On Tue, Jul 17, 2012 at 12:25 PM, Steven Rostedt wrote: > > On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: > > > >> > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > >> [] > >> > @@ -13,6 +13,8 @@ > >> > * Copyright (C)

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Jovi Zhang
On Tue, Jul 17, 2012 at 12:25 PM, Steven Rostedt wrote: > On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: > >> > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c >> [] >> > @@ -13,6 +13,8 @@ >> > * Copyright (C) 2004 William Lee Irwin III >> > */ >> > >> > +#define

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 00:25 -0400, Steven Rostedt wrote: > On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: > > > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > > [] > > > @@ -13,6 +13,8 @@ > > > * Copyright (C) 2004 William Lee Irwin III > > > */ > > > > > > +#define

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Steven Rostedt
On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > [] > > @@ -13,6 +13,8 @@ > > * Copyright (C) 2004 William Lee Irwin III > > */ > > > > +#define pr_fmt(fmt) "ftrace: " fmt > > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 09:15 +0800, Jovi Zhang wrote: > >From fe42b2f29e5968482b3129c71f81a58a0559cf04 Mon Sep 17 00:00:00 2001 [] > There don't have subsystem name output in front ot ftrace related log entry, > so use pr_fmt to enable better printk output, for output subsystem name in > log entry.

[PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Jovi Zhang
>From fe42b2f29e5968482b3129c71f81a58a0559cf04 Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Tue, 17 Jul 2012 17:10:15 +0800 Subject: [PATCH] ftrace: using pr_fmt for better printk output There don't have subsystem name output in front ot ftrace related log entry, so use pr_fmt to ena

[PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Jovi Zhang
From fe42b2f29e5968482b3129c71f81a58a0559cf04 Mon Sep 17 00:00:00 2001 From: Jovi Zhang bookj...@gmail.com Date: Tue, 17 Jul 2012 17:10:15 +0800 Subject: [PATCH] ftrace: using pr_fmt for better printk output There don't have subsystem name output in front ot ftrace related log entry, so use

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 09:15 +0800, Jovi Zhang wrote: From fe42b2f29e5968482b3129c71f81a58a0559cf04 Mon Sep 17 00:00:00 2001 [] There don't have subsystem name output in front ot ftrace related log entry, so use pr_fmt to enable better printk output, for output subsystem name in log entry. Hi

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Steven Rostedt
On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c [] @@ -13,6 +13,8 @@ * Copyright (C) 2004 William Lee Irwin III */ +#define pr_fmt(fmt) ftrace: fmt #define pr_fmt(fmt) KBUILD_MODNAME : fmt Wouldn't a nicer

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 00:25 -0400, Steven Rostedt wrote: On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c [] @@ -13,6 +13,8 @@ * Copyright (C) 2004 William Lee Irwin III */ +#define pr_fmt(fmt) ftrace:

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Jovi Zhang
On Tue, Jul 17, 2012 at 12:25 PM, Steven Rostedt rost...@goodmis.org wrote: On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c [] @@ -13,6 +13,8 @@ * Copyright (C) 2004 William Lee Irwin III */ +#define pr_fmt(fmt)

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 13:23 +0800, Jovi Zhang wrote: On Tue, Jul 17, 2012 at 12:25 PM, Steven Rostedt rost...@goodmis.org wrote: On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c [] @@ -13,6 +13,8 @@ * Copyright (C)

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 13:23 +0800, Jovi Zhang wrote: I don't make sure if there have some method or skill to let GCC knows subsystem name automatically, use built-in macro __FILE__? but this need condition of subsystem name is same as file name, not so easily to guarantee that. You could use

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Jovi Zhang
On Tue, Jul 17, 2012 at 1:07 PM, Joe Perches j...@perches.com wrote: On Tue, 2012-07-17 at 00:25 -0400, Steven Rostedt wrote: On Mon, 2012-07-16 at 20:42 -0700, Joe Perches wrote: diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c [] @@ -13,6 +13,8 @@ * Copyright (C) 2004

Re: [PATCH] ftrace: using pr_fmt for better printk output

2012-07-16 Thread Joe Perches
On Tue, 2012-07-17 at 13:32 +0800, Jovi Zhang wrote: On Tue, Jul 17, 2012 at 1:07 PM, Joe Perches j...@perches.com wrote: On Tue, 2012-07-17 at 00:25 -0400, Steven Rostedt wrote: [] Also, what is KBUILD_MODNAME defined as for non-modules? As ftrace is not a module. It depends on the