From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 18 15:35:36 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19E3116A46B; Mon, 18 Jun 2007 15:35:36 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id E8D2013C465; Mon, 18 Jun 2007 15:35:35 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.05) with ESMTP id l5IFZZtk006669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jun 2007 08:35:35 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l5IFZYmS005762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 18 Jun 2007 08:35:34 -0700 Message-ID: <4676A646.7040003@u.washington.edu> Date: Mon, 18 Jun 2007 08:35:34 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Roman Divacky References: <467636C0.6040604@u.washington.edu> <20070618081532.GI1181@turion.vk2pj.dyndns.org> <46764865.9030203@u.washington.edu> <20070618133711.GA94692@freebsd.org> In-Reply-To: <20070618133711.GA94692@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.6.18.81934 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: hackers@freebsd.org Subject: Re: Making sense of ktrace(1) output 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: Mon, 18 Jun 2007 15:35:36 -0000 Roman Divacky wrote: > On Mon, Jun 18, 2007 at 01:55:01AM -0700, Garrett Cooper wrote: > >> Peter Jeremy wrote: >> >>> On 2007-Jun-18 00:39:44 -0700, Garrett Cooper >>> wrote: >>> >>> >>>> However, I was able to get ktrace output. The only problem is that >>>> ktrace(1) apparently outputs only in binary, instead of plaintext output. >>>> Can I convert it to plaintext somehow and process it? >>>> >>>> >>> kdump(1) >>> >>> >>> >> grazi to all that replied -- that did the trick :). >> >> Now, note to self.. never ever do analysis on something so large as >> pkg_add thunderbird. Really, really bad idea :).. >> >> I'll make up some Perl scripts, produce some histograms, and see if I >> can better trace down this bottleneck. >> > > well.. instead of using ktrace I'd suggest building profiled pkg_add > and see that way where the time is spent. ktrace is great if you dont > have the source code... but you do :) > > roman > Unfortunately I have to profile all of the source up the tree to create profiled symbols, and I'm running into some issues profiling liblegacy. Does anyone have any hints for getting around that, or just profiling all of the relevant libs? Thanks, -Garrett