From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 1 20:16:29 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 5F24916A417; Fri, 1 Feb 2008 20:16:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id A430013C459; Fri, 1 Feb 2008 20:16:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.7.0 Received: from [212.86.226.226] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 71825377; Fri, 01 Feb 2008 22:16:27 +0200 Message-ID: <47A37E14.7050801@FreeBSD.org> Date: Fri, 01 Feb 2008 22:16:20 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Robert Watson References: <47A25412.3010301@FreeBSD.org> <47A25A0D.2080508@elischer.org> <47A2C2A2.5040109@FreeBSD.org> <20080201185435.X88034@fledge.watson.org> In-Reply-To: <20080201185435.X88034@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-performance@freebsd.org Subject: Re: Memory allocation performance 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: Fri, 01 Feb 2008 20:16:29 -0000 Hi. Robert Watson wrote: > It would be very helpful if you could try doing some analysis with hwpmc > -- "high resolution profiling" is of increasingly limited utility with > modern CPUs, where even a high frequency timer won't run very often. > It's also quite subject to cycle events that align with other timers in > the system. I have tried hwpmc but still not completely friendly with it. Whole picture is somewhat alike to kgmon's, but it looks very noisy. Is there some "know how" about how to use it better? I have tried it for measuring number of instructions. But I am in doubt that instructions is a correct counter for performance measurement as different instructions may have very different execution times depending on many reasons, like cache misses and current memory traffic. I have tried to use tsc to count CPU cycles, but got the error: # pmcstat -n 10000 -S "tsc" -O sample.out pmcstat: ERROR: Cannot allocate system-mode pmc with specification "tsc": Operation not supported What have I missed? I am now using Pentium4 Prescott CPU with HTT enabled in BIOS, but kernel built without SMP to simplify profiling. What counters can you recommend me to use on it for regular time profiling? Thanks for reply. -- Alexander Motin