You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .NET Alloc option requires the activation of a specific CLR profiler. The activation is implemented in PerfView by configuring HKLM\Software\Microsoft\.NETFramework\COR* registry keys. It does not seem to have any effect on my net7.0 application:
Action
Target Framework
Has ETWClrProfiler events
Run/Collection
net461
Yes
Run/Collection
net7.0
No
Run/Collection
net7.0 + manual profiler activation using environment variables
Yes
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:
By explicitly documenting the behavior ("Collect" cannot enable the profiler and it must be manually enabled).
By automatically configuring the expected environment variable when collecting with the "Run" action.
It can eventually create a PR for the last point.
The text was updated successfully, but these errors were encountered:
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:
Either move all CLR-profiler-related options to a specific section, or add a "Profiler" prefix to the options labels.
Add a CLR profiler documentation entry to explain its role, usage and activation.
Add an option to automatically enable the profiler in the "Run" collection.
Rename "ETW .NET Alloc" to "CLR SampAlloc".
Add an option "CLR Alloc" (related to GCAllObjectAllocation).
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.
The text was updated successfully, but these errors were encountered: