This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Met Problem on Enable SystemTap on Android
On 09/14/2011 03:20 PM, Yao,Yanjun wrote:
> Thanks Turgis,
>
> I got the problem fixed as what you said.
>
> One last question, in my implementation, we want to know what system
> calls each program made. However, in SystemTap tutorial or examples,
> people already know what to probe, then they go to probe that file.
>
> What's in my mind is like:
> probe syscall.* {
> //print out the * part of the target "syscall.*"
> }
>
> May I ask how can I do that?
Like this:
probe syscall.* { printf("%s: %s (%s) = ", execname(), name, argstr) }
If you want to get fancier and see the return values also, do this (this
is from testsuite/buildok/syscall.stp):
probe syscall.*, syscall.*.return {
if (retstr != "")
printf("%s\n", retstr)
else
printf("%s: %s (%s) = ", execname(), name, argstr)
}
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)