When
To profile your entire system, ensure the target button is set to All Processes and click Record.
At this point, you may be asked to authorize access to profile the system. This is required as the Linux kernel's perf implementation requires root to perform whole-system profiling.
During the profiling session, you will see the number of seconds the profile has been active. Clicking the Record button again will stop the profiling session. Afterwhich, the callgraph will be displayed.
If you find that the
See interpreting results for more guidance.
Often times, you may need to spawn a new process to profile. First, select the Application button next at the top of the recording window. Fill in your command and working directory, and optionally specify any environment variables you need. Your process will be started when recording begins.
If you are spawning a process that requires access to your current display, such as a GTK+ application, you will want to make sure Inherit current environment is set.
For minimal overhead, you might consider using the
If you would like to spawn a new process, use
The profiling results in
It is important to note that the amount of time spent in each function is not captured. That would require a tracing profiler to accurately record. The percentage is calculated by determining how often that function showed up in the current stacktrace when a sample was recorded.
After selecting a function from the functions list, all of the recorded callers of that function will be displayed on the bottom left. They are also sorted by the percentage of samples that included that function in the stacktrace.
On the right, are all of the decendants of a selected function. You can select a function either from the functions list, or the callers list.
If you see - - Context Switch - - in your results, that means that the application transitioned into or from the Linux kernel. There can be many reasons for this such as a syscall or signal.