Profiling an application

I am trying to optimise the code I have developed. I have determined which
application is using all the CPU cycles using pidin. Now, I would like to
determine which subroutines are using the most CPU cycles. I am using “gcc”
to compile and create my objects, and I am using “ld” to link the objects
together with the Empress RDBMS libraries. I have tried using “-pg” to
generate output that can be used by gprof. This option works on the “gcc”
command line, but not on the “ld” command line.

Has anyone done profiling on QNX? If so, could you tell me how it was
accomplished?


Randy Aeberhardt
<raeberhardt@tantalus-systems.com>
<www.tantalus-systems.com>

Don’t use ld directly. If you absolutely have to, then
link a test program with gcc and see what is the difference.

As I recall, you just have to change crt1.o to mcrt1.o

Randy Aeberhardt <raeberhardt@tantalus-systems.com> wrote:

I am trying to optimise the code I have developed. I have determined which
application is using all the CPU cycles using pidin. Now, I would like to
determine which subroutines are using the most CPU cycles. I am using “gcc”
to compile and create my objects, and I am using “ld” to link the objects
together with the Empress RDBMS libraries. I have tried using “-pg” to
generate output that can be used by gprof. This option works on the “gcc”
command line, but not on the “ld” command line.

Has anyone done profiling on QNX? If so, could you tell me how it was
accomplished?


Randy Aeberhardt
raeberhardt@tantalus-systems.com
www.tantalus-systems.com


cburgess@qnx.com