Mailinglist Archive: opensuse-programming (8 mails)

< Previous Next >
Re: [opensuse-programming] using performance counters?
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Tue, 22 Mar 2011 16:49:35 +0100
  • Message-id: <imagee$477$1@saturn.local.net>
Marcus Meissner wrote:

On Sun, Mar 20, 2011 at 09:34:24AM -0400, Jerry Feldman wrote:
On 03/19/2011 02:21 PM, Per Jessen wrote:
I'm trying to optimize some assembler code for which I'm measuring
runtime over a <slice of data>. Is there any easy (in C or
assembler )
access to counters for pipeline stalls and cache misses available?
At some point I'd also like to look at context switches, although
I'm not sure how I might affect those.

Valgrind can give you some of what you want. I've also used Intel's
Vtune. The Linux Trace Toolkit may also be useful. But, I think for
things like pipeline stalls you would need one of the profiling
tools.

oprofile is also at this kind of lowlevel.


Thanks, I'll have to take a closer look. I had sort of hoped to be able
to something like this:

a=readcounter()
<run my code>
b=readcounter()

b-a = number of events (stalls, context switch, cache miss etc).


/Per Jessen, Zürich

--
To unsubscribe, e-mail: opensuse-programming+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-programming+help@xxxxxxxxxxxx

< Previous Next >
List Navigation