Native Images: Exceptions and other oddities

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.

Comments

  • 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.
  • 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.
  • 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.
Sign In or Register to comment.