Performance-Monitoring Counters Library, for Intel/AMD Processors and Linux
This example introduces
rabbit command-line options --mesi m,n --bus_agent m,n --MMX m,n
Return to Main Menu
Command-Line Options
--mesi m,n
Pentium Pro/II/III and Athlon only
m, n = 4-bit unsigned integer, default 0xf
(Intel)
This option enables or disables, on a bit-wise basis, the counting of four
L2 cache line events according to the Modified, Exclusive, Shared, Invalid
protocol. When used with an input file, the value is applied as a bit-wise
mask to the unit mask field of each relevant entry in the --event_pairs
list.
To see the affected events,
rabbit -d | grep -e --mesi
rabbit -g 2 -d
To see the effect of this option, compare the output of the commands
rabbit -I
rabbit -I --mesi 2,4
The latter selection will only count events affecting cache lines in the
shared (2) and exclusive (4) states, in counters 0 and 1 respectively.
(AMD)
Four counters for three events are available, and the protocol is MOESI
(Modified, Owner, Exclusive, Shared, Invalid) with a default of 0x1f.
--bus_agent m,n
Pentium Pro/II/III only
m, n = 0 or 1, default 1
This option sets the unit mask for 14 external bus logic events according to
0: when this processor causes the bus activity,
1: when any bus agent causes the bus activity.
The only addendum to this rule is event 0x62 (98), which counts clocks as
0: bus clocks,
1: processor clocks.
When used with an input file, the value is applied as a bit-wise mask
(appropriately shifted) to the unit mask field of each relevant entry in the
--event_pairs list.
To see the affected events,
rabbit -d | grep -e --bus_agent
rabbit -g 3 -d
To see the effect of this option, compare the output of the commands
rabbit -I
rabbit -I --bus_agent 1,0
--MMX m,n
Pentium II/III only
m, n = 4-bit unsigned integer, default 0xf
This option enables or disables, on a bit-wise basis, the counting of five
events concerning the MMX registers and operations. For more details, see
the event descriptions for the MMX execution unit. When used with an input
file, the value is applied as a bit-wise mask to the unit mask field of
each relevant entry in the --event_pairs list.
Pentium III only
This option enables or disables, on a bit-wise basis, the counting of four
events concerning the Streaming SIMD Extensions operations and prefetch
instructions.
To see the affected events,
rabbit -d | grep -e --MMX
rabbit -g 7 -d
rabbit -g 8 -d
To see the effect of this option, compare the output of the commands
rabbit -I
rabbit -I --MMX 2,4
Example
Two of the events using --mesi are 41 and 42, L2 data loads and stores.
A brute-force test is easy to write:
#!/bin/sh
for mesi in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
rabbit -s 1 --e 41,42 --m 0x$mesi foo
done
On a single-processor system only the odd values of $mesi give non-zero
event counts.
Performance-Monitoring Counters Library, for Intel/AMD Processors and Linux
Author: Don Heller, dheller@scl.ameslab.gov
Last revised: 2 August 2000