[LLVMdev] Profiling in LLVM Patch Followup 1
daniel at zuster.org
Tue Jul 28 09:09:33 PDT 2009
Thanks for the clarifications, I'll take a closer look. My feeling was
that the first patch didn't change anything about the format, so I
shouldn't need to regenerate the profile info, but maybe I made a
On Wed, Jul 22, 2009 at 10:42 PM, Andreas
Neustifter<e0325716 at student.tuwien.ac.at> wrote:
> Sorry, forgot attachment.
> On 23.07.09 07:40), Andreas Neustifter wrote:
>> Good Morning.
>> On 22.07.09 14:47), Andreas Neustifter wrote:
>>> Daniel Dunbar wrote:
>>>> I merged in my changes to your patch, which results in the attached
>>>> patch. There may be some missed merge errors. The main problem I have
>>>> with the rest of this patch is that it causes a regression in
>>>> llvm-prof's behavior. I tried running edge profiling on the
>>>> MultiSource/Applications/aha benchmark in the llvm test-suite, and
>>>> llvm-prof no longer prints any function information:
>>>> ddunbar at giles:aha$ opt -f Output/aha.linked.rbc -insert-edge-profiling -o foo.bc
>>>> ddunbar at giles:aha$ llc foo.bc -o - | gcc -x assembler - -x none
>>>> ddunbar at giles:aha$ ./a.out
>>>> ddunbar at giles:aha$ ~/llvm/Release/bin/llvm-prof foo.bc llvmprof.out
>>> First of all, you have to use the original bytecode file
>>> (Output/aha.linked.bc) for use with llvm-prof like this:
>>> $ ~/llvm/Release/bin/llvm-prof Output/aha.linked.bc llvmprof.out
>>> Also you have to check that llvmprof.out is deleted between tests
>>> otherwise the figures are accumulated counts from several runs.
>> What I also use to make things easier is the utils/profile.pl script, it
>> automates the process of instrumenting running and profiling with
>> llvm-prof. I have attached a version that produces more output and
>> removes the llvmprof.out file in between runs automatically.
>>>> The basic block counts also differ, sometimes very significantly, but
>>>> I'm not sure if this is to be expected. Can you investigate both of
>>>> these differences on some real example? I'd like to keep everything
>>>> working at least as good as it was before (modulo some other features,
>>>> like function counts or basic block traces, which we don't really
>>> I have to compare the revisions 75622 and 75625 to check what's going on
>>> there, but maybe its also due to undeleted llvmprof.out files?
>> I have compared the revisions now and apart from the passes being
>> executed faster (according to -time-passes) there is no difference in
>> the llvm-prof output.
> This email is signed, for more information see
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev