Some fixes and formatting changes from jmc@openbsd.

This commit is contained in:
wiz 2004-02-17 20:41:49 +00:00
parent c8e0ab671d
commit 9ea670a934

View File

@ -1,4 +1,4 @@
.\" $NetBSD: pmap.1,v 1.11 2003/04/16 12:12:08 wiz Exp $ .\" $NetBSD: pmap.1,v 1.12 2004/02/17 20:41:49 wiz Exp $
.\" .\"
.\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. .\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
.\" All rights reserved. .\" All rights reserved.
@ -68,9 +68,9 @@ By default,
displays information for its parent process, so that when run from a displays information for its parent process, so that when run from a
shell prompt, the shell's memory information is displayed. shell prompt, the shell's memory information is displayed.
If other If other
pids are given as arguments on the command line, information for those PIDs are given as arguments on the command line, information for those
processes will be printed also. processes will be printed also.
If the special pid of 0 is given, If the special PID of 0 is given,
then information for the kernel's memory map is printed. then information for the kernel's memory map is printed.
.Pp .Pp
The options are as follows: The options are as follows:
@ -207,15 +207,17 @@ If you do wish to see information about
.Nm .Nm
and another process as the same time, simply omit the and another process as the same time, simply omit the
.Fl p .Fl p
and place the extra pid at the end of the command line. and place the extra PID at the end of the command line.
.Sh EXIT STATUS .Sh EXIT STATUS
.Nm .Nm
exits 0 on success, and \*[Gt]0 if an error occurred. exits 0 on success, and \*[Gt]0 if an error occurred.
.Sh EXAMPLES .Sh EXAMPLES
While the meaning most of the output is self evident, some pieces of While the meaning most of the output is self-evident, some pieces of
it may appear to be a little inscrutable. it may appear to be a little inscrutable.
.Pp .Pp
Here is a portion of the default output from pmap being run at an Here is a portion of the default output from
.Nm
being run at an
.Xr sh 1 .Xr sh 1
prompt showing the starting address of the map entry, the size of the prompt showing the starting address of the map entry, the size of the
map entry, the current protection level of the map entry, and either map entry, the current protection level of the map entry, and either
@ -257,16 +259,16 @@ the include file
.El .El
.Pp .Pp
The The
.Dq Tn submap , .Dq submap ,
.Dq Tn cow , .Dq cow ,
and and
.Dq Tn nc .Dq nc
fields are true or false, and indicate whether the map is a submap, fields are true or false, and indicate whether the map is a submap,
whether it is marked for copy on write, and whether it needs a copy. whether it is marked for copy on write, and whether it needs a copy.
The The
.Dq Tn prot .Dq prot
\&(or protection) field, along with \&(or protection) field, along with
.Dq Tn max .Dq max
\&(maximum protection allowed) are made up of the following flags from \&(maximum protection allowed) are made up of the following flags from
.Aq Pa uvm/uvm_extern.h : .Aq Pa uvm/uvm_extern.h :
.\" this column width specifically chosen so that all the header file .\" this column width specifically chosen so that all the header file
@ -278,9 +280,9 @@ The
.El .El
.Pp .Pp
The The
.Dq Tn obj .Dq obj
and and
.Dq Tn amap .Dq amap
fields are pointers to, and offsets into, the underlying uvm_object or fields are pointers to, and offsets into, the underlying uvm_object or
amap. amap.
The value for resident is always unknown because digging such The value for resident is always unknown because digging such
@ -307,22 +309,22 @@ $ pmap -l
.Ed .Ed
.Pp .Pp
Here the protection and maximum protection values are indicated with Here the protection and maximum protection values are indicated with
.Dq Tn r , .Sq r ,
.Dq Tn w , .Sq w ,
and and
.Dq Tn x .Sq x
characters, indicating read permission, write permission, and execute characters, indicating read permission, write permission, and execute
permission, respectively. permission, respectively.
The The
.Dq Tn COW , .Dq COW ,
.Dq Tn NC , .Dq NC ,
and and
.Dq Tn NNC .Dq NNC
values that follow indicate, again, that the map is marked for copy on values that follow indicate, again, that the map is marked for copy on
write and either needs or does not need a copy. write and either needs or does not need a copy.
It is also possible It is also possible
to see the value to see the value
.Dq Tn NCOW .Dq NCOW
here, which indicates that an entry will not be copied. here, which indicates that an entry will not be copied.
The three The three
following numbers indicate the inheritance type of the map, the wired following numbers indicate the inheritance type of the map, the wired
@ -330,10 +332,10 @@ count of the map, and any advice value assigned via
.Xr madvise 2 . .Xr madvise 2 .
.Pp .Pp
In the second form, the permissions indicated are followed by a In the second form, the permissions indicated are followed by a
.Dq Tn p .Sq p
or or
.Dq Tn s .Sq s
character indicated whether the map entry is private or shared (copy character indicating whether the map entry is private or shared (copy
on write or not), and the numbers are the offset into the underlying on write or not), and the numbers are the offset into the underlying
object, the device and numbers of the object if it is a file, and the object, the device and numbers of the object if it is a file, and the
path to the file (if available). path to the file (if available).
@ -341,7 +343,7 @@ path to the file (if available).
As noted above (see section As noted above (see section
.Sx DESCRIPTION ) , .Sx DESCRIPTION ) ,
the the
.Dq Tn all .Dq all
output format is an amalgam of the previous output formats. output format is an amalgam of the previous output formats.
.Bd -literal -offset indent .Bd -literal -offset indent
$ pmap -a $ pmap -a
@ -351,17 +353,17 @@ Start End Size Offset rwxpc RWX I/W/A ...
.Ed .Ed
.Pp .Pp
In this format, the column labeled In this format, the column labeled
.Dq Tn rwxpc .Dq rwxpc
contains the permissions for the mapping along with the shared/private contains the permissions for the mapping along with the shared/private
flag, and a character indicating whether the mapping needs to be flag, and a character indicating whether the mapping needs to be
copied on write copied on write
.Pq Dq \&+ .Pq Sq \&+
or has already been copied or has already been copied
.Pq Dq \&- .Pq Sq \&-
and is followed by a column that indicates the maximum permissions for and is followed by a column that indicates the maximum permissions for
the map entry. the map entry.
The column labeled The column labeled
.Dq Tn I/W/A .Dq I/W/A
indicates the inheritance, wired, and advice values for the map entry, indicates the inheritance, wired, and advice values for the map entry,
as previously described. as previously described.
The pointer value at the end of the output line for entries backed by The pointer value at the end of the output line for entries backed by
@ -395,7 +397,7 @@ Since processes can change state while
.Nm .Nm
is running, some of the information printed may be inaccurate. is running, some of the information printed may be inaccurate.
This This
is especially important to consider when examining the kernel's map is especially important to consider when examining the kernel's map,
since merely executing since merely executing
.Nm .Nm
will cause some of the information to change. will cause some of the information to change.