From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 10 21:17:36 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 2AF0F106566C for ; Wed, 10 Nov 2010 21:17:36 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 260088FC1C for ; Wed, 10 Nov 2010 21:17:35 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 55DC335A837 for ; Wed, 10 Nov 2010 22:17:33 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 4B0751732E; Wed, 10 Nov 2010 22:17:33 +0100 (CET) Date: Wed, 10 Nov 2010 22:17:33 +0100 From: Jilles Tjoelker To: hackers@freebsd.org Message-ID: <20101110211733.GB17871@stack.nl> References: <20101110204152.GF85693@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20101110204152.GF85693@acme.spoerlein.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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: Wed, 10 Nov 2010 21:17:36 -0000 On Wed, Nov 10, 2010 at 09:41:52PM +0100, 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? It is a while ago that I last used this, but ps and fstat definitely worked on crashdumps, to some extent. /usr/sbin/crashinfo uses this. -- Jilles Tjoelker