From: Li Zefan <lizf@cn.fujitsu.com>
To: Joe Perches <joe@perches.com>
Cc: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>,
linux-scsi@vger.kernel.org,
James Bottomley <James.Bottomley@suse.de>,
Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
lkml <linux-kernel@vger.kernel.org>,
Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
Subject: Re: [PATCH 1/2] scsi: add __print_hex() to ftrace
Date: Wed, 20 Jan 2010 15:07:34 +0800 [thread overview]
Message-ID: <4B56ABB6.9080802@cn.fujitsu.com> (raw)
In-Reply-To: <1263970573.18117.96.camel@Joe-Laptop.home>
Joe Perches wrote:
> On Wed, 2010-01-20 at 15:43 +0900, Kei Tokunaga wrote:
>> diff -puN kernel/trace/trace_output.c~ftrace_print_hex kernel/trace/trace_output.c
>> --- linux-2.6.33-rc4-trace/kernel/trace/trace_output.c~ftrace_print_hex 2010-01-14 19:55:45.000000000 +0900
>> +++ linux-2.6.33-rc4-trace-kei/kernel/trace/trace_output.c 2010-01-14 20:02:49.000000000 +0900
>> @@ -355,6 +355,21 @@ ftrace_print_symbols_seq(struct trace_se
>> }
>> EXPORT_SYMBOL(ftrace_print_symbols_seq);
>>
>> +const char *
>> +ftrace_print_hex_seq(struct trace_seq *p, const unsigned char *buf, int buf_len)
>> +{
>> + int i;
>> + const char *ret = p->buffer + p->len;
>> +
>> + for (i = 0; i < buf_len; i++)
>> + trace_seq_printf(p, "%s%2.2x", i == 0 ? "" : " ", buf[i]);
>> +
>> + trace_seq_putc(p, 0);
>
> hex_dump_to_buffer?
>
hex_dump_to_buffer has some limitations. For example, you have to specify:
@rowsize: number of bytes to print per line; must be 16 or 32
We can change hex_dump_to_buffer() to fit our needs, but let us do
that later.
prev parent reply other threads:[~2010-01-20 7:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 6:43 [PATCH 1/2] scsi: add __print_hex() to ftrace Kei Tokunaga
2010-01-20 6:56 ` Joe Perches
2010-01-20 7:07 ` Li Zefan [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=4B56ABB6.9080802@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=James.Bottomley@suse.de \
--cc=fweisbec@gmail.com \
--cc=joe@perches.com \
--cc=kusumi.tomohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tokunaga.keiich@jp.fujitsu.com \
--cc=xiaoguangrong@cn.fujitsu.com \
/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.