<div dir="ltr">Done. The commits are contained in the osi_linux_fixes PR.<div><br></div><div>A couple more functions could also be inlined, but they would require a bit more substantial code juggling.</div><div><br></div><div>M.</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 1 Oct 2018 at 22:11, Brendan Dolan-Gavitt &lt;<a href="mailto:brendandg@nyu.edu">brendandg@nyu.edu</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sound okay and minimally invasive to me! Feel free to submit a PR.<br>
<br>
On Mon, Oct 1, 2018 at 11:38 AM, Manolis Stamatogiannakis<br>
&lt;<a href="mailto:mstamat@gmail.com" target="_blank">mstamat@gmail.com</a>&gt; wrote:<br>
&gt; I moved the implementation from common.c to common.h and marked them static<br>
&gt; inline.<br>
&gt;<br>
&gt; This seems to be the most portable approach for inlining<br>
&gt; (<a href="https://www.greenend.org.uk/rjk/tech/inline.html" rel="noreferrer" target="_blank">https://www.greenend.org.uk/rjk/tech/inline.html</a>).<br>
&gt;<br>
&gt; M.<br>
&gt;<br>
&gt; On Mon, 1 Oct 2018, 17:26 Brendan Dolan-Gavitt, &lt;<a href="mailto:brendandg@nyu.edu" target="_blank">brendandg@nyu.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; What&#39;s involved in inlining them? Simply marking them as &quot;inline&quot; in the<br>
&gt;&gt; header?<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Oct 1, 2018 at 9:39 AM, Manolis Stamatogiannakis<br>
&gt;&gt; &lt;<a href="mailto:mstamat@gmail.com" target="_blank">mstamat@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; I had this in the back of my mind for some time, but today I gave it a<br>
&gt;&gt; &gt; try<br>
&gt;&gt; &gt; to see the effects.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Many functions declared in panda/common.h are only thin wrappers around<br>
&gt;&gt; &gt; other functions. E.g.:<br>
&gt;&gt; &gt; int panda_physical_memory_rw(hwaddr addr, uint8_t *buf, int len, int<br>
&gt;&gt; &gt; is_write);<br>
&gt;&gt; &gt; hwaddr panda_virt_to_phys(CPUState *env, target_ulong addr);<br>
&gt;&gt; &gt; int panda_virtual_memory_rw(CPUState *env, target_ulong addr, uint8_t<br>
&gt;&gt; &gt; *buf,<br>
&gt;&gt; &gt; int len, int is_write);<br>
&gt;&gt; &gt; int panda_virtual_memory_read(CPUState *env, target_ulong addr, uint8_t<br>
&gt;&gt; &gt; *buf, int len);<br>
&gt;&gt; &gt; int panda_virtual_memory_write(CPUState *env, target_ulong addr, uint8_t<br>
&gt;&gt; &gt; *buf, int len);<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Is there any reason these have not been implemented as inlines?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; After inlining them (a 5&#39; task), my reply replay ran ~5% faster<br>
&gt;&gt; &gt; (141.7sec -&gt;<br>
&gt;&gt; &gt; 133.7sec). Not a huge improvement, but given the effort required for the<br>
&gt;&gt; &gt; change, one can&#39;t complain.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt; Manolis<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; panda-users mailing list<br>
&gt;&gt; &gt; <a href="mailto:panda-users@mit.edu" target="_blank">panda-users@mit.edu</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mit.edu_mailman_listinfo_panda-2Dusers&amp;d=DwICAg&amp;c=slrrB7dE8n7gBJbeO0g-IQ&amp;r=A4wu5Zmpus3hDmokNWeJTO0SLjrxguzCAxn30Hc-o48&amp;m=HSkp0HaNEn4JxGH47OBshPtVt8yawjH9TlZ7cW5xaH4&amp;s=Z6_aPLmeXQf7Lrg7FEBZtXPy2bSMUjaDmTTrkGjskP4&amp;e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mit.edu_mailman_listinfo_panda-2Dusers&amp;d=DwICAg&amp;c=slrrB7dE8n7gBJbeO0g-IQ&amp;r=A4wu5Zmpus3hDmokNWeJTO0SLjrxguzCAxn30Hc-o48&amp;m=HSkp0HaNEn4JxGH47OBshPtVt8yawjH9TlZ7cW5xaH4&amp;s=Z6_aPLmeXQf7Lrg7FEBZtXPy2bSMUjaDmTTrkGjskP4&amp;e=</a><br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Brendan Dolan-Gavitt<br>
&gt;&gt; Assistant Professor, Department of Computer Science and Engineering<br>
&gt;&gt; NYU Tandon School of Engineering<br>
<br>
<br>
<br>
-- <br>
Brendan Dolan-Gavitt<br>
Assistant Professor, Department of Computer Science and Engineering<br>
NYU Tandon School of Engineering<br>
</blockquote></div>