10.4. Data Capture

Before starting any profiling, start the OProfile daemon. Once it is running, each profiling session typically consists of the following steps:
  1. Start capturing profiling data
  2. Start/run the workload
  3. Stop capturing profiling data
  4. Dump profiling data
  5. Generate the profiling report
The simplest profiling report is produced by the command:
opreport -l --output-file=<filename>
This command produces a list of processes and their CPU cycles, from highest to lowest. Note that OProfile monitors the entire system, not just the Java processes. For additional information on OProfile, including additional reporting options, refer to the man page and the home page - http://oprofile.sourceforge.net.