compiler: layout OatMethodQuickCode by profile hotness
Re-arrange all the compiled oat code by using the profile information.
If no profile is available, it retains the original order
(sorted by class_def_idx, method_idx).
Methods are all binned together in a group according to the hotness flags:
-- not hot at all
-- all hot
-- all hot and startup
-- all hot and post-startup
-- all hot and startup and poststartup
-- all startup
-- all startup and post-startup
-- all post-startup
(See MethodHotness enum definition for up-to-date binning order.)
Methods within a bin also retain the original order. A deduped method
will appear in the bin of the smallest (class_def_idx, method_idx).
Saves 700KB of memory (PSS) for system_server on most devices.
Bug: 64577026
Test: art/test.py # no regressions
Test: art/testrunner/testrunner.py -t 661-oat-writer-layout # new test
Change-Id: I40e9907d095b4a3b48bff0df8799954ef135fc19
diff --git a/test/Android.bp b/test/Android.bp
index d56c0b5..38d0651 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -420,7 +420,8 @@
"642-fp-callees/fp_callees.cc",
"647-jni-get-field-id/get_field_id.cc",
"656-annotation-lookup-generic-jni/test.cc",
- "664-aget-verifier/aget-verifier.cc",
+ "661-oat-writer-layout/oat_writer_layout.cc",
+ "664-aget-verifier/aget-verifier.cc",
"708-jit-cache-churn/jit.cc"
],
shared_libs: [