[llvm-commits] VM hooks when locking
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Fri Jul 31 07:38:36 PDT 2009
OK, here's a simple patch that just modifies the existing MutexGuard
class. Creating another class would require too much changes in the
ExecutionEngine code, or creating a base class of MutexGuard won't work
with the MutexGuard principle.
Nicolas Geoffray wrote:
> Owen Anderson wrote:
>
>> On Jul 31, 2009, at 12:24 AM, Nicolas Geoffray wrote:
>>
>>> Another solution would be to only call the hooks with the JIT lock. The
>>> other locks are all internals and won't block the threads too long.
>>> Would you prefer that solution? That requires to track all places where
>>> the JIT lock is used, so it's more error-prone.
>>>
>> I like this solution better in general,
>>
>
> Great! I'll submit a new patch then.
>
>
>> and I don't think it needs to be error-prone. Why not introduce a
>> little wrapper class for the JIT lock which calls the hooks before and
>> after locking the real lock?
>>
>
> Yeah, I would have coded a wrapper to factorize the calls to the hooks
> anyway. The problem is that the wrapper must always be used, and
> everyone hacking on llvm's execution engine should keep that in mind
> when locking the JIT lock.
>
> Thanks,
> Nicolas
>
>
>> --Owen
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lockhooks.patch
Type: text/x-patch
Size: 2179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090731/6d3e06ab/attachment.bin>
More information about the llvm-commits
mailing list