-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add support for DOTNET prefix on ICorProfiler env vars (#117902) #121646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add DOTNET_* variations to existing CORECLR_* profiler environment variables.
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
|
@dotnet-policy-service agree company="Microsoft" |
noahfalk
left a comment
There was a problem hiding this 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 :)
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
noahfalk
left a comment
There was a problem hiding this 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.
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
There was a problem hiding this 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_andCORECLR_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 |
Add DOTNET_* variations to existing CORECLR_* profiler environment variables.