I am trying to profile two different versions of the same .net4 c# app:

C:\\SolutionA\\myexe.exe
C:\\SolutionB\\myexe.exe

I have two instances of performance profiler open at once – version 6.2.0.13. I’m using detailed line-level profiling and loading previously saved profiler results in each instance.

When I look at the codeview in the second instance I see three oddities:
1. The hit count for a given line of code is different in the two instances – but I know it is called the same number of times in each case. The second instance usually – but not always – shows double the count I would expect.
2. The method drop-down at the top of the codeview shows two entries for each method in the class
3. The code view shows the wrong code – it is showing code from the first instance of the app.

I’m navigating to the method of interest by the same method in each instance of ANTS, namely switch to the methods grid, using the find box just above codeview to locate my class and then click on the required method in the methods grid.

If I close both instances and reopen just one then the profiler results appear as I expect.

What’s going on here? This is making life rather tricky at the moment and rather reduces my confidence in the results I'm being shown.

Unfortunately we have no way to diagnose or prove/disprove any of the issues you see, but I assume that MyExe is always using the same source code, so perhaps the source code being picked up in one case has been modified by a new build. Unless you use the option to save the source code into the results, Profiler is going to load it from disk regardless of wheter or not that version of the source code applies to a newer or older build.

Don't know of any documented issue of this and there isn't any useful troubleshooting information in the product. I tried to reproduce the behavior but I cannot. Can you try using Process Explorer to monitor Performance Profiler and make absolutely sure it's not trying to load stale source code from disk?