From owner-freebsd-hackers@FreeBSD.ORG Mon May 25 13:10:40 2009 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 878611065674 for ; Mon, 25 May 2009 13:10:40 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from mail-ew0-f159.google.com (mail-ew0-f159.google.com [209.85.219.159]) by mx1.freebsd.org (Postfix) with ESMTP id 1410E8FC1A for ; Mon, 25 May 2009 13:10:39 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by ewy3 with SMTP id 3so3160480ewy.43 for ; Mon, 25 May 2009 06:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=ZYi0l5OwgRhp7VkvzpnsEGasKmsyLpeZGzQfj1Wdm1U=; b=jADD7TJUNGQzloe27SbIZ4hBjcczOpSQMfgvtzM1TTZDBV3Bb/52aDGvbCEFlbPOZo /roRS/jblq53MtwL+JQ6/Ht8M3wQk2ktue8KKBfLtEq8XgKEqr8mfASGCRc922MGfh/r mC2qitabUunQ1gZJ3gJ0pVa2KfqLxwwPQueaI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=qo2i8vxeCQbaWmH30ZkkzRQuP/f2WqhXbxSaf4Y3ZbLy8fSxhFEto4PHmy+JW9UfQE 6+E19hZgSRQbXfnCu2fJTEThVbN+1VhJfBbbEk5Wz9ITAAwIMpoBxOYRpMzkirlVeey7 k+TwsxG4Ys97H47oGXcARZ1BfdBC/zfftJaVQ= Received: by 10.216.1.202 with SMTP id 52mr1766083wed.15.1243255126255; Mon, 25 May 2009 05:38:46 -0700 (PDT) Received: from nslpc5.epfl.ch (nslpc5.epfl.ch [128.178.149.20]) by mx.google.com with ESMTPS id 10sm2581034eyd.42.2009.05.25.05.38.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 25 May 2009 05:38:45 -0700 (PDT) Message-Id: <5736C5AC-F5EC-4708-8815-1747A55AF81C@gmail.com> From: =?UTF-8?Q?Nikola_Kne=C5=BEevi=C4=87?= To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Mon, 25 May 2009 14:38:44 +0200 X-Mailer: Apple Mail (2.935.3) Subject: How to visualize cache misses with pmc 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: Mon, 25 May 2009 13:10:40 -0000 Hi, During the tuning of my system, I was using pmc(3) to get various counters. Most important was the number of retired instructions, which helped me to discover some bottlenecks. However, I now need to get L2 cache misses, which I do by running: sudo pmcstat -S L2_LD -O /tmp/sample.out and then run my module with its workload. At the end, I have the output in /tmp/sample.out. However, I don't know how to get that data to anything useful, as gprof output is not very meaningful. Any thoughts, hints, best practices? Cheers, Nikola