lkml.org 
[lkml]   [2018]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/20 v2] tracing: Add symbol type to function based events
On Thu, 8 Feb 2018 12:20:31 +0100
Jiri Olsa <jolsa@redhat.com> wrote:

> > +Symbols (function names)
> > +========================
> > +
> > +To display kallsyms "%pS" type of output, use the special type "symbol".
> > +
> > +Again, using gdb to find the offset of the "func" field of struct work_struct
> > +
> > +(gdb) printf "%d\n", &((struct work_struct *)0)->func
> > +24
>
> you could also use Arnaldo's pahole for this, seems like less typing:
>
> $ pahole ./vmlinux -C work_struct
> die__process_function: tag not supported (INVALID)!
> struct work_struct {
> atomic_long_t data; /* 0 8 */
> struct list_head entry; /* 8 16 */
> work_func_t func; /* 24 8 */
>
> it's in 'dwarves' package

Nice, I'll have to document that:

$ pahole ./vmlinux -C net_device |grep perm
unsigned char perm_addr[32]; /* 558 32 */


-- Steve

\
 
 \ /
  Last update: 2018-02-08 16:59    [W:0.071 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site