Skip to content
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

CoreRT toolchain improvements #1057

Merged
merged 7 commits into from
Feb 8, 2019
Merged

CoreRT toolchain improvements #1057

merged 7 commits into from
Feb 8, 2019

Conversation

adamsitnik
Copy link
Member

No description provided.

@MichalStrehovsky
Copy link
Member

This is failing because ILC didn't get a complete assembly closure (there's a field of a type that lives in PresentationFramework assembly, but PresentationFramework assembly wasn't specified as input to ILC.

This is bad input, but I submitted dotnet/corert#6970 to make ILC not fail. The compiler can handle bad inputs otherwise (we'll generate throwing methods for things that reference such unresolvable assemblies to simulate what CLR would do).

@adamsitnik
Copy link
Member Author

@MichalStrehovsky thanks for providing this fix! when can I expect a new NuGet package with this fix to be published to myget.org?

@MichalStrehovsky
Copy link
Member

when can I expect a new NuGet package

We build twice a day, but I triggered a new build manually to get it faster: 1.0.0-alpha-27408-02 should have the fix.

@adamsitnik
Copy link
Member Author

@MichalStrehovsky with the new default settings it takes around 5 minutes to build a simple benchmarking program and our CI times out

I read the docs that you mentioned https://github.com/dotnet/corert/blob/master/Documentation/using-corert/optimizing-corert.md

I would like to disable the new default behavior and make it configurable.

@MichalStrehovsky do you think that using following settings as defaults is a good idea from BDN point of view? We don't need reflection.

<RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>

@MichalStrehovsky
Copy link
Member

This should be enough to prevent the explosion of things we build: <RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>

<IlcGenerateCompleteTypeMetadata> makes troubleshooting reflection-related errors easier and only adds a couple percent to size. <IlcGenerateStackTraceData> makes exception stack traces better at the cost of another couple percent. That said, disabling those makes everything smaller. Smaller is more cache friendly, hence better perf.

@adamsitnik
Copy link
Member Author

All CIs except of recently unstable Travis are green so I am merging this fix.

@MichalStrehovsky big thanks for the help!

The default settings are now:

<RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
<IlcGenerateCompleteTypeMetadata>true</IlcGenerateCompleteTypeMetadata>
<IlcGenerateStackTraceData>true</IlcGenerateStackTraceData>

and are customizable from the CoreRtToolchain.CreateBuilder() level

@adamsitnik adamsitnik merged commit 0b83c93 into master Feb 8, 2019
@adamsitnik adamsitnik deleted the noReflection branch February 8, 2019 16:29
@MichalStrehovsky
Copy link
Member

🚀 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants