From owner-freebsd-embedded@FreeBSD.ORG Mon Mar 1 17:32:55 2010 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CFF9106564A; Mon, 1 Mar 2010 17:32:55 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: from mail-bw0-f228.google.com (mail-bw0-f228.google.com [209.85.218.228]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2C98FC0C; Mon, 1 Mar 2010 17:32:48 +0000 (UTC) Received: by bwz28 with SMTP id 28so602471bwz.14 for ; Mon, 01 Mar 2010 09:32:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:to:cc :subject:in-reply-to:references:user-agent:mime-version:content-type :from:date; bh=y++oqr+6+iLPaL5WH1OB7KdymnZrHvlgnes9HFD7vzE=; b=vtrh82SCFv047XUaQAyNTNSh3nMGQZm2/MXgHg2qs5OBvEB+H41T95MisXITAzhEAe kMB/rDRp2pmdFnIKoE6okPeichfrlo/a0LGBQmBJpwkhkocd2sPnAE+6NaYAR/irCFG6 Z+2S6q0Wg4GBlR4j76wTzlDR01OlVOMGB52uk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:to:cc:subject:in-reply-to:references:user-agent :mime-version:content-type:from:date; b=DeIVpI0FhM1rHQVfa+CxUytb6g8OwSK/kGe2KcHIXZvOBGKusfYIZjY9wlbubvZRn7 Cvzo/uSCTctmXp9Rge1WteCHJxuh8ATCOnC812iaXAKc/F9bKq9zHqk0hue2YU5ZrtQA PcelY/fVl3EbXR6/wAtpRGqL6ZtKl25XhzGgk= Received: by 10.204.132.207 with SMTP id c15mr3155529bkt.102.1267464762835; Mon, 01 Mar 2010 09:32:42 -0800 (PST) Received: from moria.unixconsulting.co.in ([122.166.160.79]) by mx.google.com with ESMTPS id 15sm2171564bwz.0.2010.03.01.09.32.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 09:32:40 -0800 (PST) Sender: Joseph Koshy Message-ID: <86bpf83qii.wl%koshy@unixconsulting.co.in> To: George Neville-Neil In-Reply-To: References: <42B59FCC-7A59-4383-BE4E-366B80B504BF@neville-neil.com> <867hqa9d0h.wl%koshy@unixconsulting.co.in> <3BF42672-9790-4D7F-9723-3D80601930B7@neville-neil.com> <861vg54mr7.wl%koshy@unixconsulting.co.in> <4FDD422C-DF35-4FFC-9D3F-77801574DCB9@neville-neil.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.3 (amd64-portbld-freebsd6.3) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII From: Joseph Koshy Date: Mon, 01 Mar 2010 17:26:36 -0000 Cc: Joseph Koshy , embedded@freebsd.org, fabient@freebsd.org Subject: Re: First cut at hwpmc support on MIPS X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 17:32:55 -0000 > FYI, latest patch is here: > > http://people.freebsd.org/~gnn/mipshwpmc_4.diff > > This should address all the issues identified. I ran a simple test of running ls > under each event in both system and process modes and that worked like a charm. These PMCs appear to have the ability to discriminate between 'USER', 'SUPER' and 'KERNEL' CPU modes, but the proposed code in libpmc does not allow a user to select one or more of these. [libpmc.c] +static int +mips24k_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, + struct pmc_op_pmcallocate *pmc_config __unused) +{ + switch (pe) { + default: + break; + } + + return (0); +} If you wish to implement these qualifiers, function iaf_allocate_pmc() in libpmc.c would be useful as a template. If not, it would be prudent to add a sentence in the manual page so that users know exactly what is being measured. The patch looks fine otherwise. Nice work! Koshy