private:
const JDWP::FrameId frame_id_;
JDWP::JdwpError error_;
+
+ DISALLOW_COPY_AND_ASSIGN(FindFrameVisitor);
};
JDWP::JdwpError Dbg::GetLocalValues(JDWP::Request* request, JDWP::ExpandBuf* pReply) {
CatchLocationFinder(Thread* self, const Handle<mirror::Throwable>& exception, Context* context)
SHARED_REQUIRES(Locks::mutator_lock_)
: StackVisitor(self, context, StackVisitor::StackWalkKind::kIncludeInlinedFrames),
- self_(self),
exception_(exception),
handle_scope_(self),
this_at_throw_(handle_scope_.NewHandle<mirror::Object>(nullptr)),
}
if (dex_pc != DexFile::kDexNoIndex) {
- StackHandleScope<1> hs(self_);
+ StackHandleScope<1> hs(GetThread());
uint32_t found_dex_pc;
Handle<mirror::Class> exception_class(hs.NewHandle(exception_->GetClass()));
bool unused_clear_exception;
}
private:
- Thread* const self_;
const Handle<mirror::Throwable>& exception_;
StackHandleScope<1> handle_scope_;
MutableHandle<mirror::Object> this_at_throw_;
QuickExceptionHandler* exception_handler)
SHARED_REQUIRES(Locks::mutator_lock_)
: StackVisitor(self, context, StackVisitor::StackWalkKind::kIncludeInlinedFrames),
- self_(self),
exception_(exception),
exception_handler_(exception_handler) {
}
}
if (dex_pc != DexFile::kDexNoIndex) {
bool clear_exception = false;
- StackHandleScope<1> hs(self_);
+ StackHandleScope<1> hs(GetThread());
Handle<mirror::Class> to_find(hs.NewHandle((*exception_)->GetClass()));
uint32_t found_dex_pc = method->FindCatchBlock(to_find, dex_pc, &clear_exception);
exception_handler_->SetClearException(clear_exception);
return true; // Continue stack walk.
}
- Thread* const self_;
// The exception we're looking for the catch block of.
Handle<mirror::Throwable>* exception_;
// The quick exception handler we're visiting for.
DeoptimizeStackVisitor(Thread* self, Context* context, QuickExceptionHandler* exception_handler)
SHARED_REQUIRES(Locks::mutator_lock_)
: StackVisitor(self, context, StackVisitor::StackWalkKind::kIncludeInlinedFrames),
- self_(self),
exception_handler_(exception_handler),
prev_shadow_frame_(nullptr),
stacked_shadow_frame_pushed_(false) {
// In case there is no deoptimized shadow frame for this upcall, we still
// need to push a nullptr to the stack since there is always a matching pop after
// the long jump.
- self_->PushStackedShadowFrame(nullptr, StackedShadowFrameType::kDeoptimizationShadowFrame);
+ GetThread()->PushStackedShadowFrame(nullptr,
+ StackedShadowFrameType::kDeoptimizationShadowFrame);
stacked_shadow_frame_pushed_ = true;
}
return false; // End stack walk.
CHECK(code_item != nullptr) << "No code item for " << PrettyMethod(m);
uint16_t num_regs = code_item->registers_size_;
uint32_t dex_pc = GetDexPc();
- StackHandleScope<2> hs(self_); // Dex cache, class loader and method.
+ StackHandleScope<2> hs(GetThread()); // Dex cache, class loader and method.
mirror::Class* declaring_class = m->GetDeclaringClass();
Handle<mirror::DexCache> h_dex_cache(hs.NewHandle(declaring_class->GetDexCache()));
Handle<mirror::ClassLoader> h_class_loader(hs.NewHandle(declaring_class->GetClassLoader()));
- verifier::MethodVerifier verifier(self_, h_dex_cache->GetDexFile(), h_dex_cache, h_class_loader,
- &m->GetClassDef(), code_item, m->GetDexMethodIndex(),
- m, m->GetAccessFlags(), true, true, true, true);
+ verifier::MethodVerifier verifier(GetThread(), h_dex_cache->GetDexFile(), h_dex_cache,
+ h_class_loader, &m->GetClassDef(), code_item,
+ m->GetDexMethodIndex(), m, m->GetAccessFlags(), true, true,
+ true, true);
bool verifier_success = verifier.Verify();
CHECK(verifier_success) << PrettyMethod(m);
ShadowFrame* new_frame = ShadowFrame::CreateDeoptimizedFrame(num_regs, nullptr, m, dex_pc);
{
- ScopedStackedShadowFramePusher pusher(self_, new_frame,
+ ScopedStackedShadowFramePusher pusher(GetThread(), new_frame,
StackedShadowFrameType::kShadowFrameUnderConstruction);
const std::vector<int32_t> kinds(verifier.DescribeVRegs(dex_pc));
// Will be popped after the long jump after DeoptimizeStack(),
// right before interpreter::EnterInterpreterFromDeoptimize().
stacked_shadow_frame_pushed_ = true;
- self_->PushStackedShadowFrame(new_frame, StackedShadowFrameType::kDeoptimizationShadowFrame);
+ GetThread()->PushStackedShadowFrame(new_frame,
+ StackedShadowFrameType::kDeoptimizationShadowFrame);
}
prev_shadow_frame_ = new_frame;
return true;
}
- Thread* const self_;
QuickExceptionHandler* const exception_handler_;
ShadowFrame* prev_shadow_frame_;
bool stacked_shadow_frame_pushed_;
SHARED_REQUIRES(Locks::mutator_lock_)
: StackVisitor(thread_in, context, StackVisitor::StackWalkKind::kIncludeInlinedFrames),
os(os_in),
- thread(thread_in),
can_allocate(can_allocate_in),
last_method(nullptr),
last_line_number(0),
}
os << "\n";
if (frame_count == 0) {
- Monitor::DescribeWait(os, thread);
+ Monitor::DescribeWait(os, GetThread());
}
if (can_allocate) {
// Visit locks, but do not abort on errors. This would trigger a nested abort.
}
std::ostream& os;
- const Thread* thread;
const bool can_allocate;
ArtMethod* last_method;
int last_line_number;
uint32_t depth_;
uint32_t skip_depth_;
bool skipping_;
+
+ DISALLOW_COPY_AND_ASSIGN(CountStackDepthVisitor);
};
template<bool kTransactionActive>
// An array of the methods on the stack, the last entries are the dex PCs.
mirror::PointerArray* trace_;
// For cross compilation.
- size_t pointer_size_;
+ const size_t pointer_size_;
+
+ DISALLOW_COPY_AND_ASSIGN(BuildInternalStackTraceVisitor);
};
template<bool kTransactionActive>