OSDN Git Service

Use dex cache from compilation unit in RTP.
authorVladimir Marko <vmarko@google.com>
Tue, 19 Apr 2016 14:12:13 +0000 (14:12 +0000)
committerVladimir Marko <vmarko@google.com>
Thu, 21 Apr 2016 11:28:59 +0000 (12:28 +0100)
commita4336d253b88f95c49891a8084579a4599785e90
tree3d80ca96662f56b25f7af0a06c33b931eb7075d0
parent89a48396e0f0482e0ab446a1b2bd3217a51746b1
Use dex cache from compilation unit in RTP.

Avoid calling the costly ClassLinker::FindDexCache() from
reference type propagation when the dex cache from the
compilation unit will do, i.e. almost always. Compiling
the Nexus 5 boot image on host under perf(1) shows that
the FindDexCache() hits drop from about 0.2% to almost
nothing, though enabling inlining for the boot image will
increase it a bit to 0.03% due to unavoidable calls from
the inliner.

Also clean up the ScopedObjectAccess usage a bit.

Bug: 28173563

Cherry-picked the "revert-revert"
    (cherry picked from commit 456307a47336e3d6576ed6d8563b67573a4238d3)
and squashed two subsequent fixes
    Fix RTP to hold mutator lock while using raw mirror pointers.
    (cherry picked from commit 62977ff198deb673a6990202a2fb8b993217c57c)
    Fix reference_type_propagation_test.
    (cherry picked from commit 5eed0c5d27f091c952704f652cd77c4e3833ad88)

Change-Id: Ia944452d7ab26aed963832a9346df363743a419f
compiler/optimizing/builder.h
compiler/optimizing/inliner.cc
compiler/optimizing/nodes.h
compiler/optimizing/reference_type_propagation.cc
compiler/optimizing/reference_type_propagation.h
compiler/optimizing/reference_type_propagation_test.cc
compiler/optimizing/ssa_builder.cc
compiler/optimizing/ssa_builder.h