<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://8842/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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 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><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></div></blockquote></div><br></div></body></html>