summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Jeff Hao <jeffhao@google.com> 2016-11-16 15:15:04 -0800
committer Jeff Hao <jeffhao@google.com> 2016-11-17 11:00:37 -0800
commit54b5855192abee8cb612fce3c34b7562ddf42522 (patch)
tree0bba557936990568075507c5ba86efec959c752b /compiler/driver/compiler_driver.cc
parent3825da56fb16cb8c8128dfad3f65ce392ebf0642 (diff)
Change offline profile to store type_idx of classes.
Changed from storing class_def_idx to type_idx. Allows dexlayout to move class defs without affecting the profile. Test: mm test-art-host Change-Id: I8a040adf0f5f47a1592e18aeb55edde01cb3e1ed
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 8005cdf870..aa0d10b8d4 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -968,11 +968,12 @@ bool CompilerDriver::ShouldVerifyClassBasedOnProfile(const DexFile& dex_file,
return true;
}
DCHECK(profile_compilation_info_ != nullptr);
- bool result = profile_compilation_info_->ContainsClass(dex_file, class_idx);
+ const DexFile::ClassDef& class_def = dex_file.GetClassDef(class_idx);
+ uint16_t type_idx = class_def.class_idx_;
+ bool result = profile_compilation_info_->ContainsClass(dex_file, type_idx);
if (kDebugProfileGuidedCompilation) {
- LOG(INFO) << "[ProfileGuidedCompilation] "
- << (result ? "Verified" : "Skipped") << " method:"
- << dex_file.GetClassDescriptor(dex_file.GetClassDef(class_idx));
+ LOG(INFO) << "[ProfileGuidedCompilation] " << (result ? "Verified" : "Skipped") << " method:"
+ << dex_file.GetClassDescriptor(class_def);
}
return result;
}