From owner-freebsd-current@FreeBSD.ORG Fri Jan 14 03:32:57 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1927C106566C for ; Fri, 14 Jan 2011 03:32:57 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 975108FC16 for ; Fri, 14 Jan 2011 03:32:56 +0000 (UTC) Received: by eyf6 with SMTP id 6so1229375eyf.13 for ; Thu, 13 Jan 2011 19:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yW0YtZsQyjcfaZ1zDPs5MWbMNmk/yVBXirNZPPYrL6A=; b=N7fMyHHgaUNUH7QXSp9UAQkXEcfs1uR7ZG1b7/e1842x6tsQO35DMyr/HHbrMhgI+/ YNm/Wk2XmFEf9sINQZe0/apTkW8qT13+5X+3PNyI1wWzWCUpo5Boj1z5CntXGnMOJL6q PWLoDuQBFo7cgEHHECBix7fFPsNvHv1S8rdYM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=t1y0YD3Rx99pUVlwGMqeHrHgq9Xqw9vP7Fskq7gOoU4HMvPd7enXjrrwI+GjvsLCcn Xjz+SYLjWH70YjUXStXT0zQIFtSaMQ32eAZgU4iCA8lG+UGq6yWL6m6wxCtaqKbpBO6t FHXSW2jhAnObhRXo24ASVzP2tDxpiJfQ5JhQQ= MIME-Version: 1.0 Received: by 10.213.4.198 with SMTP id 6mr1143751ebs.74.1294974510082; Thu, 13 Jan 2011 19:08:30 -0800 (PST) Received: by 10.213.22.14 with HTTP; Thu, 13 Jan 2011 19:08:30 -0800 (PST) In-Reply-To: <20110113171139.GA32250@troutmask.apl.washington.edu> References: <20110113171139.GA32250@troutmask.apl.washington.edu> Date: Thu, 13 Jan 2011 22:08:30 -0500 Message-ID: From: Ryan Stone To: Steve Kargl Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: Profiling code execution on amd64? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 03:32:57 -0000 I would suggest using hwpmc for profiling: # kldload hwpmc # pmcstat -S unhalted-cycles -O /tmp/samples.out ../penetration # pmcstat -R /tmp/samples.out -G /tmp/penetration.txt You can also get pmcstat to generate gprof-compatible output with -g, but I never use the mode so I'm really not sure what it gives you. I think that you have to run gprof on the output or something, but don't hold me to that.