From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 11 13:16:40 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58959106566B for ; Thu, 11 Nov 2010 13:16:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 324BE8FC15 for ; Thu, 11 Nov 2010 13:16:40 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B50A646B09; Thu, 11 Nov 2010 08:16:39 -0500 (EST) Date: Thu, 11 Nov 2010 13:16:39 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: =?ISO-8859-15?Q?Ulrich_Sp=F6rlein?= In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> Message-ID: References: <20101110204152.GF85693@acme.spoerlein.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="621616949-2061383708-1289481399=:30414" Cc: hackers@freebsd.org Subject: Re: libkvm: consumers of kvm_getprocs for non-live kernels? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2010 13:16:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --621616949-2061383708-1289481399=:30414 Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 10 Nov 2010, Ulrich Spörlein wrote: > I have this cleanup of libkvm sitting in my tree and it needs a little bit > of testing, especially the function kvm_proclist, which is only called from > kvm_deadprocs which is only called from kvm_getprocs when kd is not ALIVE. > > The only consumer in our tree that I can make out is *probably* kgdb, as > ps(1), top(1), w(1), pkill(1), fstat(1), systat(1), pmcstat(8) and bsnmpd > don't really work on coredumps > > But, the kgdb file gnu/usr.bin/binutils/gdb/kvm-fbsd.c, where kvm_getprocs > is probably called on a dead kernel is not even used during build! > > So I guess I'm staring at dead code here, any kvm people around that can > clue me in? Even if those tools aren't using kvm properly, they should be. ps(1) at least used to work quite well on coredumps, and perhaps still does? Stas has ongoing work on a libprocstat, you might want to give him a ping. I'm not sure if he plans to refactor some of those existing tools to use that library or not, but crashdump support is a key goal of it. Robert --621616949-2061383708-1289481399=:30414--