how to use task_finder

Dave Nomura dcnltc@us.ibm.com
Thu Jun 5 13:30:00 GMT 2008


Your wiki was very helpful but I still have a few questions about the 
wiki explanation:
> stap_start_task_finder() should be called to start everything up.
I assume this means that the task_finder goes out and matches up all of 
the pid's and pathnames can then notifies you via the callback.  Is that 
right?
> 'register_p' will be set to 1 if you are supposed to attach to the 
> process, 0 otherwise.
I'm not sure what this means.  If all I was expecting the task finder to 
do was to find the task matching PID_OR_NAME, why would I have to attach 
to the process?

I think it might be helpful to give an overview of how task_finder does 
its work in case someone needs to understand what is going on under the 
covers.

David Smith wrote:
> Dave Nomura wrote:
>   
>> Do you have any documentation or how-to on how to use the task_finder
>> code?  I've tried emulate your code in tapsets.cxx but can't tell what
>> is needed just to get the pid from the task_finder stuff, and what was
>> needed to support:  probe process(PID_OR_NAME).{exec,syscall,death}
>>     
>
> I've just written up a new wiki page that makes a small attempt at
> documentation.
>
> <http://sourceware.org/systemtap/wiki/TaskFinder>
>
> Hopefully, between the wiki page and looking at systemtap output of
> something like:
>
> # stap -p3 -e 'probe process("/bin/ls").syscall {}'
>
> That will get you going.  If you have any questions, feel free to ask
> here.  Also feel free to add more information to the wiki page.
>
>   


-- 
Dave Nomura
LTC Linux Power Toolchain



More information about the Systemtap mailing list