Skip to content

Instrument IL while doing AOT compilation #104522

Answered by huoyaoyuan
m-carrasco asked this question in Q&A
Discussion options

You must be logged in to vote

There are two possible approaches: after the IL is produced, or before the IL was processed to JIT.

IL in assembly files are compiled in the IlcCompile msbuild target. Insert a msbuild target before it can get all referenced assembly files, and transform all of them. There are some special methods provided by the execution engine, like methods of array and delegates, but generally they can be considered as trusted.

Another approach is to hook everything passed into JIT. The entry point of compiling method in ILCompiler is at RyuJitCompilation.CompileSingleMethod:

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@m-carrasco
Comment options

@jkotas
Comment options

@m-carrasco
Comment options

@huoyaoyuan
Comment options

Answer selected by m-carrasco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants