Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2006 10:42:56 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        current@FreeBSD.org
Subject:   Re: The sixty second pmc howto
Message-ID:  <17405.55296.628193.915218@grasshopper.cs.duke.edu>
In-Reply-To: <20060223153135.C9642@fledge.watson.org>
References:  <20060223143856.O9642@fledge.watson.org> <17405.53911.686306.362353@grasshopper.cs.duke.edu> <20060223153135.C9642@fledge.watson.org>

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

Robert Watson writes:
 > 
 > On Thu, 23 Feb 2006, Andrew Gallatin wrote:
 > 
 > > Robert Watson writes:
 > >
 > > > (2) Run "pmcstat -S instructions -O /tmp/sample.out" to start sampling of
 > > >      instruction retirement events, saving the results to /tmp/sample.out.
 > >
 > > Dumb question, but what does "instructions" really mean?  The number of 
 > > instructions, the time spent executing them, ?
 > 
 > pmcstat magically translates 'instructions' into 'p4-instr-retired', which 
 > might well refer to what happens to an instruction when it is believed to have 
 > successfully executed.  Presumably this happens once you know it hasn't been 
 > mispredicted, etc, but I'm sure someone can give a better and more detailed 
 > answer.

Let's say it takes 1000 cycles to issue a memory load because of a
cache miss, and 1 cycle to increment something already in a register.
Let's also say that your program does each operation the same number
of times.

Does the 'instructions' count each operation identically so both
operations appear to cost the same, or is it sampled from some clock
interrupt, so that the memory load (correctly) shows up 1000 times
more often?

For what its worth,  I tend to use k8-bu-cpu-clk-unhalted because
my gut feeling is that it probably gives the latter behaviour.


Drew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17405.55296.628193.915218>