I am writing a small profiler that inserts IL code at beginning and end of certain methods.
It can do that at startup (in ModuleLoadFinished) or during runtime after specific triggers happen - triggering a rejit.
I have observed that the rejit variant does not work anymore as soon as the target method is a runtime async method -
but only if the method in question was already called before. (and therefore was jitted I guess)
I can confirm that the startup version is still working as intended.
The rejit is triggered using RequestReJITWithInliners, also COR_PRF_DISABLE_INLINING was set while testing.
While everything seems to work normally, the modified code just doesn't get applied.
Behavior after calling RequestReJITWithInliners:
- RequestReJITWithInliners returns S_OK
- GetReJITParameters gets called, call to SetILFunctionBody returns S_OK
- ReJITError never gets called
Question:
Is this a known / intended behavior?
I am writing a small profiler that inserts IL code at beginning and end of certain methods.
It can do that at startup (in ModuleLoadFinished) or during runtime after specific triggers happen - triggering a rejit.
I have observed that the rejit variant does not work anymore as soon as the target method is a runtime async method -
but only if the method in question was already called before. (and therefore was jitted I guess)
I can confirm that the startup version is still working as intended.
The rejit is triggered using RequestReJITWithInliners, also COR_PRF_DISABLE_INLINING was set while testing.
While everything seems to work normally, the modified code just doesn't get applied.
Behavior after calling RequestReJITWithInliners:
Question:
Is this a known / intended behavior?