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/knownfailures.json b/test/knownfailures.json
index 252d13a..2b77e40 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -744,5 +744,10 @@
"tests": "664-aget-verifier",
"description": ["Aget on potentially null array fails verification."],
"bug": "b/64683522"
+ },
+ {
+ "tests": "661-oat-writer-layout",
+ "variant": "interp-ac | interpreter | jit",
+ "description": ["Test is designed to only check --compiler-filter=speed"]
}
]