From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 22 20:22:16 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 2179016A417; Tue, 22 Jan 2008 20:22:16 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id D033413C447; Tue, 22 Jan 2008 20:22:15 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 8EC561B10EF3; Tue, 22 Jan 2008 21:22:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, J_CHICKENPOX_65 autolearn=no version=3.2.3 Received: from hater.haters.org (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 984101B10EFA; Tue, 22 Jan 2008 21:22:11 +0100 (CET) Message-ID: <47965072.7030700@moneybookers.com> Date: Tue, 22 Jan 2008 22:22:10 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: Kris Kennaway 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> <47963911.4000002@FreeBSD.org> In-Reply-To: <47963911.4000002@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5521/Tue Jan 22 15:55:56 2008 on blah.cmotd.com X-Virus-Status: Clean 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 20:22:16 -0000 Kris Kennaway wrote: > 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 cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=nocona -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror vers.c linking kernel.debug hwpmc_x86.o(.text+0x1a5): In function `pmc_md_initialize': /usr/src/sys/dev/hwpmc/hwpmc_x86.c:144: undefined reference to `pmc_initialize_p6' Any chance you have patches against RELENG_7_0 ? :) > >> 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. But it can also display relative timestamps (time since previous entry). Can't this be useful? > > Kris > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" -- Best Wishes, Stefan Lambrev ICQ# 24134177