This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: What can I access in return probe
On Sat, 2005-12-17 at 21:00 -0200, Marcelo Tosatti wrote:
> On Fri, Dec 02, 2005 at 04:07:21PM -0800, Badari Pulavarty wrote:
> > Hi,
> >
> > I am wondering if I can access arguments in my return probe ?
> > And also, how do I access return value ?
> >
> > Whats wrong here ?
> >
> > # stap -g pagecache.stp
> > ERROR: pointer dereference fault near identifier 'page_cache_pages' at
> > pagecache.stp:8:2
> >
> >
> > Thanks,
> > Badari
>
> Hi Badari,
>
> I just tried your script and I wonder why I'm getting negative "nrpages":
>
> mapping = 0xc1115280 nrpages = -1
> mapping = 0xc12430c0 nrpages = -1
> ...
>
Hmm. Don't know why.
> Another issue is that it would be more practical to have actual
> bdev+inode number information (which can easily be retrieved from
> address_space), to be converted later to real pathname using dcookies
> (similar to what oprofile does).
>
Yes. That would be good.
> I'm still wondering how to access the "current" task_struct pointer from
> a .stp script.
What information are you looking from "current". There are functions
that provide info from current (like pid(), ppid(), gid() etc..).
I tried using "current" in the scripts and it failed. I guess one can
easily add new functions that access information from "current".
Look at /usr/share/systemtap/tapset/context.stp
Thanks,
Badari