git: 2d84f79c4e45 - main - vmstat -o: report objects backing SysV shm segments

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Mon, 07 Oct 2024 08:25:05 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=2d84f79c4e451cac179c7b2111a7f6cba60960b3

commit 2d84f79c4e451cac179c7b2111a7f6cba60960b3
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-10-05 09:43:25 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-10-07 08:22:13 +0000

    vmstat -o: report objects backing SysV shm segments
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D46959
---
 usr.bin/vmstat/vmstat.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 1d0eb4c9283f..8c7790403786 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -1539,6 +1539,9 @@ display_object(struct kinfo_vmobject *kvo)
 		break;
 	}
 	xo_emit("{:type/%-2s} ", str);
+	if ((kvo->kvo_flags & KVMO_FLAG_SYSVSHM) != 0)
+		xo_emit("{:sysvshm/sysvshm(%ju:%u)} ",
+		    (uintmax_t)kvo->kvo_vn_fileid, kvo->kvo_vn_fsid_freebsd11);
 	xo_emit("{:path/%-s}\n", kvo->kvo_path);
 	xo_close_instance("object");
 }