Create vdex file for dex loaded with InMemoryDexClassLoader
Previous CL introduced a background verification thread for dex bytecode
loaded with InMemoryDexClassLoader. Extend the logic to collect the
results of class verification into an instance of VerifierDeps and dump
it into a vdex file in the app's data folder.
The background thread does not collect full VerifierDeps (e.g.
assignability dependencies, etc), just a bit vector of whether a class
was successfully verified or not.
The vdex format is extended to include boot classpath checksums and the
class loader context it was created for. These are optional and
currently left empty for regular vdex files.
The generated vdex files are treated as a cache with a limited capacity,
currently capped at 8 files. The least recently used file (in terms of
atime reported by stat()) is unlinked if the cache is full and a new
vdex is about to be generated.
Bug: 72131483
Test: art/tools/run-libcore-tests.sh
Test: art/test.py -b -r -t 692 -t 693
Change-Id: I26080d894d34d8f35f00c7925db569f22f008d2c
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 34de414..b76bd5c 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -560,6 +560,7 @@
"690-hiddenapi-same-name-methods",
"691-hiddenapi-proxy",
"692-vdex-inmem-loader",
+ "693-vdex-inmem-loader-evict",
"944-transform-classloaders",
"999-redefine-hiddenapi"
],
@@ -1096,6 +1097,7 @@
"690-hiddenapi-same-name-methods",
"691-hiddenapi-proxy",
"692-vdex-inmem-loader",
+ "693-vdex-inmem-loader-evict",
"999-redefine-hiddenapi",
"1000-non-moving-space-stress",
"1001-app-image-regions",