Before OProfile can be run, it must be configured. At a minimum, selecting to monitor the kernel (or selecting not to monitor the kernel) is required. The following sections describe how to use the
opcontrol utility to configure OProfile. As the
opcontrol commands are executed, the setup options are saved to the
29.2.1. Specifying the Kernel
First, configure whether OProfile should monitor the kernel. This is the only configuration option that is required before starting OProfile. All others are optional.
To monitor the kernel, execute the following command as root:
opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/`uname -r`/vmlinux
The debuginfo package for the kernel must be installed (which contains the uncompressed kernel) in order to monitor the kernel.
To configure OProfile not to monitor the kernel, execute the following command as root:
opcontrol --setup --no-vmlinux
This command also loads the
kernel module, if it is not already loaded, and creates the
directory, if it does not already exist. See Section 29.6, “Understanding
for details about this directory.