未验证 提交 7caa534d 编写于 作者: D Derek Parker 提交者: GitHub

service/debugger: Remove target lock on GetBufferedTracepoints (#2645)

There is already a lock on the actual buffered tracepoints collection
within proc, and this method call doesn't do anything to mutate Target
otherwise so we shouldn't be opening ourselves up for a race condition
error or any other kind of parallelism problem.

Additionally, with this lock we essentially can never get the data until
the process has exited becuase `continue` will lock the target. This
change allows us to get the buffered tracepoint information immediately
and display it as the program is running.
上级 2971fd4c
......@@ -2124,9 +2124,6 @@ func (d *Debugger) Target() *proc.Target {
}
func (d *Debugger) GetBufferedTracepoints() []api.TracepointResult {
d.targetMutex.Lock()
defer d.targetMutex.Unlock()
traces := d.target.GetBufferedTracepoints()
if traces == nil {
return nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册