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/cmdline/cmdline_types.h b/cmdline/cmdline_types.h
index 0d2aed8..185a0e4 100644
--- a/cmdline/cmdline_types.h
+++ b/cmdline/cmdline_types.h
@@ -727,10 +727,10 @@
&ProfileSaverOptions::save_resolved_classes_delay_ms_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "startup-method-samples:")) {
+ if (android::base::StartsWith(option, "hot-startup-method-samples:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
- &ProfileSaverOptions::startup_method_samples_,
+ &ProfileSaverOptions::hot_startup_method_samples_,
type_parser.Parse(suffix));
}
if (android::base::StartsWith(option, "min-methods-to-save:")) {