From 8891ea4eac12b8f48934d47f2d99da1e9b455788 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 1 Dec 2023 14:47:37 +0000 Subject: Put branch profiling under a flag. Until we evaluate its usefulness and reduce its overhead. Bug: 306638020 Test: test.py Change-Id: Ibb01c70a7ea19b03802dcc1b0792d3d2ff4f4d67 --- compiler/driver/compiler_options_map-inl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/driver/compiler_options_map-inl.h') diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h index 4734950a2c..9a02b576d1 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -68,6 +68,9 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string if (map.Exists(Base::Baseline)) { options->baseline_ = true; } + if (map.Exists(Base::ProfileBranches)) { + options->profile_branches_ = true; + } map.AssignIfExists(Base::AbortOnHardVerifierFailure, &options->abort_on_hard_verifier_failure_); map.AssignIfExists(Base::AbortOnSoftVerifierFailure, &options->abort_on_soft_verifier_failure_); if (map.Exists(Base::DumpInitFailures)) { @@ -198,6 +201,10 @@ NO_INLINE void AddCompilerOptionsArgumentParserOptions(Builder& b) { .WithHelp("Produce code using the baseline compilation") .IntoKey(Map::Baseline) + .Define("--profile-branches") + .WithHelp("Profile branches in baseline generated code") + .IntoKey(Map::ProfileBranches) + .Define({"--abort-on-hard-verifier-error", "--no-abort-on-hard-verifier-error"}) .WithValues({true, false}) .IntoKey(Map::AbortOnHardVerifierFailure) -- cgit v1.2.3-59-g8ed1b