Table of Contents
Profiling with operf allows you to precisely target your profiling (i.e., single process or system-wide). With operf, there is no initial setup needed -- simply invoke operf with the options you need; then run the OProfile post-processing tool(s). The operf syntax is as follows:
operf [ options ] [ --system-wide | --pid=<PID> | [ command [ args ] ] ] |
A typical usage might look like this:
operf ./my_test_program my_arg |
When ./my_test_program
completes (or when you press Ctrl-C), profiling
stops and you're ready to use opreport or other OProfile post-processing tools.
By default, operf stores the sample data in <cur_dir>/oprofile_data/samples/current
,
and opreport and other post-processing tools will look in that location first for profile data,
unless you pass the --session-dir
option.