40.2.3. Separating Kernel and User-space Profiles
40.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: Execute the following command to start profiling kernel mode for the counter again: To configure OProfile not to count events in user mode for a specific counter, execute the following command: Execute the following command to start profiling user mode for the counter again: 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: <choice> can be one of the following: none - do not separate the profiles (default) library - generate per-application profiles for libraries kernel - generate per-application profiles for the kernel and kernel modules all - generate per-application profiles for libraries and per-application profiles for the kernel and kernel modules If --separate=library is used, the sample file name includes the name of the executable as well as the name of the library.
opcontrol --event= <event-name> : <sample-rate> : <unit-mask> :0 opcontrol --event= <event-name> : <sample-rate> : <unit-mask> :1 opcontrol --event= <event-name> : <sample-rate> : <unit-mask> : <kernel> :0 opcontrol --event= <event-name> : <sample-rate> : <unit-mask> : <kernel> :1 opcontrol --separate= <choice>