-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix PerformanceCounter's when running with Globalization Invariant Mode #65414
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
Fix PerformanceCounter's when running with Globalization Invariant Mode #65414
Conversation
|
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti, @safern Issue DetailsPerformanceCounter's was creating culture objects using LCID. When running with Globalization Invariant Mode, it is not allowed to create any culture using LCID. Also, if the switch The fix here is to allow running PerformanceCounter with the Globalization Invariant Mode and always report counters matching the English language at that time.
|
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-performancecounter Issue DetailsPerformanceCounter's was creating culture objects using LCID. When running with Globalization Invariant Mode, it is not allowed to create any culture using LCID. Also, if the switch The fix here is to allow running PerformanceCounter with the Globalization Invariant Mode and always report counters matching the English language at that time.
|
|
@carlossanlop could you please help reviewing this PR? let me know if you have any question. |
...raries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
Outdated
Show resolved
Hide resolved
carlossanlop
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.
...raries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
Outdated
Show resolved
Hide resolved
...raries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
Show resolved
Hide resolved
src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceCounterTests.cs
Show resolved
Hide resolved
carlossanlop
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.
LGTM.
|
/backport to release/6.0 |
|
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1861454365 |
|
@tarekgh backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix PerformanceCounter's when running with Globalization Invariant Mode
Using index info to reconstruct a base tree...
M src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
M src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceCounterTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceCounterTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Diagnostics.PerformanceCounter/tests/PerformanceCounterTests.cs
Auto-merging src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
CONFLICT (content): Merge conflict in src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix PerformanceCounter's when running with Globalization Invariant Mode
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
…Globalization Invariant Mode (PR dotnet#65414)
PerformanceCounter's was creating culture objects using LCID. When running with Globalization Invariant Mode, it is not allowed to create any culture using LCID. Also, if the switch
DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLYis set to true there, it will not allow creating any culture even using culture names except the Invariant culture. That means PerformanceCounter library will not be usable at all when enabling the Globalization Invariant Mode.The fix here is to allow running PerformanceCounter with the Globalization Invariant Mode and always report counters matching the English language at that time.