C/C++ and Fortran

An Informal Introduction to the AIX tprof Utility

By Archive User posted Thu October 07, 2010 12:33 PM


Originally posted by: dzabawa

The AIX tprof utility is a valuable tool for optimization which provides features to identify performance bottlenecks within programs and to aid in analysis of performance-critical code. The IBM XL C/C++ Compiler provides features to aid in the use of tprof for performance analysis of programs. This document provides a brief introduction to select features of the tprof utility, with focus on features which interact with XL compiler listing files to allow performance analysis at the source-line or instruction level.


In its most simple usage, tprof executes a given workload using the AIX trace utility and provides a relative measure of how much time is spent in each process, and within each process, how much time is spent in each subroutine. This allows one performing program optimization to identify which subroutines dominate the execution time and hence where optimization efforts are best spent. When experimenting with various compiler optimization options, tprof profile data provides an effective measure of the impact of options on the subroutines in a program, which may facilitate fine-tuning of options on a per-subroutine basis. Furthermore, source and instruction-level analysis features can aid in the analysis of subroutines identified as performance-critical, to help identify compiler option or source-level modifications to avoid performance hazards or exploit new opportunities.


More information on the tprof utility and its features for reporting profiling information at various levels of granularity for users of XL compilers can be found here:


Introduction to the AIX tprof utility