On Tue, Jul 21, 2009 at 12:37 PM, Matt Ingenthron<mingenth...@acm.org> wrote:
>> To be more particular, in order to get the types from
>> the provider, you must
>> use the args[] array, not the arg? variables.  Try
>> doing:
>>
>> printf("key is %s, length is %d\n", copyinstr(arg1),
>> , args[3]);
>
> The DTrace script doesn't seem to be correct in that case.  I get the 
> following:
>
> $ pfexec ./keysflowing.d
> dtrace: failed to compile script ./keysflowing.d: line 11: args[ ] may not be 
> referenced because probe description :memcached*::command-get matches an 
> unstable set of probes
>
>     7  memcached*::command-get
>     8  / (signed int) arg3 != -1 /
>     9  {
>    10    printf("get %s, FOUND KEY\n", copyinstr(arg1));
>    11    printf("another approach %d", args[3]);
>    12  }
>
> What does it take to make it stable?  :)  Here is the probe definition.
>

You're trying to use the args[] array with a USDT provider.  DTrace
doesn't (yet) have the ability to pull type information out of
processes, so you don't get the args[] array for anything but
kernel-based probes.  (The kernel contains CTF information that it
uses to map types to arguments.)

Chad
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to