summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/Main.java
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2021-02-19 22:43:47 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-19 22:43:47 +0000
commit4f7cc11a5f29352a4a1c08ef5211b0415d05fc22 (patch)
tree07e321e74eae344a19797435269508297046f3c4 /test/ProfileTestMultiDex/Main.java
parent360b6c816108728a268ac3cd5a361ad75a0a59ba (diff)
parent6cc3161070900133cdaef3ce819e2005338d042e (diff)
Add text-profile support for multiple ICs am: a2f1319a89 am: 4ed65e8750 am: 6cc3161070
Original change: https://android-review.googlesource.com/c/platform/art/+/1574120 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I8aee8535198b9b97e1d41fb86da8ce53343aef7b
Diffstat (limited to 'test/ProfileTestMultiDex/Main.java')
-rw-r--r--test/ProfileTestMultiDex/Main.java34
1 files changed, 33 insertions, 1 deletions
diff --git a/test/ProfileTestMultiDex/Main.java b/test/ProfileTestMultiDex/Main.java
index 978cb2c6fd..a84cb98543 100644
--- a/test/ProfileTestMultiDex/Main.java
+++ b/test/ProfileTestMultiDex/Main.java
@@ -46,26 +46,58 @@ class TestInline {
public int noInlineCache(Super s) {
return s.getValue();
}
+
+ public int inlineMultiMonomorphic(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int inlineMultiPolymorphic(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int inlineTriplePolymorphic(Super s, Secret sec, Secret thr) {
+ return s.getValue() + sec.getIdentity() + thr.getIdentity();
+ }
+
+ public int inlineMultiMegamorphic(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int inlineMultiMissingTypes(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int noInlineCacheMulti(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+}
+
+abstract class Secret {
+ abstract int getIdentity();
}
-abstract class Super {
+abstract class Super extends Secret {
abstract int getValue();
}
class SubA extends Super {
int getValue() { return 42; }
+ int getIdentity() { return 24; }
}
class SubB extends Super {
int getValue() { return 38; };
+ int getIdentity() { return 83; }
}
class SubD extends Super {
int getValue() { return 20; };
+ int getIdentity() { return 2; };
}
class SubE extends Super {
int getValue() { return 16; };
+ int getIdentity() { return 61; };
}
// Add a class with lots of methods so we can test profile guided compilation triggers.