From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 19:18:24 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 D3DE41065674 for ; Wed, 18 Feb 2009 19:18:24 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: from mail-bw0-f170.google.com (mail-bw0-f170.google.com [209.85.218.170]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8A78FC1A for ; Wed, 18 Feb 2009 19:18:23 +0000 (UTC) (envelope-from laladelausanne@gmail.com) Received: by bwz18 with SMTP id 18so175133bwz.19 for ; Wed, 18 Feb 2009 11:18:23 -0800 (PST) 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=u6JEUjNBCMI1lw7TNnTFBwBVxACdzQt48nM56uAIRuc=; b=V/9bsSxI79oiW7Cb38erRC1Yrusu9PVInj2yeaOyXmnp8Kcki965xp+lEDqp0Rb/c9 Oab2ZB9aQZl6di/hy+v96/X2XWd7BHhhWEiuAGO/1my1yIJoM+y+hpDUBm4BKOSdet1n cthbxQWeCrNF6ErhPyxNMDaqsxndPmoCPgERA= 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=Q4p+W2ol7rexVOlOm439x6ePwi9LT+RW+TpsIIlUowYObeJX+yFF0Kqc7lTa62qZme dVf0kl66MTr8W1vFce2iJDm9ZqzNy58qsq8GY+6aSChJQfYkPWuG+igQyX8I5NNhn1iB WHZwU+GMaL7+tQVhk2FmJvTXRKEAoEDBbS5OQ= Received: by 10.103.171.6 with SMTP id y6mr3142582muo.110.1234984702848; Wed, 18 Feb 2009 11:18:22 -0800 (PST) Received: from ?192.168.1.11? (dyn.144-85-166-174.dsl.vtx.ch [144.85.166.174]) by mx.google.com with ESMTPS id t10sm342799muh.58.2009.02.18.11.18.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Feb 2009 11:18:22 -0800 (PST) Message-Id: 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 v930.3) Date: Wed, 18 Feb 2009 20:18:20 +0100 X-Mailer: Apple Mail (2.930.3) Subject: Obtaining l2 misses and cpu utilization in a module 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: Wed, 18 Feb 2009 19:18:25 -0000 Hi, I would like to obtain fore mentioned data from within my module. I need these performance metrics to see how certain code executes, and make decisions during the runtime. pmc(3) seems complete, but it also seems to be intended for use in the userland. How to use pmc from modules? Is there any other way? Also, module is amd64 only, so I don't care about portability. Cheers, Nikola