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(a)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.