[LLVMdev] Profiling in LLVM Patch Followup 1

Daniel Dunbar daniel at zuster.org
Wed Aug 5 15:40:13 PDT 2009


On Wed, Aug 5, 2009 at 12:22 PM, Andreas
Neustifter<e0325716 at student.tuwien.ac.at> wrote:
>> On Wed, Jul 22, 2009 at 5:47 AM, Andreas
>> Neustifter<e0325716 at student.tuwien.ac.at> wrote:
>>>
>>> Hi Daniel!
>>>
>>> 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
>>>> ~/llvm/Debug/lib/profile_rt.dylib
>>>> 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.
>>
>> Okay, I checked this in morning, and it seems ok. There is one quirk
>> where the entry block to functions doesn't get a count, but I think
>> that is cleaned up in a later patch.
>
> Yes, there is tons of cleaning up in the later patches, all I know is that
> after the last patch I ran quite a few tests and this version runs very
> well.
>
>> Can you regenerate the next patch in your sequence verse TOT and send
>> it out again? Sorry, but I can't deal with all 8 at once -- I have to
>> take them one at a time. :)
>
> Of course! Here it comes, all new and shiny :-)

Thanks, applied as r78247. Next? :)

 - Daniel

>
> Andi
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>




More information about the llvm-dev mailing list