Met Problem on Enable SystemTap on Android

Yao,Yanjun jiaoyang28@gmail.com
Wed Sep 14 20:40:00 GMT 2011


Thanks a lot.

This just fits what I want.

Yours
Sincerely

2011/9/14 David Smith <dsmith@redhat.com>:
> 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)
>



More information about the Systemtap mailing list