summaryrefslogtreecommitdiffstats
path: root/chpass/chpass.h
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2008-12-02 06:50:26 +0000
committerPeter Wemm <peter@FreeBSD.org>2008-12-02 06:50:26 +0000
commit0b0845a6f2516f95aae44bb62353372441812a58 (patch)
tree7d4d591d414282afc2e1ced892651c6b88eb8d16 /chpass/chpass.h
parentde93bd3807fda6b4c5a3c8d607413b8869f7e8d8 (diff)
downloadpw-darwin-0b0845a6f2516f95aae44bb62353372441812a58.tar.gz
pw-darwin-0b0845a6f2516f95aae44bb62353372441812a58.tar.zst
pw-darwin-0b0845a6f2516f95aae44bb62353372441812a58.zip
Merge user/peter/kinfo branch as of r185547 into head.
This changes struct kinfo_filedesc and kinfo_vmentry such that they are same on both 32 and 64 bit platforms like i386/amd64 and won't require sysctl wrapping. Two new OIDs are assigned. The old ones are available under COMPAT_FREEBSD7 - but it isn't that simple. The superceded interface was never actually released on 7.x. The other main change is to pack the data passed to userland via the sysctl. kf_structsize and kve_structsize are reduced for the copyout. If you have a process with 100,000+ sockets open, the unpacked records require a 132MB+ copyout. With packing, it is "only" ~35MB. (Still seriously unpleasant, but not quite as devastating). A similar problem exists for the vmentry structure - have lots and lots of shared libraries and small mmaps and its copyout gets expensive too. My immediate problem is valgrind. It traditionally achieves this functionality by parsing procfs output, in a packed format. Secondly, when tracing 32 bit binaries on amd64 under valgrind, it uses a cross compiled 32 bit binary which ran directly into the differing data structures in 32 vs 64 bit mode. (valgrind uses this to track file descriptor operations and this therefore affected every single 32 bit binary) I've added two utility functions to libutil to unpack the structures into a fixed record length and to make it a little more convenient to use.
Diffstat (limited to 'chpass/chpass.h')
0 files changed, 0 insertions, 0 deletions