summaryrefslogtreecommitdiffstats
path: root/runtime/image.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-08-28 11:29:12 -0700
committerMathieu Chartier <mathieuc@google.com>2013-08-29 15:52:42 -0700
commit31e8925781c2302f1d1a9b39e216ba415bfe0d7e (patch)
tree12a9173c7134bc08712e46f11ee897072b7afb61 /runtime/image.cc
parentc6dfdacea2fd9e268f70328805b0366cdd6b7b9e (diff)
downloadart-31e8925781c2302f1d1a9b39e216ba415bfe0d7e.zip
art-31e8925781c2302f1d1a9b39e216ba415bfe0d7e.tar.gz
art-31e8925781c2302f1d1a9b39e216ba415bfe0d7e.tar.bz2
Write out image bitmap inside of image file.
We now create the image bitmap when we generate the image. The image bitmap is written after the image inside of the image file. This speeds up dex2oat by making walking the image during heap creation unnecessary. This should also help memory pressure by enabling the image bitmap to be swappable. Bug: 10432288 Change-Id: Idebf459ed15edbb41a7d9b9b353934155bce2f19
Diffstat (limited to 'runtime/image.cc')
-rw-r--r--runtime/image.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/image.cc b/runtime/image.cc
index 686a117..d11594c 100644
--- a/runtime/image.cc
+++ b/runtime/image.cc
@@ -24,9 +24,12 @@
namespace art {
const byte ImageHeader::kImageMagic[] = { 'a', 'r', 't', '\n' };
-const byte ImageHeader::kImageVersion[] = { '0', '0', '4', '\0' };
+const byte ImageHeader::kImageVersion[] = { '0', '0', '5', '\0' };
ImageHeader::ImageHeader(uint32_t image_begin,
+ uint32_t image_size,
+ uint32_t image_bitmap_offset,
+ uint32_t image_bitmap_size,
uint32_t image_roots,
uint32_t oat_checksum,
uint32_t oat_file_begin,
@@ -34,6 +37,9 @@ ImageHeader::ImageHeader(uint32_t image_begin,
uint32_t oat_data_end,
uint32_t oat_file_end)
: image_begin_(image_begin),
+ image_size_(image_size),
+ image_bitmap_offset_(image_bitmap_offset),
+ image_bitmap_size_(image_bitmap_size),
oat_checksum_(oat_checksum),
oat_file_begin_(oat_file_begin),
oat_data_begin_(oat_data_begin),