Use minipal timers directly in GC - #132197
Conversation
|
Azure Pipelines: 16 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
src/coreclr/gc/env/gcenv.os.h:14
- The PR metadata claims to fix #126551 (QueryUnbiasedInterruptTime availability), but this change only switches GC call sites to
minipal_lowres_ticks()/minipal_hires_ticks()without adding the requested availability check/fallback.minipal_lowres_ticks()on Windows still callsQueryUnbiasedInterruptTimeunconditionally, so the original partition-availability concern remains. Please either (a) implement the feature check + fallback in minipal (and align other call sites), or (b) drop the “Fixes #126551” linkage / update the PR scope accordingly.
#include <minipal/mutex.h>
#include <minipal/time.h>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (3)
src/coreclr/gc/mark_phase.cpp:2085
- These
dprintfcalls use%dbut pass anint64_ttick delta (minipal_lowres_ticks() - begin_tick). This is a varargs type mismatch (undefined behavior) on some ABIs; use a 64-bit format specifier consistent with the rest of the GC logging.
dprintf (SNOOP_LOG, ("heap%d: marking %zx from %d [%d] tl:%dms",
heap_number, (size_t)o, (heap_number+1)%n_heaps, level,
(minipal_lowres_ticks()-begin_tick)));
src/coreclr/gc/mark_phase.cpp:2094
- This
dprintfcall uses%d/%dfor millisecond tick deltas, but the arguments areint64_t(minipal_lowres_ticks() - start_tick/- begin_tick). This is a varargs type mismatch; update the format string to 64-bit specifiers.
dprintf (SNOOP_LOG, ("heap%d: done marking %zx from %d [%d] %dms tl:%dms",
heap_number, (size_t)o, (heap_number+1)%n_heaps, level,
(minipal_lowres_ticks()-start_tick),(minipal_lowres_ticks()-begin_tick)));
src/coreclr/gc/env/gcenv.os.h:14
- PR description says this fixes #126551 (QueryUnbiasedInterruptTime availability), but after switching GC call sites to
minipal_lowres_ticks()the underlying implementation insrc/native/minipal/time.cstill callsQueryUnbiasedInterruptTimeunconditionally and asserts on failure. If this API is missing on some Windows partitions, the regression remains—just centralized in minipal. Consider implementing the proposed feature check/fallback (e.g. toGetTickCount64) in minipal before marking the issue as fixed.
#include <minipal/mutex.h>
#include <minipal/time.h>
|
Tagging subscribers to this area: @anicka-net, @dotnet/gc |
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
src/coreclr/gc/env/gcenv.os.h:14
- This change routes GC low-res timing through
minipal_lowres_ticks()(via<minipal/time.h>), butminipal_lowres_ticks()on Windows still callsQueryUnbiasedInterruptTimeunconditionally (see src/native/minipal/time.c). If the PR is intended to fix #126551 (API not available in some Windows partitions), this refactor alone doesn’t address the missing-API problem; the fix likely needs to be implemented in minipal (fallback toGetTickCount64/ dynamic lookup) and then consumed here.
#include <minipal/mutex.h>
#include <minipal/time.h>
…ctly Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/coreclr/gc/env/gcenv.os.h:14
- This change routes GC low-res timing through
minipal_lowres_ticks(), but on Windows the minipal implementation still callsQueryUnbiasedInterruptTimedirectly (seesrc/native/minipal/time.c). That means the original problem in #126551 (API not present in some Windows partitions, causing link/load failures) is not actually avoided by moving the callsite into minipal unless minipal also has an availability fallback (e.g.,GetProcAddress+GetTickCount64fallback, or a build-time feature macro).
#include <minipal/mutex.h>
#include <minipal/time.h>
|
/ba-g build analysis misclassifying known failures - dotnet/arcade#17340 |
Fixes #126551 (comment)
GCToOSInterface.minipal_lowres_ticks,minipal_hires_ticks, andminipal_hires_tick_frequency.