<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 5:11 AM, Sami Liedes <span dir="ltr"><<a href="mailto:sami.liedes@iki.fi" target="_blank">sami.liedes@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jan 05, 2015 at 04:36:32PM -0800, Sean Silva wrote:<br>
> I'm wondering how much we can improve on that 300 executions/second. My<br>
> guess is that a lot of time is constant-overhead startup code. A back of<br>
> the envelope calculation:<br>
><br>
> 300 executions/second * 300 bytes/source file (small files) ~ 100 000<br>
> bytes/second.<br>
> 4 cores * 3 giga instructions/second ~ 10 000 000 000 instructions/second.<br>
><br>
> So that's about 1 million instructions per byte, which seems excessive.<br>
<br>
</span>One thing that clearly does cause an overhead is the instrumentation<br>
done by afl to get the edge coverage. It could probably also be made<br>
more efficient by turning it into an LLVM pass instead of the current<br>
textual search-and-replace on .s files (never before I've seen<br>
instrumentation done that way), since now it among other things always<br>
saves and restores registers at every conditional branch and function<br>
entry point[1] (plus a few non-conditionals "due to the simplicity of<br>
afl-as" [2]).<br></blockquote><div><br></div><div>Do you have any idea how to quantify the overhead? Like what is the time difference between an instrumented and non-instrumented clang?</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
        Sami<br>
<br>
<br>
[1] <a href="https://github.com/mcarpenter/afl/blob/master/afl-as.h#L115" target="_blank">https://github.com/mcarpenter/afl/blob/master/afl-as.h#L115</a><br>
[2] <a href="https://groups.google.com/d/msg/afl-users/9swBIFHTmpo/P_PNdubKpQwJ" target="_blank">https://groups.google.com/d/msg/afl-users/9swBIFHTmpo/P_PNdubKpQwJ</a><br>
</blockquote></div><br></div></div>