[llvm-commits] VM hooks when locking

Owen Anderson resistor at mac.com
Fri Jul 31 00:03:02 PDT 2009


On Jul 30, 2009, at 11:55 PM, Nicolas Geoffray wrote:
> So In my case (vmkit), I don't really care about /what/ is being  
> locked
> on. All I need is the information that the thread /is/ blocked. I
> understand that for a debugging/monitoring/whatever system, it would  
> be
> nice to know /what/, but that demands a more high-level solution.

OK, but you're likely to get a bunch of false positives for this.   
Locks are (now) acquired in the process of type construction and  
constant creation, which happen all over the place, assuming you're  
running in multithreaded mode.

> The only places where the VM-provided functions must be called is when
> there are chances the thread will be blocked. I believe the only place
> in llvm where a thread may be blocked is when it calls the
> pthread_mutex_lock, and that is only in Mutex.cpp. I believe the
> recursive and normal mutexes share the same function.

Nope, see lib/System/RWMutex.cpp.  They don't share an implementation.

--Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090731/e7071c82/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090731/e7071c82/attachment.bin>


More information about the llvm-commits mailing list