Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Profiling

Author: James Robertson

Date: 17:50:54 04/17/99

Go up one level in this thread


On April 17, 1999 at 20:23:09, Bruce Moreland wrote:

>
>On April 17, 1999 at 18:43:46, James Robertson wrote:
>
>>On April 17, 1999 at 17:23:06, Bruce Moreland wrote:
>>
>>>
>>>On April 17, 1999 at 14:11:41, James Robertson wrote:
>>>
>>>>A absolutely cannot get the VC++ profile to work. A few months ago I posted a
>>>>message on this topic and no one could really help, but I'll try again. Maybe
>>>>somebody has some suggestions? Has ANYBODY gotton the VC++ profiler to work?
>>>>
>>>>James
>>>
>>>Yes.  I don't use the IDE, I use the tools from the command line.
>>>
>>>I compile with -Zi, which may or may not be necessary, and I link with /DEBUG
>>>/DEBUGTYPE:CV.  You *may* have to link with /FIXED:NO, I might be wrong about
>>>needing to do that, it may have only been necessary on the alpha.
>>>
>>>Here is the iimportant part of the batch macro that I used to run the profiler:
>>>
>>>prep /SF _VThink /om /ft ferret.exe
>>>if errorlevel 1 goto done
>>>profile ferret -s 3600 e:\foo.ci
>>>if errorlevel 1 goto done
>>>prep /m ferret
>>>if errorlevel 1 goto done
>>>plist ferret >pr
>>>:done
>>>
>>>My exe is called "ferret.exe".  My function that does all of the thinking is
>>>"_VThink".  I collect everything that happens under this function, but you can
>>>also run it so that it collects statistics for the app as a whole.  The "-s 3600
>>>e:\foo.ci" is my command line arguments, you would have to change this.
>>>
>>>The thing runs at maybe 1/60 of normal speed, so you can't just run it for a few
>>>seconds, although you could start out doing that of course, just to see that you
>>>are getting statistics.
>>>
>>>My output goes into a file called "pr".
>>>
>>>If this doesn't work, there are MSVC usenet groups.
>>>
>>>bruce
>>
>>Actually, it works. Thanks! Apparently I had the directories screwed completely
>>up. Unfortunately, "Prep" says that it cannot find my think function (named
>>"Think"). Any suggestions?
>>
>>James
>
>It is probably not really called "Think".  It is more likely it is called
>"_Think".  You can find out for sure by looking in the map file, which you can
>create by passing the "/MAP" flag to the linker.
>
>If you get too screwed up you can look in the MSVC doc and see how to profile
>the whole thing at once, you take out the "/SF <whatever>", I think, but I can't
>remember what you put there instead.
>
>bruce

You don't have to put anything.

I had already looked through the map file, and it is "Think". :( I am still able
to profile, but when I specify just a few modules I get wild counts. For
instance, it says my move generator takes up 81% of the search, but only had 4
hits. If I let it profile the whole thing, at least I get reasonable counts, but
a tremendous number of useless iostream functions are listed....

James



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.