Open
Description
Motivation
This is inspired by investigation with @pavelsavara on why there are OOMs during build - dotnet/runtime#111662
It is currently nontrivial to attribute the memory hitter (especially if notrivial amount of native allocations or pinning are involved as well). It would be nice if we could get some initial rough direction from binlog. But this might be interesting data for telemetry as well.
Idea
System.Diagnostics.Process
and System.GC
can be queried for a consumed memry before and after task execution - the diffs can then be attached to TaskExecutedEventArgs.