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() {
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() {
// Update logging information before enforcing flag implications.
bool* log_all_flags[] = {&FLAG_turbo_profiling_log_builtins,
......@@ -129,7 +136,7 @@ void V8::InitializeOncePerProcessImpl() {
// memory.
#if V8_ENABLE_WEBASSEMBLY
if (FLAG_jitless && !FLAG_correctness_fuzzer_suppressions) {
FLAG_expose_wasm = false;
DISABLE_FLAG(expose_wasm);
}
#endif
......@@ -139,24 +146,24 @@ void V8::InitializeOncePerProcessImpl() {
// TODO(chromium:1205289): Teach relevant fuzzers to not pass TF tracing
// flags instead, and remove this section.
if (FLAG_fuzzing && FLAG_concurrent_recompilation) {
FLAG_trace_turbo = false;
FLAG_trace_turbo_graph = false;
FLAG_trace_turbo_scheduled = false;
FLAG_trace_turbo_reduction = false;
FLAG_trace_turbo_trimming = false;
FLAG_trace_turbo_jt = false;
FLAG_trace_turbo_ceq = false;
FLAG_trace_turbo_loop = false;
FLAG_trace_turbo_alloc = false;
FLAG_trace_all_uses = false;
FLAG_trace_representation = false;
FLAG_trace_turbo_stack_accesses = false;
DISABLE_FLAG(trace_turbo);
DISABLE_FLAG(trace_turbo_graph);
DISABLE_FLAG(trace_turbo_scheduled);
DISABLE_FLAG(trace_turbo_reduction);
DISABLE_FLAG(trace_turbo_trimming);
DISABLE_FLAG(trace_turbo_jt);
DISABLE_FLAG(trace_turbo_ceq);
DISABLE_FLAG(trace_turbo_loop);
DISABLE_FLAG(trace_turbo_alloc);
DISABLE_FLAG(trace_all_uses);
DISABLE_FLAG(trace_representation);
DISABLE_FLAG(trace_turbo_stack_accesses);
}
if (FLAG_regexp_interpret_all && FLAG_regexp_tier_up) {
// Turning off the tier-up strategy, because the --regexp-interpret-all and
// --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
......
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