[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100120185614.GB6194@nowhere>
Date: Wed, 20 Jan 2010 19:56:16 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/6] tracing: Change trace_seq to use separate buffer
On Tue, Jan 19, 2010 at 03:34:16PM +0800, Lai Jiangshan wrote:
> @@ -526,19 +526,19 @@ event_format_read(struct file *filp, char __user *ubuf, size_t cnt,
> {
> struct ftrace_event_call *call = filp->private_data;
> struct ftrace_event_field *field;
> - struct trace_seq *s;
> + struct trace_seq seq, *s = &seq;
> + unsigned char *buffer;
> int common_field_count = 5;
> - char *buf;
> int r = 0;
>
> if (*ppos)
> return 0;
>
> - s = kmalloc(sizeof(*s), GFP_KERNEL);
> - if (!s)
> + buffer = (unsigned char *)__get_free_page(GFP_KERNEL);
> + if (!buffer)
> return -ENOMEM;
>
> - trace_seq_init(s);
> + trace_seq_init(s, buffer, PAGE_SIZE);
May be can we use a paired trace_seq_init_page/trace_seq_free_page,
to sum up a bit the above pattern.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists