Refactor some profiling info functions
Deleted profile_compilation_info-inl.h
Added a new helper class MethodHotness to reduce the number of
required getters for reading method hotness, startup, and post
startup booleans.
Test: test-art-host
Bug: 62040831
Change-Id: I799a38e2bea6177ba5816c54524f4ccacedba772
diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc
index 4b979d8..85d8b12 100644
--- a/compiler/driver/compiler_driver_test.cc
+++ b/compiler/driver/compiler_driver_test.cc
@@ -239,14 +239,10 @@
ProfileCompilationInfo info;
for (const std::unique_ptr<const DexFile>& dex_file : dex_files) {
- profile_info_.AddMethodIndex(dex_file->GetLocation(),
- dex_file->GetLocationChecksum(),
- 1,
- dex_file->NumMethodIds());
- profile_info_.AddMethodIndex(dex_file->GetLocation(),
- dex_file->GetLocationChecksum(),
- 2,
- dex_file->NumMethodIds());
+ profile_info_.AddMethodIndex(ProfileCompilationInfo::MethodHotness::kFlagHot,
+ MethodReference(dex_file.get(), 1));
+ profile_info_.AddMethodIndex(ProfileCompilationInfo::MethodHotness::kFlagHot,
+ MethodReference(dex_file.get(), 2));
}
return &profile_info_;
}