RotateRight Zoom
Zoom is a performance analysis tool for applications running on the Linux and Mac OS X operating systems 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 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. 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 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) 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 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. It also allows for each line of source or instruction to be annotated with performance data.
- Debug information such as DWARF can be used to map program addresses back to source code. This is the same information used by debuggers 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.
- Detects loop boundaries.
- Computes register dependencies.
- Finds branch targets.
- Computes stall cycles.