From: John H. <ha...@sg...> - 2001-11-21 20:27:21
|
From: "Dipankar Sarma" <dip...@in...> > > From: "Dipankar Sarma" <dip...@in...> > > > Does lockmeter handle atomic_dec_and_lock() ? If I remember correctly, > > > it didn't. Fixing this would be handy. > Oh, I can see the aggregate of all calls to atomic_dec_and_lock(), > but that is not very useful. Is it not possible to treat > atomic_dec_and_lock() as another locking primitive for instrumentation > and show the stats broken up by calling routines ? The problem is a generic Lockmeter shortcoming: a specific spin_lock() call that locks more than one spinlock. I tried making the i386 atomic_dec_and_lock() an inline (in order to have each caller of atomic_dec_and_lock have the spin_lock() inside that caller's procedure), but that didn't work. When I hacked individual "static inline" versions of atomic_dec_and_lock() for each particular caller, then those were nicely inline'd. That's not a general long-term solution, however, since atomic_dec_and_lock() calls can come and go, and it would complicate the Lockmeter patch. John Hawkes |