Skip to content

Is profiler ReJIT of runtime-async method bodies intended to be supported on .NET 11 (preview 4)? #128944

@birnbeidla

Description

@birnbeidla

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions