[LLVMdev] Profiling in LLVM Patch Followup 1

Andreas Neustifter e0325716 at student.tuwien.ac.at
Wed Jul 22 22:42:40 PDT 2009


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
>>> ~/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.
> 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
>>> support).
>> 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.
> 
> Andi

-- 
This email is signed, for more information see
http://web.student.tuwien.ac.at/~e0325716/gpg.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: profile.pl
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090723/5984e0ed/attachment.pl>


More information about the llvm-dev mailing list