Move single-step control into thread.
This CL moves single-step control into the Thread structure. This is stored in
Thread::single_step_control_ member. This allows to support single-stepping of
multiple threads at the same time.
Since each thread holds its single-step information, we no longer need to use
the breakpoint lock to support single-stepping. It helps reduce lock contention
on this lock while debugging.
All JDWP tests passed on the host and on the target with this CL.
Bug: 11667502
Change-Id: I886d5c8c625ca5a072803e296c32eec5f7e9e82d
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 1f6dd69..bcfc51b 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -917,6 +917,7 @@
throwing_OutOfMemoryError_(false),
debug_suspend_count_(0),
debug_invoke_req_(new DebugInvokeReq),
+ single_step_control_(new SingleStepControl),
deoptimization_shadow_frame_(NULL),
instrumentation_stack_(new std::deque<instrumentation::InstrumentationStackFrame>),
name_(new std::string(kThreadNameDuringStartup)),
@@ -1018,6 +1019,7 @@
}
delete debug_invoke_req_;
+ delete single_step_control_;
delete instrumentation_stack_;
delete name_;
delete stack_trace_sample_;