Commit 473b3881 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

Skip no-op stores when enforcing flag implications

The d8 shell modifies compiler flags in PrepareStressRun after isolate
was already set up and has run some JS code. Updating these flags
forces recomputation of implications for all flags.

This causes no-op stores to some unrelated flags that are accessed
from background threads leading to benign data races.

Bug: v8:10315
Change-Id: I568445d4382ae392970deccbf9588c98e46a4a4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2390140
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69672}
parent 7dc8d1f3
...@@ -60,13 +60,13 @@ ...@@ -60,13 +60,13 @@
// We produce the code to set flags when it is implied by another flag. // We produce the code to set flags when it is implied by another flag.
#elif defined(FLAG_MODE_DEFINE_IMPLICATIONS) #elif defined(FLAG_MODE_DEFINE_IMPLICATIONS)
#define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) \ #define DEFINE_VALUE_IMPLICATION(whenflag, thenflag, value) \
if (FLAG_##whenflag) FLAG_##thenflag = value; if (FLAG_##whenflag && FLAG_##thenflag != (value)) FLAG_##thenflag = (value);
#define DEFINE_GENERIC_IMPLICATION(whenflag, statement) \ #define DEFINE_GENERIC_IMPLICATION(whenflag, statement) \
if (FLAG_##whenflag) statement; if (FLAG_##whenflag) statement;
#define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) \ #define DEFINE_NEG_VALUE_IMPLICATION(whenflag, thenflag, value) \
if (!FLAG_##whenflag) FLAG_##thenflag = value; if (!FLAG_##whenflag && FLAG_##thenflag != (value)) FLAG_##thenflag = (value);
// We apply a generic macro to the flags. // We apply a generic macro to the flags.
#elif defined(FLAG_MODE_APPLY) #elif defined(FLAG_MODE_APPLY)
...@@ -1078,8 +1078,8 @@ DEFINE_INT(stress_marking, 0, ...@@ -1078,8 +1078,8 @@ DEFINE_INT(stress_marking, 0,
DEFINE_INT(stress_scavenge, 0, DEFINE_INT(stress_scavenge, 0,
"force scavenge at random points between 0 and X (inclusive) " "force scavenge at random points between 0 and X (inclusive) "
"percent of the new space capacity") "percent of the new space capacity")
DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_marking) DEFINE_VALUE_IMPLICATION(fuzzer_gc_analysis, stress_marking, 99)
DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_scavenge) DEFINE_VALUE_IMPLICATION(fuzzer_gc_analysis, stress_scavenge, 99)
DEFINE_BOOL( DEFINE_BOOL(
reclaim_unmodified_wrappers, true, reclaim_unmodified_wrappers, true,
"reclaim otherwise unreachable unmodified wrapper objects when possible") "reclaim otherwise unreachable unmodified wrapper objects when possible")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment