diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2009-11-25 15:23:14 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2009-11-25 15:23:14 +0000 |
commit | 2e7ecbfbc8780fa1e28e70668cd53dad6b13970d (patch) | |
tree | 2fc661855fe3ae219318587028a267aed4af0f2f /usr.bin/gcore/gcore.1 | |
parent | 7a7043c787b61d6bf02733a04ade1947fc4ded2b (diff) | |
download | src-2e7ecbfbc8780fa1e28e70668cd53dad6b13970d.tar.gz src-2e7ecbfbc8780fa1e28e70668cd53dad6b13970d.zip |
Change gcore in order to get rid of the procfs accesses and use FreeBSD's
specific sysctls and ptrace interfaces.
This change switches a bit gcore POLA that is summarized here:
- now gcore can recognize threads within the process and handle dumps
on thread-scope
- the process to be analyzed will be stopped during its gcore run
- gcore may not work with processes which are actively being analyzed
by gdb or truss
- the ptrace interface may cause syscalls to return EINTR, thus
interferring with signals handling within the process
Side note: <janitor task> the interface can be further lifted in order to
get rid of the very last procfs interfaces remnants and made more
suitable for copying with sysctl/ptrace interface </janitor task>.
Obtained from: Sandvine Incorporated
Reviewed by: emaste, rwatson
Sponsored by: Sandvine Incorporated
MFC: 1 month
Notes
Notes:
svn path=/head/; revision=199805
Diffstat (limited to 'usr.bin/gcore/gcore.1')
-rw-r--r-- | usr.bin/gcore/gcore.1 | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/usr.bin/gcore/gcore.1 b/usr.bin/gcore/gcore.1 index 981e0be3b346..a5be26a3f4d6 100644 --- a/usr.bin/gcore/gcore.1 +++ b/usr.bin/gcore/gcore.1 @@ -32,7 +32,7 @@ .\" @(#)gcore.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd April 18, 1994 +.Dd November 18, 2009 .Dt GCORE 1 .Os .Sh NAME @@ -55,11 +55,6 @@ By default, the core is written to the file The process identifier, .Ar pid , must be given on the command line. -If no executable image is -specified, -.Nm -will use -.Dq Pa /proc/<pid>/file . .Pp The following options are available: .Bl -tag -width indent @@ -80,8 +75,6 @@ The same effect can be achieved manually with .Bl -tag -width /var/log/messages -compact .It Pa core.<pid> the core image -.It Pa /proc/<pid>/file -the executable image .El .Sh HISTORY A @@ -89,12 +82,15 @@ A utility appeared in .Bx 4.2 . .Sh BUGS -Context switches or paging activity that occur while +Because of the +.Xr ptrace 2 +usage .Nm -is running may cause the program to become confused. -For best results, use -.Fl s -to temporarily stop the target process. +may not work with processes which are actively investigated with +.Xr truss 1 +or +.Xr gdb 1 . +Additionally, interruptable sleeps may exit with EINTR. .Pp The .Nm |