diff options
author | John Baldwin <jhb@FreeBSD.org> | 2015-05-27 18:11:05 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2015-05-27 18:11:05 +0000 |
commit | ff87ae350ea75191bb1b11f5b5ef7b4db55ee799 (patch) | |
tree | 37a92b925fe57ffd5d1a3498a3f8c83b9dbd5fef /sys/sys | |
parent | 789d9103af3c4948e719c24b98f5aca83b48c2d4 (diff) | |
download | src-ff87ae350ea75191bb1b11f5b5ef7b4db55ee799.tar.gz src-ff87ae350ea75191bb1b11f5b5ef7b4db55ee799.zip |
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)
Notes
Notes:
svn path=/head/; revision=283624
Diffstat (limited to 'sys/sys')
-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 c3b3bc59b414..e831a37ce541 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). |