Commit 6f95f22e authored by Tobias Tebbi's avatar Tobias Tebbi Committed by V8 LUCI CQ

[builtins] suppress builtin PGO warnings

Bug: v8:13119
Change-Id: Idbacfe1fd8259a8ff378ec97c770cc997c0c813d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3792606Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82083}
parent c0690fa8
......@@ -3114,8 +3114,11 @@ MaybeHandle<Code> Pipeline::GenerateCodeForCodeStub(
if (profile_data != nullptr &&
profile_data->hash() != graph_hash_before_scheduling) {
PrintF("Rejected profile data for %s due to function change\n", debug_name);
PrintF("Please use tools/builtins-pgo/generate.py to refresh it.\n");
if (FLAG_warn_about_builtin_profile_data) {
PrintF("Rejected profile data for %s due to function change\n",
debug_name);
PrintF("Please use tools/builtins-pgo/generate.py to refresh it.\n");
}
profile_data = nullptr;
data.set_profile_data(profile_data);
}
......
......@@ -495,7 +495,8 @@ class CFGBuilder : public ZoneObject {
break;
}
if (hint_from_profile != BranchHint::kNone &&
if (FLAG_warn_about_builtin_profile_data &&
hint_from_profile != BranchHint::kNone &&
BranchHintOf(branch->op()) != BranchHint::kNone &&
hint_from_profile != BranchHintOf(branch->op())) {
PrintF("Warning: profiling data overrode manual branch hint.\n");
......
......@@ -927,6 +927,9 @@ DEFINE_IMPLICATION(turbo_profiling_verbose, turbo_profiling)
DEFINE_BOOL(turbo_profiling_log_builtins, false,
"emit data about basic block usage in builtins to v8.log (requires "
"that V8 was built with v8_enable_builtins_profiling=true)")
DEFINE_BOOL(
warn_about_builtin_profile_data, false,
"flag for mksnapshot, emit warnings when applying builtin profile data")
DEFINE_BOOL(turbo_verify_allocation, DEBUG_BOOL,
"verify register allocation in TurboFan")
DEFINE_BOOL(turbo_move_optimization, true, "optimize gap moves in TurboFan")
......
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