This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: accessing target globals with systemtap


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]