OSDN Git Service

Fix oatdump after ArtMethod change.
authorNicolas Geoffray <ngeoffray@google.com>
Wed, 8 Jul 2015 14:55:28 +0000 (15:55 +0100)
committerNicolas Geoffray <ngeoffray@google.com>
Wed, 8 Jul 2015 14:55:28 +0000 (15:55 +0100)
ArtMethod is now word aligned, and not necessarily 8 byte aligned.

Change-Id: I8bd6b2f156d7f2ab191d6f2675b013713bbf258d

oatdump/oatdump.cc

index cf4f822..8dde547 100644 (file)
@@ -1618,7 +1618,8 @@ class ImageDumper {
     stats_.alignment_bytes += bitmap_section.Offset() - image_header_.GetImageSize();
     stats_.bitmap_bytes += bitmap_section.Size();
     stats_.art_field_bytes += field_section.Size();
-    stats_.art_method_bytes += method_section.Size();
+    // RoundUp to 8 bytes to match the intern table alignment expectation.
+    stats_.art_method_bytes += RoundUp(method_section.Size(), sizeof(uint64_t));
     stats_.interned_strings_bytes += intern_section.Size();
     stats_.Dump(os);
     os << "\n";