summaryrefslogtreecommitdiff
path: root/oatdump/oatdump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'oatdump/oatdump.cc')
-rw-r--r--oatdump/oatdump.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 147be4afa7..9a3b28b16e 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -1473,7 +1473,7 @@ class OatDumper {
Runtime* const runtime = Runtime::Current();
Handle<mirror::DexCache> dex_cache(
hs->NewHandle(runtime->GetClassLinker()->RegisterDexFile(*dex_file, nullptr)));
- CHECK(dex_cache.Get() != nullptr);
+ CHECK(dex_cache != nullptr);
DCHECK(options_.class_loader_ != nullptr);
return verifier::MethodVerifier::VerifyMethodAndDump(
soa.Self(), vios, dex_method_idx, dex_file, dex_cache, *options_.class_loader_,
@@ -2235,14 +2235,9 @@ class ImageDumper {
ScopedIndentation indent2(&state->vios_);
auto* resolved_types = dex_cache->GetResolvedTypes();
for (size_t i = 0; i < num_types; ++i) {
- auto pair = resolved_types[i].load(std::memory_order_relaxed);
+ auto* elem = resolved_types[i].Read();
size_t run = 0;
- for (size_t j = i + 1; j != num_types; ++j) {
- auto other_pair = resolved_types[j].load(std::memory_order_relaxed);
- if (pair.index != other_pair.index ||
- pair.object.Read() != other_pair.object.Read()) {
- break;
- }
+ for (size_t j = i + 1; j != num_types && elem == resolved_types[j].Read(); ++j) {
++run;
}
if (run == 0) {
@@ -2252,13 +2247,12 @@ class ImageDumper {
i = i + run;
}
std::string msg;
- auto* elem = pair.object.Read();
if (elem == nullptr) {
msg = "null";
} else {
msg = elem->PrettyClass();
}
- os << StringPrintf("%p %u %s\n", elem, pair.index, msg.c_str());
+ os << StringPrintf("%p %s\n", elem, msg.c_str());
}
}
}
@@ -2956,7 +2950,7 @@ class IMTDumper {
const DexFile::ClassDef& class_def = dex_file->GetClassDef(class_def_index);
const char* descriptor = dex_file->GetClassDescriptor(class_def);
h_klass.Assign(class_linker->FindClass(self, descriptor, h_class_loader));
- if (h_klass.Get() == nullptr) {
+ if (h_klass == nullptr) {
std::cerr << "Warning: could not load " << descriptor << std::endl;
continue;
}