mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 04:22:44 +00:00
sysctl vm.objects: report objects backing posix shm segments
Add the KVMO_FLAG_POSIXSHM flag. Fill the path. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46970
This commit is contained in:
parent
a8c641bbcb
commit
b0b18b57a5
@ -582,6 +582,7 @@ struct kinfo_vmentry {
|
||||
#define kve_obj kve_type_spec._kve_obj
|
||||
|
||||
#define KVMO_FLAG_SYSVSHM 0x0001
|
||||
#define KVMO_FLAG_POSIXSHM 0x0002
|
||||
|
||||
/*
|
||||
* The "vm.objects" sysctl provides a list of all VM objects in the system
|
||||
|
@ -2601,6 +2601,11 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
|
||||
kvo->kvo_vn_fileid = key;
|
||||
kvo->kvo_vn_fsid_freebsd11 = seq;
|
||||
}
|
||||
if ((obj->flags & OBJ_POSIXSHM) != 0) {
|
||||
kvo->kvo_flags |= KVMO_FLAG_POSIXSHM;
|
||||
shm_get_path(obj, kvo->kvo_path,
|
||||
sizeof(kvo->kvo_path));
|
||||
}
|
||||
if (vp != NULL) {
|
||||
vn_fullpath(vp, &fullpath, &freepath);
|
||||
vn_lock(vp, LK_SHARED | LK_RETRY);
|
||||
|
Loading…
Reference in New Issue
Block a user