OProfile
   HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
, OProfile is a system-wide
statistical Statistics (from German: ''Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, industria ...
profiling tool for
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
. John Levon wrote it in 2001 for
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ope ...
version 2.4 after his
M.Sc. A Master of Science ( la, Magisterii Scientiae; abbreviated MS, M.S., MSc, M.Sc., SM, S.M., ScM or Sc.M.) is a master's degree in the field of science awarded by universities in many countries or a person holding such a degree. In contrast to ...
project; it consists of a
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learnin ...
module, a
user-space A modern computer operating system usually segregates virtual memory into user space and kernel space. Primarily, this separation serves to provide memory protection and hardware protection from malicious or errant software behaviour. Kernel ...
daemon Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and Greek mythology, mythology and of later Hellenistic religion and Hell ...
and several user-space tools.


Details

OProfile can profile an entire system or its parts, from interrupt routines or drivers, to user-space processes. It has low overhead. The most widely supported kernel mode of uses a system timer (See: Gathering profiling events). However, this mode is unable to measure kernel functions where
interrupts In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
are disabled. Newer CPU models support a
hardware performance counter In computers, hardware performance counters (HPC), or hardware counters are a set of special-purpose Processor register, registers built into modern microprocessors to store the counts of hardware-related activities within computer systems. Advanced ...
mode which uses hardware logic to record events without any active code needed. In Linux 2.2/2.4 only 32-bit
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was introd ...
and
IA64 IA-64 (Intel Itanium architecture) is the instruction set architecture (ISA) of the Itanium family of 64-bit Intel microprocessors. The basic ISA specification originated at Hewlett-Packard (HP), and was subsequently implemented by Intel in coll ...
are supported; in Linux 2.6 there is wider support: x86 (32 and 64 bit),
DEC Alpha Alpha (original name Alpha AXP) is a 64-bit reduced instruction set computer (RISC) instruction set architecture (ISA) developed by Digital Equipment Corporation (DEC). Alpha was designed to replace 32-bit VAX complex instruction set computers ...
, MIPS,
ARM In human anatomy, the arm refers to the upper limb in common usage, although academically the term specifically means the upper arm between the glenohumeral joint (shoulder joint) and the elbow joint. The distal part of the upper limb between th ...
, sparc64,
ppc64 ppc64 is an identifier commonly used within the Linux, GNU Compiler Collection (GCC) and LLVM open-source software communities to refer to the target computer architecture, architecture for applications optimized for 64-bit big-endian PowerPC an ...
, AVR32.
Call graph A call graph (also known as a call multigraph) is a control-flow graph, which represents calling relationships between subroutines in a computer program. Each node represents a procedure and each edge ''(f, g)'' indicates that procedure ''f'' cal ...
s are supported only on x86 and ARM. In 2012 two IBM engineers recognized OProfile as one of the two most commonly used performance counter monitor profiling tools on Linux, alongside perf tool. In 2021, OProfile is set to be removed from version 5.12 of the Linux kernel, with the user-space tools continuing to work by using the kernel's perf system.


User-space tools

* is used to start and stop the daemon, which collects profiling data. This data is periodically saved to the directory. * shows basic profiling data. can produce annotated
sources Source may refer to: Research * Historical document * Historical source * Source (intelligence) or sub source, typically a confidential provider of non open-source intelligence * Source (journalism), a person, publication, publishing institute o ...
or
assembly Assembly may refer to: Organisations and meetings * Deliberative assembly, a gathering of members who use parliamentary procedure for making decisions * General assembly, an official meeting of the members of an organization or of their representa ...
. * converts from oprofile data into
gprof Gprof is a performance analysis tool for Unix applications. It used a hybrid of instrumentation and samplingSusan L. Graham, Peter B. Kessler, and Marshall K. Mckusick''gprof: a Call Graph Execution Profiler''// Proceedings of the SIGPLAN '82 Sy ...
-compatible format. Example:


See also

*
List of performance analysis tools This is a list of performance analysis tools for use in software development. General purpose, language independent The following tools work based on log files that can be generated from various systems. * time (Unix) - can be used to determin ...


References


External links

* {{Official website, http://oprofile.sourceforge.net/news/ * W. Cohen
Tuning programs with OProfile
// Wide Open Magazine, 2004, pages 53–62 * Prasanna Panchamukhi

// IBM DeveloperWorks, Technical Library, 16 Oct 2003 * Justin Thiel

(2006) "2.2.2 Overview of Oprofile" Linux kernel features Profilers