* How can I get the number of Generic counters and Fixed Counters in A computer
@ 2013-06-26 19:00 Peipei Wang
2013-06-26 19:18 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Peipei Wang @ 2013-06-26 19:00 UTC (permalink / raw)
To: perf group
Hi all,
I see from Perf wiki that if i put too many events in a perf stat,
there will be something called multiplexing and scaling because of the
number of counters provided by PMU. That wiki gives the Generic
counter and Fixed counters For Intel Core and Nehalem.
Does anybody know how to find the number of Both counters for Other
processors?? Mine is Xelon.
Another question. I found there is some events that are stored in
Generic counters, while others in Fixed Counters. Here is an example.
How can I get to know which kind of counter that actually each
performance events is stored in?
**********here is no scaling******************************
perf stat -e cycles -e instructions -e branches -a sleep 2
Performance counter stats for 'sleep 2':
1,166,790,650 cycles # 0.000 GHz
[100.00%]
1,197,347,780 instructions # 1.03 insns per
cycle [100.00%]
227,330,156 branches
2.000775070 seconds time elapsed
**********if I add branches-misses here, then it starts scaling for
the four******************************
***************So I guess they use generic counters and should be only
3, since 3/5=75%****************
perf stat -e cycles -e instructions -e branches -e branch-misses -a sleep 2
Performance counter stats for 'sleep 2':
1,028,005,876 cycles # 0.000 GHz
[47.87%]
1,177,117,294 instructions # 1.15 insns per
cycle [70.11%]
229,233,872 branches
[77.88%]
3,276,060 branch-misses # 1.43% of all
branches [74.25%]
2.000727148 seconds time elapsed
**********but if I change branches-misses to context-switches, then it
stops scaling ***********
***************So I guess branches instructions and cycles are for
generic counters, and context-switches is stored by another fixed
counter***************
perf stat -e cycles -e instructions -e branches -e context-switches -a sleep 2
Performance counter stats for 'sleep 2':
1,141,756,954 cycles # 0.000 GHz
[100.00%]
1,192,438,722 instructions # 1.04 insns per
cycle [100.00%]
226,363,898 branches
2,644 context-switches
2.000766968 seconds time elapsed
Best wishes.
Yours,
Wang Peipei
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How can I get the number of Generic counters and Fixed Counters in A computer
2013-06-26 19:00 How can I get the number of Generic counters and Fixed Counters in A computer Peipei Wang
@ 2013-06-26 19:18 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2013-06-26 19:18 UTC (permalink / raw)
To: Peipei Wang; +Cc: perf group
On 6/26/13 1:00 PM, Peipei Wang wrote:
> Hi all,
>
> I see from Perf wiki that if i put too many events in a perf stat,
> there will be something called multiplexing and scaling because of the
> number of counters provided by PMU. That wiki gives the Generic
> counter and Fixed counters For Intel Core and Nehalem.
>
> Does anybody know how to find the number of Both counters for Other
> processors?? Mine is Xelon.
Check the output of 'dmesg | grep -A 10 Perf'. e.g.,
[ 0.140962] Performance Events: PEBS fmt1+, 16-deep LBR, Westmere
events, Intel PMU driver.
[ 0.141302] perf_event_intel: CPUID marked event: 'bus cycles'
unavailable
[ 0.141412] ... version: 3
[ 0.141516] ... bit width: 48
[ 0.141623] ... generic registers: 4
[ 0.141732] ... value mask: 0000ffffffffffff
[ 0.141842] ... max period: 000000007fffffff
[ 0.141958] ... fixed-purpose events: 3
[ 0.142065] ... event mask: 000000070000000f
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-26 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26 19:00 How can I get the number of Generic counters and Fixed Counters in A computer Peipei Wang
2013-06-26 19:18 ` 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).