Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

oprofiled(1) [redhat man page]

OPROFILE(1)						      General Commands Manual						       OPROFILE(1)

NAME
oprofile - a sytem-wide profiler SYNOPSIS
opcontrol [ options ] oprofpp [ options ] [ sample-file ] [ binary ] op_to_source [ options ] op_time [ options ] [ samples-files-directory ] op_merge [ options ] [ samples-filenames or binary-filename] op_help [ event-name ] oprof_convert DESCRIPTION
OProfile is a profiling system for systems running Linux 2.2,2.4, and 2.5. Profiling runs transparently in the background and profile data can be collected at any time. OProfile makes use of the hardware performance counters provided on Intel P6, Intel Pentium 4, and AMD Athlon family processors, and OProfile can use the RTC for profiling on other processor. In the following description, options that begin with ctrN- define N as a logical counter number in the range 0-7, which is processor specific. See the HTML documentation for further details. COMMONS OPTIONS
All utilities share the following options --help -? --usage Show help message. --version -v Show version. OPTIONS
opcontrol options --list-events Shows the monitorable events. --init Load the OProfile module if required and make the OProfile driver interface available. --setup Followed by list options for profiling setup. Store setup in /home/root/.oprofile/daemonrc. --start-daemon Start the oprofile daemon without starting profiling. Not available in 2.2/2.4 kernels. --start Start data collection with either arguments provided by --setup of information saved in /home/root/.oprofile/daemonrc. --dump Force a flush of the collected profiling data to the daemon. --stop Stop data collection. --shutdown Stop data collection and remove daemon. --reset Clear out data from current session, but leaves saved sessions. --save=sessionname Save data from current session to sessionname. --deinit Shut down daemon. Unload the oprofile module and oprofilefs. --buffer-size=num Set kernel buffer to num samples. --ctrN-event=name Set counter N to measure symbolic event name. --ctrN-count=val Number of events between samples for counter N. --ctrN-unit-mask=val Set unit mask for counter N (e.g. --ctr0-unit-mask=0xf). --ctrN-kernel=[0|1] Count events in kernel mode when 1, do not count when 0 (default 1). --ctrN-user=[0|1] Count events in user mode when 1, do not count when 0 (default 1). --pid-filter=pid Only profile process pid (only available for 2.4 version). --pgrp-filter=pgrp Only profile process tty group pgrp (only available for 2.4 version). --separate=[library] Separate samples based on the given separator. Currently only "library" is supported, which gives sample files for libraries on a per-application basis. --vmlinux=file vmlinux kernel image. --verbose Be verbose in the daemon log. --kernel-range=start,end Set kernel range vma address in hexadecimal. oprofpp options --samples-file filename, -f filename Analyze sample filename. --image-file filename, -i filename Analyze image filename. --list-symbols -l List samples by symbol. --dump-gprof-file filename, -g filename Dump gprof format file. --list-symbol name, -s name Give detailed samples for the symbol name. --list-all-symbols-details -L Give detailed samples for all symbols. --output-linenr-info -o Output filename:linenr info for all samples, usable only with --list-all-symbols-details, --list-symbol and --list-symbols. --demangle -d Demangle GNU C++ symbol names. --counter counter_nr, -c counter_nr Analyze using counter nr. --verbose -V Generate verbose output. --exclude-symbol symbols -e symbols Exclude list of comma separated symbols. --show-shared-libs -k Show the details for each shared lib which belongs to one application. This option is useful only if you have profiled with --sepa- rate=library option and you specify on the oprofpp command line either --list-symbols or --list-all-symbols-details. --reverse -r Sort the entries in reverse order, from largest to smallest (only with --list-symbols). --output-format vsSpPqQnlLiIh, -t vsSpPqQnlLiIdh Specify the output format where a single format char is a field intended for: 'v' vma, 's' nr samples, 'S' nr cumulated samples, 'p' percent samples, 'P' cumulated percent samples, 'n' symbol name, 'l' source file name and line nr, 'L' ditto as 'l' but with base- name of source file name, 'i' image name, 'I' ditto as 'i' but with base name of image name, 'd' details for each samples for the selected symbols and 'h' for the header itself. 'q','Q' are identical to 'p', 'P' but the percentage are relative to the total num- ber of symbols. This option is not available with --dump-gprof-file. --session session-name Specify the session name you want to use, session-name can be an absolute path where samples reside or a session name relative to samples files base directory. If you specify a samples filename with an absolute path this option is ignored op_to_source options --samples-file filename, -f filename Annotate sample sample filename. --image-file filename, -i filename Annotate image filename. --demangle -d Demangle GNU C++ symbol names. --assembly -a Output assembly code. --source-dir base_directory Search the base directory for the source files. All source file outside this base directory are ignored. If neither --source-dir nor --output-dir specified, annotated source files go to stdout. --output-dir base_directory Output annotated source file into base directory. If neither --source-dir nor --output-dir specified, annotated source files go to stdout. --output pattern Generate annotations only for the files matching pattern. Multiple patterns can be specified by separating the patterns with com- mas. --no-output pattern Do not generate annotations for files matching pattern. Multiple patterns can be specified by separating the patterns with commas. --source-with-assembly -s Output assembly mixed with source file. --until-more-than-samples percent_nr, -m percent_nr Output source files until the amount of samples in these files reach percent_nr samples. --with-more-than-samples percent_nr, -w percent_nr Annotate source files with more than percent_nr samples. --sort-by-counter counter_nr, -c counter_nr Sort on counter_nr. --verbose -V Generate verbose output. --exclude-symbol symbols, -e symbols Exclude comma separated list of symbols. --include-symbol symbol, -y symbol Include comma separated list of symbol. --session session-name Specify the session name you want to use, session-name can be an absolute path where samples reside or a session name relative to samples files base directory. If you specify a samples filename, with an absolute path this option is ignored. --objdump-params 'params', -o 'params' Pass the comma separated additional parameters to objdump. Check the objdump man page to see what options objdump accept e.g. -o '--disassembler-options=intel' to get Intel assembly syntax instead of AT&T syntax. This option can be used only with --assembly or --source-with-assembly. op_time options [image_name [image_names]] --use-counter counter_nr, -c counter_nr Sort on counter_nr. --show-shared-libs -k Show the details for each shared lib which belongs to one application. This option is useful only if you have profiled with --sepa- rate=library option. --list-symbols -l Show details for each symbol in each profiled file. --demangle -d Demangle GNU C++ symbol names. --show-image-name -n Show the image name when specifying --list-symbols. --output-format vsSpPnlLiIeEh, -t vsSpPnlLiIeEh Specify the output format where a single format char is a field intended for: 'v' vma, 's' nr samples, 'S' nr cumulated samples, 'p' percent samples, 'P' cumulated percent samples, 'n' symbol name, 'l' source file name and line nr, 'L' ditto as 'l' but with base- name of source file name, 'i' image name, 'I' ditto as 'i' but with base name of image name, 'e' application name, 'E' basename of application name 'e' and 'E' are useless unless you profile with --separate=library, 'd' details for each samples for the selected symbols and 'h' for the header itself. This option is available only with --list-symbols --reverse -r Sort output from largest to smallest count. --path path_list, -p path_list Specify an alternate list of pathname to locate image file. Use if the samples files name does not match the image file name, e.g. modules loaded at boot time through a RAM disk. The path_list is a comma separated list of directories. --recursive-path path_list, -P path_list Same as --path but retrieve recursively the image file name in the path list. The path_list is a comma separated list of directo- ries. --session session-name Specify the session name you want to use, session-name can be an absolute path where samples reside or a session name relative to samples files base directory op_merge options --use-counter counter_nr, -c counter_nr Select sample files for counter_nr rather than the default 0. USAGE
Setup and start the profiler with the provided opcontrol shell script. You are required to specify vmlinux, as well as specify a counter event and value, e.g. : opcontrol --setup --vmlinux=/sys/vmlinux --ctr0-event=CPU_CLK_UNHALTED --ctr0-count=600000 If you are using a linux 2.4 kernel on a machine that doesn't support the performance counters, you can use the RTC driver instead, e.g. : opcontrol --setup --vmlinux=/sys/vmlinux --rtc-value=128 If you are using a linux 2.5 kernel on a machine that doesn't support the performance counters, you can use the TIMER_INT driver instead, e.g. : opcontrol --setup --vmlinux=/sys/vmlinux Then actually start profiling with : opcontrol --start Profiles will be stored in the sample files periodically. You can force a collection at any time : opcontrol --dump Stopping profiling is done using opcontrol --shutdown which also flushes all samples to disk. As an alternative you can use the oprof_start GUI to start the profiler. See the HTML documentation for further details You can then collect profiles for any binary or shared library by using oprofpp to read the sample file : oprofpp -l /lib/libc-2.1.92.so or by using : op_to_source op_to_source -i /lib/libc-2.1.92.so op_time utility can be used to get an overall view of all profiled applications. op_merge utility can be used to merge multiple samples files which belongs to the same binary image. ENVIRONMENT
No environment variables are recognised by oprofile. FILES
$HOME/.oprofile/ Configuration files /home/root/.oprofile/daemonrc Configuration file for opcontrol /var/lib/oprofile/oprofiled.log The user-space daemon logfile. /var/lib/oprofile/opdev, /var/lib/oprofile/ophashmapdev, /var/lib/oprofile/opnotedev The device files for communication with the Linux 2.4 kernel module. /dev/oprofile The device filesystem for communication with the Linux 2.5 kernel module. /var/lib/oprofile/samples/ The location of the generated sample files. VERSION
This man page is current for oprofile-0.4. SEE ALSO
gprof(1), readprofile(1), Intel IA32 Architecture Developer's Manual, Volume 3 COPYRIGHT
oprofile is Copyright (C) 1998-2003 University of Manchester, UK, John Levon, and others. OProfile is released under the GNU General Pub- lic License, Version 2, or (at your option) any later version. AUTHORS
John Levon <levon@movementarian.org> is the primary author. See the documentation for other contributors. 4th Berkeley Distribution Fri 14 February 2003 OPROFILE(1)
Man Page