From 78f62d84f23153d77d542b32e4ebe248bbb6b44c Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 10 Jan 2022 16:25:19 +0000 Subject: Rewrite interface table setup. Collect references for all required interfaces and allocate the table of the correct size to avoid reallocation. Add new cases when we can reuse the interface table from the superclass. When there are no new interfaces, check also for concrete class with no new virtual methods. After collecting interface references, re-check if all direct interfaces were already present in the interface table of the superclass. Primary boot images for aosp_oriole-userdebug have unchanged reservation size for both arm and arm64 (the size reduction did not cross a page boundary in any .art file). The boot image extension reservations are smaller by 1 page (4KiB) for arm and 4 pages (16KiB) for arm64. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Change-Id: I5a0d2d44f53fca05ac6a86888a7d5a673570f9ec --- runtime/class_linker.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'runtime/class_linker.h') diff --git a/runtime/class_linker.h b/runtime/class_linker.h index b0c02e538e..22a8c7f190 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -552,10 +552,6 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); - ObjPtr AllocIfTable(Thread* self, size_t ifcount) - REQUIRES_SHARED(Locks::mutator_lock_) - REQUIRES(!Roles::uninterruptible_); - ObjPtr> AllocStackTraceElementArray(Thread* self, size_t length) REQUIRES_SHARED(Locks::mutator_lock_) @@ -1172,14 +1168,6 @@ class ClassLinker { const dex::MethodHandleItem& method_handle, ArtMethod* referrer) REQUIRES_SHARED(Locks::mutator_lock_); - // Sets up the interface lookup table (IFTable) in the correct order to allow searching for - // default methods. - bool SetupInterfaceLookupTable(Thread* self, - Handle klass, - Handle> interfaces) - REQUIRES_SHARED(Locks::mutator_lock_); - - enum class DefaultMethodSearchResult { kDefaultFound, kAbstractFound, -- cgit v1.2.3-59-g8ed1b