Red Gate forums :: View topic - Profiling Silverlight app that's hosted inside an exe
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler 7
ANTS Memory Profiler 7 forum

Profiling Silverlight app that's hosted inside an exe

Search in ANTS Memory Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
ergu



Joined: 29 Nov 2011
Posts: 6

PostPosted: Tue Nov 29, 2011 4:36 am    Post subject: Profiling Silverlight app that's hosted inside an exe Reply with quote

Is there a way to do this with the ANTS Memory Profiler?

I have a silverlight app that's hosted within an active x control within an exe. I only see the option to start a silverlight app by using a URL or by selecting a xap.

Thanks!
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Thu Dec 01, 2011 11:17 am    Post subject: Reply with quote

I'm afraid I don't know enough about this particular configuration to answer the question, but provided that Silverlight Runtime is the only loaded .net runtime, I think it may work to profile the application as a regular desktop application.

Profiler only "supports" profiling SL hosted in a browser or by sllauncher.exe when you specify a XAP file.

I'll let development know about this topic and they should have enough knowledge of the undocumented features of Profiler to provide a solid answer.

EDIT: Yes, I'm told profiling your application as a .NET executable will work. However as I mentioned before, if the app loads both .NET Runtime and Silverlight Runtime you will get results for one or the other but not both.
Back to top
View user's profile Send private message
ergu



Joined: 29 Nov 2011
Posts: 6

PostPosted: Thu Dec 01, 2011 8:29 pm    Post subject: Reply with quote

Thanks for the response.

For my specific case: I am trying to profile a SL app hosted in an Active x control in Excel so there should only be the SL runtime.

How does ANTS launch the exe? The add in doesn't work when launching excel from the profiler but works otherwise.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Fri Dec 02, 2011 10:21 am    Post subject: Reply with quote

Okay, so this is not an information request, it's a problem with Profiler actually not working.

Well, make sure you have AMP v7.2 and contact us again if you do. I'm going to have to get the development team to investigate why the memory profiler isn't working with Excel add-ins (this time). *sigh*
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Mon Dec 05, 2011 12:39 pm    Post subject: Reply with quote

The profiler starts the executable you supply using Process.Start and some extra environment variables that tell .NET to load the profiler and which process to attach to. Provided the variables aren't unset, the profiler will be loaded into the CLR whenever it starts (even if it's in a process launched by the one you initially specify)

Can you give more details about how the addin doesn't work? If it fails to load, then it's probably something to do with the way Excel is being started. If Excel crashes when you try to use it, there's a good chance that you've found a bug in the profiler core. If it works but doesn't profile, the chances are that the variables have got cleared somehow before the add-in started, or the profiler didn't load for some reason (unfortunately, this is the hardest kind of problem to narrow down, as there's little feedback from .NET on what happened).

Older versions of the profiler did have some issues with Excel - specifically to do with Data Execution Prevention - they would crash when you took a snapshot, though profiling would work OK otherwise. This should have been fixed in version 7.1, however, so I'm interested if this still occurs in newer versions.
_________________
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