From 7de5dfe37f3cf24e1166412b589f6f67dcd1f1c0 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 22 Sep 2015 09:48:02 +0000 Subject: Revert "Add one LinearAlloc per ClassLoader" Times out on 32bit target/host for 132-daemon-locks-shutdown test. Bug: 22720414 This reverts commit 356412e2b7ba3fde164bc08a44fee0ddc19c54e1. Change-Id: I5ab3a09e88a5ad8c306a27d2606ecbecc80b9326 --- runtime/stack.cc | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'runtime/stack.cc') diff --git a/runtime/stack.cc b/runtime/stack.cc index 7f72f8ab61..d739743151 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -840,30 +840,23 @@ void StackVisitor::SanityCheckFrame() const { } else { CHECK(declaring_class == nullptr); } - Runtime* const runtime = Runtime::Current(); - LinearAlloc* const linear_alloc = runtime->GetLinearAlloc(); - if (!linear_alloc->Contains(method)) { - // Check class linker linear allocs. - mirror::Class* klass = method->GetDeclaringClass(); - LinearAlloc* const class_linear_alloc = (klass != nullptr) - ? ClassLinker::GetAllocatorForClassLoader(klass->GetClassLoader()) - : linear_alloc; - if (!class_linear_alloc->Contains(method)) { - // Check image space. - bool in_image = false; - for (auto& space : runtime->GetHeap()->GetContinuousSpaces()) { - if (space->IsImageSpace()) { - auto* image_space = space->AsImageSpace(); - const auto& header = image_space->GetImageHeader(); - const auto* methods = &header.GetMethodsSection(); - if (methods->Contains(reinterpret_cast(method) - image_space->Begin())) { - in_image = true; - break; - } + auto* runtime = Runtime::Current(); + auto* la = runtime->GetLinearAlloc(); + if (!la->Contains(method)) { + // Check image space. + bool in_image = false; + for (auto& space : runtime->GetHeap()->GetContinuousSpaces()) { + if (space->IsImageSpace()) { + auto* image_space = space->AsImageSpace(); + const auto& header = image_space->GetImageHeader(); + const auto* methods = &header.GetMethodsSection(); + if (methods->Contains(reinterpret_cast(method) - image_space->Begin())) { + in_image = true; + break; } } - CHECK(in_image) << PrettyMethod(method) << " not in linear alloc or image"; } + CHECK(in_image) << PrettyMethod(method) << " not in linear alloc or image"; } if (cur_quick_frame_ != nullptr) { method->AssertPcIsWithinQuickCode(cur_quick_frame_pc_); -- cgit v1.2.3-59-g8ed1b