Skip to content

build: don't build the crowdsourced V8 compile hints producer - #52791

Merged
MarshallOfSound merged 1 commit into
mainfrom
build/no-crowdsourced-compile-hints-producer
Aug 12, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
build/no-crowdsourced-compile-hints-producer

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member

Description of Change

  • Sets produce_v8_compile_hints = false so Blink builds the stub V8CrowdsourcedCompileHintsProducer (the configuration Android already ships) instead of the real one.
  • The real producer picks 0.5% of renderer processes on Windows (v8_compile_hints_producer.cc) and, for the first page in that process, compiles every http(s) classic script from source: an existing V8 code cache is deliberately not consumed and local compile hints are neither consumed nor produced (v8_code_cache.cc), so it can record which functions were compiled to UKM.
  • The consuming half lives in chrome/browser/v8_compile_hints/ and requires OptimizationGuide, and Electron has no UKM backend, so the recorded data is never used; the only observable effect of the producer is a cold-cache load for 1 in 200 renderer processes on Windows.
  • Verified locally on Linux: gn regenerates bindings/buildflags.h with PRODUCE_V8_COMPILE_HINTS=0, v8_compile_hints_producer.o compiles down to the stub, and the build links and runs.

Checklist

Release Notes

Notes: Fixed a 1-in-200 chance per renderer process on Windows of scripts on the first page load being compiled without their V8 code cache.

Blink's crowdsourced compile hints producer selects 0.5% of renderer
processes on Windows and compiles every http(s) script on their first
page from source, deliberately ignoring an existing V8 code cache and
skipping local compile hints, so it can record which functions were
compiled to UKM. The consuming side lives in chrome/browser and needs
OptimizationGuide, and there is no UKM backend here, so the data is
never used and the only effect is a cold-cache page load. Set
produce_v8_compile_hints = false so the stub producer (already used on
Android) is built instead.
@MarshallOfSound MarshallOfSound added semver/none target/42-x-y PR should also be added to the "42-x-y" branch. target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. labels Aug 12, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) August 12, 2026 18:14
@MarshallOfSound
MarshallOfSound merged commit c6e46a4 into main Aug 12, 2026
98 of 100 checks passed
@MarshallOfSound
MarshallOfSound deleted the build/no-crowdsourced-compile-hints-producer branch August 12, 2026 19:39
@release-clerk

release-clerk Bot commented Aug 12, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a 1-in-200 chance per renderer process on Windows of scripts on the first page load being compiled without their V8 code cache.

@trop

trop Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "42-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot removed the target/42-x-y PR should also be added to the "42-x-y" branch. label Aug 12, 2026
@trop

trop Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "43-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/42-x-y needs-manual-bp/43-x-y and removed target/43-x-y PR should also be added to the "43-x-y" branch. labels Aug 12, 2026
@trop

trop Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #52792

@trop trop Bot added in-flight/44-x-y merged/44-x-y PR was merged to the "44-x-y" branch. and removed target/44-x-y PR should also be added to the "44-x-y" branch. in-flight/44-x-y labels Aug 12, 2026
@trop

trop Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

@VerteDinde has manually backported this PR to "43-x-y", please check out #52943

MarshallOfSound added a commit that referenced this pull request Aug 18, 2026
build: don't build the crowdsourced V8 compile hints producer (#52791)

Blink's crowdsourced compile hints producer selects 0.5% of renderer
processes on Windows and compiles every http(s) script on their first
page from source, deliberately ignoring an existing V8 code cache and
skipping local compile hints, so it can record which functions were
compiled to UKM. The consuming side lives in chrome/browser and needs
OptimizationGuide, and there is no UKM backend here, so the data is
never used and the only effect is a cold-cache page load. Set
produce_v8_compile_hints = false so the stub producer (already used on
Android) is built instead.

(cherry picked from commit c6e46a4)

Co-authored-by: Samuel Attard <[email protected]>
@trop trop Bot added merged/43-x-y PR was merged to the "43-x-y" branch. and removed in-flight/43-x-y labels Aug 18, 2026
@trop

trop Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

@VerteDinde has manually backported this PR to "42-x-y", please check out #52988

MarshallOfSound added a commit that referenced this pull request Aug 19, 2026
build: don't build the crowdsourced V8 compile hints producer (#52791)

Blink's crowdsourced compile hints producer selects 0.5% of renderer
processes on Windows and compiles every http(s) script on their first
page from source, deliberately ignoring an existing V8 code cache and
skipping local compile hints, so it can record which functions were
compiled to UKM. The consuming side lives in chrome/browser and needs
OptimizationGuide, and there is no UKM backend here, so the data is
never used and the only effect is a cold-cache page load. Set
produce_v8_compile_hints = false so the stub producer (already used on
Android) is built instead.

(cherry picked from commit c6e46a4)

Co-authored-by: Samuel Attard <[email protected]>
@trop trop Bot added merged/42-x-y PR was merged to the "42-x-y" branch. and removed in-flight/42-x-y labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

45-x-y merged/42-x-y PR was merged to the "42-x-y" branch. merged/43-x-y PR was merged to the "43-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. semver/none

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants