summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/main.jpp
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2021-02-03 18:19:03 -0800
committerTreehugger Robot <treehugger-gerrit@google.com>2021-02-19 20:32:08 +0000
commita2f1319a8941ae52c98594824b919c08eeb0ecd1 (patch)
treedf07248cd6701bf764c01ed1322b355c16e159bf /test/ProfileTestMultiDex/main.jpp
parent642c0f0e79ce35f11e0af5625618cb126ad40ffa (diff)
Add text-profile support for multiple ICs
Text profile inline-cache support was limited to methods with only a single invoke. This extends support so it is instead based on the receiver type and supports an arbitrary number of invokes. It does assume that all invokes of the same receivers should have the same ICs. This enables us to create text profiles that can survive most common edits to the underlying java language files. IC lines are of the following format <<CLASS_GROUP>> := {CLASS}(,{CLASS})* <<IC_GROUP>> := \[{CLASS}{CLASS_GROUP} <<IC_LINE>> := {PROFILE_FLAGS}{CLASS}->{METHOD}\+{IC_GROUP}* This means a typical line might look like: ``` HLTestInline;->inlineTriplePolymorphic(LSuper;LSecret;LSecret;)I+[LSuper;LSubA;,LSubB;,LSubC;[LSecret;LSubB;,LSubC; ``` Note that old style single-invoke IC lines are still supported as well and their format has not changed. Updated --dump-classes-and-methods to dump ICs using this format. Note that it will combine ICs for different pcs with the same target so it is possible to construct a profile where the 'profile -> dump -> profile' operation is not idempotent. Any profile coming from a text-dump will be idempotent under this transform. Test: ./test.py --host Bug: 168941430 Change-Id: I69ba3b312caa7ca454487aaeb49862e393de3a4a
Diffstat (limited to 'test/ProfileTestMultiDex/main.jpp')
-rw-r--r--test/ProfileTestMultiDex/main.jpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ProfileTestMultiDex/main.jpp b/test/ProfileTestMultiDex/main.jpp
index 0644072510..bd548a88ed 100644
--- a/test/ProfileTestMultiDex/main.jpp
+++ b/test/ProfileTestMultiDex/main.jpp
@@ -4,6 +4,9 @@ Main:
TestInqline:
@@com.android.jack.annotations.ForceInMainDex
class TestInline
+Secret:
+ @@com.android.jack.annotations.ForceInMainDex
+ class Secret
Super:
@@com.android.jack.annotations.ForceInMainDex
class Super