在什么条件下使用非NGEN组件? [英] Under what conditions will a non-NGEN assembly be used?

查看:74
本文介绍了在什么条件下使用非NGEN组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个分析器并设置COR_PRF_USE_PROFILE_IMAGES。  当我这样做时,我发现正在加载非NGEN的图像 - 我可以通过使用ProcessExplorer并看到非NI版本的dll被加载来说明这一点。  此外,由于jitting,
应用程序的启动速度要慢得多。  在进行此测试之前,我运行了这个ngen命令,该命令记录了所有相关系统映像都具有ngened的分析版本的消息。

I'm working on a profiler and setting COR_PRF_USE_PROFILE_IMAGES.  When I do so, I find that the non-NGEN'd images are being loaded - I can tell this by using ProcessExplorer and seeing that the non-NI versions of dlls are loaded.  Also, the app is much slower to startup due to jitting.  Before doing this test I ran this ngen command which logged messages saying all the dependent system images got a profiling version ngened.

  ngen / profile< my exe>

  ngen /profile <my exe>

所以我的问题是,在什么条件下CLR不会加载NGEN的图像?当然,除了COR_PRF_DISABLE_ALL_NGEN_IMAGES之外。是否有其他标志导致这种情况?是否有其他CLR禁用它?

SO my question is, under what conditions will the CLR not load the NGEN'd image? Aside from COR_PRF_DISABLE_ALL_NGEN_IMAGES, of course. Are there other flags that cause this? Are there other calls to the CLR that disable it?

推荐答案

通常,当CLR需要某些未编译的东西时,它会调用JIT再次加载相应的IL代码。可能你需要检查你是否已经清理了DLL的其他版本或者你当前的版本是否可用。

Generally, when CLR needs something which is not been compiled, it will call JIT again to load the corresponding IL code. May be you need to check do you have cleaned the other version of the DLL or your current version dll is available.

祝你有愉快的一天。


这篇关于在什么条件下使用非NGEN组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