This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: [RFC]-Approaches to user space probes
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>
- Cc: <prasanna at in dot ibm dot com>, <systemtap at sources dot redhat dot com>, <suparna at in dot ibm dot com>, <ak at suse dot de>, <roland at redhat dot com>, <varap at us dot ibm dot com>
- Date: Wed, 1 Feb 2006 16:20:09 -0800
- Subject: RE: [RFC]-Approaches to user space probes
Stone, Joshua I wrote:
> Keshavamurthy Anil S wrote:
>> [...]
>> If in the user program, strlen() is called only once and
>> assuming that the return probe failed to initialize due to
>> no kretprobe instance, your return probe handler will
>> never gets fired and your hence in_strlen[tid()] will
>> never gets reset and the pagefault count will have
>> wrong value.
>
> Well, in a world where kretprobes can miss, the best you can do is a
> "statistical" sampling. If an event only heppens once, it may not be
> of much interest anyway. (It would be nice to see this limitation of
> kretprobes go away, but I haven't reviewed the code enough to know why
> that limitation is necessary...)
Sorry, I didn't quite understand your point. If only one strlen is
called and then missed on return, then *every* pagefault in that thread
from then on will be attributed to strlen. I agree this is a problem
with my example - and also a problem that may crop up in SystemTap
scripts in general. All the more reason why I wish kretprobes were more
"robust"...
Josh