From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 22 18:42:27 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA1E416A418 for ; Tue, 22 Jan 2008 18:42:27 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 97CFD13C45B; Tue, 22 Jan 2008 18:42:26 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <47963911.4000002@FreeBSD.org> Date: Tue, 22 Jan 2008 19:42:25 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Stefan Lambrev References: <4795CC13.7080601@moneybookers.com> <868x2i3v8d.fsf@ds4.des.no> <864pd63v2h.fsf@ds4.des.no> <4795FE54.9090606@moneybookers.com> <86lk6i0vzk.fsf@ds4.des.no> <479605E2.6070709@moneybookers.com> <479621BE.2060907@FreeBSD.org> <4796357B.9020508@moneybookers.com> In-Reply-To: <4796357B.9020508@moneybookers.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= , freebsd-hackers@FreeBSD.org Subject: Re: gettimeofday() in hping 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: Tue, 22 Jan 2008 18:42:28 -0000 Stefan Lambrev wrote: >> You should use hwpmc to verify where the application is really >> spending time, since gettimeofday doesn't seem to account for it all. > pmc: Unknown Intel CPU. > module_register_init: MOD_LOAD (hwpmc, 0xffffffff8029906d, > 0xffffffff8054c500) error 78 OK, this is the famous problem with modern CPUs that jkoshy has declined to work around :( There are patches for this in perforce, see http://perforce.freebsd.org/changeView.cgi?CH=126189 > What was the other way to do this profiling? No other that I have found to be useful. > Can ktrace help? Not really, it only tells you what syscalls were made. Kris