Evaluate profiler callback behavior for runtime async methods
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
The "enter" callback is currently emitted as part of the prolog, and that means we are calling it also when we resume. On the other hand we do not call the "leave" callback on suspension, so this is inconsistent.
There is a question if we should do the callbacks for suspend and resume or only when starting/finishing. The former means that we won't have arguments/return value available, while the latter means that the events won't be scoped around CPU execution of the method (we could suspend for an indefinite amount of time before seeing the leave callback).
Alternatively we could also just not do these callbacks at all for runtime async methods, or introduce new callbacks for this case.
cc @dotnet/dotnet-diag-contrib -- thoughts?
Contributor guide
Assessment
This issue has not been assessed yet.