Author: Tom Likens
Date: 10:25:49 07/20/03
Go up one level in this thread
On July 20, 2003 at 13:06:59, Omid David Tabibi wrote: >On July 20, 2003 at 13:02:42, Tom Likens wrote: > >>On July 20, 2003 at 12:05:32, Omid David Tabibi wrote: >> >>>On July 20, 2003 at 11:49:22, Dieter Buerssner wrote: >>> >>>>On July 20, 2003 at 11:44:12, Omid David Tabibi wrote: >>>> >>>>>On July 20, 2003 at 11:32:48, Tom Likens wrote: >>>>> >>>>>>On July 20, 2003 at 09:48:39, Omid David Tabibi wrote: >>>>>> >>>>>>[--snip--] >>>>>> >>>>>>>Use Intel VTune Performance Analyzer >>>>>>>http://www.intel.com/software/products/vtune/ , it has a trial period of one >>>>>>>month. Using the "function call" profiling, it provides you with a wealth of >>>>>>>information about the efficiency of your functions. I think the old rule of >>>>>>>80-20 applies also in computer chess: 80% of the time is spent in 20% of the >>>>>>>functions. Finding those 20% and optimizing them can be easier using a profiler. >>>>>> >>>>>>For some reason the new VTune 7.0 trial period is only 7 days (I've got >>>>>>six days left). I really like VTune. It is *very* powerful, but the >>>>>>learning curve can be steep. >>>>> >>>>>Well, I use only the function call feature of VTune, and it is quite simple to >>>>>use. I haven't tried other profiling options... >>>> >>>>If you are only (or mainly) interested in the times spent inside functions (and >>>>functions called inside those), you could try gprof in combination with gcc. I >>>>find it very easy to use, too. Basically I add -pg to the options for compiling >>>>and linking, run the executable, and then start gprof and look at the output. >>> >>>Yes, I've tried it, however VTune presents the data in a gaphical view so that >>>you can easily spot the bottlenecks. >>> >>>I assume that in addition to function time VTune provides wealth of other >>>information which can be of use in optimizing a chess engine. Maybe more >>>experienced VTune users coulod mention a few of the additional handy features. >> >>I'll share what I know. One thing, right off the bat, is that they have >>a Linux version. Unfortunately, the interface is not as nice as >>the Windows version, but I give them kudos for *any* Linux support. You can >>analyze a Linux run under the Windows interface which is convenient. >> >>A partial list of what VTune provides: >> >>Note, that for all of the below VTune provides detailed definitions >>and examples. It also has a very through online tutorial. >> >>1. Thread utilization, memory latency, priviledged processor execution, >> regular processor utilization, etc. All of these are graphed, which >> is very convenient for determining any aberrations in the program's >> execution. If you do see something odd, you can bracket off that >> region and drill down into it for more details. >> >>2. HotSpot analysis - You can sort this by clock ticks, branch >> mispredictions, CPI (clock ticks/instruction), instructions retired, >> branches retired etc. Everything can be displayed in either >> absolute values or percentages. >> >>3. Call graph analysis - lets the user trace function hierarchy, the time >> elapsed in each of the functions and their children. In addition, it will >> show you the critical timing paths, all in graphical form. >> >>4. Source Code analysis - VTune provides both C/C++ code analysis as well >> as assembly level (or both if you like). If you have the disassembled >> view of code enabled, it will also show you penalties in your code such >> as latency issues, partial register stalls, partial flag stalls etc. >> It will even highlight C-type issues. >> >>5. Memory issues - Info on 1st level cache misses, retires, 2nd level etc. >> Memory address dependencies etc. >> >>All of this can analyzed in relationship to specific *Intel* processors, >>for some reason the Athlon line of processors didn't seem to be listed :) >> >>The other *really* nice feature is the code coach. When VTune identifies >>a problem in your code it will provide advice and potential code >>transformations to improve the performance. All of this data can represented >>in a multitude of ways (more than I care to list). There are also a ton >>of other features but this gives you some idea of its capabilities. >> >>A book that gives a reasonable overview of the tool is... >> >>__The Software Optimization Cookbook__ by Intel Press >> >>http://www.intel.com/intelpress/swoptcookbook/ >> >>It's kind of one big advertisement for VTune, but that's OK since the >>tool really is worthwhile. > >Thanks for the info! One additional question: I manage to profile function calls >only when I compile the program in Debug mode (under MSVC++ 6), is there any way >to do that when compiling in Release mode? Absolutely, if you use the Intel compiler (which will can be used inside of Visual Studio instead of the Visual C++ compiler by just clicking a radio button under the Tools tab) you can enable the debugging info with the optimization switches. A 30-day evaluation of the Windows Intel compiler is available on their site. Unfortunately, (as far as I know) the Intel compiler doesn't seem to work very well with the Compuware products (BoundsChecker et'al). I couldn't get BoundsChecker's "Final Check" option to instrument the Intel executable and had to fall back to the Microsoft compiler. If anyone knows of a way to get BoundsChecker to instrument the Intel executable I'd be interested in hearing it. regards, --tom >> >>regards, >>--tom >> >>>> >>>>Regards, >>>>Dieter
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.