PTU source-code handling needs work

PTU source-code handling needs work

Visual Studio has a couple of great features for ensuring that it displays the correct source code when debugging. PTU needs to adopt both of these.

The first feature that VS has is using a check-sum to determine whether a source file matches the one used to build a binary. The PDB sources the check-sum, the debugger calculates the check-sum and compares it, and this ensures that the user does not inadvertently debug using stale source code. PTU uses an inferior algorithm. It checks to see if the date on the source file is later than the date on the binary. This can fail for all sorts of reasons. In my case I have retrieved the source from Perforce and got the binaries from the build machine. Therefore it is normal and expected that the source file date might be later than the binary date, so PTU refuses to use the *correct* source file.

The second feature that VS (and windbg) have is source indexing. Our build machine runs source indexing as a final build step and this means that our PDBs contain full Perforce version-control information. VS or windbg can invoke p4.exe to retrieve the correct source file. Therefore I can step through our code even if my enlistment doesn't match the source.

Since PTU supports neither of these features it means that I cannot run PTU on binaries created by our build machines. Supporting both features would be ideal. Supporting just *one* of the features would let me profile binaries from our build machines.

I moved this from the VTune forums since this forum seems more appropriate.

2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Great suggestions. I would recommend you to report them on Intel VTune Amplifier XE forum.
PTU is a prototype product and it will never get all ofenhancements important for real production stuff.
AFAIK, on Windows we use source checksums (this is how msdia works) on Linux dates...
If we have another public release we will try to consider fixing this.

If you are interested in a well supported profiler, you would better switch to Intel VTune Amplifier XE.

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!