[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <477F20668A386D41ADCC57781B1F704307F5150529@SC-VEXCH1.marvell.com>
Date: Tue, 1 Mar 2011 11:33:55 -0800
From: Bing Zhao <bzhao@...vell.com>
To: Joe Perches <joe@...ches.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"John W. Linville" <linville@...driver.com>,
Johannes Berg <johannes@...solutions.net>,
Amitkumar Karwar <akarwar@...vell.com>,
Kiran Divekar <dkiran@...vell.com>,
Frank Huang <frankh@...vell.com>
Subject: RE: [RFC v2 1/2] dynamic debug: add dynamic_hexdump_debug macro
Hi Joe,
> -----Original Message-----
> From: Joe Perches [mailto:joe@...ches.com]
> Sent: Monday, February 28, 2011 9:26 PM
> To: Bing Zhao
> Cc: linux-kernel@...r.kernel.org; linux-wireless@...r.kernel.org; John W. Linville; Johannes Berg;
> Amitkumar Karwar; Kiran Divekar; Frank Huang
> Subject: Re: [RFC v2 1/2] dynamic debug: add dynamic_hexdump_debug macro
>
> On Mon, 2011-02-28 at 21:06 -0800, Bing Zhao wrote:
> > dynamic_hexdump_debug(str, buf, len)
>
> > diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
> > +#define dynamic_hexdump_debug(str, buf, len) \
> > +do { \
> > + static struct _ddebug descriptor \
> > + __used \
> > + __attribute__((section("__verbose"), aligned(8))) = \
> > + { KBUILD_MODNAME, __func__, __FILE__, str, __LINE__, \
> > + _DPRINTK_FLAGS_DEFAULT }; \
> > + if (unlikely(descriptor.enabled)) { \
> > + printk(KERN_DEBUG str); \
> > + print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len); \
>
> Perhaps
> print_hex_dump(str, DUMP_PREFIX_OFFSET, buf, len);
I wanted to print the "str" as a subject line, like this:
mwifiex data: tx_buf:
00000000: 34 8c 24 a0 ff ff ff ff 36 72 24 a0 ff ff ff ff 4.$.....6r$.....
00000010: d7 7f 24 a0 ff ff ff ff 80 8e 24 a0 ff ff ff ff ..$.......$.....
00000020: df 7d 24 a0 ff ff .}$...
The "str" will serve as the prefix strings if we use
print_hex_dump(KERN_DEBUG, str, DUMP_PREFIX_OFFSET, 16, 1, buf, len, true);
mwifiex data: tx_buf:00000000: 34 8c 24 a0 ff ff ff ff 36 72 24 a0 ff ff ff ff 4.$.....6r$.....
mwifiex data: tx_buf:00000010: d7 7f 24 a0 ff ff ff ff 80 8e 24 a0 ff ff ff ff ..$.......$.....
mwifiex data: tx_buf:00000020: df 7d 24 a0 ff ff .}$...
I'm okay with this format too.
Thanks,
Bing
Powered by blists - more mailing lists