]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Export some more useful info about shared memory objects to userland
authorjhb <jhb@FreeBSD.org>
Sun, 1 Apr 2012 18:22:48 +0000 (18:22 +0000)
committerjhb <jhb@FreeBSD.org>
Sun, 1 Apr 2012 18:22:48 +0000 (18:22 +0000)
commit506e2f15b93a1584a9103782c48037c858a30609
treec2db61e497320454ff8abdab4b6faede73162985
parentd5bc632dfb8beb870403790342bc3e9573c4f038
Export some more useful info about shared memory objects to userland
via procstat(1) and fstat(1):
- Change shm file descriptors to track the pathname they are associated
  with and add a shm_path() method to copy the path out to a caller-supplied
  buffer.
- Use the fo_stat() method of shared memory objects and shm_path() to
  export the path, mode, and size of a shared memory object via
  struct kinfo_file.
- Add a struct shmstat to the libprocstat(3) interface along with a
  procstat_get_shm_info() to export the mode and size of a shared memory
  object.
- Change procstat to always print out the path for a given object if it
  is valid.
- Teach fstat about shared memory objects and to display their path,
  mode, and size.

MFC after: 2 weeks
lib/libprocstat/Symbol.map
lib/libprocstat/Versions.def
lib/libprocstat/libprocstat.3
lib/libprocstat/libprocstat.c
lib/libprocstat/libprocstat.h
sys/kern/kern_descrip.c
sys/kern/uipc_shm.c
sys/sys/mman.h
usr.bin/fstat/fstat.c
usr.bin/procstat/procstat_files.c