You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quite often it is required to understand why a method has been AOTed, which function, type or instantiation caused the compilation of the method and what are its dependencies.
This information is needed when we are trying to answer some of the following questions:
Why a certain instantiation of a method has been generated?
Why a certain optimisation has not been performed?
What are all the wrapper (extra) methods generated by mono for a with a particular method?
Why is the generated binary so large?
How much a newly added type impacts the size of the generated binary?
etc ...
By just disassembling the binary and examining generated symbols, it is quite hard, and sometimes impossible, to answer these kind of questions.
Idea
Introduce a new feature to the AOT compiler to build a type/call dependency graph by recording when for example:
a method calls another method
a method instantiates a type
a method requires a runtime wrapper(s) - with a reason (eg: interpreter requires gsharedvt_out wrappers in order to call AOTed code)
...
The dependency information should be logged into a file in a well-known graph description language for example:
It would be nice to have a simpler version of this feature, which prints out a list of AOT compiled methods for il strip tool to consume. That feature would help with stripping IL's for MAUI Android apps, which used Profiled AOT mode. (#44855)
It would be nice to have a simpler version of this feature, which prints out a list of AOT compiled methods for il strip tool to consume. That feature would help with stripping IL's for MAUI Android apps, which used Profiled AOT mode. (#44855)
Implementing this feature has been paused for now, as we are trying to prove whether it is possible to use NativeAOT's dependency analysis to drive MonoAOT compilation in order to reduce the generated code size (especially in case of generics): #80941
Motivation
Quite often it is required to understand why a method has been AOTed, which function, type or instantiation caused the compilation of the method and what are its dependencies.
This information is needed when we are trying to answer some of the following questions:
By just disassembling the binary and examining generated symbols, it is quite hard, and sometimes impossible, to answer these kind of questions.
Idea
Introduce a new feature to the AOT compiler to build a type/call dependency graph by recording when for example:
The dependency information should be logged into a file in a well-known graph description language for example:
The feature should be controlled by a command-line switch.
Benefits
The generated dependency graphs would:
This is merely an idea for the improvement, not an official proposal, making this issue open for discussions and ideas.
CC: @lambdageek @vargaz
The text was updated successfully, but these errors were encountered: