Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] ftrace.h: Use common pr_info fmt string

14 views
Skip to first unread message

Joe Perches

unread,
Dec 12, 2009, 8:30:02 PM12/12/09
to
Reduces fmt string space a bit

Signed-off-by: Joe Perches <j...@perches.com>
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index d1b3de9..c4eca38 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -733,7 +733,7 @@ static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\
ret = register_trace_##call(ftrace_raw_event_##call); \
if (ret) \
pr_info("event trace: Could not activate trace point " \
- "probe to " #call "\n"); \
+ "probe to %s\n", #call); \
return ret; \
} \
\


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

tip-bot for Joe Perches

unread,
Dec 13, 2009, 2:40:02 AM12/13/09
to
Commit-ID: 4819568f23a8bef0ca99b740ca60fe2450ab0aac
Gitweb: http://git.kernel.org/tip/4819568f23a8bef0ca99b740ca60fe2450ab0aac
Author: Joe Perches <j...@perches.com>
AuthorDate: Sat, 12 Dec 2009 13:06:13 -0800
Committer: Ingo Molnar <mi...@elte.hu>
CommitDate: Sun, 13 Dec 2009 08:14:45 +0100

ftrace.h: Use common pr_info fmt string

Reduces fmt string space a bit.

Signed-off-by: Joe Perches <j...@perches.com>
Cc: Frederic Weisbecker <fwei...@gmail.com>
Cc: Steven Rostedt <ros...@goodmis.org>
LKML-Reference: <1260651974....@Joe-Laptop.home>
Signed-off-by: Ingo Molnar <mi...@elte.hu>
---
include/trace/ftrace.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Frederic Weisbecker

unread,
Dec 13, 2009, 10:00:02 AM12/13/09
to
On Sun, Dec 13, 2009 at 09:48:15AM -0500, Steven Rostedt wrote:
> This reduces format string space a bit, but doesn't it just add another
> string to the string tables #func == "func" as well as add code to pass
> in another parameter?
>
> -- Steve


Yeah, I don't understand the purpose of this patch either...

Joe Perches

unread,
Dec 13, 2009, 1:00:01 PM12/13/09
to
On Sun, 2009-12-13 at 15:50 +0100, Frederic Weisbecker wrote:
> On Sun, Dec 13, 2009 at 09:48:15AM -0500, Steven Rostedt wrote:
> > > pr_info("event trace: Could not activate trace point " \
> > > - "probe to " #call "\n"); \
> > > + "probe to %s\n", #call); \
> > This reduces format string space a bit, but doesn't it just add another
> > string to the string tables #func == "func" as well as add code to pass
> > in another parameter?
> Yeah, I don't understand the purpose of this patch either...

For sched, it reduces size by ~1k.

Joe Perches

unread,
Dec 13, 2009, 1:40:02 PM12/13/09
to
On Sun, 2009-12-13 at 15:50 +0100, Frederic Weisbecker wrote:
> On Sun, Dec 13, 2009 at 09:48:15AM -0500, Steven Rostedt wrote:
> > > pr_info("event trace: Could not activate trace point " \
> > > - "probe to " #call "\n"); \
> > > + "probe to %s\n", #call); \
> > This reduces format string space a bit, but doesn't it just add another
> > string to the string tables #func == "func" as well as add code to pass
> > in another parameter?
> Yeah, I don't understand the purpose of this patch either...

The patch from Li Zefan you've already queued is better

http://lkml.org/lkml/2009/12/13/60

Subject: [PATCH 03/13] tracing: Move a printk out of ftrace_raw_reg_event_foo()
Date: Sun, 13 Dec 2009 14:08:04 +0100
From: Li Zefan <li...@cn.fujitsu.com>

Move the printk from each ftrace_raw_reg_event_foo() to
its caller ftrace_event_enable_disable(). This avoids each
regfunc trace event callbacks to handle a same error report
that can be carried from the caller.

Frederic Weisbecker

unread,
Dec 13, 2009, 4:30:01 PM12/13/09
to
On Sun, Dec 13, 2009 at 10:33:27AM -0800, Joe Perches wrote:
> On Sun, 2009-12-13 at 15:50 +0100, Frederic Weisbecker wrote:
> > On Sun, Dec 13, 2009 at 09:48:15AM -0500, Steven Rostedt wrote:
> > > > pr_info("event trace: Could not activate trace point " \
> > > > - "probe to " #call "\n"); \
> > > > + "probe to %s\n", #call); \
> > > This reduces format string space a bit, but doesn't it just add another
> > > string to the string tables #func == "func" as well as add code to pass
> > > in another parameter?
> > Yeah, I don't understand the purpose of this patch either...
>
> The patch from Li Zefan you've already queued is better
>
> http://lkml.org/lkml/2009/12/13/60


Ok. Thanks.

0 new messages