-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Remove HAVE_CLOCK_MONOTONIC and dead fallback code #124120
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
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
|
@copilot Please fix this build break on Windows |
The parameter was always TRUE, so simplify by removing it and always preferring CLOCK_MONOTONIC when available. Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
CLOCK_MONOTONIC is a POSIX constant not available on Windows. Guard the assignment with #ifdef to prevent build failures on Windows/WASM builds. Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
... Fixed. Added |
Deleted all instances of mono_clock_init() and inlined the initialization. On Darwin, the host_get_clock_service call is now directly in mini-posix.c. On Linux/non-Darwin, sampling_clock is already set to CLOCK_MONOTONIC directly. Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
|
@copilot Revert last commit, it does not look like an improvement |
This reverts commit 3ca9315. Keeping the mono_clock_init() wrapper function as requested. Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Reverted. The |
Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
|
@copilot analyze the build and test failures in CI |
Changed assert statements to use the simpler form: assert(result == 0 && "message") instead of if (result != 0) { assert(!"message"); }
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
I analyzed the PR and couldn't find completed Azure DevOps CI builds yet. The local builds (CoreCLR + Libraries, Mono) all succeed with the current changes. The PR removes the HAVE_CLOCK_MONOTONIC macro and simplifies code to assume CLOCK_MONOTONIC is available on all Unix platforms. If specific CI failures appear, please share the build URLs or failure details and I can investigate further. |
|
@copilot analyze the build and test failures in CI |
No completed CI builds found for this PR yet. The GitHub status API shows "pending" with 0 status checks. The azdo-helix-failures skill couldn't locate any Azure DevOps builds. Local builds (CoreCLR + Libraries, Mono) all pass successfully. Once CI completes, I can analyze any failures if they occur. |
|
@copilot analyze the build and test failures in CI |
CI Analysis SummaryBuild: 1284159 | Status: Failed | Tests: 26 failed / 3,679,973 passed (99.99% pass rate) Failures Found (All Known Issues - Not PR-Related)1. crossgen2determinism test failure (linux-arm)
2. stackoverflowtester test failure (linux-x64)
Build Analysis Result✅ Build Analysis correctly identified both failures as known issues. RecommendationSAFE TO MERGE - All failures are tracked known issues unrelated to the HAVE_CLOCK_MONOTONIC removal. Local builds pass successfully. The changes don't touch Crossgen2, ReadyToRun, or stack overflow handling code. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Description
HAVE_CLOCK_MONOTONIC is always defined as 1 on all Unix-like platforms, so we can remove the macro and all associated fallback code.
Changes Made
Configuration Files
Source Files
#elif HAVE_CLOCK_MONOTONICto#else, removed error fallback, simplified assert statements to more concise form#if HAVE_PTHREAD_CONDATTR_SETCLOCK(removed&& HAVE_CLOCK_MONOTONIC)fPreferMonotonicClockparameter fromGetAbsoluteTimeout()(was always TRUE)#ifdef HAVE_CLOCK_MONOTONICto#ifdef CLOCK_MONOTONICto guard against Windows WASM builds where the POSIX constant is unavailable#undef HAVE_CLOCK_MONOTONICworkaround andgettimeofday()fallbackAll code now assumes
clock_gettime(CLOCK_MONOTONIC, ...)is available on Unix-like platforms where the CLOCK_MONOTONIC constant is defined.Testing
Net -81 lines across 17 files.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.