-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ready2Run images are still loaded when COR_PRF_DISABLE_ALL_NGEN_IMAGES is set #8633
Comments
Fixed in dotnet/coreclr#13043 |
I just ran into this issue with the latest .NET Core 2.0.0 Preview. I tried an ASP.NET Core application and was not able to instrument code into the I see that this is planned for Milestone 2.1.0, but I would like to see this included in the 2.0.0 release. Otherwise we must use a workaround and set the |
@mmayr-at It is unfortunately too late for 2.0, it has already locked down. For what it's worth, this fix means that when a profiler is attached and requests that NGEN images are not loaded, it is the same impact as setting COMPLUS_ReadyToRun=0. You don't gain anything with this fix, other than not having to set the extra environment variable. |
This is bad news for us, but thanks for that information. I know that the workaround is quite easy, but we have to deploy it to production/testing environments and have to consider it in everyday development tasks. |
@davmason We should include this fix in the first 2.0 servicing update (2.0.1). |
@jkotas This is definitely better than waiting for the 2.1.0 release, thx. |
From the profiler's point of view, it does not know about the differences between R2R and NGEN. There is a profiler flag to set
COR_PRF_DISABLE_ALL_NGEN_IMAGES
, to ensure that no pre-generated code is loaded.However, this flag does not prevent the loading of R2R images. This is an issue for the profiler because pre-generated code cannot be instrumented, such as enter/leave callbacks, does not have jit events, etc.
I wrote a sample profiler and tested it without COR_PRF_DISABLE_ALL_NGEN_IMAGES, with it, and without it plus COMPLUS_ReadyToRun=0. Here are the results. Note that "loaded as NGEN" just means loaded as a pre-compiled library, they are all R2R except for System.Private.CoreLib
The text was updated successfully, but these errors were encountered: