Uh oh!
There was an error while loading. Please reload this page.
[Mono] Add the capability of trimming IL code of individual methods - #86722
Conversation
| int allowedParallelism = DisableParallelStripping ? 1 : Math.Min(Assemblies.Length, Environment.ProcessorCount); | ||
| if (BuildEngine is IBuildEngine9 be9) | ||
| allowedParallelism = be9.RequestCores(allowedParallelism); |
There was a problem hiding this comment.
| intallowedParallelism=DisableParallelStripping?1:Math.Min(Assemblies.Length,Environment.ProcessorCount); | |
| if(BuildEngineisIBuildEngine9be9) | |
| allowedParallelism=be9.RequestCores(allowedParallelism); | |
| intallowedParallelism=DisableParallelStripping?1:BuildEngine9.RequestCores(Math.Min(Assemblies.Length,Environment.ProcessorCount)); |
There was a problem hiding this comment.
I hit an error when applying your change
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
| int allowedParallelism = DisableParallelStripping ? 1 : Math.Min(MethodTokenFiles.Length, Environment.ProcessorCount); | ||
| if (BuildEngine is IBuildEngine9 be9) | ||
| allowedParallelism = be9.RequestCores(allowedParallelism); |
There was a problem hiding this comment.
| intallowedParallelism=DisableParallelStripping?1:Math.Min(MethodTokenFiles.Length,Environment.ProcessorCount); | |
| if(BuildEngineisIBuildEngine9be9) | |
| allowedParallelism=be9.RequestCores(allowedParallelism); | |
| intallowedParallelism=DisableParallelStripping?1:BuildEngine9.RequestCores(Math.Min(Assemblies.Length,Environment.ProcessorCount)); |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ivanpovazan
commented
May 29, 2023
It would be nice to include a specification/documentation of how this feature is used/enabled (possibly with an example of |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Ankit Jain <radical@gmail.com>
fanyang-mono
commented
Jun 16, 2023
CI failures are not related to this PR. |
Context: dotnet/runtime#86722 This adds an `<ILStrip/>` step after the `<MonoAOTCompiler/>` task. This trims away IL of AOT-compiled methods. This is WIP. Builds work currently, but the app crashes at runtime with: 07-06 16:57:07.413 8865 8865 E companyname.foo: * Assertion at /__w/1/s/src/mono/mono/mini/mini-trampolines.c:1416, condition `invoke' not met
Contributes to #44855
@jonathanpeppers After this is merged. It should be adoptable by Android. I have updated the HelloWorld sample as an example to showcase how to use this feature.
Usage of this feature:
CollectCompiledMethodsandCompiledMethodsOutputDirectoryforMonoAOTCompilerILStripafterMonoAOTCompilerFor more details, please refer to the HelloWorld sample app change included in this PR.