Mac Developer Library Developer


This manual page is part of Xcode Tools version 5.0

To obtain these tools:

If you are running a version of Xcode Tools other than 5.0, view the documentation locally:

  • In Xcode

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.

iprofiler(1)              BSD General Commands Manual             iprofiler(1)


     iprofiler [-l] [-L] [-legacy] [-T duration] [-I interval] [-window period] [-d path] [-o basename]
     [-activitymonitor] [-allocations] [-counters] [-eventprofiler] [-leaks] [-systemtrace] [-timeprofiler]
     [-kernelstacks | -userandkernelstacks] [-allthreadstates] [-pmc PMC_MNEMONIC] [-pmi PMI_MNEMONIC]
     [-pmithreshold INTEGER] [-a process/pid | executable [args...]]

     Measure an application's performance without launching and then visualize the measure-ments measurements
     ments at a later time in  The performance data is saved in a .dtps bundle that can be
     opened in via "Open existing file...".  iprofiler supports these instruments: Activity
     Monitor, Allocations, Counters, Event Profiler, Leaks, System Trace, and Time Profiler.  Any combina-tion combination
     tion of these instruments can be run simultaneously.  iprofiler supports attaching to a currently-run-ning currently-running
     ning process, launching a process that will only run during the measurement, or profiling all cur-rently-running currently-running
     rently-running processes (by not specifying process/pid or executable).

     Options are :

     -l       Lists all supported instruments

     -L       Lists all supported instruments, with a description

     -legacy  Executes the legacy Instruments command-line interface.  This is a non-lightweight command-line commandline
              line interface that launches

     -T duration
              Records for this duration of time (Defaults to 10 seconds).  Duration can be specified in sec-onds seconds
              onds (e.g. 1s or 1), milliseconds (1000m or 1000ms) or microseconds (1000000u or 1000000us).

     -I interval
              Measures performance once during each sampling interval.  If this is not specified, it uses
    's default sampling interval.  Interval can be specified in microseconds (e.g.
              1000u or 1000us or 1000), seconds (1s) or milliseconds (1000m or 1000ms)

     -window period
              Performance measurement is limited to the final period of the iprofiler run.  If this is not
              specified, performance is measured during the complete duration.  Window period can be speci-fied specified
              fied in seconds (e.g. 1s or 1), milliseconds (1000m or 1000ms) or microseconds (1000000u or
              1000000us).  This option can only be used with -timeprofiler and/or -systemtrace.

     -d path -o basename
              Specifies "path/basename.dtps" as the path where the performance data is written.  If path is
              not specified, then it gets written to current working directory.  If basename is not speci-fied, specified,
              fied, then the process name or process id is used as the basename.

              When present, this argument will append a timestamp to the end of the filename, i.e.

     -activitymonitor -allocations -counters -eventprofiler -leaks -systemtrace -timeprofiler
              Chooses which instruments to run.  At least 1 instrument must be specified.

     -kernelstacks | -userandkernelstacks
              Causes backtraces to include only kernel stacks, or both user and kernel stacks.  If neither
              is specified, backtraces include only user stacks.

     -pmc PMC_MNEMONIC
              When using -counters, use this flag to specify the mnemonic of the event to count. Separate
              multiple mnemonics by a ','.

     -pmi PMI_MNEMONIC
              When using -eventprofiler, use this flag to specify the mnemonic of the event to use for sam-pling. sampling.

     -pmithreshold INTEGER
              When using -eventprofiler, use this flag to specify the number of events that must occur
              before a sample is taken.

              Causes timeprofiler to sample all thread states.  If this is not specified, timeprofiler will
              sample only running threads.

     -a process/pid
              Attaches to an already running process.  If you specify a pid number, it will attach to the
              process with that pid.  If you specify a process string, it will attach to the process whose
              name starts with that string.

     executable [args...]
              Causes a target process to be launched for the duration of the measurement.  The executable
              and the arguments are listed as if they were being invoked directly from the commandline.

SEE ALSO is able to open the resulting .dtps bundles that contain the performance data.  It can
     also be used to perform trace executions in a graphical environment.

     iprofiler -timeprofiler -activitymonitor

     iprofiler -T 8s -d /tmp -o YourApp_perf -timeprofiler -a YourApp

     iprofiler -T 2500ms -o YourApp_perf -leaks -activitymonitor -a 823

     iprofiler -d /tmp -timeprofiler -allocations -a

     iprofiler -T 15 -I 1000ms -window 2s -o YourApp_perf -timeprofiler -systemtrace /path/to/

Mac OS                         October 11, 2013                         Mac OS

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.