Lewis Thompson wrote:
> Hi Pramod
>
> On 17 February 2010 18:37, Pramod Batni <Pramod.Batni at sun.com> wrote:
>   
>>> Lewis Thompson wrote:
>>>       
>>>>> ::lastran
>>>>> would print the time a thread last ran in walltime and ticks
>>>>>           
>>>  ::thread -d
>>>  This prints the last time [lbolt] the thread ran on a cpu .
>>>  Printing the time since it last ran [t - X] would be useful like it is done
>>> for ::cpuinfo wrt to the lbolt.
>>>       
> This was exactly what I was thinking... time since last ran along with
> a wallclock version in hours, minutes, seconds.  Both of these
> readouts can be very handy at times.
>   
 Right. This would be useful.
>   
>>>>> ::ts_chain
>>>>> would look up the ts_chain for a given sobj.  we already have sobj2ts
>>>>> which does this work so it would make sense to update sobj2ts to use
>>>>> ts_chain and expose both functionalities.
>>>>>           
>>> I am not quite sure what you are proposing. can you please provide an
>>> example.
>>>       
> Certainly...
>
>   
>>> sobjptr::ts_chain
>>>       
> would return the turnstile_chain_t from the turnstile_table bucket
> sobj is associated with.  We can check whether the dispatch lock is
> held for the turnstile_chain_t with this.
>   

   I think I get the idea now. :-)
   In most dumps where there was a need to find the turnstile_chain 
bucket, it was done by doing the math [for TURNSTILE_SOBJ_HASH] in mdb 
and getting the
   actual entry.
 
> We already have
>
>   
>>> sobjptr::sobj2ts
>>>       
> which returns the turnstile_t associated with sobj.  The current
> sobj2ts dcmd performs the lookup that I propose ::ts_chain will do,
> and then goes further by finding the turnstile_t off the
> turnstile_chain_t for sobj.
>
> It would make sense to implement sobj2ts with a call to ts_chain and a
> walk rather than implementing the same lookup twice.
>   

  Makes sense.
>   
>>>>> My question is really around the inclusion of these dcmds in mdb.  I'd
>>>>> like to see them included and not maintain a personal set of modules.  Can
>>>>> anybody comment on whether this is likely.  I work at Sun, if that makes 
>>>>> any
>>>>> difference.
>>>>>           
> Any thoughts on this?
>   

  I think these are useful extensions.
  +1 from my side.


Pramod

Reply via email to