views:

48

answers:

2

I have used vtune several times in the past, usually without too much trouble. Unfortunately the gaps between each use are often so long that I forget some aspects of how to use it each time. I know that the line number and symbols information needs to be stored somehow. I thought that all that was required was to compile your exe with "Program Database" (/Zi)... but I have just done a sampling and found that vtune reports that there are no symbols available. Is there something I missed?

EDIT: problem solved - turns out it was a mistake in setting the working directory... so /Zi appears to be all that is required after all. I don't need to switch off optimization.

A: 

There are two options for debugging (check $> cl /?):

/Zi enable debugging information

/ZI enable Edit and Continue debug info

Make sure that you have .pdb and manifest file (if generated). It's not related but maybe turn off optimizations as well.

bua
A: 

Like Bua mentioned, you definitely need to be compiling with debugging information enabled. If the pdb files are in the same directory as the exe that you're profiling, then it should be able to find them. If not, you can also try explicitly adding the path to the pdbs in config -> options -> directories. alt text Add an item with your symbols directory. You might also want to add a symbol server and symbol cache, because then you'll get symbols for all of Microsoft's public binaries. The image above shows how to add a symbol server with a symbol cache at c:\websymbols. Generally, the format for a "symbol server" is a string of the form:

an example:

SRV*C:\MySymbolCache\*http://msdl.microsoft.com/download/symbol

of the form:

SRV * [CACHE] * [SYM SERVER PATH]

Hope this helps!

Matt