profiling problems

I’ve spent 20 minutes trying to profile an executable by passing the -p
flag to qcc. I get the number of calls to each function correctly but
execution times don’t gets calculated:

% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
0.00 0.00 0.00 1000 0.00 0.00 slowFunc
0.00 0.00 0.00 1 0.00 0.00 main

the slowFunc as the name suggets should take at least 0.45 seconds but
I always get zeros.

Should I pass particular parameters other than -p to qcc?
I’ve also tryed to use gcc -pg directly but the gprof output is the same.

Thanks


Wave++

You must run as root to get the profiled times if I remember
correctly.

Thomas

Wave++ <wavexx@apexmail.com> wrote:

I’ve spent 20 minutes trying to profile an executable by passing the -p
flag to qcc. I get the number of calls to each function correctly but
execution times don’t gets calculated:

% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
0.00 0.00 0.00 1000 0.00 0.00 slowFunc
0.00 0.00 0.00 1 0.00 0.00 main

the slowFunc as the name suggets should take at least 0.45 seconds but
I always get zeros.

Should I pass particular parameters other than -p to qcc?
I’ve also tryed to use gcc -pg directly but the gprof output is the same.

Thanks


Wave++

Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf

thomasf@qnx.com wrote:

You must run as root to get the profiled times if I remember
correctly.

Why I must be root? Profiling code use restricted resources?

Thomas

Wave++ <> wavexx@apexmail.com> > wrote:
I’ve spent 20 minutes trying to profile an executable by passing the -p
flag to qcc. I get the number of calls to each function correctly but
execution times don’t gets calculated:

% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
0.00 0.00 0.00 1000 0.00 0.00 slowFunc
0.00 0.00 0.00 1 0.00 0.00 main

the slowFunc as the name suggets should take at least 0.45 seconds but
I always get zeros.

Should I pass particular parameters other than -p to qcc?
I’ve also tryed to use gcc -pg directly but the gprof output is the same.

Thanks


Wave++

Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com > Neutrino Development Group
(613)-591-0931 > http://www.qnx.com/~thomasf


Wave++