John Criswell
2013-Jan-22 16:29 UTC
[LLVMdev] Dynamic Profiling - Instrumentation basic query
On 1/13/13 11:06 PM, Criswell, John T wrote:> There is code that does this for older versions of LLVM. I believe it is in the giri project in the LLVM SVN repository. I can look into more details when I get back from vacation. Swarup may also be able to provide information on the giri code.I took a quick look, and the dynamic slicing code doesn't appear to be checked into the giri project yet like I had originally thought. We can, however, give you a copy of the code if you would like. However, having looked at other emails in the thread, I'm not sure if it's what you want. Our dynamic slicing code only instruments LLVM IR loads and stores; it does not instrument memory accesses caused by stack spill slots, function argument setup, etc. (these are only visible at the code generation IR level). If instrumenting LLVM IR loads and stores suffices, and if you'd like a copy of our code, please let me know. -- John T.> > -- John T. > > ________________________________________ > From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Silky Arora [silkyar at umich.edu] > Sent: Saturday, January 12, 2013 10:28 PM > To: llvmdev at cs.uiuc.edu > Subject: [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! > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Hi John, Thanks for getting back to me. I was able to instrument the memory instructions. I'll reach out to you if I've issues. I really appreciate the help. Sincerely, Silky -- View this message in context: http://llvm.1065342.n5.nabble.com/Dynamic-Profiling-Instrumentation-basic-query-tp53611p54042.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Sahoo, Swarup Kumar
2013-Jan-22 18:07 UTC
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi John and Silky, I can see a copy of 'giri' slicing project branch here http://llvm.org/viewvc/llvm-project/giri/. Though it may be little older, it will work I think. You can look at the code to see how we do the instrumentation. Thanks, Swarup. ________________________________________ From: John Criswell [criswell at illinois.edu] Sent: Tuesday, January 22, 2013 10:29 AM To: Silky Arora; llvmdev at cs.uiuc.edu; Sahoo, Swarup Kumar Subject: Re: [LLVMdev] Dynamic Profiling - Instrumentation basic query On 1/13/13 11:06 PM, Criswell, John T wrote:> There is code that does this for older versions of LLVM. I believe it is in the giri project in the LLVM SVN repository. I can look into more details when I get back from vacation. Swarup may also be able to provide information on the giri code.I took a quick look, and the dynamic slicing code doesn't appear to be checked into the giri project yet like I had originally thought. We can, however, give you a copy of the code if you would like. However, having looked at other emails in the thread, I'm not sure if it's what you want. Our dynamic slicing code only instruments LLVM IR loads and stores; it does not instrument memory accesses caused by stack spill slots, function argument setup, etc. (these are only visible at the code generation IR level). If instrumenting LLVM IR loads and stores suffices, and if you'd like a copy of our code, please let me know. -- John T.> > -- John T. > > ________________________________________ > From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Silky Arora [silkyar at umich.edu] > Sent: Saturday, January 12, 2013 10:28 PM > To: llvmdev at cs.uiuc.edu > Subject: [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! > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
John Criswell
2013-Jan-22 18:12 UTC
[LLVMdev] Dynamic Profiling - Instrumentation basic query
On 1/22/13 12:07 PM, Sahoo, Swarup Kumar wrote:> Hi John and Silky, > > I can see a copy of 'giri' slicing project branch here http://llvm.org/viewvc/llvm-project/giri/. Though it may be little older, it will work I think. You can look at the code to see how we do the instrumentation.The giri project is supposed to contain both the static slicing code and the dynamic slicing code. It looks like all it contains at present is the static slicing code. At some point, the dynamic slicing code needs to be integrated into it. -- John T.> > Thanks, > Swarup. > > ________________________________________ > From: John Criswell [criswell at illinois.edu] > Sent: Tuesday, January 22, 2013 10:29 AM > To: Silky Arora; llvmdev at cs.uiuc.edu; Sahoo, Swarup Kumar > Subject: Re: [LLVMdev] Dynamic Profiling - Instrumentation basic query > > On 1/13/13 11:06 PM, Criswell, John T wrote: >> There is code that does this for older versions of LLVM. I believe it is in the giri project in the LLVM SVN repository. I can look into more details when I get back from vacation. Swarup may also be able to provide information on the giri code. > I took a quick look, and the dynamic slicing code doesn't appear to be > checked into the giri project yet like I had originally thought. > > We can, however, give you a copy of the code if you would like. However, > having looked at other emails in the thread, I'm not sure if it's what > you want. Our dynamic slicing code only instruments LLVM IR loads and > stores; it does not instrument memory accesses caused by stack spill > slots, function argument setup, etc. (these are only visible at the code > generation IR level). > > If instrumenting LLVM IR loads and stores suffices, and if you'd like a > copy of our code, please let me know. > > -- John T. > > >> -- John T. >> >> ________________________________________ >> From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Silky Arora [silkyar at umich.edu] >> Sent: Saturday, January 12, 2013 10:28 PM >> To: llvmdev at cs.uiuc.edu >> Subject: [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! >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Apparently Analagous Threads
- [LLVMdev] Dynamic Profiling - Instrumentation basic query
- [LLVMdev] Dynamic Profiling - Instrumentation basic query
- [LLVMdev] Dynamic Profiling - Instrumentation basic query
- [LLVMdev] Dynamic Profiling - Instrumentation basic query
- [LLVMdev] Dynamic Profiling - Instrumentation basic query