From 83dc2280cebd626d5a4fda7c4268a94d329c4e78 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 29 Nov 2008 20:55:11 +0000 Subject: WIP kinfo_file/kinfo_vmmentry tweaks. The idea: 1) to get the 32 and 64 bit versions in sync so that no shims are needed, Valgrind in particular excercises this. and: 2) reduce the size of the copyout. On large processes this turns out to be a huge problem. Valgrind also suffers from this since it needs to do this in a context that can't malloc. I want to pack the records. 3) Add new types.. 'tell me about fd N' and 'tell me about addr N'. --- sys/kern/kern_descrip.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/kern/kern_descrip.c') diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 833aa2c..848aa92 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2509,6 +2509,10 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD, 0, 0, sysctl_kern_file, "S,xfile", "Entire file table"); +#ifdef KINFO_FILE_SIZE +CTASSERT(sizeof(struct kinfo_file) == KINFO_FILE_SIZE); +#endif + static int export_vnode_for_sysctl(struct vnode *vp, int type, struct kinfo_file *kif, struct filedesc *fdp, struct sysctl_req *req) -- cgit v1.1