diff options
author | jhb <jhb@FreeBSD.org> | 2015-05-27 18:11:05 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-05-27 18:11:05 +0000 |
commit | 4a4be98eae460918227f3cff47cf8c574ea39ea3 (patch) | |
tree | 37a92b925fe57ffd5d1a3498a3f8c83b9dbd5fef /sys/sys/user.h | |
parent | b365af7766cc44bd4b33dbec9b7eb20311f21f36 (diff) | |
download | FreeBSD-src-4a4be98eae460918227f3cff47cf8c574ea39ea3.zip FreeBSD-src-4a4be98eae460918227f3cff47cf8c574ea39ea3.tar.gz |
Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'. It can be used to determine which files are
using physical pages of memory and how much each is using.
Differential Revision: https://reviews.freebsd.org/D2277
Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc. (forward porting to HEAD/10)
Diffstat (limited to 'sys/sys/user.h')
-rw-r--r-- | sys/sys/user.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/sys/user.h b/sys/sys/user.h index c3b3bc5..e831a37 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -486,6 +486,27 @@ struct kinfo_vmentry { }; /* + * The "vm.objects" sysctl provides a list of all VM objects in the system + * via an array of these entries. + */ +struct kinfo_vmobject { + int kvo_structsize; /* Variable size of record. */ + int kvo_type; /* Object type: KVME_TYPE_*. */ + uint64_t kvo_size; /* Object size in pages. */ + uint64_t kvo_vn_fileid; /* inode number if vnode. */ + uint32_t kvo_vn_fsid; /* dev_t of vnode location. */ + int kvo_ref_count; /* Reference count. */ + int kvo_shadow_count; /* Shadow count. */ + int kvo_memattr; /* Memory attribute. */ + uint64_t kvo_resident; /* Number of resident pages. */ + uint64_t kvo_active; /* Number of active pages. */ + uint64_t kvo_inactive; /* Number of inactive pages. */ + uint64_t _kvo_qspare[8]; + uint32_t _kvo_ispare[8]; + char kvo_path[PATH_MAX]; /* Pathname, if any. */ +}; + +/* * The KERN_PROC_KSTACK sysctl allows a process to dump the kernel stacks of * another process as a series of entries. Each stack is represented by a * series of symbol names and offsets as generated by stack_sbuf_print(9). |