From: Frederic Weisbecker <fweisbec@gmail.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 4/6] tracing: Change trace_seq to use separate buffer
Date: Wed, 20 Jan 2010 19:56:16 +0100 [thread overview]
Message-ID: <20100120185614.GB6194@nowhere> (raw)
In-Reply-To: <4B556078.7000004@cn.fujitsu.com>
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.
prev parent reply other threads:[~2010-01-20 18:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 7:34 [PATCH 4/6] tracing: Change trace_seq to use separate buffer Lai Jiangshan
2010-01-20 18:40 ` Frederic Weisbecker
2010-01-26 3:24 ` Lai Jiangshan
2010-01-30 22:07 ` Frederic Weisbecker
2010-01-20 18:56 ` Frederic Weisbecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100120185614.GB6194@nowhere \
--to=fweisbec@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.