Open ocoanet opened 7 months ago
I don't believe that the registry is supported for configuring the profiler API for .NET Core. @davmason can you please confirm.
At the same time, you should be able to capture the unsampled allocation events directly in PerfView without using the profiler API at all. This is done by specifying /ClrEvents:Default+GCAllObjectAllocation
.
I did a few experiments with GCAllObjectAllocation
and it seems to generate unsampled Microsoft-Windows-DotNETRuntime/GC/SampledObjectAllocation
events. So, indeed, it is a good option to capture allocations for .NET (Core) programs.
But my main issue is that many collection UI options are linked to the CLR profiler. This fact is not clearly documented and these options have no effect on .NET (Core) programs unless the profiler is manually enabled.
I think that both the collection UI and the documentation (PerfView Help) should be improved to make more explicit the behaviors. Also, it would be nice to have an option to enable GCAllObjectAllocation
.
I clearly lake experience on the subject to describe a complete solution. I can only make a few suggestions:
GCAllObjectAllocation
).I can probably help on these tasks if needed.
The
.NET Alloc
option requires the activation of a specific CLR profiler. The activation is implemented in PerfView by configuringHKLM\Software\Microsoft\.NETFramework\COR*
registry keys. It does not seem to have any effect on my net7.0 application:Is this behavior a configuration issue on my side?
I could not find any documented way to activate profilers from registry keys for the .NET (Core) runtime, so maybe it is a known and expected behavior.
However, if the profiler cannot be activated using registry keys, I suppose that PerfView should be improved:
It can eventually create a PR for the last point.