microsoft / microsoft/perfview

.NET Alloc profiler activation on .NET (Core)

Open
#1,955 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.7k
Forks
775
Avg merge
5d 11h
Merged PRs (30d)
9

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported Run/Collection matrix for net461 and net7.0, comparing registry-key activation with manual environment-variable activation. Inspect the profiler activation path used by PerfView; done means the .NET (Core) behavior is documented or the Run action configures the expected activation when collecting.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.