diff options
author | Alex Light <allight@google.com> | 2021-03-25 17:33:32 -0700 |
---|---|---|
committer | Alex Light <allight@google.com> | 2021-03-31 21:33:24 +0000 |
commit | cff30a0bfa3c4212f304caef24236884e144375d (patch) | |
tree | 6a431222409f3a1a96c775d14cf455b82d466301 /test/ProfileTestMultiDex | |
parent | 34aebb676cd442475e9384d72193b3693846247f (diff) |
Better support ICs on virtual calls
Due to the way we implement profiles InlineCaches are only valid on
methods with implementations. Unfortunately due to the rather slow way
we update boot profile definitions code refactorings can lead to
inline-caches being lost. This change makes profman more resilient to
this error by searching up the superclass resolutions to try to find a
method the inline-caches can be attached to. This should ensure that
boot-profile definitions fall out of date more slowly.
Test: ./test.py --host
Bug: 168941430
Change-Id: I5f6096500fa6f17e285b5a7bab21ad8216221966
Diffstat (limited to 'test/ProfileTestMultiDex')
-rw-r--r-- | test/ProfileTestMultiDex/Main.java | 6 | ||||
-rw-r--r-- | test/ProfileTestMultiDex/main.jpp | 5 | ||||
-rw-r--r-- | test/ProfileTestMultiDex/main.list | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/test/ProfileTestMultiDex/Main.java b/test/ProfileTestMultiDex/Main.java index a84cb98543..98d4d96281 100644 --- a/test/ProfileTestMultiDex/Main.java +++ b/test/ProfileTestMultiDex/Main.java @@ -72,6 +72,12 @@ class TestInline { } } +class TestInlineSubtype extends TestInline { + public void foobar() { + this.inlineMonomorphic(new SubA()); + } +} + abstract class Secret { abstract int getIdentity(); } diff --git a/test/ProfileTestMultiDex/main.jpp b/test/ProfileTestMultiDex/main.jpp index bd548a88ed..33fede8a5b 100644 --- a/test/ProfileTestMultiDex/main.jpp +++ b/test/ProfileTestMultiDex/main.jpp @@ -1,7 +1,7 @@ Main: @@com.android.jack.annotations.ForceInMainDex class Main -TestInqline: +TestInline: @@com.android.jack.annotations.ForceInMainDex class TestInline Secret: @@ -25,3 +25,6 @@ SubE: ZLotsOfMethods: @@com.android.jack.annotations.ForceInMainDex class ZLotsOfMethods +TestInlineSubtype: + @@com.android.jack.annotations.ForceInMainDex + class TestInlineSubtype diff --git a/test/ProfileTestMultiDex/main.list b/test/ProfileTestMultiDex/main.list index 8ef9280c9e..023f948d0f 100644 --- a/test/ProfileTestMultiDex/main.list +++ b/test/ProfileTestMultiDex/main.list @@ -1,5 +1,6 @@ Main.class TestInline.class +TestInlineSubtype.class Secret.class Super.class SubA.class |