OSDN Git Service

Use dex cache from compilation unit in RTP.
authorVladimir Marko <vmarko@google.com>
Thu, 14 Apr 2016 17:07:55 +0000 (18:07 +0100)
committerVladimir Marko <vmarko@google.com>
Thu, 14 Apr 2016 17:45:01 +0000 (18:45 +0100)
commit27bb86edf60e2f9ca2c1075c0c86b9e79374f1d0
tree5e2cb0caa0b4456fd55c93f6c863bb3b26d5cd31
parent0108f3d945cd5483217d7bf1df75ab5108d4555c
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.

Change-Id: I426a5f9f5da9e64fad2ea57654240789a48d3871
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/ssa_builder.cc
compiler/optimizing/ssa_builder.h