5.20.2.1. Online Mode

Using OProfile in online mode assumes a working network connection with the target hardware. With this connection, you just need to run "oprofile-server" on the device. By default, OProfile listens on port 4224.

Note

You can change the port using the --port command-line option.

The client program is called oprofile-viewer and its UI is relatively straightforward. You access key functionality through the buttons on the toolbar, which are duplicated in the menus. Here are the buttons:

The client downloads the complete 'profile archive' from the target to the host for processing. This archive is a directory that contains the sample data, the object files, and the debug information for the object files. The archive is then converted using the oparchconv script, which is included in this distribution. The script uses opimport to convert the archive from the target to something that can be processed on the host.

Downloaded archives reside in the Build Directory in tmp and are cleared up when they are no longer in use.

If you wish to perform kernel profiling, you need to be sure a vmlinux file that matches the running kernel is available. In the source directory, that file is usually located in /boot/vmlinux-KERNELVERSION, where KERNEL-version is the version of the kernel. The OpenEmbedded build system generates separate vmlinux packages for each kernel it builds. Thus, it should just be a question of making sure a matching package is installed (e.g. opkg install kernel-vmlinux). The files are automatically installed into development and profiling images alongside OProfile. A configuration option exists within the OProfileUI settings page that you can use to enter the location of the vmlinux file.

Waiting for debug symbols to transfer from the device can be slow, and it is not always necessary to actually have them on the device for OProfile use. All that is needed is a copy of the filesystem with the debug symbols present on the viewer system. The "Launch GDB on the Host Computer" section covers how to create such a directory with the Source Directory and how to use the OProfileUI Settings Dialog to specify the location. If you specify the directory, it will be used when the file checksums match those on the system you are profiling.