Table 19.2. OProfile Processors and Counters
Processor | cpu_type | Number of Counters |
---|---|---|
AMD64 | x86-64/hammer | 4 |
AMD Athlon | i386/athlon | 4 |
AMD Family 10h | x86-64/family10 | 4 |
AMD Family 11h | x86-64/family11 | 4 |
AMD Family 12h | x86-64/family12 | 4 |
AMD Family 14h | x86-64/family14 | 4 |
AMD Family 15h | x86-64/family15 | 6 |
IBM eServer System i and IBM eServer System p | timer | 1 |
IBM POWER4 | ppc64/power4 | 8 |
IBM POWER5 | ppc64/power5 | 6 |
IBM PowerPC 970 | ppc64/970 | 8 |
IBM S/390 and IBM System z | timer | 1 |
Intel Core i7 | i386/core_i7 | 4 |
Intel Nehalem microarchitecture | i386/nehalem | 4 |
Intel Pentium 4 (non-hyper-threaded) | i386/p4 | 8 |
Intel Pentium 4 (hyper-threaded) | i386/p4-ht | 4 |
Intel Westmere microarchitecture | i386/westmere | 4 |
TIMER_INT | timer | 1 |
timer
is used as the processor type if the processor does not have supported performance monitoring hardware.
timer
is used, events cannot be set for any processor because the hardware does not have support for hardware performance counters. Instead, the timer interrupt is used for profiling.
timer
is not used as the processor type, the events monitored can be changed, and counter 0 for the processor is set to a time-based event by default. If more than one counter exists on the processor, the counters other than counter 0 are not set to an event by default. The default events monitored are shown in Table 19.3, “Default Events”.
Table 19.3. Default Events
Processor | Default Event for Counter | Description |
---|---|---|
AMD Athlon and AMD64 | CPU_CLK_UNHALTED | The processor's clock is not halted |
AMD Family 10h, AMD Family 11h, AMD Family 12h | CPU_CLK_UNHALTED | The processor's clock is not halted |
AMD Family 14h, AMD Family 15h | CPU_CLK_UNHALTED | The processor's clock is not halted |
IBM POWER4 | CYCLES | Processor Cycles |
IBM POWER5 | CYCLES | Processor Cycles |
IBM PowerPC 970 | CYCLES | Processor Cycles |
Intel Core i7 | CPU_CLK_UNHALTED | The processor's clock is not halted |
Intel Nehalem microarchitecture | CPU_CLK_UNHALTED | The processor's clock is not halted |
Intel Pentium 4 (hyper-threaded and non-hyper-threaded) | GLOBAL_POWER_EVENTS | The time during which the processor is not stopped |
Intel Westmere microarchitecture | CPU_CLK_UNHALTED | The processor's clock is not halted |
TIMER_INT | (none) | Sample for each timer interrupt |
~]# ls -d /dev/oprofile/[0-9]*
~]# ophelp
opcontrol
:
~]# opcontrol --event=event-name:sample-rate
ophelp
, and replace sample-rate with the number of events between samples.
cpu_type
is not timer
, each event can have a sampling rate set for it. The sampling rate is the number of events between each sample snapshot.
~]# opcontrol --event=event-name:sample-rate
Sampling too frequently can overload the system
ophelp
command. The values for each unit mask are listed in hexadecimal format. To specify more than one unit mask, the hexadecimal values must be combined using a bitwise or operation.
~]# opcontrol --event=event-name:sample-rate:unit-mask