delve/pkg/proc/native
Alessandro Arzilli e9b2da17cb
proc/native/linuc: Better native.Process.stop performance (#1874)
* proc/native/linux: only set breakpoints on threads that receive SIGTRAP

* proc/native/linux: do not call (*Thread).Stopped inside (*Process).stop

(*Thread).Stopped is slow because it needs to open, read and parse a
file in /proc, we don't actually need to do that, we can just rely on
the value of Thread.os.running.

Benchmark before:

BenchmarkConditionalBreakpoints-4              1        12476166303 ns/op

Benchmark after:

BenchmarkConditionalBreakpoints-4   	       1	10403533675 ns/op

Conditional breakpoint evaluation: 1.24ms -> 1ms

Updates #1549
2020-03-09 10:15:45 -07:00
..
exc_user_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
exc.h proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00
exec_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
exec_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
mach_exc_user_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
mach_exc.h proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00
nonative_darwin.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
proc_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_darwin.go *: Go 1.14 support branch (#1727) 2020-02-10 17:31:54 -08:00
proc_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_freebsd.c *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
proc_freebsd.go *: Go 1.14 support branch (#1727) 2020-02-10 17:31:54 -08:00
proc_freebsd.h *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
proc_linux.go proc/native/linuc: Better native.Process.stop performance (#1874) 2020-03-09 10:15:45 -07:00
proc_windows.go proc/gdbserial: disable async preemption on macOS 2020-03-02 12:51:26 -08:00
proc.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
ptrace_darwin.go proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
ptrace_freebsd_amd64.c *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd_amd64.h *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_linux_amd64.go proc/native: separate amd64-arch code 2019-11-27 11:07:31 -08:00
ptrace_linux.go proc/native/linux: try to use process_vm_readv/writev 2020-02-29 08:25:31 -08:00
registers_darwin_amd64.go proc: only format registers value when it's necessary (#1860) 2020-02-12 13:31:48 -08:00
registers_freebsd_amd64.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
registers_linux_amd64.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
registers_linux_arm64.go pkg/proc: fix typo in the comment of PtraceGetFpRegset (#1848) 2020-01-27 10:20:56 +01:00
registers_windows_amd64.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
support_sentinel.go proc/native: better error message when building on unsupported systems (#1883) 2020-02-24 09:39:51 -08:00
syscall_windows_amd64.go proc: move windows register handling code to winutil package 2018-11-21 12:17:16 -08:00
syscall_windows.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
threads_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
threads_darwin.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
threads_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
threads_freebsd.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
threads_linux_amd64.go proc/native: separate amd64-arch code 2019-11-27 11:07:31 -08:00
threads_linux_arm64.go proc/core: implementing coredump functionality for ARM64 (#1774) 2020-02-17 09:29:17 -08:00
threads_linux.go proc/native/linuc: Better native.Process.stop performance (#1874) 2020-03-09 10:15:45 -07:00
threads_windows.go *: Go 1.14 support branch (#1727) 2020-02-10 17:31:54 -08:00
threads.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
zsyscall_windows.go proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00