Repository navigation
Conversation
godofecht
marked this pull request as ready for review
October 6, 2026 23:18
godofecht
marked this pull request as draft
October 6, 2026 23:19
godofecht
force-pushed
the
fix/735-no-unconditional-profile-startup-clock
branch
from
October 7, 2026 12:38
5d050d5 to
e37b212
Compare
godofecht
marked this pull request as ready for review
October 7, 2026 12:38
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #735. Does not close it.
Change
compiler/src/profile.flowembeds a GCC constructor,flowc_prof_ctor, that calledclock_gettimebeforemainon every flowc run, even withFLOWC_PROFILEunset. It now calls it only whenflowc_prof_mode_c()is non-zero. The mode is read once from the environment and cached, so a disabled run costs onegetenv.docs/project/compile-profile.mdsays so. No speedup is claimed.Evidence
Rebased onto main 948ae09. Bootstrap regenerated in its own commit.
compile_profile/ctor_clock_gated(added in this rebase) checks that the constructor incompiler/bootstrap/flowc_stage_a.cis gated. It fails against main's bootstrap and passes here. The constructor cannot be observed from outside the process, so the test reads the C that the shipped compiler is built from.compile_profile/explicitly_disabledchecks that0,false,offandnoprint no profile../flow tool tests/scripts/compile_profile.flow: 7 passed.flowc: PASS.bootstrap_from_c.sh --regen: fixed point at gen2;--verify: PASS.self_host_full.flow: ALL PASS.roundtrip.flow: ALL PASS../flow tool tests/cgen/run.flow: 130/0../flow test-lang274/0,./flow test-runtime34/0,./flow tool tests/cli/run.flow152 passed, 2 failed (jit_hello,test_mlir: golden drift on main).Merge notes:
tests/scripts/compile_profile.flowis also edited by #1401; the two merge cleanly (git merge-tree). As acompiler/srcPR it needs its own bootstrap regeneration at merge time.