From 94ec2db21332ee1dcdbbf254b99a9a999a304fe0 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 6 Sep 2017 17:21:03 +0100 Subject: Use mmapped boot image class table for PIC app HLoadClass. Implement new HLoadClass load kind for boot image classes referenced by PIC-compiled apps (i.e. prebuilts) that uses PC-relative load from a boot image ClassTable mmapped into the apps .bss. This reduces the size of the PIC prebuilts that reference boot image classes compared to the kBssEntry as we can completely avoid the slow path and stack map unless we need to do the class initialization check. Prebuilt services.odex for aosp_angler-userdebug (arm64): - before: 20312800 - after: 19775352 (-525KiB) Test: m test-art-host-gtest Test: testrunner.py --host Test: testrunner.py --host --pictest Test: testrunner.py --target on Nexus 6P. Test: testrunner.py --target --pictest on Nexus 6P. Test: Nexus 6P boots. Bug: 31951624 Change-Id: I13adb19a1fa7d095a72a41f09daa6101876e77a8 --- runtime/class_table.h | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/class_table.h') diff --git a/runtime/class_table.h b/runtime/class_table.h index a259725399..0ffe93e051 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -287,6 +287,7 @@ class ClassTable { std::vector oat_files_ GUARDED_BY(lock_); friend class ImageWriter; // for InsertWithoutLocks. + friend class OatWriter; // for boot class TableSlot address lookup. }; } // namespace art -- cgit v1.2.3-59-g8ed1b