_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
 
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
 
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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top