summaryrefslogtreecommitdiffstats
path: root/oatdump
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-07-09 11:38:21 -0700
committerAndreas Gampe <agampe@google.com>2014-07-11 15:53:27 -0700
commit22f8e5c82d12951be38cd893426e13bee33fd69d (patch)
treef575655ba55315205b7a73f1e02773497913b157 /oatdump
parent946a55fa7aec5058d357b601ac3554e242cd1afa (diff)
downloadart-22f8e5c82d12951be38cd893426e13bee33fd69d.zip
art-22f8e5c82d12951be38cd893426e13bee33fd69d.tar.gz
art-22f8e5c82d12951be38cd893426e13bee33fd69d.tar.bz2
Revert "Revert "ART: Key-Value Store in Oat header""
This reverts commit 452bee5da9811f62123978e142bd67b385e9ff82. Heap-allocate a couple of objects in dex2oat to avoid large frame size. Includes fixes originally in 100596 and 100605. Change-Id: Id51a44198c973c91f0a3f87b9d992a5dc110c6f8
Diffstat (limited to 'oatdump')
-rw-r--r--oatdump/oatdump.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 12970fc..631d538 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -171,10 +171,18 @@ class OatDumper {
os << "IMAGE FILE LOCATION OAT BEGIN:\n";
os << StringPrintf("0x%08x\n\n", oat_header.GetImageFileLocationOatDataBegin());
- os << "IMAGE FILE LOCATION:\n";
- const std::string image_file_location(oat_header.GetImageFileLocation());
- os << image_file_location;
- os << "\n\n";
+ // Print the key-value store.
+ {
+ os << "KEY VALUE STORE:\n";
+ size_t index = 0;
+ const char* key;
+ const char* value;
+ while (oat_header.GetStoreKeyValuePairByIndex(index, &key, &value)) {
+ os << key << " = " << value << "\n";
+ index++;
+ }
+ os << "\n";
+ }
os << "BEGIN:\n";
os << reinterpret_cast<const void*>(oat_file_.Begin()) << "\n\n";