RotateRight Zoom
Encyclopedia
Zoom is a performance analysis
Performance analysis
In software engineering, profiling is a form of dynamic program analysis that measures, for example, the usage of memory, the usage of particular instructions, or frequency and duration of function calls...

 tool for applications running on the Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 operating system from RotateRight. Using statistical (event-based) profiling, this software diagnoses performance problems related to cpu- and memory-intensive program code.

Statistical Sampling

Statistical sampling is the periodic recording of a processor's program counter
Program counter
The program counter , commonly called the instruction pointer in Intel x86 microprocessors, and sometimes called the instruction address register, or just part of the instruction sequencer in some computers, is a processor register that indicates where the computer is in its instruction sequence...

 or instruction pointer.
  • Each sample is taken (triggered) after a fixed period of time has elapsed or set number of events has occurred. In this way samples are taken in code proportionate to where more time is spent or more events occur.
  • Statistical sampling can be either system-wide or target a specific process
    Process (computing)
    In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...

    . System-wide sampling captures all of the processes running on a system, and can include time spent in kernel or driver code as well. Process-targeted sampling can be used to understand time spent waiting for I/O or kernel work.
  • Additional information besides the program counter can be recorded at each interval. For example, other hardware performance counters
    Hardware performance counter
    In computers, hardware performance counters, or hardware counters are a set of special-purpose registers built into modern microprocessors to store the counts of hardware-related activities within computer systems...

     can be read or the entire function callstack can be recorded. Recording the stack is important because it allows the developer to know not only where time was spent (or events occurred), but also how that code was called.

Call Tree Visualization

Symbol information is used to map program addresses to symbol names. Breaking down a profile at symbol granularity is a useful way to understand the time spent in blocks of code. There are a variety of methods for summarizing the information in a set of samples that include backtraces of each sample's call stack:
  • Top-down (tree
    Tree (data structure)
    In computer science, a tree is a widely-used data structure that emulates a hierarchical tree structure with a set of linked nodes.Mathematically, it is an ordered directed tree, more specifically an arborescence: an acyclic connected graph where each node has zero or more children nodes and at...

    ) visualization is used to find "hot" (frequently sampled) call paths, starting at the root symbol (e.g. main).
  • Bottom-up (leaf) visualization is used to find "hot" code, starting in the symbols where samples occurred.
  • Hotspot visualization is a complete list of symbols
    Debug symbol
    A debug symbol is information that expresses which programming-language constructs generated a specific piece of machine code in a given executable module. Sometimes the symbolic information is compiled together with the module's binary file, or distributed in separate file, or simply discarded...

     encountered in the profile that is used in conjunction with a side-by-side tree and leaf views (butterfly view). Selecting a symbol in the hotspot list shows the callers and callees of that symbol in the butterfly view.

Code visualization

Code visualization enables the developer to correlate source code to machine instructions
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

. It also allows for each line of source or instruction to be annotated with performance data.
  • Debug information such as DWARF
    DWARF
    DWARF is a widely used, standardized debugging data format. DWARF was originally designed along with Executable and Linkable Format , although it is independent of object file formats...

     can be used to map program addresses back to source code. This is the same information used by debugger
    Debugger
    A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

    s such as gdb.

Code Analysis Engine

A code analysis engine parses source or assembly code to provide tuning advice for specific processors and architectures. Zoom's code analysis engine performs the following:
  • Displays basic blocks
    Basic block
    In computing, a basic block is a portion of the code within a program with certain desirable properties that make it highly amenable to analysis. Compilers usually decompose programs into their basic blocks as a first step in the analysis process...

    .
  • Detects loop boundaries.
  • Computes register
    Processor register
    In computer architecture, a processor register is a small amount of storage available as part of a CPU or other digital processor. Such registers are addressed by mechanisms other than main memory and can be accessed more quickly...

     dependencies.
  • Finds branch
    Branch (computer science)
    A branch is sequence of code in a computer program which is conditionally executed depending on whether the flow of control is altered or not . The term can be used when referring to programs in high level languages as well as program written in machine code or assembly language...

     targets.
  • Computes stall cycles.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK