<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 26, 2014 at 11:49 AM,  <span dir="ltr"><<a href="mailto:betulb@codeaurora.org" target="_blank">betulb@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 10/24/14, 8:26 PM, <a href="mailto:betulb@codeaurora.org">betulb@codeaurora.org</a> wrote:<br>
>> Hi All,<br>
>><br>
>> We've been working on enhancing LLVM's instrumentation based profiling<br>
>> by<br>
>> adding indirect call target profiling support. Our goal is to add<br>
>> instrumentation around indirect call sites, so that we may track the<br>
>> frequently taken target addresses and their call frequencies.<br>
>><br>
>> The acquired data has uses in optimization of indirect function call<br>
>> heavy applications. Our initial findings show that using the profile<br>
>> data<br>
>> in optimizations would help improve the performance of some of the spec<br>
>> benchmarks notably.<br>
><br>
> Can you quantify "notably?" Also, do you profile on one set of inputs<br>
> and then test the optimization on another set of inputs (e.g., the test<br>
> and train runs)?<br>
<br>
</span>I can't give numbers, but we do collect data from train runs.<br>
<span class=""><br>
>>   We have a proof of concept implementation,  which we<br>
>> plan to put it up for review. However, I’d like to inquire prior if<br>
>> there<br>
>> are any plans or ongoing work done in the community to enable indirect<br>
>> call target profiling support or not. Please inform if cfe-dev is a<br>
>> better<br>
>> candidate for posting PGO related emails.<br>
><br>
> Interesting. I did not think SPEC had many programs with a lot of<br>
> indirect function calls.<br>
<br>
</span>Spec does have programs such as gcc, vortex and others which use indirect<br>
calls. I'm planning to have an RFC soon on the feature. I'll follow it w/<br>
the patch for the profiler changes for clang, llvm and compiler-rt.<br></blockquote><div><br></div><div>IIRC, gap is another C program benefit from this.</div><div><br></div><div>David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
> It would be interesting to see what your optimization would do on an<br>
> operating system kernel like FreeBSD or Linux. The VFS (file system)<br>
> layer uses function pointers a lot, but I'm not sure if it's the<br>
> dominant overhead.<br>
><br>
> Have you tried on C++ programs? They should be making heavy use of<br>
> indirect function calls as well.<br>
><br>
> If you make your software public, please let me know. Adapting your work<br>
> for kernel execution and trying it out on a kernel might be a nice<br>
> project for one of our students.<br>
><br>
> Regards,<br>
><br>
> John Criswell<br>
><br>
> --<br>
> John Criswell<br>
> Assistant Professor<br>
> Department of Computer Science, University of Rochester<br>
> <a href="http://www.cs.rochester.edu/u/criswell" target="_blank">http://www.cs.rochester.edu/u/criswell</a><br>
><br>
><br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div></div>