Performance-Monitoring Counters Library, for Intel/AMD Processors and Linux
This example introduces
   rabbit command-line options --events m,n -Label text
                               -group n
                               -number replication
                               -list -codes -descriptions

Return to Main Menu

Command-Line Options --events m,n Specify a single pair of events to monitor, for counters 0 and 1. The event codes are verified, as some events can only be used in one of the counters, and not all codes are available. The values m and n are system- dependent; use 'rabbit -c' to see the complete list, and 'rabbit -d' for their descriptions. This option overrides the -group option. On the Athlon, four counters are available. -Label text Supply a textual label to accompany the --events option. -group n Select one of a number of pre-defined groups of events to monitor. The special case n = 'all' selects all events; this is the default. User- defined groups are entered with the -input option and --event_pairs keyword, or with the --events option for a single pair. Use 'rabbit -l' to see how the events are paired within the group. The group structure is roughly along these lines: Pentium, Pentium with MMX Technology: 0: floating-point operations and memory references 1: memory activity 2: memory and L1 cache activity 3: L1 cache activity 4: branches and instruction pipes 5: miscellany 6: floating-point operations, bus activity, stalls 7: MMX (if available) 7/8: all events (concatenation of groups 1, 3, 4, 5, 6, 7) Pentium Pro, Pentium II, Pentium III: 0: floating-point operations and memory references 1: L1 cache activity 2: L2 cache activity 3: external bus activity 4: floating-point unit 5: memory ordering, instruction decoding and retirement 6: interrupts, branches, stalls 7: MMX (if available) 8: Streaming SIMD (if available) 7/8/9: all events (concatenation of groups 1 through 6/7/8) Athlon: 0: data cache accesses and misses 1: data cache activity 2: instruction cache activity 3: instruction execution 4: interrupts 5: all events (concatenation of groups 1, 2, 3, 4) -number replication To form the list of counters, replicate each event pair this many times. The default is replication = 1. -list -codes -descriptions The options -l -c -d first verify that the requested event pairs are valid for the processor, then print event codes and descriptive information.
Examples To see the members of group 3, with pairings and descriptions, rabbit -g 3 -l -c -d To find events relevant to the L2 cache, rabbit -d | grep L2 To give a multi-word label, use quotes, rabbit --e 0xc0,0xc2 date rabbit --e 0xc0,0xc2 -Label 'Instructions and micro-operations' date
Notes The Pentium event FLOPS (0x22, 34) includes floating-point +, -, *, /, remainder, square root, + and * as generated by the transcendental instructions, and integer multiply.

Performance-Monitoring Counters Library, for Intel/AMD Processors and Linux
Author: Don Heller,
Last revised: 2 August 2000