> On Oct 21, 2014, at 10:26 PM, Nan Xiao via dtrace-discuss 
> <[email protected]> wrote:
>       
>       Execute the dtrace command: "dtrace -n 'pid$target::*sigaction*:entry 
> {ustack();}' -c ./test".
>       The output is:
>       bash-3.2# dtrace -n 'pid$target::*sigaction*:entry {ustack();}' -c 
> ./test
>       dtrace: description 'pid$target::*sigaction*:entry ' matched 2 probes
>       dtrace: pid 26799 has exited

In this invocation you are filtering on the pid of the test program because you 
are using the $target macro.

> 
>       If I execute the following dtrace command: "dtrace -n 
> '*sigaction*:entry {ustack();}' -c ./test".
>       bash-3.2# dtrace -n '*sigaction*:entry {ustack();}' -c ./test
>       dtrace: description '*sigaction*:entry ' matched 12 probes
>       CPU     ID                    FUNCTION:NAME
>         2  58241                  sigaction:entry 
>                                 libc.so.1`__sigaction+0xa
>                                 dtrace`main+0x802
>                                 dtrace`_start+0x6c
> 
>         2  20383                  sigaction:entry 
>                                 libc.so.1`__sigaction+0xa
>                                 dtrace`main+0x802
>                                 dtrace`_start+0x6c
>         ......
>         dtrace: pid 26815 has exited

In this invocation you are not using the $target macro to filter and thus the 
probes will fire for any pid that calls sigaction.

-Z



-------------------------------------------
dtrace-discuss
Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2
Powered by Listbox: http://www.listbox.com

Reply via email to