linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sourceforge.net>
To: Segher Boessenkool <segher@koffie.nl>
Cc: Albert Cahalan <albert@users.sourceforge.net>,
	oprofile-list@lists.sourceforge.net,
	linuxppc-dev@lists.linuxppc.org
Subject: Re: porting oprofile to ppc
Date: 03 Mar 2003 03:14:56 -0500	[thread overview]
Message-ID: <1046679297.1090.405.camel@cube> (raw)
In-Reply-To: <3E62B4C4.6030306@koffie.nl>


On Sun, 2003-03-02 at 20:49, Segher Boessenkool wrote:
> Albert Cahalan wrote:

>> I'm considering a port to the MPC7400 ("G4") PowerPC.
>> This is out of desperation, since there isn't anything
>> beyond gprof available for Linux/ppc users.
>
> Great to hear someone's willing to work on this!

Sort of. "feeling dragged into" is more like it.
Porting oprofile looks easier than porting valgrind
and kcachegrind, and nobody else seems to care
about PowerPC.

> I currently use the following hack to use the pmc's:
> I have a trivial kernel module that accepts as parameters
> the events to count on each pmc (like, insmod pmc.o 1 2 3 4),
> sets the PMCn and MMCRn regs, and fails to load.  This sets
> the counters running, and then I instrument the program
> to be profiled to read the PMC's at interesting program
> locations.  I wrote this years ago and never got around
> to finish any better tools.

Oooh... you shouldn't have said that. I might be
mostly satisfied. Right now I'm using a nasty hack
involving "gcc -finstrument-functions" and "nm".

I guess I most want instruction pointer (NIP) sampling
at irregular intervals, or at least not tied to the
clock tick. I could see using some random pre-initialized
profiling counter ("42 foo from now") to get this. I could
hook into the regular external interrupt and rely on USB
traffic to do my sampling. >:-)

> You are talking about the time base?  It runs at 1/4th
> the cpu clock.  It can be disabled by means of a hardware
> pin (GPIO9 on most Mac's); default is running and that's
> just what you want, I think ;)

Yes. I wonder where I got the 1/16 idea.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-03-03  8:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28 23:27 porting oprofile to ppc Albert Cahalan
2003-03-01  0:22 ` John Levon
2003-03-03  1:49 ` Segher Boessenkool
2003-03-03  8:14   ` Albert Cahalan [this message]
2003-03-03  8:28     ` Benjamin Herrenschmidt
2003-03-04  3:44       ` Segher Boessenkool
2003-03-04 16:36 ` AW: " Oliver Oppitz

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=1046679297.1090.405.camel@cube \
    --to=albert@users.sourceforge.net \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=oprofile-list@lists.sourceforge.net \
    --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).