[Crash-utility] trace.c extension module needs to be updated

Dave Anderson anderson at redhat.com
Wed Sep 23 20:43:37 UTC 2015



----- Original Message -----
> 
> Hi Daisuke,
> 
> The trace.c extension module is no longer functional as of Linux 4.2
> due to a huge rework of the ftrace code which, most notably, changed
> symbol and structure names from "ftrace..." to "trace...".
> 
> Can you take a look at addressing those changes, while maintaining
> backwards compatibility?
> 
> Thanks,
>   Dave


Hi Daisuke,

I *think* that the attached patch may be enough to handle the kernel changes.  
It uses this construct in the relevant locations to pick the correct version:

  MAX(MEMBER_OFFSET("ftrace_event_call", ...), MEMBER_OFFSET("trace_event_call", ...))  

Note that I also added a gdb_set_crash_scope() call to init_offsets()
because there are multiple, different, "struct ring_buffer" declarations in 
the kernel, and for whatever reason, crash was initially picking up the wrong
one from "kernel/events/internal.h".

Can you verify that this patch is sufficient and test its functionality?
Or if you prefer, can you come up with your own solution?  

Thanks,
  Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace.patch
Type: text/x-patch
Size: 5136 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20150923/54d4cc22/attachment.bin>


More information about the Crash-utility mailing list