RE: [Open64-devel] whirl profiling (fwd)
Brought to you by:
ributzka,
suneeljain
From: Shukang Z. <zh...@cs...> - 2003-05-13 02:49:32
|
thanks Sun. I figured it out finally with Sun's help. It is needed to re-built instrumentation library libnstr.a in osprey1.0/targia64/libinstr. The following is what I did (I am using native ORC). src/Make.native doesn't build this library itself, so I have to build it manually, typing make in "osprey1.0/targia64/libinstr". I don't know if it's a problem in instrumentation/libinstr/Makefile.gbase, because initially an error "bstring.h missing" reported when compiling dump.cxx. I modified Makefile.gbase as: ------------------- $ diff Makefile.gbase.old Makefile.gbase 107c107,108 < $(BUILD_TOT)/common/com --- > $(BUILD_TOT)/common/com \ > $(BUILD_TOT)/targia64_ia64_nodebug/include ------------------- and the problem is fixed. Then invoke make install (or INSTALL.native) to install the new library (copying src/osprey1.0/targia64/libinstr/libinstr.a into usr/lib/gcc-lib/ia64-orc-linux/2.0/libinstr.a). Hope this helps who are doing profiling. Shukang Zhou Univ. of Pittsburgh On Mon, 12 May 2003, Chan, Sun C wrote: > I think you can do that. I think you can also do make install. > I usually build the instrumentation library in the targ_xxx directory, > Then just copy the file into the right lib directory. Before I do that, > I specify the exact instrumentation library that I just built to make > sure that the right thing is happening > Sun > > -----Original Message----- > From: Shukang Zhou [mailto:zh...@cs...] > Sent: Monday, May 12, 2003 2:41 PM > To: Chan, Sun C > Subject: RE: [Open64-devel] whirl profiling > > Sun, > > I use "make -f Make.native" and "INSTALL.native" from src directory, is > this correct way to rebuild instrument library? If not, can you tell me > how to rebuild it? Thanks. > > - Shukang > > On Mon, 12 May 2003, Chan, Sun C wrote: > > > You need to rebuild the instrumentation library, install that to see > the effect of your changes > > Sun > > > > > -----Original Message----- > > > From: Shukang Zhou [mailto:zh...@cs...] > > > Sent: Monday, May 12, 2003 1:06 PM > > > To: ope...@li... > > > Subject: [Open64-devel] whirl profiling > > > > > > > > > Hi > > > > > > I have a question about WHIRL profiling. I want to add some > > > instrumentation and collect some other profiling data, which should > be > > > very similar to the current ORC WHIRL profiling process. But I am > not > > > quite sure the current mechanism. > > > > > > The following is my understand, I appreciate if anybody can > > > point out if > > > it is correct, or give me some advice. > > > > > > For exampel, as in current ORC, to instrument branch (OPR_TRUEBR, > > > OPR_FALSEBR, OPR_IF), ORC calls Instrument_Branch(wn, id, block ) at > > > every branch whirl node in wn_instrument.cxx. Instrument_Branch() > > > generates a whirl node and intert it before the branch node. This > > > generated node is a part of the executable, and it is > > > supposed increment > > > a counter in profiling data file whenever it is called when the > > > executable is running. > > > > > > ------------------- > > > WN *instr = Gen_Call( BRANCH_INSTRUMENT_NAME, PU_Handle(), > > > WN_Intconst( MTYPE_I4, id ), taken ); > > > Instrument_Before( instr, wn, block ); > > > ------------------- > > > > > > There is: > > > #define BRANCH_INSTRUMENT_NAME "__profile_branch" > > > > > > My question is: > > > Where is code for the user's executable's action when it meets the > > > inserted function call ( Gen_Call( BRANCH_INSTRUMENT_NAME...))? > > > > > > Is it the one in profile_interface.cxx: > > > void > > > __profile_branch(void *pu_handle, INT32 branch_id, bool taken) ? > > > > > > I tried modifying __profile_branch() in profile_interface.cxx, but > > > orc behavior seems unchanged, and the directory tree also > > > seems unchanged, > > > no changes made to .o and .so files. > > > > > > So where is the source code for the user's application when > > > it meets the > > > instrumented code? > > > > > > Thanks. > > > > > > > > > Shukang Zhou > > > Univ. of Pittsburgh > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa > Clara > > > The only event dedicated to issues related to Linux > > > enterprise solutions > > > www.enterpriselinuxforum.com > > > > > > _______________________________________________ > > > Open64-devel mailing list > > > Ope...@li... > > > https://lists.sourceforge.net/lists/listinfo/open64-devel > > > > > > > > > ------------------------------------------------------- > > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > > The only event dedicated to issues related to Linux enterprise > solutions > > www.enterpriselinuxforum.com > > > > _______________________________________________ > > Open64-devel mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/open64-devel > > > |