OSDN Git Service

Avoid allocating OatFile::OatClass on the heap.
authorVladimir Marko <vmarko@google.com>
Fri, 11 Apr 2014 15:32:51 +0000 (16:32 +0100)
committerVladimir Marko <vmarko@google.com>
Mon, 14 Apr 2014 17:03:41 +0000 (18:03 +0100)
commitd3c5bebcb52a67cb06e7ab303eaf45f230c08b60
tree85df477ba745b1e2c85ab1d167b0297236060f2f
parent043a7a6182870964021476484b1534106ff20600
Avoid allocating OatFile::OatClass on the heap.

Avoid allocating a BitVector for OatFile::OatClass::bitmap_
with kOatClassSomeCompiled methods. That makes the OatClass
copy-constructible as it doesn't own any memory. We use that
in OatFile::OatDexFile::GetOatClass() to return the result
by value thus avoiding one or two heap allocations per call.

Change-Id: Ic7098109028a5b49e39ef626f877de86e732ed18
compiler/oat_test.cc
oatdump/oatdump.cc
runtime/base/bit_vector.cc
runtime/base/bit_vector.h
runtime/base/bit_vector_test.cc
runtime/class_linker.cc
runtime/class_linker.h
runtime/oat_file.cc
runtime/oat_file.h