summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2015-11-13 14:47:00 +0000
committerVladimir Marko <vmarko@google.com>2015-11-19 11:58:41 +0000
commitfbb184a1c6df22d9302b32b55206396c8278edcf (patch)
treec1a952cec4b5c15e30728f83da0cc5ac20c0bad9 /test/ProfileTestMultiDex
parent2f49b0a90720fe9f4cab040c376aab5f387967e3 (diff)
Fix ClinitCheck pruning.
Make sure we merge the ClinitCheck only with LoadClass and HInvokeStaticOrDirect that is a part of the very same dex instruction. This fixes incorrect stack traces from class initializers (wrong dex pcs). Rewrite the pruning to do all the ClinitCheck merging when we see the ClinitCheck, instead of merging ClinitCheck into LoadClass and then LoadClass into HInvokeStaticOrDirect. When we later see an HInvokeStaticOrDirect with an explicit check (i.e. not merged), we know that some other instruction is doing the check and the invoke doesn't need to, so we mark it as not requiring the check at all. (Previously it would have been marked as having an implicit check.) Remove the restriction on merging with inlined invoke static as this is not necessary anymore. This was a workaround for X.test(): invoke-static C.foo() [1] C.foo(): invoke-static C.bar() [2] After inlining and GVN we have X.test(): LoadClass C (from [1]) ClinitCheck C (from [1], to be merged to LoadClass) InvokeStaticOrDirect C.bar() (from [2]) and the LoadClass must not be merged into the invoke as this would cause the resolution trampoline to see an inlined frame from the not-yet-loaded class C during the stack walk and try to load the class. However, we're not allowed to load new classes at that point, so an attempt to do so leads to an assertion failure. With this CL, LoadClass is not merged when it comes from a different instruction, so we can guarantee that all inlined frames seen by the stack walk in the resolution trampoline belong to already loaded classes. Change-Id: I2b8da8d4f295355dce17141f0fab2dace126684d
Diffstat (limited to 'test/ProfileTestMultiDex')
0 files changed, 0 insertions, 0 deletions