This article is in need of a technical review.
Instruments seems to be Apple's replacement for Shark. You can use it for memory profiling and for statistical profiling.
Missing features compared to Shark
- Command line tool ('shark') (fixed with
iprofilerin Xcode 4).
- No performance counter (cache miss etc.) profiling.
- Can't focus functions in the call tree view (this is fixed in Mac OS X 10.7).
Instruments will record a call stack at each allocation point. The call tree view can be quite helpful here. Switch from "Statistics". This
malloc profiling is done using the
malloc_logger infrastructure (similar to
MallocStackLogging). Currently this means you need to build with jemalloc disabled (
ac_add_options --disable-jemalloc). You also need the fix to Bug 719427
DTPerformanceSession api can be used to control profiling from applications like the old CHUD API we use in Shark builds. Bug 667036
System Trace might be useful.