cf6c2155dc
This was Craig's original patch, referenced below, but it was never pushed to newlib. It has now been rebased on top of some diskstat stuff to serve as a beginning. The original effort was perfectly serviceable (after a memory leak was fixed) but the approach would not have served future PID needs when that proc_t went bye bye. The slabtop requirements are similar to those of PIDs. One must accommodate the variable number of slab nodes (PIDs) while also accepting different data (char * and unsigned long). Furthermore, some generalized means to sort all that acquired stuff must somehow be provided. So I wanted to try a different approach that seemed to hold potential for satisfying future top and ps needs. Subsequent commits will make that attempt, building on Craig's original patch whose commit msg appears below. ------------------------------------------------------ All of the /proc/slabinfo related calls have been changed here. They follow the same procps_slabinfo_* format. Made both the slabtop and vmstat programs use the new API as one was using the old one and one was just sort of trying to do its own thing. Sorting of slabnodes is also possible via the library. Reference(s): http://www.freelists.org/post/procps/Sorting-slabsprocesses,3 http://www.freelists.org/post/procps/library-rework-slabinfo-calls Signed-off-by: Craig Small <csmall@enc.com.au> Signed-off-by: Jim Warner <james.warner@comcast.net> |
||
---|---|---|
.. | ||
alloc.c | ||
alloc.h | ||
COPYING | ||
devname.c | ||
devname.h | ||
diskstat.c | ||
diskstat.h | ||
escape.c | ||
escape.h | ||
libprocps.pc.in | ||
libprocps.sym | ||
meminfo.c | ||
meminfo.h | ||
openproc.3 | ||
procps-private.h | ||
procps.h | ||
pwcache.c | ||
pwcache.h | ||
readproc.3 | ||
readproc.c | ||
readproc.h | ||
readproctab.3 | ||
readstat.c | ||
readstat.h | ||
slab.c | ||
slab.h | ||
sysinfo.c | ||
sysinfo.h | ||
uptime.c | ||
uptime.h | ||
version.c | ||
version.h | ||
vmstat.c | ||
vmstat.h | ||
wchan.c | ||
wchan.h |