search for: llvmprof

Displaying 20 results from an estimated 64 matches for "llvmprof".

2009 Jul 22
4
[LLVMdev] Profiling in LLVM Patch Followup 1
...unbar 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...
2011 May 09
4
[LLVMdev] Path profiling command
...ode llvm-gcc –emit-llvm foo.c –c –o foo.bc 2. Insert Path Instruments opt –insert-path-profiling foo.bc –o foo_path.bc 3. Link with profile runtime library and make machine code llvm-ld –lprofile_rt –native foo_path.bc –o foo_path 4. Run program to get profile info ./foo_path –llvmprof-out 5. Create path count map from raw data opt –path-profile-loader-file =llvmprof.out –path-profile-loader foo_path.bc –o path.out 6. Load Profile info: llvm-prof path.out The error message from llvm-prof is: llvm-prof: Unkknown packet #5 Could you explain me the error message? Ar...
2009 Jul 23
0
[LLVMdev] Profiling in LLVM Patch Followup 1
...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 &gt...
2009 Jul 23
1
[LLVMdev] Profiling in LLVM Patch Followup 1
...nked.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...
2013 Sep 04
0
[LLVMdev] llvm-prof: Error opening 'llvmprof.out': Illegal seek
It is solved. The problem was trying to profile while the llvmprof.out has not been generated. Below, the sequence of instructions that worked with me $ clang -03 -emit-llvm hello.c -c -o hello.bc $ opt -insert-edge-profiling hello.bc -o hello.profile.bc $ llc hello.profile.bc -o hello.profile.s $ clang -o hello.profile hello.profile.s <LLVM_HOME_DIR>/b...
2010 Feb 25
3
[LLVMdev] Using Profile Information
Hi, How can I use profile information into my pass for performing some analysis. I tried something like: PassManager PassMgr = PassManager(); cl::opt<std::string> ProfileDataFile(cl::Positional, cl::desc("<llvmprof.out file>"), cl::Optional, cl::init("llvmprof.out")); PassMgr.add(createProfileLoaderPass(ProfileDataFile)); PassMgr.run(M); ProfileInfo *PI; PI = &getAnalysis<ProfileInfo>(); But this dosent seem to work. I want to perform profi...
2010 Feb 26
1
[LLVMdev] Using Profile Information
...virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<ProfileInfo>(); } bool runOnModule(Module &M) { PassManager PassMgr = PassManager(); cl::opt<std::string> ProfileDataFile(cl::Positional, cl::desc("<llvmprof.out file>"), cl::Optional, cl::init("llvmprof.out")); PassMgr.add(createProfileLoaderPass(ProfileDataFile)); PI = &getAnalysis<ProfileInfo>(); } }; } char MyAna::ID = 0; static RegisterPass<MyAna> X("my-ana", "...
2008 Nov 25
2
[LLVMdev] LLVM profiling
...sing the LLVM profiling tools. I run "opt -insert-function-profiling -insert-block-profiling input.bc -o output.bc" and an output file generates correctly. I have disassembled the output file and i can see that profiling code has been added. I then run "llvm-prof -A output.bc -o llvmprof.out". For some reason, nothing gets written to llvmprof.out; instead everything is written to the terminal window. At the very top, i get a message saying "function counts are not available" and every basic block has an execution count of 0. Am i doing something wrong or am i mis...
2009 Aug 05
0
[LLVMdev] Profiling in LLVM Patch Followup 1
...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 >...
2009 Aug 05
2
[LLVMdev] Profiling in LLVM Patch Followup 1
...nked.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...
2008 Nov 26
0
[LLVMdev] LLVM profiling
...file.pl for profiling? It works well. If you don't want to use it, there is at least some code in the script that should help you. BTW: I'm not sure if it is possible to instrument the bitcode with function and basic block code at the same time. But it should work sequential (data in llvmprof.out are accumulated after each run - not deleted) Ciao, Nico On Nov 25, 2008, at 9:39 PM, <rantao at umd.edu> <rantao at umd.edu> wrote: > Hello, > > My name is Rantao Chen and i am a student at the University of > Maryland. I am > currently doing some research for...
2012 Apr 18
2
[LLVMdev] how to get path profile information ?
...nd http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-February/012466.html After getting rid of some error messages, I was able to run the following commands: 1) opt -insert-path-profiling matmul.bc -o matmul.pp.bc 2) lli -load ../llvm_build/Debug+Asserts/lib/libprofile_rt.so matmul.pp.bc (generates llvmprof.out file) and as a last command: 3) opt -path-profile-loader -profile-info-file=llvmprof.out matmul.pp.bc -analyze which provides the following output: Printing analysis 'Load path profile information from file': Pass::print not implemented for pass: 'Path Profiling Information Loade...
2009 Nov 17
2
[LLVMdev] PassManager again...
...ception handling preparation' on Function 'main'... > 0x1c36c70 Required Analyses: Dominator Tree Construction, Dominance Frontier Construction > 0x1c36c70 Preserved Analyses: Dominator Tree Construction, Dominance Frontier Construction, Load profile information from llvmprof.out > -*- 'Exception handling preparation' is the last user of following pass instances. Free these instances > 0x1c301a0 Freeing Pass 'Exception handling preparation' on Function 'main'... > 0x1c301a0 Freeing Pass 'Dominance Frontier Construction&...
2013 Jan 13
4
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi, I am new to LLVM, and would like to write a dynamic profiler, say which prints out the load address of all the load instructions encountered in a program. >From what I could pick up, edge-profiler.cpp increments a counter dynamically which is somehow dumped onto llvmprof.out by profile.pl Could anyone explain me how this works? Can I instrument the code to dump out the load addresses or other such information to a file? Thanks!
2012 Apr 18
0
[LLVMdev] how to get path profile information ?
...nd http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-February/012466.html After getting rid of some error messages, I was able to run the following commands: 1) opt -insert-path-profiling matmul.bc -o matmul.pp.bc 2) lli -load ../llvm_build/Debug+Asserts/lib/libprofile_rt.so matmul.pp.bc (generates llvmprof.out file) and as a last command: 3) opt -path-profile-loader -profile-info-file=llvmprof.out matmul.pp.bc -analyze which provides the following output: Printing analysis 'Load path profile information from file': Pass::print not implemented for pass: 'Path Profiling Information Loade...
2009 Nov 04
0
[LLVMdev] Determine branch coverage information
...ile_rt.bca <executable>.2.bc -o <executable>.3.bc You can then create a native executable by $> llc <executable>.3.bc <executable>.s $> gcc -g <executable>.s -o <executable> When you run this executable (with your parameters) it creates a file called llvmprof.out which contains an edge profiling of your code. With $> llvm-prof -print-all-code <executable>.1.bc you can dump a bytecode file which is annotated with the recorded profiling information. If you do several runs of your executable all runs are combined in the single llvmprof.out and...
2010 Feb 25
0
[LLVMdev] Using Profile Information
Ah BTW... On 25.02.2010, at 17:33, ambika wrote: > ProfileInfo *PI; > PI = &getAnalysis<ProfileInfo>(); If this _in_ your pass, then you have to register the usage of this in the getAnalysisUsage() method: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<ProfileInfo>(); } Also you have to ensure that the pass you are using is executed right
2012 May 22
1
[LLVMdev] unable to decode llvmpro.out for path profiling
...ofiling file.bc -o file.ins.bc $ llc -march=x86 file.ins.bc -o file.ins.s $ gcc -I llvm2.9/runtime/PathProfling.c -I llvm2.9/runtime/CommonProfiling.c $ ./a.out This will give me path profile of of program in 'llvmpro.out' to decode this profile data I tried as: $ llvm-prof -A file.ins.bc llvmprof.out this gives error: llvm-prof: Unknown packet type #5! I also tried to decode the "llvmprof.out" manually and found that it dumps different profile data for different input files. For example for bzip2.c is dumps like this: * Pty = 1* * SavedArgslength=10* * SavedArgs=(null)* *...
2006 Nov 01
2
[LLVMdev] dump profiling data
Hi, sorry but I can't found where the profiling data (llvmprof.out[?]) is generated. Perhaps soembody has a hint for me? Thank you very much Nico
2009 Jul 14
0
[LLVMdev] Profiling in LLVM Patch Followup 1
...nction 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 WARNING: profile information is inconsistent with the current program! ===-------------------------------------------------------------------------=== LLVM profiling output for executions: 1. ./a.out ===-------------------------------------------------------------------------=== Function exe...