Andrew MacPherson
2014-Jan-15 08:27 UTC
[LLVMdev] [PATCH] Don't optimize out GDB JIT registrar
Hi Rafael, comment explanation added now. Thanks. On Tue, Jan 14, 2014 at 8:31 PM, Rafael Espíndola < rafael.espindola at gmail.com> wrote:> LGTM with a comment explaining the issue. > > On 20 December 2013 03:50, Andrew MacPherson <andrew.macp at gmail.com> > wrote: > > Thanks Joerg. > > > > I've made the change you suggested and verified that it still works. I > think > > the noinline is still required though as this function can be called > from a > > couple of places and gdb will want to set its breakpoint on the single > > function address. Let me know if you think otherwise though. > > > > Cheers, > > Andrew > > > > > > > > On Fri, Dec 20, 2013 at 11:52 AM, Joerg Sonnenberger > > <joerg at britannica.bec.de> wrote: > >> > >> On Fri, Dec 20, 2013 at 11:18:46AM +0100, Andrew MacPherson wrote: > >> > This patch forces it to leave the call using the method described here > >> > in > >> > the 'noinline' section: > >> > >> Use asm volatile("":::"memory") to make sure that it doesn't leave > >> trackes. The noinline can likely go in that case... > >> > >> Joerg > >> _______________________________________________ > >> LLVM Developers mailing list > >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140115/a1ea5a10/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: GDBRegistrar-2.patch Type: text/x-diff Size: 735 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140115/a1ea5a10/attachment.patch>
Rafael Espíndola
2014-Jan-15 16:46 UTC
[LLVMdev] [PATCH] Don't optimize out GDB JIT registrar
LGTM. Do you have commit access? On 15 January 2014 00:27, Andrew MacPherson <andrew.macp at gmail.com> wrote:> Hi Rafael, comment explanation added now. Thanks. > > > On Tue, Jan 14, 2014 at 8:31 PM, Rafael Espíndola > <rafael.espindola at gmail.com> wrote: >> >> LGTM with a comment explaining the issue. >> >> On 20 December 2013 03:50, Andrew MacPherson <andrew.macp at gmail.com> >> wrote: >> > Thanks Joerg. >> > >> > I've made the change you suggested and verified that it still works. I >> > think >> > the noinline is still required though as this function can be called >> > from a >> > couple of places and gdb will want to set its breakpoint on the single >> > function address. Let me know if you think otherwise though. >> > >> > Cheers, >> > Andrew >> > >> > >> > >> > On Fri, Dec 20, 2013 at 11:52 AM, Joerg Sonnenberger >> > <joerg at britannica.bec.de> wrote: >> >> >> >> On Fri, Dec 20, 2013 at 11:18:46AM +0100, Andrew MacPherson wrote: >> >> > This patch forces it to leave the call using the method described >> >> > here >> >> > in >> >> > the 'noinline' section: >> >> >> >> Use asm volatile("":::"memory") to make sure that it doesn't leave >> >> trackes. The noinline can likely go in that case... >> >> >> >> Joerg >> >> _______________________________________________ >> >> LLVM Developers mailing list >> >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > >> > >> > >> > _______________________________________________ >> > LLVM Developers mailing list >> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > >
Andrew MacPherson
2014-Jan-15 18:00 UTC
[LLVMdev] [PATCH] Don't optimize out GDB JIT registrar
I don't have commit access, I wasn't sure if this was the right protocol to get a patch accepted but just let me know if not and I'll get it right the next time. Cheers, Andrew On Wed, Jan 15, 2014 at 5:46 PM, Rafael Espíndola < rafael.espindola at gmail.com> wrote:> LGTM. Do you have commit access? > > On 15 January 2014 00:27, Andrew MacPherson <andrew.macp at gmail.com> wrote: > > Hi Rafael, comment explanation added now. Thanks. > > > > > > On Tue, Jan 14, 2014 at 8:31 PM, Rafael Espíndola > > <rafael.espindola at gmail.com> wrote: > >> > >> LGTM with a comment explaining the issue. > >> > >> On 20 December 2013 03:50, Andrew MacPherson <andrew.macp at gmail.com> > >> wrote: > >> > Thanks Joerg. > >> > > >> > I've made the change you suggested and verified that it still works. I > >> > think > >> > the noinline is still required though as this function can be called > >> > from a > >> > couple of places and gdb will want to set its breakpoint on the single > >> > function address. Let me know if you think otherwise though. > >> > > >> > Cheers, > >> > Andrew > >> > > >> > > >> > > >> > On Fri, Dec 20, 2013 at 11:52 AM, Joerg Sonnenberger > >> > <joerg at britannica.bec.de> wrote: > >> >> > >> >> On Fri, Dec 20, 2013 at 11:18:46AM +0100, Andrew MacPherson wrote: > >> >> > This patch forces it to leave the call using the method described > >> >> > here > >> >> > in > >> >> > the 'noinline' section: > >> >> > >> >> Use asm volatile("":::"memory") to make sure that it doesn't leave > >> >> trackes. The noinline can likely go in that case... > >> >> > >> >> Joerg > >> >> _______________________________________________ > >> >> LLVM Developers mailing list > >> >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > >> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >> > > >> > > >> > > >> > _______________________________________________ > >> > LLVM Developers mailing list > >> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >> > > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140115/c7f94889/attachment.html>
Reid Kleckner
2014-Jan-15 23:16 UTC
[LLVMdev] [PATCH] Don't optimize out GDB JIT registrar
Wouldn't LLVM_ATTRIBUTE_USED be the correct thing here to prevent dead stripping, if that's the problem? On Wed, Jan 15, 2014 at 8:46 AM, Rafael Espíndola < rafael.espindola at gmail.com> wrote:> LGTM. Do you have commit access? > > On 15 January 2014 00:27, Andrew MacPherson <andrew.macp at gmail.com> wrote: > > Hi Rafael, comment explanation added now. Thanks. > > > > > > On Tue, Jan 14, 2014 at 8:31 PM, Rafael Espíndola > > <rafael.espindola at gmail.com> wrote: > >> > >> LGTM with a comment explaining the issue. > >> > >> On 20 December 2013 03:50, Andrew MacPherson <andrew.macp at gmail.com> > >> wrote: > >> > Thanks Joerg. > >> > > >> > I've made the change you suggested and verified that it still works. I > >> > think > >> > the noinline is still required though as this function can be called > >> > from a > >> > couple of places and gdb will want to set its breakpoint on the single > >> > function address. Let me know if you think otherwise though. > >> > > >> > Cheers, > >> > Andrew > >> > > >> > > >> > > >> > On Fri, Dec 20, 2013 at 11:52 AM, Joerg Sonnenberger > >> > <joerg at britannica.bec.de> wrote: > >> >> > >> >> On Fri, Dec 20, 2013 at 11:18:46AM +0100, Andrew MacPherson wrote: > >> >> > This patch forces it to leave the call using the method described > >> >> > here > >> >> > in > >> >> > the 'noinline' section: > >> >> > >> >> Use asm volatile("":::"memory") to make sure that it doesn't leave > >> >> trackes. The noinline can likely go in that case... > >> >> > >> >> Joerg > >> >> _______________________________________________ > >> >> LLVM Developers mailing list > >> >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > >> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >> > > >> > > >> > > >> > _______________________________________________ > >> > LLVM Developers mailing list > >> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >> > > > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140115/0424b273/attachment.html>