Siu Kwan Lam via llvm-dev
2017-Feb-23 16:43 UTC
[llvm-dev] Is OrcJIT compile-on-demand thread safe?
Hi all, I am trying OrcMCJITReplacement but I am seeing failures whenever multiple threads calls the same function concurrently. I am suspecting that the compile-on-demand feature is not thread safe. Details of my usecase: A single JIT engine compiles code and sends the jitted function address to multiple threads. So, all threads could be enter the lazy function stub concurrently. -- Siu Kwan Lam Software Engineer Continuum Analytics -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170223/d3b7678a/attachment.html>
Mehdi Amini via llvm-dev
2017-Feb-24 21:32 UTC
[llvm-dev] Is OrcJIT compile-on-demand thread safe?
> On Feb 23, 2017, at 8:43 AM, Siu Kwan Lam via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi all, > > I am trying OrcMCJITReplacement but I am seeing failures whenever multiple threads calls the same function concurrently. I am suspecting that the compile-on-demand feature is not thread safe.A good way to confirm in this case is to build with TSAN enabled. I think it is: cmake -DLLVM_USE_SANITIZER=Thread — Mehdi> > Details of my usecase: > > A single JIT engine compiles code and sends the jitted function address to multiple threads. So, all threads could be enter the lazy function stub concurrently. > > > -- > Siu Kwan Lam > Software Engineer > Continuum Analytics > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev