Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: (OT) Profiling under gcc

Author: Vincent Diepeveen

Date: 16:11:42 05/22/02

Go up one level in this thread


On May 22, 2002 at 14:07:45, Sven Reichard wrote:

try something like:

-pg -O2

and then after compiling it run your program.

gmon.out gets created. You can view this profile file with

the 'gprof' profiler.


>Sorry about being off-topic, but this is probably the best (in terms of quality
>and speed) place to ask this. If you feel otherwise, please ignore.
>
>I'm using gcc (actually g++), versions 2.96 and 3.0.x, and I can't get profiling
>to work. I suspect that the 2.96 specs file is screwed up, but maybe it's me. I
>experimented with all sorts of combinations of the following switches: -g -ggdb
>-pg -p --static --profile, but to no avail. The best I get is a call count for
>every function, but the times don't match. No matter which program I run, gprof
>thinks it takes 10 ms, and spends all that time in one function, usually some
>mem allocation.
>
>I would be grateful for any hint (other than "download 3.1" :-) )
>
>Sven.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.