All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: fix trace_buf_size boot option
@ 2009-06-24  9:27 Li Zefan
  2009-06-24  9:33 ` Li Zefan
  0 siblings, 1 reply; 3+ messages in thread
From: Li Zefan @ 2009-06-24  9:27 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Steven Rostedt, Frederic Weisbecker, LKML

We should be able to specify [KMG] when setting trace_buf_size
boot option, as documented in kernel-parameters.txt

[ Impact: allow to specify [KMG] in trace_buf_size boot option ]

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 Documentation/kernel-parameters.txt |    3 ++-
 kernel/trace/trace.c                |    5 ++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 256a650..421f1e6 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2446,7 +2446,8 @@ and is between 256 and 4096 characters. It is defined in the file
 
 	tp720=		[HW,PS2]
 
-	trace_buf_size=nn[KMG] [ftrace] will set tracing buffer size.
+	trace_buf_size=nn[KMG]
+			[FTRACE] will set tracing buffer size.
 
 	trix=		[HW,OSS] MediaTrix AudioTrix Pro
 			Format:
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 3bb3100..7068468 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -284,13 +284,12 @@ void trace_wake_up(void)
 static int __init set_buf_size(char *str)
 {
 	unsigned long buf_size;
-	int ret;
 
 	if (!str)
 		return 0;
-	ret = strict_strtoul(str, 0, &buf_size);
+	buf_size = memparse(str, &opt);
 	/* nr_entries can not be zero */
-	if (ret < 0 || buf_size == 0)
+	if (buf_size == 0)
 		return 0;
 	trace_buf_size = buf_size;
 	return 1;
-- 
1.5.4.rc3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-24  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24  9:27 [PATCH] tracing: fix trace_buf_size boot option Li Zefan
2009-06-24  9:33 ` Li Zefan
2009-06-24  9:47   ` [tip:tracing/urgent] tracing: Fix " tip-bot for Li Zefan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.