Re: Q reg using prof/gprof to profile 4GL or ESQL/C programs
Posted in 1997
In article <6624me$efp@cssun.mathcs.emory.edu>, Jonathan Leffler <johnl@informix.com> writes >On Mon, 24 Nov 1997, Sujit Pal wrote: > >} Hi all >} >} I have a question regarding use of the Unix utilities prof or gprof to >} profile 4GL or ESQL/C programs. Adding either -p (for prof) or -G (for >} gprof, I am on HP-UX 10.01) to c4gl I get unsatisfied symbols from the >} linker. For example, if I say: >} >} c4gl -G myprog.4gl -o myprog.4ge >} >} I get: >} /usr/ccs/bin/ld: Unsatisfied symbols: >} shl_findsym (code) >} shl_load (code) These are look iike functions for shared library manipulation:- I know that on another platform dl_open opens a shared library dl_sym is used find a function in a librart (pass the name of the function in a string and receive a pointer to the function so you can call it). I would excpect shl_load and shl_findsym to be similar to the above. In which case you have to include the library for handling shared librarries (!) :- c4gl -G myprog.4gl -o myprog.4ge -ldl Try doing a man on shl_load and shl_sym. >} >} Any idea where I can find these functions? Is there a workaround? Or is >} there no way I can use prof or gprof to profile my 4GL or ESQL/C >} programs? > >Since the I4GL and ESQL/C libraries are not provided in a profiled format, there >isn't anything you can do with tools such as prof or gprof which require >special compilations to work. > >If you want to deal with this, you could consider Quantify from Rational >(http://www.rational.com) which works with object code as is. You wouldn't >get as accurate diagnostics on the internals of the Informix libraries as >you would with a debug build, but you would be able to do profiling. > >} BTW I tried to create a .c file using -phase argument of c4gl and then do >} a cc -G on the .c file, but the result was the same. > >Good; it should be the same. The problem is that the shared library was >not built for profiling, I'm pretty sure. The shl_xyz names are not part >of Informix's code... > >Yours, >Jonathan Leffler (johnl@informix.com) #include <witticism.h> > -- David Williams