Fix some ArtMethod related bugs
Added root visiting for runtime methods, not currently required
since the GcRoots in these methods are null.
Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes
--trace run-tests 005, 044.
Fixed optimizing compiler bug where we used a normal stack location
instead of double on ARM64, this fixes the debuggable tests.
TODO: Fix JDWP tests.
Bug: 19264997
Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 81846df..65ea77a 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1329,6 +1329,24 @@
mirror::PrimitiveArray<int32_t>::VisitRoots(visitor); // IntArray
mirror::PrimitiveArray<int64_t>::VisitRoots(visitor); // LongArray
mirror::PrimitiveArray<int16_t>::VisitRoots(visitor); // ShortArray
+ // Visiting the roots of these ArtMethods is not currently required since all the GcRoots are
+ // null.
+ BufferedRootVisitor<16> buffered_visitor(visitor, RootInfo(kRootVMInternal));
+ if (HasResolutionMethod()) {
+ resolution_method_->VisitRoots(buffered_visitor);
+ }
+ if (HasImtConflictMethod()) {
+ imt_conflict_method_->VisitRoots(buffered_visitor);
+ }
+ if (imt_unimplemented_method_ != nullptr) {
+ imt_unimplemented_method_->VisitRoots(buffered_visitor);
+ }
+ for (size_t i = 0; i < kLastCalleeSaveType; ++i) {
+ auto* m = reinterpret_cast<ArtMethod*>(callee_save_methods_[i]);
+ if (m != nullptr) {
+ m->VisitRoots(buffered_visitor);
+ }
+ }
}
void Runtime::VisitConcurrentRoots(RootVisitor* visitor, VisitRootFlags flags) {