Add more comments in GetProfiledMethods
Explain why we are looking in the method dex file for array types.
Test: m test-art-host
Change-Id: Ib94475f79844968591f72f46a2c714f9971778ba
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index b1ba952..a2ea96d 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -1270,6 +1270,9 @@
if (cls->GetDexCache() == nullptr) {
DCHECK(cls->IsArrayClass()) << cls->PrettyClass();
+ // Make a best effort to find the type index in the method's dex file.
+ // We could search all open dex files but that might turn expensive
+ // and probably not worth it.
class_dex_file = dex_file;
type_index = cls->FindTypeIndexInOtherDexFile(*dex_file);
} else {
@@ -1278,7 +1281,6 @@
}
if (!type_index.IsValid()) {
// Could be a proxy class or an array for which we couldn't find the type index.
- // TODO(calin): can we really miss the type index for arrays here?
continue;
}
if (ContainsElement(dex_base_locations, class_dex_file->GetBaseLocation())) {