From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 18 19:34:21 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 E86A316A468 for ; Mon, 18 Jun 2007 19:34:21 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.freebsd.org (Postfix) with ESMTP id C725C13C465 for ; Mon, 18 Jun 2007 19:34:21 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from hymn01.u.washington.edu (hymn01.u.washington.edu [140.142.8.55]) by mxout4.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.05) with ESMTP id l5IJYLAb008826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Jun 2007 12:34:21 -0700 Received: from localhost (localhost [127.0.0.1]) by hymn01.u.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l5IJYLRj028011 for ; Mon, 18 Jun 2007 12:34:21 -0700 X-Auth-Received: from [192.55.52.1] by hymn01.u.washington.edu via HTTP; Mon, 18 Jun 2007 12:34:21 PDT Date: Mon, 18 Jun 2007 12:34:21 -0700 (PDT) From: youshi10@u.washington.edu To: hackers@freebsd.org In-Reply-To: <20070618191609.GM1181@turion.vk2pj.dyndns.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.6.18.121634 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='NO_REAL_NAME 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Cc: 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 19:34:22 -0000 On Tue, 19 Jun 2007, Peter Jeremy wrote: > On 2007-Jun-18 15:37:11 +0200, Roman Divacky wrote: >> 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 :) > > If you decide to go this route, you might like to apply > http://www.freebsd.org/cgi/query-pr.cgi?pr=99800 > > By default gmon.out is overwritten by each process so you will only > get the output from the last process of a given name. My patch > optionally saves the profiling output each process in a separate file. > gprof(1) can already accumulate the output from multiple files so this > patch gives you the ability to profile multiple executions of a single > executable. You will still need to glue together the profiling > results from each executable. > > -- > Peter Jeremy > Yeah, I noticed that. Thanks for the heads up on the PR :). Why not create a flag though instead of check to see if an environment variables been set? -Garrett