Chapter 43. OProfile
Caution
Be extremely careful when setting sampling rates. Sampling too frequently can overload the system,
causing the system to appear as if it is frozen or causing the system to actually freeze.
43.2.2.2. Unit Masks
If the
is not
cpu_type
Unit masks for each event are listed with the
listed in hexadecimal format. To specify more than one unit mask, the hexadecimal values must be
combined using a bitwise or operation.
opcontrol --ctrN -event=
43.2.3. Separating Kernel and User-space Profiles
By default, kernel mode and user mode information is gathered for each event. To configure OProfile
not to count events in kernel mode for a specific counter, execute the following command (where N is
the counter number):
opcontrol --ctrN -kernel=0
Execute the following command to start profiling kernel mode for the counter again:
opcontrol --ctrN -kernel=1
To configure OProfile not to count events in user mode for a specific counter, execute the following
command (where N is the counter number):
opcontrol --ctrN -user=0
Execute the following command to start profiling user mode for the counter again:
opcontrol --ctrN -user=1
When the OProfile daemon writes the profile data to sample files, it can separate the kernel and library
profile data into separate sample files. To configure how the daemon writes to sample files, execute
the following command as root:
opcontrol --separate=
<choice> can be one of the following:
— do not separate the profiles (default)
•
none
— generate per-application profiles for libraries
•
library
— generate per-application profiles for the kernel and kernel modules
•
kernel
— generate per-application profiles for libraries and per-application profiles for the kernel and
•
all
kernel modules
, unit masks may also be required to further define the event.
timer
event-name
--ctrN -count=
<
>
choice
<
>
command. The values for each unit mask are
op_help
sample-rate
<
305
--ctrN -unit-mask=
>
value
<
>
Need help?
Do you have a question about the ENTERPRISE LINUX 3 and is the answer not in the manual?