Skip to contentSkip to conversation

ftrace.h: Use common pr_info fmt string

PATCH In review Joe Perches 2 participants 6 messages Dec 13, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ftrace.h: Use common pr_info fmt string

Reduces fmt string space a bit

include/trace/ftrace.h +1 -1
index d1b3de9..c4eca38 100644
@@ -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;							\
 }									\
 									\
#1 lore raw
Commit-ID:  4819568f23a8bef0ca99b740ca60fe2450ab0aac
Gitweb:     http://git.kernel.org/tip/4819568f23a8bef0ca99b740ca60fe2450ab0aac
Author:     Joe Perches <[email protected]>
AuthorDate: Sat, 12 Dec 2009 13:06:13 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 13 Dec 2009 08:14:45 +0100

ftrace.h: Use common pr_info fmt string

Reduces fmt string space a bit.

Cc Frederic Weisbecker <[email protected]>
Cc Steven Rostedt <[email protected]>

LKML-Reference: <[email protected]>

---
 include/trace/ftrace.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/trace/ftrace.h +1 -1
index d1b3de9..c4eca38 100644
@@ -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;							\
 }									\
 									\

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 36 lines · Steven Rostedt
Quoted 25 lines · tip-bot for Joe Perches
Commit-ID:  4819568f23a8bef0ca99b740ca60fe2450ab0aac
Gitweb:     http://git.kernel.org/tip/4819568f23a8bef0ca99b740ca60fe2450ab0aac
Author:     Joe Perches <[email protected]>
AuthorDate: Sat, 12 Dec 2009 13:06:13 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 13 Dec 2009 08:14:45 +0100

ftrace.h: Use common pr_info fmt string

Reduces fmt string space a bit.

Cc Frederic Weisbecker <[email protected]>
Cc Steven Rostedt <[email protected]>

LKML-Reference: <[email protected]>

---
 include/trace/ftrace.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/trace/ftrace.h +0 -0
index d1b3de9..c4eca38 100644

include/trace/ftrace.h static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\ · line 736

Quoted 5 lines
include/trace/ftrace.h +1 -1
@@ -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);			\

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?

Quoted 1 line

-- Steve

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

#4 lore raw
Quoted 8 lines · Frederic Weisbecker
Quoted 6 lines · Steven Rostedt

include/trace/ftrace.h static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\ · line 736

Quoted 3 lines
include/trace/ftrace.h +1 -1
 		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.

#5 lore raw
In reply to Frederic Weisbecker
Quoted 8 lines · Frederic Weisbecker
Quoted 6 lines · Steven Rostedt

include/trace/ftrace.h static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\ · line 736

Quoted 3 lines
include/trace/ftrace.h +1 -1
 		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 <[email protected]>

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.

#6 lore raw
Quoted 8 lines · Joe Perches
Quoted 7 lines · Frederic Weisbecker
Quoted 6 lines · Steven Rostedt

include/trace/ftrace.h static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\ · line 736

Quoted 3 lines
include/trace/ftrace.h +1 -1
 		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?

Quoted 5 lines
Quoted 1 line

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.