[LLVMdev] Profiling in LLVM Patch Followup 1

Daniel Dunbar daniel at zuster.org
Wed Aug 5 08:57:46 PDT 2009


Hi Andreas,

Sorry for the lag time...

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.

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. :)

 - Daniel



More information about the llvm-dev mailing list