From owner-freebsd-arch@FreeBSD.ORG Tue May 3 12:21:12 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 135F710657A4 for ; Tue, 3 May 2011 12:21:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D98378FC13 for ; Tue, 3 May 2011 12:21:11 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 92DF246B55; Tue, 3 May 2011 08:21:11 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 318548A027; Tue, 3 May 2011 08:21:11 -0400 (EDT) From: John Baldwin To: Alexander Leidinger Date: Tue, 3 May 2011 08:04:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201105021537.19507.jhb@freebsd.org> <201105021602.02668.jhb@freebsd.org> <20110503133844.184523llr0156o9w@webmail.leidinger.net> In-Reply-To: <20110503133844.184523llr0156o9w@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201105030804.52840.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 03 May 2011 08:21:11 -0400 (EDT) Cc: Kostik Belousov , arch@freebsd.org Subject: Re: [PATCH] Add ktrace records for user page faults X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 12:21:12 -0000 On Tuesday, May 03, 2011 7:38:44 am Alexander Leidinger wrote: > Quoting John Baldwin (from Mon, 2 May 2011 16:02:02 -0400): > > > It is true that it would be nice to have the exact faulting address, though > > having page granularity has been sufficient for the few times I've actually > > used the address itself (e.g. I could figure out which page of libstdc++ a > > fault occurred on and narrow down from there as to which of the routines most > > likely was executed given what the app was doing at the time). In my case > > knowing how much time was spent handling a page fault has been useful. > > > > Would we have to push this logic out of vm_fault and into every > > trap() routine > > to get the original address? That would make the patch quite a bit bigger > > (touching N MD files vs 1 MI file). > > dtrace is not a solution here (in general, not to the exact-address problem)? It probably is, but many folks are still quite used to ktrace. At some point I may sit down and spend more time with DTrace, but for now I have other fish to fry. I can just keep the page fault tracing patch private if that is what folks prefer. -- John Baldwin