Diego Novillo
2014-Apr-15 17:38 UTC
[LLVMdev] Announcement - A tool to convert Perf profiles to use with LLVM's sample profiler
I'm glad to announce the availability of the AutoFDO converter for LLVM. This tool reads a profile generated with Linux Perf ( perf.wiki.kernel.org) and converts it into a format readable with LLVM's sample-based profiler. The converter shares a significant amount of code with GCC's converter tool (authored by Dehao Chen), so we can support both compilers with it. At this time, I'm looking for volunteers to try out the tool and use it with their own code. There will be missing documentation, sharp edges and other issues typical of a tool that so far has had limited use. To download and build the converter: $ git clone github.com/google/autofdo.git autofdo $ cd autofdo && ./configure && make Note that you will need a compiler with C++11 support (either gcc 4.7+ or a recent Clang/LLVM). To use the converter, you need to use Perf with a kernel that supports LBR (any kernel post 3.4 should suffice) and LLVM from trunk (there is some support in the 3.4 release, but there were changes post 3.4 that are only present in trunk). The workflow is: $ clang++ -O2 -gline-tables-only code.cc -o code $ perf record -b ./code $ create_llvm_prof --binary=./code --out=code.prof $ clang++ -O2 -fprofile-sample-use=code.prof code.cc -o code The second version of 'code' should run faster than the first one. In theory. For issues with the tool itself, please use the issue tracker in github ( github.com/google/autofdo/issues). There is also a mailing list where you can ask questions about it ( groups.google.com/forum/#!forum/autofdo). Thanks. Diego. -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.llvm.org/pipermail/llvm-dev/attachments/20140415/1d38ca70/attachment.html>
Eric Christopher
2014-Apr-15 17:42 UTC
[LLVMdev] Announcement - A tool to convert Perf profiles to use with LLVM's sample profiler
Awesome! Thanks Diego! -eric On Tue, Apr 15, 2014 at 10:38 AM, Diego Novillo <dnovillo at google.com> wrote:> > I'm glad to announce the availability of the AutoFDO converter for LLVM. > This tool reads a profile generated with Linux Perf > (perf.wiki.kernel.org) and converts it into a format readable with > LLVM's sample-based profiler. The converter shares a significant amount of > code with GCC's converter tool (authored by Dehao Chen), so we can support > both compilers with it. > > At this time, I'm looking for volunteers to try out the tool and use it with > their own code. There will be missing documentation, sharp edges and other > issues typical of a tool that so far has had limited use. > > To download and build the converter: > > $ git clone github.com/google/autofdo.git autofdo > $ cd autofdo && ./configure && make > > Note that you will need a compiler with C++11 support (either gcc 4.7+ or a > recent Clang/LLVM). > > To use the converter, you need to use Perf with a kernel that supports LBR > (any kernel post 3.4 should suffice) and LLVM from trunk (there is some > support in the 3.4 release, but there were changes post 3.4 that are only > present in trunk). The workflow is: > > $ clang++ -O2 -gline-tables-only code.cc -o code > $ perf record -b ./code > $ create_llvm_prof --binary=./code --out=code.prof > $ clang++ -O2 -fprofile-sample-use=code.prof code.cc -o code > > The second version of 'code' should run faster than the first one. In > theory. > > For issues with the tool itself, please use the issue tracker in github > (github.com/google/autofdo/issues). There is also a mailing list > where you can ask questions about it > (groups.google.com/forum/#!forum/autofdo). > > > Thanks. Diego. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu llvm.cs.uiuc.edu > lists.cs.uiuc.edu/mailman/listinfo/llvmdev >