Andrew Gallatin wrote:
> Michael Schuster wrote:
>> Andrew Gallatin wrote:
>>> Thanks!  That seems to work.
>>>
>>> FWIW, recursion also seems to work.  Eg:
>>
>> can you explain a little what you mean by that? As I understand both 
>> DTrace and recursion, they don't really mix.
>>
>> Michael
>>> fbt::driver_send:entry
>>> /arg1 != 0/
>>> {
>>> this->mp = (mblk_t *)arg1;
>>> this->size = this->mp->b_wptr - this->mp->b_rptr;
>>> this->count=1;
>>> }
>>>
>>> fbt::driver_send:entry
>>> /this->mp && this->mp->b_cont/
>>> {
>>> this->mp = this->mp->b_cont;
>>> this->size += this->mp->b_wptr - this->mp->b_rptr;
>>> this->count++;
>>> }
> 
> Just that that the second snippet seems to be rather
> recursive (this->mp = this->mp->b_cont) and it seems
> to work, and is a nice alternative to enumerating
> all the potential chains as was suggested.

can you show a concrete example, please? how do you know what this->size 
and this->count look like?

Michael
-- 
Michael Schuster        http://blogs.sun.com/recursion
Recursion, n.: see 'Recursion'
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to