From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 2 10:09:15 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 5DBE016A421 for ; Sat, 2 Feb 2008 10:09:15 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id D166713C458 for ; Sat, 2 Feb 2008 10:09:14 +0000 (UTC) (envelope-from joseph.koshy@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so1389833fgg.35 for ; Sat, 02 Feb 2008 02:09:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=G6cj0Eu0WZ+ahxzGM3wGYEeeVXrlAL5uzCfPYLqTkLM=; b=iBUONsD4sADNtcJgxGg2cBfl4maAmyjEbJoI1VuSf+HFszKJ/JmE8ulLSxNDEUdsLjVkpRleHOO6vAbcr/RtwN2u4EtVDxIH2op6UbmbREvvt4IpXG4mP51NgD9ybHu3wKRFG+oXZLfddDy35bxccoXNeRGr8la79EuovO9QfDE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jAcBMF3LEq2ptlbPrNY1OL9PHVYzOufIjrW2vF6pT/1gU1yor6vBq6jMrQ121GHyoHOuFsyDT186anl7B4NdItqW4l8UuaecWNzEK6aya/YuE7gHO8gkXhfALYBvNqzVO/E8q+SWYBRf67npLKThKYd3RWG5elCgijWm9RQLn8E= Received: by 10.86.71.1 with SMTP id t1mr4203474fga.33.1201946952701; Sat, 02 Feb 2008 02:09:12 -0800 (PST) Received: by 10.86.90.11 with HTTP; Sat, 2 Feb 2008 02:09:12 -0800 (PST) Message-ID: <84dead720802020209n49c09664p3962fa08f2f9a57c@mail.gmail.com> Date: Sat, 2 Feb 2008 15:39:12 +0530 From: "Joseph Koshy" To: "Alexander Motin" In-Reply-To: <47A37E14.7050801@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47A25412.3010301@FreeBSD.org> <47A25A0D.2080508@elischer.org> <47A2C2A2.5040109@FreeBSD.org> <20080201185435.X88034@fledge.watson.org> <47A37E14.7050801@FreeBSD.org> 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: Sat, 02 Feb 2008 10:09:15 -0000 > 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? You cannot sample with the TSC since the TSC does not interrupt the CPU. For CPU cycles you would probably want to use "p4-global-power-events"; see pmc(3). Regards, Koshy