<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://2987/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Danil,</div><div><br></div><div>I'm not sure what additional information you're looking for. The logic you're wanting to add belongs in the memory manager of the client application, not the MCJIT. For example, in the case of lli, it should be part of the TrivialMemoryManager there.</div><div><br></div><div>Note that the old JIT did this differently, as it assumed it wasn't ever going to deal with a remote target. It could, and did, make lots of assumptions about that. As such, be wary of using its code paths as a guide for how the MCJIT should work.</div><div><br></div><div>-Jim</div><div><br></div><br><div><div>On May 14, 2012, at 9:49 AM, Danil Malyshev <<a href="mailto:dmalyshev@accesssoftek.com">dmalyshev@accesssoftek.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div ocsi="x" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="font-family: Tahoma; direction: ltr; font-size: x-small; "><div>Ping.</div><div><font face="tahoma"></font> </div><div><font face="tahoma"></font> </div><div><font face="tahoma">Regards,</font></div><div><font face="tahoma">Danil</font></div><div> </div><div dir="ltr"><font size="2" face="Tahoma"></font> </div><div id="divRpF115907" style="direction: ltr; "><hr tabindex="-1"><font size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a> [<a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a>] On Behalf Of Danil Malyshev [<a href="mailto:dmalyshev@accesssoftek.com">dmalyshev@accesssoftek.com</a>]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, May 08, 2012 5:50 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Jim Grosbach<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm-commits] [llvm] [Patch] Add RuntimeDyld.invalidateEmittedSectionsCache()<br></font><br></div><div></div><div><div style="font-family: Tahoma; direction: ltr; font-size: x-small; "><div>Hi Jim,</div><div><font face="tahoma"></font> </div><div>Yes, I agree that it's client application job. But the MCJIT hard linked with hosted platform. It loads hosted library, it executes code on the host machine and etc. JIT and MCJIT was hidden from appication by EngineBuilder, their memory managers hidden too. The JIT does it for own code, I believe the MCJIT should do it too.</div><div>The remote JIT will not be based by MCJIT, it's will be something new, with own memory manager inherited from RTDyldMemoryManager and in this case the remote client application will be cares about their cache.<br></div><div><font face="tahoma"></font> </div><div><font face="tahoma">Regards,</font></div><div><font face="tahoma">Danil</font></div><div dir="ltr"><font size="2" face="Tahoma"></font> </div><div id="divRpF163767" style="direction: ltr; "><hr tabindex="-1"><font size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span>Jim Grosbach [<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, May 08, 2012 4:24 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Danil Malyshev<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm-commits] [llvm] [Patch] Add RuntimeDyld.invalidateEmittedSectionsCache()<br></font><br></div><div></div><div>Hi Danil,<div><br></div><div>This is closer, but not quite. By the client's memory manager, I mean the application. This functionality shouldn't be in the core MC-JIT at all. For example, it belongs in the TrivialMemoryManager in llvm-rtdyld.cpp. That includes keeping the list of allocations and sections. Consider a remote client. The MemoryBlock map you're creating here will refer to the local copy, not the memory that's actually on the target where it'll be executed. The code that knows how to map between the two is the client's memory manager, so that's where this logic belongs as well.</div><div><br></div><div>-Jim</div><div><br><div><div>On May 8, 2012, at 4:09 PM, Danil Malyshev <<a href="mailto:dmalyshev@accesssoftek.com">dmalyshev@accesssoftek.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Tahoma; direction: ltr; font-size: x-small; "><div><div>Hi,</div><div><font face="tahoma"></font> </div><div><font face="tahoma">Please review changed the patch.</font></div><div><font face="tahoma">This patch adds finalize() to RTDyldMemoryManager, and implements it for MCJITMemoryManager as invalidate instruction cache.</font></div><div><font face="tahoma"></font> </div><div> </div><div><font face="tahoma">Regards,</font></div><div><font face="tahoma">Danil</font></div><div><font face="tahoma"></font> </div></div><div dir="ltr"><font size="2" face="Tahoma"></font> </div><div id="divRpF625534" style="direction: ltr; "><hr tabindex="-1"><font size="2" face="Tahoma"><b>From:</b><span class="Apple-converted-space"> </span>Jim Grosbach [<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>]<br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, May 07, 2012 4:16 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Danil Malyshev<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [llvm-commits] [llvm] [Patch] Add RuntimeDyld.invalidateEmittedSectionsCache()<br></font><br></div><div></div><div><div>Hi Danil,</div><div><br></div>That's not the RuntimeDyld's job. That functionality belongs in elsewhere, probably in the client's memory manager implementation where it's hooked into copying the compiled code into the target's address space. For a hosted platform, something similar just w/o the copying.<div><br></div><div>-Jim</div><div><br><div><div><div>On May 7, 2012, at 2:09 PM, Danil Malyshev <<a href="mailto:dmalyshev@accesssoftek.com">dmalyshev@accesssoftek.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Tahoma; direction: ltr; font-size: x-small; "><div style="margin-top: 0px; margin-bottom: 0px; ">Hi everyone,</div><p style="margin-top: 0px; margin-bottom: 0px; "> </p><div style="margin-top: 0px; margin-bottom: 0px; ">Please review attached the patch.</div><div style="margin-top: 0px; margin-bottom: 0px; ">This patch adds invalidateEmmittedSectionsCache() to the RuntimeDyld and uses it in the MCJIT after resolve relocations.<br>The MCJIT works unstable on the ARM platforms without it.<br>This patch haven't any tests because I want to commit the common ExecutionEngine/MCJIT tests after attached the patch will be committed. These tests will cover it.<br></div><div></div><div dir="ltr"><font size="2" face="Tahoma">Regards,</font></div><div dir="ltr"><font face="tahoma">Danil</font></div></div><span><RuntimeDyld_invalidateEmittedSectionsCache-01.patch></span>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote></div><br></div></div></div></div><span><RTDyldMemoryManager_finalize-01.patch></span></blockquote></div></div></div></div></div></div></div></blockquote></div><br></body></html>