FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 03-23-2011, 09:21 AM
Lai Jiangshan
 
Default crash-trace-command: Include trace_printk() formats for modules

On 03/23/2011 06:18 AM, Steven Rostedt wrote:
> If a module has a trace_printk() and it is optimized to be a
> trace_bprintk() then we want to save the format for that as well.
> The trace_bprintk() just saves the pointer of the format in the
> ftrace ring buffer, thus trace-cmd requires the mapping of that
> address to the format.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>

Thanks you for your contribution.
All the patches are reviewed and tested, they are good!

> +
> static int save_ftrace_printk(int fd)
> {
> - struct syment *s, *e;
> + struct kernel_list_head *mod_fmt;
> + struct syment *s, *e, *b;
> long bprintk_fmt_s, bprintk_fmt_e;
> - char string[4096];
> long *address;
> - size_t i, count;
> + size_t i, count, len;
>

This "len" is unused and cause the compiler warning:
gcc -Wall -I/usr/include/crash -nostartfiles -shared -rdynamic -o trace.so trace.c -fPIC -DX86_64
trace.c: In function ‘save_ftrace_printk’:
trace.c:1918:19: warning: unused variable ‘len’

I can fix it and apply the patches to the crash-trace-command git tree,
but these patches will be also applied to the upstream crash utility by Dave,
Could you resend the patches with the fix.

Thanks you very much.
Lai.

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 03-23-2011, 10:52 AM
Steven Rostedt
 
Default crash-trace-command: Include trace_printk() formats for modules

On Wed, 2011-03-23 at 18:21 +0800, Lai Jiangshan wrote:
> O
> > +
> > static int save_ftrace_printk(int fd)
> > {
> > - struct syment *s, *e;
> > + struct kernel_list_head *mod_fmt;
> > + struct syment *s, *e, *b;
> > long bprintk_fmt_s, bprintk_fmt_e;
> > - char string[4096];
> > long *address;
> > - size_t i, count;
> > + size_t i, count, len;
> >
>
> This "len" is unused and cause the compiler warning:
> gcc -Wall -I/usr/include/crash -nostartfiles -shared -rdynamic -o trace.so trace.c -fPIC -DX86_64
> trace.c: In function ‘save_ftrace_printk’:
> trace.c:1918:19: warning: unused variable ‘len’

Hmm, that must have been left over from one of my "variations".

>
> I can fix it and apply the patches to the crash-trace-command git tree,
> but these patches will be also applied to the upstream crash utility by Dave,
> Could you resend the patches with the fix.

I'll fix it. As I also found that patch 3 fixes a bug in patch 2. That
fix belongs in patch 2.

I'll resend later today.

Thanks for the review!

-- Steve


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 12:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org