Skip to content

Conversation

@barosiak
Copy link
Member

Add DOTNET_* variations to existing CORECLR_* profiler environment variables.

Add DOTNET_* variations to existing CORECLR_* profiler environment variables.
@barosiak barosiak added enhancement Product code improvement that does NOT require public API changes/additions area-Diagnostics-coreclr labels Nov 14, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@barosiak
Copy link
Member Author

@dotnet-policy-service agree company="Microsoft"

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on the first PR! Everything here looks like it works so adding a few suggestions to refine it :)

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I made a few minor comment suggestions and then I assume Jan's suggestion to move the docs is still in progress.

barosiak and others added 3 commits November 18, 2025 12:53
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
@barosiak barosiak marked this pull request as ready for review November 19, 2025 18:38
Copilot AI review requested due to automatic review settings November 19, 2025 18:38
Copilot finished reviewing on behalf of barosiak November 19, 2025 18:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the DOTNET_ prefix as the primary environment variable prefix for ICorProfiler configuration, while maintaining backward compatibility with the existing CORECLR_ prefix. The implementation introduces a new CoreclrFallbackPrefix lookup option that causes the configuration system to use CORECLR_ as the fallback prefix instead of COMPlus_.

Key changes:

  • Core configuration system updated to recognize both DOTNET_ and CORECLR_ prefixes for profiler environment variables
  • Test infrastructure enhanced to support testing with different environment variable prefixes
  • Documentation updated to recommend DOTNET_ prefix going forward

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/inc/clrconfig.h Adds CoreclrFallbackPrefix lookup option flag
src/coreclr/inc/clrconfignocache.h Adds CORECLR prefix constants and updates Get method signature to support CORECLR fallback
src/coreclr/utilcode/clrconfig.cpp Implements CORECLR prefix lookup logic for both cached and non-cached configuration paths
src/coreclr/inc/clrconfigvalues.h Updates profiler config entries to use CoreclrFallbackPrefix option and removes prefix from config names
src/tests/profiler/common/ProfilerTestRunner.cs Adds envVarProfilerPrefix parameter to allow tests to specify which prefix to use
src/tests/profiler/multiple/multiple.cs Tests both CORECLR and DOTNET prefixes to verify backward compatibility
src/tests/profiler/assembly/ALCTest.cs Tests both CORECLR and DOTNET prefixes to verify backward compatibility
src/tests/profiler/native/README.md Updates documentation to show DOTNET prefix as primary with backward compatibility note
src/tests/profiler/README.md Updates example script to use DOTNET prefix with backward compatibility note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Diagnostics-coreclr enhancement Product code improvement that does NOT require public API changes/additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants