summaryrefslogtreecommitdiffstats
path: root/oatdump
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-08-30 14:04:08 -0700
committerMathieu Chartier <mathieuc@google.com>2013-08-30 14:13:41 -0700
commit32327098e300ab66671b891a18bf669576fc896a (patch)
treecc7b93b256a6890534f3f5929b2609f40ab71033 /oatdump
parent70814f7746793934a29e010211ef6e652ad75cd2 (diff)
downloadart-32327098e300ab66671b891a18bf669576fc896a.zip
art-32327098e300ab66671b891a18bf669576fc896a.tar.gz
art-32327098e300ab66671b891a18bf669576fc896a.tar.bz2
Fix oatdump to take bitmap bytes into its accounting.
Bug: 10567842 Change-Id: I14d921343bc54598a83cfcf8d7185dca702c2739
Diffstat (limited to 'oatdump')
-rw-r--r--oatdump/oatdump.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index d683c8e..cf1b6af 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -780,6 +780,8 @@ class ImageDumper {
stats_.header_bytes = header_bytes;
size_t alignment_bytes = RoundUp(header_bytes, kObjectAlignment) - header_bytes;
stats_.alignment_bytes += alignment_bytes;
+ stats_.alignment_bytes += image_header_.GetImageBitmapOffset() - image_header_.GetImageSize();
+ stats_.bitmap_bytes += image_header_.GetImageBitmapSize();
stats_.Dump(os);
os << "\n";
@@ -1066,6 +1068,7 @@ class ImageDumper {
size_t header_bytes;
size_t object_bytes;
+ size_t bitmap_bytes;
size_t alignment_bytes;
size_t managed_code_bytes;
@@ -1092,6 +1095,7 @@ class ImageDumper {
file_bytes(0),
header_bytes(0),
object_bytes(0),
+ bitmap_bytes(0),
alignment_bytes(0),
managed_code_bytes(0),
managed_code_bytes_ignoring_deduplication(0),
@@ -1250,12 +1254,14 @@ class ImageDumper {
std::ostream indent_os(&indent_filter);
indent_os << StringPrintf("header_bytes = %8zd (%2.0f%% of art file bytes)\n"
"object_bytes = %8zd (%2.0f%% of art file bytes)\n"
+ "bitmap_bytes = %8zd (%2.0f%% of art file bytes)\n"
"alignment_bytes = %8zd (%2.0f%% of art file bytes)\n\n",
header_bytes, PercentOfFileBytes(header_bytes),
object_bytes, PercentOfFileBytes(object_bytes),
+ bitmap_bytes, PercentOfFileBytes(bitmap_bytes),
alignment_bytes, PercentOfFileBytes(alignment_bytes))
<< std::flush;
- CHECK_EQ(file_bytes, header_bytes + object_bytes + alignment_bytes);
+ CHECK_EQ(file_bytes, bitmap_bytes + header_bytes + object_bytes + alignment_bytes);
}
os << "object_bytes breakdown:\n";