linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* perf stat: Doubt about stall cycle support
@ 2012-03-21  4:42 Yipeng Huang
  2012-03-21 14:46 ` David Ahern
  0 siblings, 1 reply; 7+ messages in thread
From: Yipeng Huang @ 2012-03-21  4:42 UTC (permalink / raw)
  To: linux-perf-users

I am running perf stat to count hardware counters but am confused about stall 
cycle support. 

On running the command perf stat ./progname, I am told that stalled-cycles-
frontend and stalled-cycles-backend are not counted, but when on running perf 
stat -v ./progname, I am told that stall cycles are not supported by the kernel. 
So which is it? 

I am running kernel 3.0.0-17 on a Core 2 Duo T9600. 

Output of perf stat -v ./progname below.
-------------------------------------------------------------------------

stalled-cycles-frontend event is not supported by the kernel.
stalled-cycles-backend event is not supported by the kernel.
task-clock: 10721725 10721725 10721725
context-switches: 21 10721725 10721725
CPU-migrations: 7 10721725 10721725
page-faults: 307 10721725 10721725
cycles: 8448552 10786438 10786438
stalled-cycles-frontend: 0 0 0
stalled-cycles-backend: 0 0 0
instructions: 9441906 10786438 10786438
branches: 2248426 10786438 10786438
branch-misses: 78571 10786438 10786438

 Performance counter stats for './dd-exp1-papiex 10':

         10.721725 task-clock                #    0.232 CPUs utilized          
                21 context-switches          #    0.002 M/sec                  
                 7 CPU-migrations            #    0.001 M/sec                  
               307 page-faults               #    0.029 M/sec                  
         8,448,552 cycles                    #    0.788 GHz                    
     <not counted> stalled-cycles-frontend 
     <not counted> stalled-cycles-backend  
         9,441,906 instructions              #    1.12  insns per cycle        
         2,248,426 branches                  #  209.707 M/sec                  
            78,571 branch-misses             #    3.49% of all branches        

       0.046307919 seconds time elapsed

Thanks and Regards, 

Yipeng 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: perf stat: Doubt about stall cycle support
  2012-03-21  4:42 perf stat: Doubt about stall cycle support Yipeng Huang
@ 2012-03-21 14:46 ` David Ahern
       [not found]   ` <CAB_n8zK5b0jWA=retCX12DGmrb19gMd2UxJGWkn6HD9nFrdiAQ@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: David Ahern @ 2012-03-21 14:46 UTC (permalink / raw)
  To: Yipeng Huang; +Cc: linux-perf-users

On 3/20/12 10:42 PM, Yipeng Huang wrote:
> I am running perf stat to count hardware counters but am confused about stall
> cycle support.
>
> On running the command perf stat ./progname, I am told that stalled-cycles-
> frontend and stalled-cycles-backend are not counted, but when on running perf
> stat -v ./progname, I am told that stall cycles are not supported by the kernel.
> So which is it?

What does perf --version show?

Should be fixed by 2cee77c4505fc581f41b44e18ffc0953b67a414c.

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: perf stat: Doubt about stall cycle support
       [not found]   ` <CAB_n8zK5b0jWA=retCX12DGmrb19gMd2UxJGWkn6HD9nFrdiAQ@mail.gmail.com>
@ 2012-03-21 16:24     ` David Ahern
  2012-03-22  0:43       ` Yipeng Huang
  0 siblings, 1 reply; 7+ messages in thread
From: David Ahern @ 2012-03-21 16:24 UTC (permalink / raw)
  To: yipeng; +Cc: linux-perf-users

On 3/21/12 9:32 AM, yipeng wrote:
>
>     What does perf --version show?
>
>     Should be fixed by 2cee77c4505fc581f41b44e18ffc09__53b67a414c.
>
>     David
>
>
> I'm not sure what version that hash is. I'm using perf version
> 3.0.22. Is my version that too old?

That's a commit id for perf-stat to discriminate unsupported events from 
not counted events.

It was committed around 3.0 timeframe. Try compiling a newer version of 
perf and see if it addresses your concern.

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: perf stat: Doubt about stall cycle support
  2012-03-21 16:24     ` David Ahern
@ 2012-03-22  0:43       ` Yipeng Huang
  2012-03-22  1:17         ` Vince Weaver
  2012-03-22  2:30         ` David Ahern
  0 siblings, 2 replies; 7+ messages in thread
