accessing target globals with systemtap

Frank Ch. Eigler fche@redhat.com
Wed Sep 12 11:17:00 GMT 2012


Hi -

On Tue, Sep 11, 2012 at 05:59:58PM -0700, Jeff Haran wrote:
> [...]
> 1235 void __init arp_init(void)
> [...]

It does look like a tasty little tidbit.  Unfortunately, __init
functions in the kernel are normally tossed into the memory hole right
after bootup, so are not available for probing by the time we proles
come along.  With a "stap --vp 02" option added, you'll get a hint at
the problem:

probe arp_init@net/ipv4/arp.c:1276 kernel reloc=.dynamic pc=0xffffffff81bb7f6f init/exit - skipped


> [...]
> Also, what is the recommended way of getting the address of an in-scope structure instance?
> 
> As you've pointed out this is wrong:
>         arp_tbl = $arp_tbl
> Is this the way to do it?
>         arp_tbl = &$arp_tbl

Yes.



- FChE



More information about the Systemtap mailing list