Red Gate forums :: View topic - ANTS profiler still fails when Unity pdb symbols are present
Return to www.red-gate.com RSS Feed Available

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

ANTS profiler still fails when Unity pdb symbols are present

Search in ANTS Performance Profiler 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
slaneyrw



Joined: 08 Feb 2005
Posts: 28

PostPosted: Thu Jun 24, 2010 1:51 am    Post subject: ANTS profiler still fails when Unity pdb symbols are present Reply with quote

Title says it all.

Check previous forums messages. I thought that you would have fixed this by now
Back to top
View user's profile Send private message
nick.maidment



Joined: 29 Jan 2010
Posts: 74

PostPosted: Thu Jun 24, 2010 9:48 am    Post subject: Reply with quote

Sorry to hear you're still having problems. After looking in the development database, the developers thought they had fixed it for this version. Are you getting the same error?
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Thu Jun 24, 2010 11:29 am    Post subject: Reply with quote

We fixed several bugs with identical symptoms during the v6 EAP and beta periods. This specific case was not tested by us as we had no evidence that it was any different from the other cases we knew about, and the EAP feedback that we got was that the issues caused by these bugs were no longer occurring, so there was no reason for us to investigate this specific case.

I have reproduced an issue with Unity 2.0, however. It only occurs if the target application is 64-bit and the profiler is in a line-level mode and seems to be due to an access violation in the .NET JIT. It's possible to work around the problem for now by changing the application target to x86 or by deleting the pdb or switching to a different profiling mode.
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Thu Jun 24, 2010 3:28 pm    Post subject: Reply with quote

I've now narrowed this down to an issue with the way that the profiler handles assemblies with the SecurityTransparent attribute, combined with a bug in .NET 2's verification of this attribute.

In .NET 4, this will produce a SecurityVerificationException. In .NET 2, nothing happens when using the x86 JIT and the x64 JIT crashes.

This means that you can also work around the problem by removing the SecurityTransparent attribute from any assemblies you want to use line-level timings on.
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
slaneyrw



Joined: 08 Feb 2005
Posts: 28

PostPosted: Thu Jun 24, 2010 10:30 pm    Post subject: Reply with quote

Thanks Andrew...

x64 ASP.NET MVC application, with Unity 2.0 and all Unity assemblies are marked with this attribute.

Is there a KB article from MS on the .NET 2 bug, I might be able to get a hotfix using our Premier support agreement ?
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Fri Jun 25, 2010 10:58 am    Post subject: Reply with quote

I haven't been able to find anything on Microsoft's site about this problem, though I can write my own assembly marked as SecurityTransparent and call P/Invokes from it.

A fix for the .NET issue wouldn't help with the profiler, however, as the problem is due to code being generated by the profiler that can't run in a SecurityTransparent assembly. The only difference would be that the program would crash with an exception instead of an access violation.

We'll look into fixing this in a minor release: the solution will probably have to be to disable line-level timings for SecurityTransparent methods.
_________________
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