From: Yipeng Huang @ 2012-03-22  0:43 UTC (permalink / raw)
  To: linux-perf-users

David Ahern <dsahern <at> gmail.com> writes:

> 
> On 3/21/12 9:32 AM, yipeng wrote:
> >
> >     What does perf --version show?
> >
> >     Should be fixed by 2cee77c4505fc581f41b44e18ffc09__53b67a414c.
> >
> >     David
> >
> >
> > I'm not sure what version that hash is. I'm using perf version
> > 3.0.22. Is my version that too old?
> 
> That's a commit id for perf-stat to discriminate unsupported events from 
> not counted events.
> 
> It was committed around 3.0 timeframe. Try compiling a newer version of 
> perf and see if it addresses your concern.
> 
> David
> 


David, you are right, it consistently shows "not supported by the kernel" on
3.2. However, I am still unable to read stall cycles. 

Since I am on a much newer kernel, could it be the case that reading stall
cycles is not supported by my hardware rather than by the kernel?

Thanks, 

Yipeng 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: perf stat: Doubt about stall cycle support
  2012-03-22  0:43       ` Yipeng Huang
@ 2012-03-22  1:17         ` Vince Weaver
  2012-03-24  1:55           ` yipeng
  2012-03-22  2:30         ` David Ahern
  1 sibling, 1 reply; 7+ messages in thread
From: Vince Weaver @ 2012-03-22  1:17 UTC (permalink / raw)
  To: Yipeng Huang; +Cc: linux-perf-users

On Wed, 21 Mar 2012, Yipeng Huang wrote:
> 
> Since I am on a much newer kernel, could it be the case that reading stall
> cycles is not supported by my hardware rather than by the kernel?

What kind of stalls are you looking to measure?

The core2 supports many kind of stall events.  Check out Intel Vol3b 
documentation, or the libpfm4 showevtinfo utility for a list of them all.

perf only directly supports a small subset of "generalized" events, and 
only then if a kernel developer bothers to hook up the proper events in 
the kernel sources.

If you do find a likely event you want to use, you can make perf use it as 
a "raw" event.

Vince

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: perf stat: Doubt about stall cycle support
  2012-03-22  0:43       ` Yipeng Huang
  2012-03-22  1:17         ` Vince Weaver
@ 2012-03-22  2:30         ` David Ahern
  1 sibling, 0 replies; 7+ messages in thread
From: David Ahern @ 2012-03-22  2:30 UTC (permalink / raw)
  To: Yipeng Huang; +Cc: linux-perf-users

On 3/21/12 6:43 PM, Yipeng Huang wrote:
> Since I am on a much newer kernel, could it be the case that reading stall
> cycles is not supported by my hardware rather than by the kernel?

Sandy Bridge and Westmere support should be in 3.0. Are you sure your 
processor supports it?

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: perf stat: Doubt about stall cycle support
  2012-03-22  1:17         ` Vince Weaver
@ 2012-03-24  1:55           ` yipeng
  0 siblings, 0 replies; 7+ messages in thread
From: yipeng @ 2012-03-24  1:55 UTC (permalink / raw)
  To: linux-perf-users

On Thu, Mar 22, 2012 at 9:17 AM, Vince Weaver <vweaver1@eecs.utk.edu> wrote:
>
> What kind of stalls are you looking to measure?
>
> The core2 supports many kind of stall events.  Check out Intel Vol3b
> documentation, or the libpfm4 showevtinfo utility for a list of them all.
>
> perf only directly supports a small subset of "generalized" events, and
> only then if a kernel developer bothers to hook up the proper events in
> the kernel sources.
>
> If you do find a likely event you want to use, you can make perf use it as
> a "raw" event.

Vince, resource stalls is close to what I was looking for.

libpfim4 and raw events set me on the right direction, thanks!

Yipeng

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-24  1:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21  4:42 perf stat: Doubt about stall cycle support Yipeng Huang
2012-03-21 14:46 ` David Ahern
     [not found]   ` <CAB_n8zK5b0jWA=retCX12DGmrb19gMd2UxJGWkn6HD9nFrdiAQ@mail.gmail.com>
2012-03-21 16:24     ` David Ahern
2012-03-22  0:43       ` Yipeng Huang
2012-03-22  1:17         ` Vince Weaver
2012-03-24  1:55           ` yipeng
2012-03-22  2:30         ` David Ahern

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).