Runtime Statistics

Hello All,

What progs are available that will analyze a program and tell me where the
slowdowns are occuring? This is C code on x86 platform using 6.1.a.

TIA,

Jim

You’ll probably want to use profiling. If you compile your app with qcc and
give it a -p flag (-pg if using gcc) and then run it, you’ll get a gmon.out
file. If you then run gprof on the executable, it will load gmon.out and
print out oodles of information including a call graph and timing
statistics. Note however that some of the timing routines are privileged
calls so to obtain proper timing info you’ll need to run the app as root.

cheers,

Kris
“Jim Lambert” <jlambert@futurex.com> wrote in message
news:a5oe87$5ae$1@inn.qnx.com

Hello All,

What progs are available that will analyze a program and tell me where the
slowdowns are occuring? This is C code on x86 platform using 6.1.a.

TIA,

Jim

Hmmm? I compile using gcc so I set the -pg flag in my cflags. Compiled and
ran the app as root and no gmon.out file was created.

Jim

“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:a5ohf1$qip$1@nntp.qnx.com

You’ll probably want to use profiling. If you compile your app with qcc
and
give it a -p flag (-pg if using gcc) and then run it, you’ll get a
gmon.out
file. If you then run gprof on the executable, it will load gmon.out and
print out oodles of information including a call graph and timing
statistics. Note however that some of the timing routines are privileged
calls so to obtain proper timing info you’ll need to run the app as root.

cheers,

Kris
“Jim Lambert” <> jlambert@futurex.com> > wrote in message
news:a5oe87$5ae$> 1@inn.qnx.com> …
Hello All,

What progs are available that will analyze a program and tell me where
the
slowdowns are occuring? This is C code on x86 platform using 6.1.a.

TIA,

Jim
\

qcc with option -p works.
ex:
qcc -p -o test test.cpp
Cheers.

“Jim Lambert” <jlambert@futurex.com> wrote in message
news:a5p22i$ibf$1@inn.qnx.com
Hmmm? I compile using gcc so I set the -pg flag in my cflags. Compiled and
ran the app as root and no gmon.out file was created.

Jim

“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:a5ohf1$qip$1@nntp.qnx.com

You’ll probably want to use profiling. If you compile your app with qcc
and
give it a -p flag (-pg if using gcc) and then run it, you’ll get a
gmon.out
file. If you then run gprof on the executable, it will load gmon.out and
print out oodles of information including a call graph and timing
statistics. Note however that some of the timing routines are privileged
calls so to obtain proper timing info you’ll need to run the app as root.

cheers,

Kris
“Jim Lambert” <> jlambert@futurex.com> > wrote in message
news:a5oe87$5ae$> 1@inn.qnx.com> …
Hello All,

What progs are available that will analyze a program and tell me where
the
slowdowns are occuring? This is C code on x86 platform using 6.1.a.

TIA,

Jim
\

I believe this is a problem with the gcc specs files. We don’t do a very
good job of keeping them up to date because qcc is the official solution we
advocate. You’ll probably find (if you turn up the verbosity) that gcc
with -pg is not properly linking in the right startup code (mcrt1.o) in with
the final executable.

cheers,

Kris

“Jim Lambert” <jlambert@futurex.com> wrote in message
news:a5p22i$ibf$1@inn.qnx.com

Hmmm? I compile using gcc so I set the -pg flag in my cflags. Compiled
and
ran the app as root and no gmon.out file was created.

Jim

“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:a5ohf1$qip$> 1@nntp.qnx.com> …
You’ll probably want to use profiling. If you compile your app with qcc
and
give it a -p flag (-pg if using gcc) and then run it, you’ll get a
gmon.out
file. If you then run gprof on the executable, it will load gmon.out
and
print out oodles of information including a call graph and timing
statistics. Note however that some of the timing routines are
privileged
calls so to obtain proper timing info you’ll need to run the app as
root.

cheers,

Kris
“Jim Lambert” <> jlambert@futurex.com> > wrote in message
news:a5oe87$5ae$> 1@inn.qnx.com> …
Hello All,

What progs are available that will analyze a program and tell me where
the
slowdowns are occuring? This is C code on x86 platform using 6.1.a.

TIA,

Jim


\

We have detected problems with creating the gmon.out file.
Can you desribe the target configuration and the file systems in use?
If you are building from an RTP development system, does the .out file get
created when the test code is run on it?


“Jim Lambert” <jlambert@futurex.com> wrote in message
news:a5p22i$ibf$1@inn.qnx.com

Hmmm? I compile using gcc so I set the -pg flag in my cflags. Compiled
and
ran the app as root and no gmon.out file was created.

Jim

“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:a5ohf1$qip$> 1@nntp.qnx.com> …
You’ll probably want to use profiling. If you compile your app with qcc
and
give it a -p flag (-pg if using gcc) and then run it, you’ll get a
gmon.out
file. If you then run gprof on the executable, it will load gmon.out
and
print out oodles of information including a call graph and timing
statistics. Note however that some of the timing routines are
privileged
calls so to obtain proper timing info you’ll need to run the app as
root.

cheers,

Kris
“Jim Lambert” <> jlambert@futurex.com> > wrote in message
news:a5oe87$5ae$> 1@inn.qnx.com> …
Hello All,

What progs are available that will analyze a program and tell me where
the
slowdowns are occuring? This is C code on x86 platform using 6.1.a.

TIA,

Jim


\