iprofiler(1) BSD General Commands Manual iprofiler(1)
NAME
iprofiler
USAGE
iprofiler [-l] [-L] [-legacy] [-T duration] [-I interval] [-window
period] [-d path] [-o basename] [-activitymonitor] [-allocations]
[-leaks] [-systemtrace] [-timeprofiler] [-kernelstacks | -userandkernel-
stacks] [-allthreadstates] [-a process/pid | executable [args...]]
DESCRIPTION
Measure an application's performance without launching Instruments.app
and then visualize the measurements at a later time in Instruments.app.
The performance data gets saved in a .dtps bundle that can be opened in
Instruments.app via "Open existing file...". iprofiler supports these
instruments: Time Profiler, System Trace, Activity Monitor, Allocations,
and Leaks. Any combination of these instruments can be run simultane-
ously. iprofiler supports attaching to a currently-running process,
launching a process that will only run during the measurement, or profil-
ing all currently-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 found at
/usr/bin/instruments. This is a non-lightweight command-line
interface that launches Instruments.app.
-T duration
Measures performance for this duration of time. If this is not
specified, it measures for 10 seconds. Duration can be speci-
fied in seconds (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 Instruments.app's default sam-
pling 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 mea-
sured during the complete duration. Window period can be speci-
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 specified,
then the process name or process id is used as the basename.
-timeprofiler -allocations -leaks -activitymonitor -systemtrace
Chooses which instruments to run. At least 1 instrument must be
specified, and up to all 5 instruments at the same time.
-kernelstacks | -userandkernelstacks
Causes backtraces to include only kernel stacks, or both user
and kernel stacks. If neither is specified, backtraces include
only user stacks.
-allthreadstates
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.
FILES
/usr/bin/iprofiler Executable
SEE ALSO
/Developer/Applications/Instruments.app 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.
EXAMPLES
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 YourApp.app
iprofiler -T 15 -I 1000ms -window 2s -o YourApp_perf -timeprofiler
-systemtrace /path/to/YourApp.app arg1
Mac OS August 22, 2012 Mac OS
Mac OS X 10.8 - Generated Wed Aug 22 05:26:33 CDT 2012
