Thanks Andrew for the update. Does it support NotifyFunctionEmitted? Cheers. -----Original Message----- From: Kaylor, Andrew [mailto:andrew.kaylor at intel.com] Sent: Monday, November 26, 2012 1:06 PM To: Manny Ko Cc: LLVM Developers Mailing List Subject: RE: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC The current 3.2 code branch has events being broadcast from the MCJIT engine when a new object is emitted, but the profiling listeners do not do anything with the events (and I don't expect they will before the 3.2 release becomes official). I have implemented some code in trunk since the 3.2 branch to traverse the emitted object and pick out named functions in the IntelJITEventsListener. An update that uses debug information to get source file and line numbers for the functions shouldn't be too far behind. Once that is working, it should be a very small task to port it over to the OProfile listener. It's also worth noting that the MCJIT engine has support for registering JITed code with GDB for source-level debugging on platforms that use the ELF format. I believe this was in place in the 3.1 release. This is currently done inside the MCJIT engine but it definitely should be moved to a JIT event listener. FWIW, the legacy JIT only registered function names and unwind information (and I think even that may be gone now). -Andy -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Manny Ko Sent: Monday, November 26, 2012 9:27 AM To: Eli Bendersky Cc: Benjamin Kramer; LLVM Developers Mailing List Subject: Re: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC Sorry for speaking too soon. It is missing from 3.2 which is the version I have been using. If it is already implemented than it is very good news. Thanks. -----Original Message----- From: Eli Bendersky [mailto:eliben at google.com] Sent: Monday, November 26, 2012 9:25 AM To: Manny Ko Cc: Albert Graef; Benjamin Kramer; LLVM Developers Mailing List Subject: Re: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC On Mon, Nov 26, 2012 at 9:18 AM, Manny Ko <Manny.Ko at imgtec.com> wrote:> I know the old JIT pretty well but have only used the MCJIT from the client side. Most of my experience is on the x86backend though. > > Another critical feature missing from MCJIT is the JITEventListener. This is usually for supporting debuggers and profiling tools.What makes you say it is missing? Eli _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Kaylor, Andrew
2012-Nov-26 21:23 UTC
[LLVMdev] Removing old JIT CodeEmitters for ARM and PPC
No. It adds a new event, 'NotifyObjectEmitted'. The Intel JIT listener that I mentioned then uses the emitted object to find the functions (which are all emitted together). Because of the way that MCJIT is implemented, it isn't really feasible to reconstruct things like the EmittedFunctionDetails in the NotifyFunctionEmitted event. -Andy -----Original Message----- From: Manny Ko [mailto:Manny.Ko at imgtec.com] Sent: Monday, November 26, 2012 1:10 PM To: Kaylor, Andrew Cc: LLVM Developers Mailing List Subject: RE: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC Thanks Andrew for the update. Does it support NotifyFunctionEmitted? Cheers. -----Original Message----- From: Kaylor, Andrew [mailto:andrew.kaylor at intel.com] Sent: Monday, November 26, 2012 1:06 PM To: Manny Ko Cc: LLVM Developers Mailing List Subject: RE: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC The current 3.2 code branch has events being broadcast from the MCJIT engine when a new object is emitted, but the profiling listeners do not do anything with the events (and I don't expect they will before the 3.2 release becomes official). I have implemented some code in trunk since the 3.2 branch to traverse the emitted object and pick out named functions in the IntelJITEventsListener. An update that uses debug information to get source file and line numbers for the functions shouldn't be too far behind. Once that is working, it should be a very small task to port it over to the OProfile listener. It's also worth noting that the MCJIT engine has support for registering JITed code with GDB for source-level debugging on platforms that use the ELF format. I believe this was in place in the 3.1 release. This is currently done inside the MCJIT engine but it definitely should be moved to a JIT event listener. FWIW, the legacy JIT only registered function names and unwind information (and I think even that may be gone now). -Andy -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Manny Ko Sent: Monday, November 26, 2012 9:27 AM To: Eli Bendersky Cc: Benjamin Kramer; LLVM Developers Mailing List Subject: Re: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC Sorry for speaking too soon. It is missing from 3.2 which is the version I have been using. If it is already implemented than it is very good news. Thanks. -----Original Message----- From: Eli Bendersky [mailto:eliben at google.com] Sent: Monday, November 26, 2012 9:25 AM To: Manny Ko Cc: Albert Graef; Benjamin Kramer; LLVM Developers Mailing List Subject: Re: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC On Mon, Nov 26, 2012 at 9:18 AM, Manny Ko <Manny.Ko at imgtec.com> wrote:> I know the old JIT pretty well but have only used the MCJIT from the client side. Most of my experience is on the x86backend though. > > Another critical feature missing from MCJIT is the JITEventListener. This is usually for supporting debuggers and profiling tools.What makes you say it is missing? Eli _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
I see. If I am writing my own listener can I still get back the (llvm::Function, void* Code, size_t Size)? Ciao. -----Original Message----- From: Kaylor, Andrew [mailto:andrew.kaylor at intel.com] Sent: Monday, November 26, 2012 1:24 PM To: Manny Ko Cc: LLVM Developers Mailing List Subject: RE: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC No. It adds a new event, 'NotifyObjectEmitted'. The Intel JIT listener that I mentioned then uses the emitted object to find the functions (which are all emitted together). Because of the way that MCJIT is implemented, it isn't really feasible to reconstruct things like the EmittedFunctionDetails in the NotifyFunctionEmitted event. -Andy -----Original Message----- From: Manny Ko [mailto:Manny.Ko at imgtec.com] Sent: Monday, November 26, 2012 1:10 PM To: Kaylor, Andrew Cc: LLVM Developers Mailing List Subject: RE: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC Thanks Andrew for the update. Does it support NotifyFunctionEmitted? Cheers. -----Original Message----- From: Kaylor, Andrew [mailto:andrew.kaylor at intel.com] Sent: Monday, November 26, 2012 1:06 PM To: Manny Ko Cc: LLVM Developers Mailing List Subject: RE: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC The current 3.2 code branch has events being broadcast from the MCJIT engine when a new object is emitted, but the profiling listeners do not do anything with the events (and I don't expect they will before the 3.2 release becomes official). I have implemented some code in trunk since the 3.2 branch to traverse the emitted object and pick out named functions in the IntelJITEventsListener. An update that uses debug information to get source file and line numbers for the functions shouldn't be too far behind. Once that is working, it should be a very small task to port it over to the OProfile listener. It's also worth noting that the MCJIT engine has support for registering JITed code with GDB for source-level debugging on platforms that use the ELF format. I believe this was in place in the 3.1 release. This is currently done inside the MCJIT engine but it definitely should be moved to a JIT event listener. FWIW, the legacy JIT only registered function names and unwind information (and I think even that may be gone now). -Andy -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Manny Ko Sent: Monday, November 26, 2012 9:27 AM To: Eli Bendersky Cc: Benjamin Kramer; LLVM Developers Mailing List Subject: Re: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC Sorry for speaking too soon. It is missing from 3.2 which is the version I have been using. If it is already implemented than it is very good news. Thanks. -----Original Message----- From: Eli Bendersky [mailto:eliben at google.com] Sent: Monday, November 26, 2012 9:25 AM To: Manny Ko Cc: Albert Graef; Benjamin Kramer; LLVM Developers Mailing List Subject: Re: [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC On Mon, Nov 26, 2012 at 9:18 AM, Manny Ko <Manny.Ko at imgtec.com> wrote:> I know the old JIT pretty well but have only used the MCJIT from the client side. Most of my experience is on the x86backend though. > > Another critical feature missing from MCJIT is the JITEventListener. This is usually for supporting debuggers and profiling tools.What makes you say it is missing? Eli _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC
- [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC
- [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC
- [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC
- [LLVMdev] Removing old JIT CodeEmitters for ARM and PPC