linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Vince Weaver <vweaver1@eecs.utk.edu>
Cc: nelakurthi koteswararao <koteswararao18@gmail.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: How to check perf commands are producing proper output or not?
Date: Fri, 28 Jan 2011 13:43:14 -0200	[thread overview]
Message-ID: <20110128154314.GC6345@ghostprotocols.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1101280929240.10620@cl320.eecs.utk.edu>

Em Fri, Jan 28, 2011 at 09:37:03AM -0500, Vince Weaver escreveu:
> On Fri, 28 Jan 2011, Arnaldo Carvalho de Melo wrote:
> > 
> > So far I wrote some that generate tracepoint events, but I can envision
> > for instance, figuring out the size of the L2 processor cache, creating
> > an array that is of that size, then go on touching it till it trashes
> > the cache while measuring the relevant event.
> 
> Unfortunately it is harder to validate perf events than you might guess.

My expectation so far, for basic tests, is not to precisely detect each
and every event, but to make sure that if a big number of cache misses
is being provoked, a big number of cache misses is being detected, to
test the basic working of the system.

After basic tests are in place, we go on trying to make them more
precise as is practical.
 
> For your L2 example, most processors do hardware prefetch in very hard to 
> model way, so the "expected" value never matches anything that you get 
> with the counters.  This is even if you write the tests in assembly
> language to avoid any weird behavior from the C compilers (and there can 
> be, even on something as simple as an array walk).
> 
> Even things you might think are simple, like retired-instructions can vary 
> wildly.  There are enough differences caused by Linux and processor errata 
> with retired-instructions that I wrote a whole 10 page paper about the 
> differences you see.

Cool, can I get the paper URL? I'd love to read it
 
> I have started writing some validation tests, though they use the PAPI 
> library which runs on top of perf-events.  You can see that and other 
> validation work linked to here:
>    http://web.eecs.utk.edu/~vweaver1/projects/validation-tests/

Will look at it, thanks for the pointer, thanks for working on it!

- Arnaldo

  reply	other threads:[~2011-01-28 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTikZc4L=-xzmOvqLC00qNHLuqCBOdcD3hofBNfFN@mail.gmail.com>
2011-01-28 13:48 ` How to check perf commands are producing proper output or not? Arnaldo Carvalho de Melo
2011-01-28 14:37   ` Vince Weaver
2011-01-28 15:43     ` Arnaldo Carvalho de Melo [this message]
2011-01-28 22:03       ` Vince Weaver
2011-01-29 13:07         ` Arnaldo Carvalho de Melo

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=20110128154314.GC6345@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=koteswararao18@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=vweaver1@eecs.utk.edu \
    /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).