Hey Noel,
So you''re trying to decrement all entries set in an associative array
every second (for some kind of hysteresis or something)? It''s not
currently possible to do this exactly, but it might be possible to
use the tick probe to iterate through your array.
What exactly are you trying to do? Perhaps a slightly different solution
would jive better with the DTrace model.
Adam
On Wed, Sep 14, 2005 at 05:52:59PM -0700, Noel Dellofano
wrote:>
> If you have an associative array that uses for example a string for the
> key, is there any way to iterate through all of the elements in the
> array in order to access them periodically?
>
> If I have
>
> struct times {
> uint64_t timer;
> };
>
> struct times list[string];
>
> sdt:::startprobe
> {
> list[stringof(arg0)].timer = 30;
> }
>
> Is there a way to do that using something like the tick provider?
>
> profile:::tick-1sec
> /list[?].timer >0/
> {
> list[?].timer--;
> }
>
> thanks,
> Noel :-)
>
>
> ************************************************************************
> **
>
> "Question all the answers"
>
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
--
Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl