Only compile hot methods
Instead of compiling all startup + hot methods, we now only compile
hot methods. However, the current logic still marks all startup
methods that have a counter greater than hot_method_sample_threshold_
as hot methods. Since hot-startup-method-samples is currently 1,
there is no current behavioral change.
The goal is to increase hot_method_sample_threshold_ in a follow up
CL.
Renamed startup-method-samples to hot-startup-method-samples to
better reflect the new behavior of the option.
Test: test-art-host
Bug: 36457259
Change-Id: I820bdcd4426769d76131b08a8b41f3b7eebfbc23
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 93f678c..d157652 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1000,8 +1000,9 @@
if (profile_compilation_info_ == nullptr) {
return false;
}
- // TODO: Revisit compiling all startup methods. b/36457259
- bool result = profile_compilation_info_->IsStartupOrHotMethod(method_ref);
+ // Compile only hot methods, it is the profile saver's job to decide what startup methods to mark
+ // as hot.
+ bool result = profile_compilation_info_->ContainsHotMethod(method_ref);
if (kDebugProfileGuidedCompilation) {
LOG(INFO) << "[ProfileGuidedCompilation] "