Unfortunately profiling does not work on gcc + Cygwin + Windows. There is never any routine that takes more than 0%...bob wrote: I've not seen a C compiler that doesn't have this option included. But you can always download gcc or the windows version of it and use it for profiling, even if you don't want to use it for the "production compile".
perft and nps speed
Moderators: hgm, Rebel, chrisw
-
- Posts: 28123
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: perft and nps speed
Re: perft and nps speed
I was just about to mention the VS Performance Tools with which I am, sort of, profiling.
So if you use some version of Visual C++ you could try the following:
Download and install vs_profiler_x86.exe.
http://www.microsoft.com/downloads/deta ... laylang=en
Add [VS Path]\Team Tools\Performance Tools to your PATH.
Now you should be able to profile your engine by
I believe the console should run with admin rights. If all works, you can use the tool VSPTree to represent your profiling data. The tool should also be able start the profiler for you.
http://code.google.com/p/vsptree/
So why am I saying things like "sort of" and "x should do y"? Well, these Performance Tools are kind of difficult to use. E.g. I profiled my engine just the other day, after having worked around some issues with the admin rights. It worked. Now I want to do it again, just to write it down neat step by step for you and I can't manage to start the thing...
Anyway, if you want to give it a try, it'd be nice of you to report back in case you managed to run it properly.
If it doesn't work, you could also try this profiler:
http://www.codersnotes.com/sleepy. It creates the same output as the Performance Tools, but you'll have to attach an already running engine process.
So if you use some version of Visual C++ you could try the following:
Download and install vs_profiler_x86.exe.
http://www.microsoft.com/downloads/deta ... laylang=en
Add [VS Path]\Team Tools\Performance Tools to your PATH.
Now you should be able to profile your engine by
Code: Select all
VsPerfCmd.exe /start:sample /output:"[PROFILE_INFO_PATH]/name.vsp" /launch:"Engine.exe"
http://code.google.com/p/vsptree/
So why am I saying things like "sort of" and "x should do y"? Well, these Performance Tools are kind of difficult to use. E.g. I profiled my engine just the other day, after having worked around some issues with the admin rights. It worked. Now I want to do it again, just to write it down neat step by step for you and I can't manage to start the thing...
Anyway, if you want to give it a try, it'd be nice of you to report back in case you managed to run it properly.
If it doesn't work, you could also try this profiler:
http://www.codersnotes.com/sleepy. It creates the same output as the Performance Tools, but you'll have to attach an already running engine process.
-
- Posts: 951
- Joined: Mon Jan 05, 2009 7:40 pm
- Location: Germany
- Full name: Engin Üstün
Re: perft and nps speed
hello Dan !,
gprof is an command line profiler for GNU C right ?
i am using only Visual C++ 2008 but i cant find any profiler in the IDE to look wich parts of the programm how much using time.
if i can download other free profiler who i can use it for testing, i tried VTune a couple times ago, but this is evalutionware and i dont much understand what to do then to improve my code.
a free visual profiler may help me.
gprof is an command line profiler for GNU C right ?
i am using only Visual C++ 2008 but i cant find any profiler in the IDE to look wich parts of the programm how much using time.
if i can download other free profiler who i can use it for testing, i tried VTune a couple times ago, but this is evalutionware and i dont much understand what to do then to improve my code.
a free visual profiler may help me.
-
- Posts: 951
- Joined: Mon Jan 05, 2009 7:40 pm
- Location: Germany
- Full name: Engin Üstün
Re: perft and nps speed
Hello Oliver!
many thanks for you hint of and help
i tested very sleepy and its work ! but i dont undestand now what meaning it with exklusiv and inklusive and wich part of programm consumed much time.
i am now asleep in my code
many thanks for you hint of and help
i tested very sleepy and its work ! but i dont undestand now what meaning it with exklusiv and inklusive and wich part of programm consumed much time.
i am now asleep in my code
-
- Posts: 951
- Joined: Mon Jan 05, 2009 7:40 pm
- Location: Germany
- Full name: Engin Üstün
Re: perft and nps speed
and nice to meet you here online since long time last in mainz
congratulate your Kurt engine is now public !
congratulate your Kurt engine is now public !
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: perft and nps speed
If you are using an AMD processor, you can try AMD codeanalyst.
http://developer.amd.com/cpu/CodeAnalys ... fault.aspx
It might work on Intel processors but I haven't tried it.
http://developer.amd.com/cpu/CodeAnalys ... fault.aspx
It might work on Intel processors but I haven't tried it.
Re: perft and nps speed
Yeah, the single half point my Kurt collected at Mainz back then was against Tornado... but I guess I'll have to play catch-up now... I've been away from chess programming for almost two and a half years now and I'm just getting into it again...Engin wrote:Hello Oliver!
many thanks for you hint of and help
i tested very sleepy and its work ! but i dont undestand now what meaning it with exklusiv and inklusive and wich part of programm consumed much time.
i am now asleep in my code
The thing with exclusive/inclusive is as follows:
Let's assume the profiler halts your engine every x seconds. It records which function is being executed at that very time. The percentages that results of this are the "exclusive" data you're getting. Moreover, the profiler also examines the call stack of these functions, and logs the uppermost function under "inclusive". Thus you should expect something like say "UCILoop()" or "Search()" to show up at almost 100% here.