Red Gate forums :: View topic - Why does it thinks that the source file was modified?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 5
ANTS Performance Profiler 5 forum

Why does it thinks that the source file was modified?

Search in ANTS Performance Profiler 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
MikiWatts



Joined: 28 Jul 2009
Posts: 11
Location: Israel

PostPosted: Tue Jul 28, 2009 11:16 am    Post subject: Why does it thinks that the source file was modified? Reply with quote

I'm profiling my application on a Point of Sale hardware, and do so by deploying a version on the hardware, profiling it, then copying the profiler results back to my dev machine and loading it there.

When I load the results in my dev machine, i get a warning message saying "This source file appears to have been modified since profiling was carried out".
I don't understand where that message is coming from, since I didn't change the source code between deploying to the POS and profiling it.

How does the profiler decides that ?

Also, I'm not sure if this is related, but while in most places in the source view i can drilldown, someplaces just won't let me drilldown. Could it be related to that that the profiler thinks that the file is different ?
Back to top
View user's profile Send private message
MikiWatts



Joined: 28 Jul 2009
Posts: 11
Location: Israel

PostPosted: Tue Jul 28, 2009 1:14 pm    Post subject: Reply with quote

I also just noticed that the line times are off from the functions themselves... see attached image for example



Could it be because in the settings i have the "save source code" option enabled ?
Back to top
View user's profile Send private message
MikiWatts



Joined: 28 Jul 2009
Posts: 11
Location: Israel

PostPosted: Tue Jul 28, 2009 1:57 pm    Post subject: Reply with quote

Ok, I think I found the problem, I was profiling the release build, and with the debug build it works just fine.
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Tue Jul 28, 2009 2:04 pm    Post subject: Reply with quote

The 'file has been modified' warning is shown if the time of modification of the file is different to what it was when profiling was carried out. This is usually a reliable indicator but can also be flagged up if the results are taken between two machines with their own copy of the same source code. The warning is flagged up because if the profiler isn't saving source code along with the results then any modifications will make the line-level timings meaningless.

Line-level timings not lining up with the source code can be caused by a couple of problems: the most common is that the application that was profiled was compiled from a different version of the source code.

A less common cause can be that the C# compiler records different line positions from those used by our source control for some reason. Visual Studio usually warns about inconsistent line endings in situations where this can occur. We don't currently know about any situations which can cause this, though exotic unicode line endings or odd combinations of the ASCII \r and \n characters could potentially cause a conflict.

The occasional inability to drill down through a function can happen for a few reasons: this facility is implemented by inspecting the source code and comparing it to the generated call stacks. If the line-level data isn't matching up to the source code for any reason, it can be impossible to determine which function calls correspond to which line of code.

Interfaces, events, anonymous delegates, the yield operator and other C# features can result in functions being called at run-time that look very different to the way they are specified in the source code, which will make this feature fail to work.
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group