Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Mar 2010 17:26:36 -0000
From:      Joseph Koshy <jkoshy@FreeBSD.org>
To:        George Neville-Neil <gnn@neville-neil.com>
Cc:        Joseph Koshy <jkoshy@freebsd.org>, embedded@freebsd.org, fabient@freebsd.org
Subject:   Re: First cut at hwpmc support on MIPS
Message-ID:  <86bpf83qii.wl%koshy@unixconsulting.co.in>
In-Reply-To: <B7DFF6BA-B10B-4458-94A9-76720D6820FD@neville-neil.com>
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> <B7DFF6BA-B10B-4458-94A9-76720D6820FD@neville-neil.com>

index | next in thread | previous in thread | raw e-mail

> 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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86bpf83qii.wl%koshy>