Skip to content

Commit

Permalink
Ignore --predictable when computing flag list hashes
Browse files Browse the repository at this point in the history
This allows reproducible code cache generation.

Refs: nodejs/node#48749

Change-Id: Ib4693de60ddff1fe41d95c10980f763463db3f95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4681766
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#88943}
  • Loading branch information
joyeecheung authored and V8 LUCI CQ committed Jul 14, 2023
1 parent 1448916 commit b33bf2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flags/flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,10 @@ uint32_t ComputeFlagListHash() {
// We want to be able to flip --profile-deserialization without
// causing the code cache to get invalidated by this hash.
if (flag.PointsTo(&v8_flags.profile_deserialization)) continue;
// Skip v8_flags.random_seed to allow predictable code caching.
// Skip v8_flags.random_seed and v8_flags.predictable to allow predictable
// code caching.
if (flag.PointsTo(&v8_flags.random_seed)) continue;
if (flag.PointsTo(&v8_flags.predictable)) continue;
modified_args_as_string << flag;
}
std::string args(modified_args_as_string.str());
Expand Down

0 comments on commit b33bf2d

Please sign in to comment.