# oprofile

## NAME



           oprofile - a statistical profiler for Linux systems, capable of
           profiling all running code at low overhead; also included is a set
           of post-profiling analysis tools, as well as a simple event
           counting tool
    


## SYNOPSIS



           **operf**[ _options_ ]
           **ocount**[ _options_ ]
           **opreport**[ _options_ ] [ profile specification ]
           **opannotate**[ _options_ ] [ profile specification ]
           **oparchive**[ _options_ ] [ profile specification ]
           **opgprof**[ _options_ ] [ profile specification ]
    


## DESCRIPTION



           OProfile is a profiling system for systems running Linux 2.6.31
           and greater. OProfile makes use of the hardware performance
           counters provided on Intel, AMD, and other processors.  OProfile
           can profile a selected program or process or the whole system.
           OProfile can also be used to collect cumulative event counts at
           the application, process, or system level.
           For a gentle guide to using OProfile, please read the HTML
           documentation listed in SEE ALSO.
    


## OPERF



           **operf** is a performance profiler tool for Linux.
    


## OCOUNT



           **ocount** is an event counting tool for Linux.
    


## OPREPORT



           **opreport** gives image and symbol-based profile summaries for the
           whole system or a subset of binary images.
    


## OPANNOTATE



           **opannotate** can produce annotated source or mixed source and
           assembly output.
    


## OPARCHIVE



           **oparchive** produces oprofile archive for offline analysis
    


## OPGPROF



           **opgprof** can produce a gprof-format profile for a single binary.
    


## PROFILE SPECIFICATIONS



           Various optional profile specifications may be used with the post-
           profiling tools. A profile specification is some combination of
           the parameters listed below. ( **Note** : Enclosing part of a profile
           specification in curly braces { } can be used for differential
           profiles with **opreport** , but the braces **must** be surrounded by
           whitespace.)
    
           **archive:**_archive_
                  Path to the archive to inspect, as generated by **oparchive**
    
           **session:**_sessionlist_
                  A comma-separated list of session names to resolve in.
                  Absence of this tag, unlike all others, means "the current
                  session", equivalent to specifying "session:current".
    
           **session-exclude:**_sessionlist_
                  A comma-separated list of sessions to exclude.
    
           **image:**_imagelist_
                  A comma-separated list of image names to resolve. Each
                  entry may be relative path, glob-style name, or full path,
                  e.g.  opreport 'image:/usr/bin/operf,*op*,./oprofpp'
    
           **image-exclude:**_imagelist_
                  Same as image:, but the matching images are excluded.
    
           **lib-image:**_imagelist_
                  Same as image:, but only for images that are for a
                  particular primary binary image (namely, an application).
                  This only makes sense to use if you're using --separate.
                  This includes kernel modules and the kernel when using
                  --separate=kernel.
    
           **lib-image-exclude:**_imagelist_
                  Same as <option>lib-image:</option>, but the matching
                  images are excluded.
    
           **event:**_eventname_
                  The symbolic event name to match on, e.g.
                  event:DATA_MEM_REFS.
    
           **count:**_eventcount_
                  The event count to match on, e.g. event:DATA_MEM_REFS
                  count:30000.
    
           **unit-mask:**_maskvalue_
                  The unit mask value of the event to match on, e.g. unit-
                  mask:1.
    
           **cpu:**_cpulist_
                  Only consider profiles for the given numbered CPU (starting
                  from zero).  This is only useful when using CPU profile
                  separation.
    
           **tgid:**_pidlist_
                  Only consider profiles for the given task groups. Unless
                  some program is using threads, the task group ID of a
                  process is the same as its process ID. This option
                  corresponds to the POSIX notion of a thread group. This is
                  only useful when using per-process profile separation.
    
           **tid:**_tidlist_
                  Only consider profiles for the given threads. When using
                  recent thread libraries, all threads in a process share the
                  same task group ID, but have different thread IDs. You can
                  use this option in combination with tgid: to restrict the
                  results to particular threads within a process.  This is
                  only useful when using per-process profile separation.
    


## ENVIRONMENT



           No special environment variables are recognized by OProfile.
    


## FILES



           _/usr/local/share/doc/oprofile/oprofile.html_
                  OProfile user guide.
    
           _/usr/local/share/doc/oprofile/opreport.xsd_
                  Schema file for opreport XML output.
    
           _/usr/local/share/doc/oprofile/ophelp.xsd_
                  Schema file for ophelp XML output.
    
           _/usr/local/share/oprofile/_
                  Event description files used by OProfile.
    
           _< session-dir>/samples/operf.log_
                  The profiler log file.
    
           _< session-dir>/samples/current_
                  The location of the generated sample files.
    


## VERSION



           This man page is current for oprofile-1.5.0git.
    


* * *