From owner-cvs-all@FreeBSD.ORG Sat Feb 23 01:01:49 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA3F716A405; Sat, 23 Feb 2008 01:01:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AE99A13C44B; Sat, 23 Feb 2008 01:01:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N11n1v091704; Sat, 23 Feb 2008 01:01:49 GMT (envelope-from des@repoman.freebsd.org) Received: (from des@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N11ndD091703; Sat, 23 Feb 2008 01:01:49 GMT (envelope-from des) Message-Id: <200802230101.m1N11ndD091703@repoman.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 23 Feb 2008 01:01:49 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_descrip.c kern_ktrace.c uipc_syscalls.c vfs_syscalls.c src/sys/sys ktrace.h src/usr.bin/kdump kdump.1 kdump.c mksubr src/usr.bin/ktrace ktrace.1 ktrace.h subr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 01:01:49 -0000 des 2008-02-23 01:01:49 UTC FreeBSD src repository Modified files: sys/kern kern_descrip.c kern_ktrace.c uipc_syscalls.c vfs_syscalls.c sys/sys ktrace.h usr.bin/kdump kdump.1 kdump.c mksubr usr.bin/ktrace ktrace.1 ktrace.h subr.c Log: This patch adds a new ktrace(2) record type, KTR_STRUCT, whose payload consists of the null-terminated name and the contents of any structure you wish to record. A new ktrstruct() function constructs and emits a KTR_STRUCT record. It is accompanied by convenience macros for struct stat and struct sockaddr. In kdump(1), KTR_STRUCT records are handled by a dispatcher function that runs stringent sanity checks on its contents before handing it over to individual decoding funtions for each type of structure. Currently supported structures are struct stat and struct sockaddr for the AF_INET, AF_INET6 and AF_UNIX families; support for AF_APPLETALK and AF_IPX is present but disabled, as I am unable to test it properly. Since 's' was already taken, the letter 't' is used by ktrace(1) to enable KTR_STRUCT trace points, and in kdump(1) to enable their decoding. Derived from patches by Andrew Li . PR: kern/117836 MFC after: 3 weeks Revision Changes Path 1.324 +8 -0 src/sys/kern/kern_descrip.c 1.126 +31 -1 src/sys/kern/kern_ktrace.c 1.268 +36 -0 src/sys/kern/uipc_syscalls.c 1.450 +12 -0 src/sys/kern/vfs_syscalls.c 1.34 +13 -0 src/sys/sys/ktrace.h 1.16 +7 -3 src/usr.bin/kdump/kdump.1 1.40 +239 -4 src/usr.bin/kdump/kdump.c 1.11 +1 -0 src/usr.bin/kdump/mksubr 1.19 +7 -5 src/usr.bin/ktrace/ktrace.1 1.5 +1 -1 src/usr.bin/ktrace/ktrace.h 1.14 +3 -0 src/usr.bin/ktrace/subr.c