_mcount_private


H

Hans Jespersen

I am profiling a c++ chess program with gprof, and it seems that the the
function that uses most of the time is called "_mcount_private".
A Google search only revealed that others also see it on top of their
profiles, nothing about the nature of the function.
I assume that it is an internal gpp function or an operating system
function, but I need to know what it does to judge if it is fair that it
takes up 15% of my codes total execution time.

Can somebody please help me out here?

Thanks,

Hans
 
Ad

Advertisements

I

Ian Collins

I am profiling a c++ chess program with gprof, and it seems that the the
function that uses most of the time is called "_mcount_private".
A Google search only revealed that others also see it on top of their
profiles, nothing about the nature of the function.

Just a wild guess without looking at the source, but that looks like it
could be a profiler internal function.
 
G

gwowen

I am profiling a c++ chess program with gprof, and it seems that the the
function that uses most of the time is called "_mcount_private".
A Google search only revealed that others also see it on top of their
profiles, nothing about the nature of the function.
I assume that it is an internal gpp function or an operating system
function, but I need to know what it does to judge if it is fair that it
takes up 15% of my codes total execution time.

mcount() and associated routines are part of the profiler itself -
they're the reason the code runs slower under the profiler, but you
should ignore them when looking for things to optimize.

http://sourceware.org/binutils/docs/gprof/Implementation.html
 
Ad

Advertisements

H

Hans Jespersen

Ah - that explains.

I can see that if I had just used Google to search for "_mcount" instead of
"_mcount_private", I would have got the answer right away.

Thank you very much for your help

Hans
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top