From: Rob Latham <rob@terizla.org>
To: Segher Boessenkool <segher@koffie.nl>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: RFC: Performance Monitor Counters device
Date: Sat, 14 Sep 2002 20:37:21 -0500 [thread overview]
Message-ID: <20020915013721.GH1169@terizla.org> (raw)
In-Reply-To: <3D80F2F7.3FB3AE4B@koffie.nl>
On Thu, Sep 12, 2002 at 10:03:02PM +0200, Segher Boessenkool wrote:
> Now the questions ;)
>
> 1) What's the best interface for this kind of thing? A char
> device? With ioctl()'s? a sysctl? something in /proc?
> I'm not interested in ease of implementation (I'll have to
> hack some on gprof too, for this -- so I'm not afraid of
> the kernel ;) ), but in what's philosophically/technically/
> procatically the best interface.
> 2) Do we want to be able to profile several tasks (independently
> from each other) at once? This will require some bookkeeping
> and task switch overhead, and is probably not necessary in
> practice; also, it will degrade the quality of the results some.
> 3) [I'm ashamed I have to ask this...] Is there a good tutorial
> to kernel locks somewhere?
> 4) Security: I want to generate most of the settings in userland,
> for maximum ease of use and ease of implementation; but that
> brings up some security issues. Only allowing root to
> profile code isn't ideal, either. So:
> a) Don't automagically load the module; if root loads it, let's
> hope he knows what he's doing;
> b) Have the pmc device be accessible only to a 'trusted' group;
> c) A setuid driver program to start profiling;
> d) Something much more clever?
it'd be really cool if the performance counter stuff looked like
perfctr (http://user.it.uu.se/~mikpe/linux/perfctr/). it uses a /dev/
entry.
The nice thing about making it perfctr-like is that it can tie into
oprofile (as mentioned in another reply) and also tie into PAPI
(http://icl.cs.utk.edu/projects/papi/).
PAPI has support for all kinds of performance counters on all sorts of
platforms. PAPI can be ported to whatever interface you end up
deciding upon: it's just that if it's perfctr-like, the porting
becomes a lot eaiser :>
just my non-hacker two cents.
==rob
--
Rob Latham Woodridge, IL USA
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
prev parent reply other threads:[~2002-09-15 1:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-12 20:03 RFC: Performance Monitor Counters device Segher Boessenkool
2002-09-12 9:52 ` Benjamin Herrenschmidt
2002-09-12 21:45 ` Segher Boessenkool
2002-09-12 10:25 ` Benjamin Herrenschmidt
2002-09-14 11:28 ` Segher Boessenkool
2002-09-15 12:50 ` samuel
2002-09-16 12:38 ` Benjamin Herrenschmidt
2002-09-16 23:50 ` Segher Boessenkool
2002-09-13 3:32 ` Paul Mackerras
2002-09-14 11:36 ` Segher Boessenkool
2002-09-13 10:04 ` Anton Blanchard
2002-09-14 11:39 ` Segher Boessenkool
2002-09-13 22:21 ` David Engebretsen
2002-09-14 11:22 ` Segher Boessenkool
2002-09-16 15:14 ` Dave Engebretsen
2002-09-17 4:59 ` Segher Boessenkool
2002-09-14 4:41 ` Ethan Benson
2002-09-15 1:37 ` Rob Latham [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020915013721.GH1169@terizla.org \
--to=rob@terizla.org \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=segher@koffie.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).