summaryrefslogtreecommitdiff
path: root/test/MultiDexModifiedSecondary/Main.java
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2020-03-05 17:13:28 +0000
committerVladimir Marko <vmarko@google.com>2020-03-09 10:03:15 +0000
commit37d6d77297bf682eed7f9d65be49e8ea61aa3b69 (patch)
treec513eaf0af894e7beb324eb6ebbba86ed393a7d5 /test/MultiDexModifiedSecondary/Main.java
parentf5d83b3a550496f6ef120606de9920b3fb85baf1 (diff)
Allow ThreadLocal object allocation during AOT.
The class ThreadLocal has a static field nextHashCode used for assigning hash codes to new ThreadLocal objects. Since the class and the object referenced by the field are in the boot image, they cannot be modified under normal rules for AOT compilation. However, since this is a private detail that's used only for assigning hash codes and everything should work fine with different hash codes, we override the field for the compilation, providing another object that the AOT class initialization can modify. We select the initial hash code based on dex file checksums. Use similar hash code selection for the identity hash code. Test: aosp_taimen-userdebug boots. Test: m dump-oat && \ grep -cE 'Class.*VisiblyInitialized' \ out/soong/boot.arm64.oatdump.txt # before: 8635 # after: 8706 Test: EMMA_INSTRUMENT_FRAMEWORK=true m Bug: 150319075 Change-Id: I46ebd8eed43860241533a8c061d7667ac84dda1f
Diffstat (limited to 'test/MultiDexModifiedSecondary/Main.java')
0 files changed, 0 insertions, 0 deletions