From owner-cvs-src@FreeBSD.ORG Tue Nov 1 16:04:04 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 897DF16A41F; Tue, 1 Nov 2005 16:04:04 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CA5543D5D; Tue, 1 Nov 2005 16:04:02 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id AC0CB46B04; Tue, 1 Nov 2005 11:04:01 -0500 (EST) Date: Tue, 1 Nov 2005 16:04:01 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200511010952.18579.jhb@freebsd.org> Message-ID: <20051101155829.L45155@fledge.watson.org> References: <200511011446.jA1EkbU2062219@repoman.freebsd.org> <200511010952.18579.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys ktrace.h src/sys/kern kern_ktrace.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:04:04 -0000 On Tue, 1 Nov 2005, John Baldwin wrote: > On Tuesday 01 November 2005 09:46 am, Robert Watson wrote: >> rwatson 2005-11-01 14:46:37 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/sys ktrace.h >> sys/kern kern_ktrace.c >> Log: >> Reuse ktr_unused field in ktr_header structure as ktr_tid; populate >> ktr_tid as part of gathering of ktr header data for new ktrace >> records. The continued use of intptr_t is required for file layout >> reasons, and cannot be changed to lwpid_t at this point. >> >> MFC after: 1 month >> Reviewed by: davidxu > > CTASSERT that sizeof(lwpid_t) <= sizeof(intptr_t) Well, we also have to make sure that the structure doesn't shrink, not just not grow. This could be accomplished with a union and CTASSERT. However, I think the main thing that matters is that today kdump continue to work with ktraces from yesterday on the platforms we care about. If it breaks in four weeks due to lack of a CTASSERT, that is someone else's bug. I do notice, though, that our 64-bit amd64 kernel likely produces ktrace results a 32-bit i386 binary can't read, due to inclusion of the ktr_buffer field. Given that it was never needed, it's sort of a shame it was ever in the file format. Robert N M Watson