Commit c55994a0 authored by Ross McIlroy's avatar Ross McIlroy Committed by V8 LUCI CQ

[Flags] Add a warning when flags are disabled due to conflicts.

Change-Id: I29b3a805a6031bf874e8b7e0775f5725b6180fca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2914879Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74734}
parent 1dd70d42
...@@ -65,6 +65,13 @@ void V8::TearDown() { ...@@ -65,6 +65,13 @@ void V8::TearDown() {
FlagList::ResetAllFlags(); // Frees memory held by string arguments. FlagList::ResetAllFlags(); // Frees memory held by string arguments.
} }
#define DISABLE_FLAG(flag) \
if (FLAG_##flag) { \
PrintF(stderr, \
"Warning: disabling flag --" #flag " due to conflicting flags\n"); \
FLAG_##flag = false; \
}
void V8::InitializeOncePerProcessImpl() { void V8::InitializeOncePerProcessImpl() {
// Update logging information before enforcing flag implications. // Update logging information before enforcing flag implications.
bool* log_all_flags[] = {&FLAG_turbo_profiling_log_builtins, bool* log_all_flags[] = {&FLAG_turbo_profiling_log_builtins,
...@@ -129,7 +136,7 @@ void V8::InitializeOncePerProcessImpl() { ...@@ -129,7 +136,7 @@ void V8::InitializeOncePerProcessImpl() {
// memory. // memory.
#if V8_ENABLE_WEBASSEMBLY #if V8_ENABLE_WEBASSEMBLY
if (FLAG_jitless && !FLAG_correctness_fuzzer_suppressions) { if (FLAG_jitless && !FLAG_correctness_fuzzer_suppressions) {
FLAG_expose_wasm = false; DISABLE_FLAG(expose_wasm);
} }
#endif #endif
...@@ -139,24 +146,24 @@ void V8::InitializeOncePerProcessImpl() { ...@@ -139,24 +146,24 @@ void V8::InitializeOncePerProcessImpl() {
// TODO(chromium:1205289): Teach relevant fuzzers to not pass TF tracing // TODO(chromium:1205289): Teach relevant fuzzers to not pass TF tracing
// flags instead, and remove this section. // flags instead, and remove this section.
if (FLAG_fuzzing && FLAG_concurrent_recompilation) { if (FLAG_fuzzing && FLAG_concurrent_recompilation) {
FLAG_trace_turbo = false; DISABLE_FLAG(trace_turbo);
FLAG_trace_turbo_graph = false; DISABLE_FLAG(trace_turbo_graph);
FLAG_trace_turbo_scheduled = false; DISABLE_FLAG(trace_turbo_scheduled);
FLAG_trace_turbo_reduction = false; DISABLE_FLAG(trace_turbo_reduction);
FLAG_trace_turbo_trimming = false; DISABLE_FLAG(trace_turbo_trimming);
FLAG_trace_turbo_jt = false; DISABLE_FLAG(trace_turbo_jt);
FLAG_trace_turbo_ceq = false; DISABLE_FLAG(trace_turbo_ceq);
FLAG_trace_turbo_loop = false; DISABLE_FLAG(trace_turbo_loop);
FLAG_trace_turbo_alloc = false; DISABLE_FLAG(trace_turbo_alloc);
FLAG_trace_all_uses = false; DISABLE_FLAG(trace_all_uses);
FLAG_trace_representation = false; DISABLE_FLAG(trace_representation);
FLAG_trace_turbo_stack_accesses = false; DISABLE_FLAG(trace_turbo_stack_accesses);
} }
if (FLAG_regexp_interpret_all && FLAG_regexp_tier_up) { if (FLAG_regexp_interpret_all && FLAG_regexp_tier_up) {
// Turning off the tier-up strategy, because the --regexp-interpret-all and // Turning off the tier-up strategy, because the --regexp-interpret-all and
// --regexp-tier-up flags are incompatible. // --regexp-tier-up flags are incompatible.
FLAG_regexp_tier_up = false; DISABLE_FLAG(regexp_tier_up);
} }
// The --jitless and --interpreted-frames-native-stack flags are incompatible // The --jitless and --interpreted-frames-native-stack flags are incompatible
......
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