Skip to content

Follow up on recent PAL cleanups#116127

Merged
jkotas merged 6 commits into
dotnet:mainfrom
jkotas:misc
May 31, 2025
Merged

Follow up on recent PAL cleanups#116127
jkotas merged 6 commits into
dotnet:mainfrom
jkotas:misc

Conversation

@jkotas

@jkotas jkotas commented May 30, 2025

Copy link
Copy Markdown
Member
  • Avoid extra layer in System.Diagnostics.Stopwatch
  • Rename Millieseconds -> MillieSecond
  • Delete types from NativeAOT PAL that are not longer needed
  • Delete unused g_registerModuleTrace

Copilot AI review requested due to automatic review settings May 30, 2025 05:06
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 30, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refines time-related functionality by simplifying Stopwatch internals, standardizing millisecond naming in PAL, and cleaning up unused types in NativeAOT.

  • Removed obsolete time conversion constants in mono-time.c
  • Refactored Stopwatch to eliminate extra QueryPerformance* wrappers and unified GetFrequency/GetTimestamp implementations
  • Corrected “MillieSeconds” naming to “MilliSeconds” across PAL and removed unused NativeAOT PAL types

Reviewed Changes

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

Show a summary per file
File Description
src/mono/mono/utils/mono-time.c Deleted unused TimeConversionConstants enum
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Stopwatch.cs Inlined frequency/timestamp getters and removed wrapper methods
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Stopwatch.Windows.cs Renamed QueryPerformanceFrequency/QueryPerformanceCounter to GetFrequency/GetTimestamp
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Stopwatch.Unix.cs Renamed QueryPerformanceFrequency/QueryPerformanceCounter to GetFrequency/GetTimestamp
src/coreclr/pal/src/synchmgr/synchmanager.cpp Updated timeout calculations to use corrected tccSecondsToMilliSeconds constants
src/coreclr/pal/src/misc/time.cpp Fixed naming in millisecond conversion constant
src/coreclr/pal/src/include/pal/palinternal.h Standardized TimeConversionConstants member names for milliseconds
src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp Removed unused PalGetCurrentOSThreadId
src/coreclr/nativeaot/Runtime/startup.cpp Deleted g_registerModuleTraces and related RegisterModuleTrace definitions
src/coreclr/nativeaot/Runtime/PalRedhawk.h Pruned redundant LARGE_INTEGER and old exception/disposition definitions

Comment thread src/coreclr/nativeaot/Runtime/startup.cpp Outdated
Comment thread src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp
@jkotas

jkotas commented May 31, 2025

Copy link
Copy Markdown
Member Author

/ba-g opened issue #116170, but it is not getting matched

@jkotas jkotas merged commit fa1b389 into dotnet:main May 31, 2025
147 of 153 checks passed
@jkotas jkotas deleted the misc branch May 31, 2025 04:21
@teo-tsirpanis teo-tsirpanis added area-PAL-coreclr only for closed issues and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 31, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-PAL-coreclr only for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants