Shark User Guide
PDF
Introduction
Getting Started with Shark
Main Window
Mini Configuration Editors
Perform Sampling
Session Windows and Files
Session Files
Session Information Sheet
Session Report
Advanced Settings Drawer
Shark Preferences
Time Profiling
Statistical Sampling
Taking a Time Profile
Profile Browser
Heavy View
Tree View
Profile Display Preferences
Chart View
Advanced Chart View Settings
Code Browser
Assembly Browser
Advanced Code Browser Settings
ISA Reference Window
Tips and Tricks
Example: Optimizing MPEG-2 using Time Profiles
Base
Vectorization
System Tracing
Tracing Methodology
Basic Usage
Interpreting Sessions
Summary View In-depth
Scheduler Summary
System Calls Summary
Virtual Memory (VM) Faults Summary
Summary View Advanced Settings
Trace View In-depth
Scheduler Trace
System Call Trace
VM Fault Trace
Timeline View In-depth
Thread Run Intervals
System Calls
VM Faults
Interrupts
Sign Posts
Timeline View Advanced Settings
Sign Posts
Tips and Tricks
Other Profiling and Tracing Techniques
Time Profile (All Thread States)
Malloc Trace
Using a Malloc Trace
Advanced Display Options
Static Analysis
Using Shark with Java Programs
Java Tracing Techniques
Linking Shark with the Java Virtual Machine
Event Counting and Profiling Overview
Timed Counters: The Performance Counter Spreadsheet
The Counters Menu
Performance Counter Spreadsheet Advanced Settings
Adding Shortcut Equations
Event-Driven Counters: Correlating Events with Your Code
Advanced Profiling Control
Process Attach
Process Launch
Batch Mode
Windowed Time Facility (WTF)
WTF with System Trace
Unresponsive Application Measurements
Command Line Shark
Basic Methodology
Interactive Mode
Immediate Mode
Remote Mode
Network Mode
Common Options
Target Selection
Reports
Custom Configurations
More Information
Interprocess Remote Control
Programmatic Control
Example: Towers of Hanoi
Command Line Remote Control
Network/iPhone Profiling
Using Shared Profiling Mode
Mac OS X Firewall Considerations
Advanced Session Management and Data Mining
Automatic Symbolication Troubleshooting
Symbol Lookup
Debugging Information
Xcode
GCC/XLC/XLF
Manual Session Symbolication
Managing Sessions
Comparing Sessions
Example
Merging Sessions
Data Mining
Callstack Data Mining
Perf Count Data Mining
Example: Using Data Mining with a Time Profile
A Performance Problem...
Taking Samples
High Level Analysis
Analysis Via Source Navigation
Introduction To Focusing
Dig Deeper by Charging Costs
Example: Graphical Analysis using Chart View with a Malloc Trace
Taking Samples
Graphical Analysis of a Malloc Trace
Custom Configurations
The Config Editor
Simple Timed Samples and Counters Config Editor
Malloc Data Source PlugIn Editor
Static Analysis Data Source PlugIn Editor
Java Trace Data Source PlugIn Editor
Sampler Data Source PlugIn Editor
System Trace Data Source PlugIn Editor
All Thread States Data Source PlugIn Editor
Analysis and Viewer PlugIn Summary
Counter Spreadsheet Analysis PlugIn Editor
Using the Editor
Spreadsheet Configuration Example
Hardware Counter Configuration
Configuring the Sampling Technique: The Sampling Tab
Common Elements in Performance Counter Configuration Tabs
Counter Control
Privilege Level Filtering
Process Marking
MacOS X OS-Level Counters Configuration
Intel CPU Performance Counter Configuration
PowerPC G3/G4/G4+ CPU Performance Counter Configuration
PowerPC G5 (970) Performance Counter Configuration
PowerPC North Bridge Counter Configuration
U1.5/U2 North Bridges
U3 North Bridge
U4 (Kodiak) North Bridge
ARM11 CPU Performance Counter Configuration
Appendix A: Command Reference
Menu Reference
Shark
File
Edit
Format
Config
Sampling
Data Mining
Window
Help
Alphabetical Reference
Appendix B: Miscellaneous Topics
Code Analysis with the G5 (PPC970) Model
Supervisor Space Sampling Guidelines
Appendix C: Intel Core Performance Counter Event List
Appendix D: Intel Core 2 Performance Counter Event List
Appendix E: PPC 750 (G3) Performance Counter Event List
Appendix F: PPC 7400 (G4) Performance Counter Event List
Appendix G: PPC 7450 (G4+) Performance Counter Event List
Appendix H: PPC 970 (G5) Performance Counter Event List
Appendix I: UniNorth-2 (U1.5/2) Performance Counter Event List
Appendix J: UniNorth-3 (U3) Performance Counter Event List
Appendix K: Kodiak (U4) Performance Counter Event List
Appendix L: ARM11 Performance Counter Event List
Revision History