diff options
author | Ian Rogers <irogers@google.com> | 2013-11-06 20:16:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-11-06 20:16:53 +0000 |
commit | 56dafdd47cdcde1ba76d6770c506322ffb55b2b3 (patch) | |
tree | f2ff7c9ff3d1e23e574b0afeb35c174fe584e934 /oatdump | |
parent | 82a9539625f553107b35907f25fb5804a1289936 (diff) | |
parent | fa82427c68b09f4aedbee319dc71579afbfc66f5 (diff) | |
download | art-56dafdd47cdcde1ba76d6770c506322ffb55b2b3.zip art-56dafdd47cdcde1ba76d6770c506322ffb55b2b3.tar.gz art-56dafdd47cdcde1ba76d6770c506322ffb55b2b3.tar.bz2 |
Merge "Fix oatdump and valgrind." into dalvik-dev
Diffstat (limited to 'oatdump')
-rw-r--r-- | oatdump/oatdump.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index b9716d5..90276c2 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -715,14 +715,25 @@ class ImageDumper { if (image_root_object->IsObjectArray()) { Indenter indent2_filter(indent1_os.rdbuf(), kIndentChar, kIndentBy1Count); std::ostream indent2_os(&indent2_filter); - // TODO: replace down_cast with AsObjectArray (g++ currently has a problem with this) mirror::ObjectArray<mirror::Object>* image_root_object_array - = down_cast<mirror::ObjectArray<mirror::Object>*>(image_root_object); - // = image_root_object->AsObjectArray<Object>(); + = image_root_object->AsObjectArray<mirror::Object>(); for (int i = 0; i < image_root_object_array->GetLength(); i++) { mirror::Object* value = image_root_object_array->Get(i); + size_t run = 0; + for (int32_t j = i + 1; j < image_root_object_array->GetLength(); j++) { + if (value == image_root_object_array->Get(j)) { + run++; + } else { + break; + } + } + if (run == 0) { + indent2_os << StringPrintf("%d: ", i); + } else { + indent2_os << StringPrintf("%d to %zd: ", i, i + run); + i = i + run; + } if (value != NULL) { - indent2_os << i << ": "; PrettyObjectValue(indent2_os, value->GetClass(), value); } else { indent2_os << i << ": null\n"; |