Native Images: Exceptions and other oddities

Code profiling for .NET Developers

Moderators: StephenC, Alex.Davies, AndrewH

Native Images: Exceptions and other oddities

Postby David.Narraway » Tue Jan 12, 2010 12:46 pm

A little while ago I noticed that a lot of time was spent in the JIT complier when profiling our app, so I thought I'd spend some time getting to know NGEN. All well and good - reduced start up time by 25%, but obviously I thought I'd profile it as well. The method graphs are pretty much empty and I get an Out-of-Memory exception during my profiling sessions. I can expand the call graph and see method calls even though they are not in the tree or table views. Well I did all this before reading this topic.

So now I know that trying to profile an app using native images is probably not going to work properly. I posted this so that the title might help others who stumble across it.

David.
David.Narraway
 
Posts: 14
Joined: Fri Oct 23, 2009 9:26 am
Location: Oulu, Finland

Postby Chris.Allen » Wed Jan 13, 2010 1:49 pm

Thank you for this informaiton- it is very helpful. I think we have some known issues with ngen- I will search for the infomaton and re-post it here.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby Chris.Allen » Thu Jan 14, 2010 6:06 pm

Here's the info we have:
when you profile a managed process, only IL assembly modules are loaded and not the native images as would happen normally.
According to MS, it is possible to create "profiler friendly" native images using ngen with some specific switches- we have an exisiting feature request to do this automatically - PP-865.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby David.Narraway » Fri Jan 15, 2010 7:18 am

The switch for NGEN is /Profile, which I did use, but obviously it won't have had any effect. Do you have any idea why I would have got the OOM exception? It doesn't happen when profiling normally, i.e. without using the native images. Might be something you have to look into.

David.
David.Narraway
 
Posts: 14
Joined: Fri Oct 23, 2009 9:26 am
Location: Oulu, Finland


Return to ANTS Performance Profiler 5

Who is online

Users browsing this forum: No registered users and 1 guest