TPROF


General Description

TPROF is a CPU profiling tool that can be used for system performance analysis. The tool is based on the sampling technique which encompasses the following steps:
  The TPROF hooks are stored in a trace file using  the SWTRACE  facility. The sampling information is post-processed by the post executable.  post produces the tprof.out report which has several subreports which rollup execution time by various combinations of  processes, threads, and subroutines.

The detailed steps to obtain a tprof trace and subsequent report are encapsulated by the run.tprof script. This script interacts with the analyst to setup and run the necessary steps.

TPROF requires

  1. the swtrace software trace facility to gather the data,
  2. the a2n shared library to gather and resolve system and application symbolic resolution,
  3. the Java profiler ( jprof) to gather Java address-to-name data which is recorded in per pid jita2n files, and
  4. post to reduce the swtrace.nrm2, interact with the a2n library and produce the final reports.

 
Back to TOP
 

Supported Environments


 
Back to TOP
 

Using run.tprof script

Syntax

run.tprof <-a | -t | -p> <-b #> <-m [time | event]> <-s #> <-r #> <-M>
Arguments in "<>" (angle brackets) are OPTIONAL.
Arguments in "[]" (square brackets) are REQUIRED.

Arguments

 -a      Run entire TPROF procedure.
         * This is the DEFAULT and need not be specified!
         * Performs the trace and post-processing steps.
         * Produces a raw trace file (swtrace.nrm2) and a TPROF report file (tprof.out).

 -t      Run tracing only.
         * Performs only the tracing (i.e., data collection) step of the TPROF procedure.
         * Produces a raw trace file (swtrace.nrm2).
         * The trace will not be post-processed.
         * You can post-process the trace at later time
           by invoking run.tprof with the -p option.
         * This option is mutually exclusive with -a and -p.

  -p      Run post-processing only.
         * Performs only the post-processing step of the TPROF procedure.
         * It requires a trace file (swtrace.nrm2) and assumes that
           you have already done the tracing step, either by itself,
           via a previous -t, or in a previous complete run, via -a.
         * Produces a TPROF report file (tprof.out)
         * This option is mutually exclusive with -a and -t.
 
 -b ##   Set the trace buffer size to ## MB per processor.
         * You can also set this value using the IBMPERF_TPROF_BUFFER_SIZE environment variable.

 -m mode Set the TPROF mode.
         * Valid modes are:
                 - time
                  This causes TPROF to run in the TIME-based mode.
                  In this mode sampling is based on time and the time
                  between samples is constant. The sampling rate
                  can be set via the -c option.
                 - event
                  This causes TPROF to run in EVENT-based mode.
                  In this mode sampling is based on event counts and
                  the time between samples is not constant. The sampling
                  event count can be set via the -c option.
         * Default mode is time.
         * You can also set this value using the IBMPERF_TPROF_MODE environment variable.

 -e event  Set the event name when in EVENT-based mode.
         * 'event' is the name of an event. Valid event names can be
           obtained by entering the 'swtrace event list' command.
           - Event names are not case sensitive.
           - An event count can be set using the -c option.
         * Default event name is INSTR.
         * You can also set this value using the IBMPERF_TPROF_EVENT environment variable.

 -c ##evts  Set tick rate (TIME-based) or event count (EVENT-based).
         * If mode is TIME then ##evts represents the desired TPROF tick rate, in ticks/second.
           - Default tick rate is 100 ticks/second.
           - You can also set this value using the IBMPERF_TPROF_TICK_RATE environment variable.
         * If mode is EVENT then ##evts represents represent the number of events
           after which a TPROF tick will occur.
           - Default event count is 10,000,000 events.
           - You can also set this value using the IBMPERF_TPROF_EVENTCNT environment variable.
         * Setting the rate too high may affect overall system performance.
         * Setting the rate too low may not collect enough samples.
         * Set a rate that is neither too high nor too low :-)

 -s ##   Automatically start tracing after approximately ## seconds.
         * You WILL NOT be prompted for when to start tracing. Instead,
           tracing will start automatically after a delay of approximately # seconds.
         * If you DO NOT specify the -r option, you will be prompted
           for when to stop tracing.
         * If you specify 0 (zero) or a non-numeric value, tracing is
           started immediately.
         * If you use this option your application should be started and
           warmed up by the time tracing is started.
         * Only applicable with -a or -t. Ignored otherwise.
         * Default is to prompt for when to start tracing.

 -r ##   Run (trace) for approximately ## seconds.
         * You WILL NOT be prompted for when to stop tracing. Instead,
           tracing will stop automatically after a delay of approximately
           # seconds from the time tracing was started.
         * If you DO NOT specify the -s option, tracing is stopped
           approximately # seconds after you press ENTER to start the trace.
         * If you use this option your application should complete the
           scenario you want to trace in the approximately the amount of
           time you specify with this option.
         * Only applicable with -a or -t. Ignored otherwise.
         * Default is to prompt for when to stop tracing.

 -M      Combine the tprof.out, tprof.micro, log-jita2n*, log-jtnm* and
         post.show files into a single file - tprof_e.out.
         * Done if no errors are encountered generating the TPROF report.
         * You can also set this option using the IBMPERF_TPROF_GENERATE_MERGE_FILE
           environment variable. The merged file name can be specified using
           IBMPERF_TPROF_MERGE_FILE_NAME.
 
 -h     Short help. 

 -h verbose  Long help.

Examples


 
Back to TOP
 

TPROF sample reports

Tprof Reports

ProcessorSpeed 398000000
TraceCycles 25382010763
TraceTime 63.774(sec)



TOTAL TICKS 25383
(Clipping Level : 0.1 % 25 Ticks)


================================
TPROF Report Summary

)) Process
)) Process_Module
)) Process_Module_Symbol
)) Process_Thread
)) Process_Thread_Module
)) Process_Thread_Module_Symbol
)) Module
)) Module_Symbol
================================


================================
)) Process
================================

LAB TKS %%% NAMES

PID 19094 75.22 SystemProcess_0000
PID 6284 24.76 /space/piperf/bin/WatchedPot_057c

================================
)) Process_Module
================================

LAB TKS %%% NAMES

PID 19094 75.22 SystemProcess_0000
MOD 19094 75.22 vmlinux

PID 6284 24.76 /space/piperf/bin/WatchedPot_057c
MOD 6284 24.76 /space/piperf/bin/WatchedPot

================================
)) Process_Module_Symbol
================================

LAB TKS %%% NAMES

PID 19094 75.22 SystemProcess_0000
MOD 19094 75.22 vmlinux
SYM 19094 75.22 default_idle

PID 6284 24.76 /space/piperf/bin/WatchedPot_057c
MOD 6284 24.76 /space/piperf/bin/WatchedPot
SYM 3154 12.43 ThirtyTwo
SYM 1615 6.36 Sixteen
SYM 808 3.18 Eight
SYM 404 1.59 Four
SYM 202 0.80 Two
SYM 101 0.40 One

================================
)) Process_Thread
================================

LAB TKS %%% NAMES

PID 19094 75.22 SystemProcess_0000
TID 19094 75.22 tid_0000

PID 6284 24.76 /space/piperf/bin/WatchedPot_057c
TID 6284 24.76 tid_057c

================================
)) Process_Thread_Module
================================

LAB TKS %%% NAMES

PID 19094 75.22 SystemProcess_0000
TID 19094 75.22 tid_0000
MOD 19094 75.22 vmlinux

PID 6284 24.76 /space/piperf/bin/WatchedPot_057c
TID 6284 24.76 tid_057c
MOD 6284 24.76 /space/piperf/bin/WatchedPot

================================
)) Process_Thread_Module_Symbol
================================

LAB TKS %%% NAMES

PID 19094 75.22 SystemProcess_0000
TID 19094 75.22 tid_0000
MOD 19094 75.22 vmlinux
SYM 19094 75.22 default_idle

PID 6284 24.76 /space/piperf/bin/WatchedPot_057c
TID 6284 24.76 tid_057c
MOD 6284 24.76 /space/piperf/bin/WatchedPot
SYM 3154 12.43 ThirtyTwo
SYM 1615 6.36 Sixteen
SYM 808 3.18 Eight
SYM 404 1.59 Four
SYM 202 0.80 Two
SYM 101 0.40 One

================================
)) Module
================================

LAB TKS %%% NAMES

MOD 19096 75.23 vmlinux
MOD 6284 24.76 /space/piperf/bin/WatchedPot

================================
)) Module_Symbol
================================

LAB TKS %%% NAMES

MOD 19096 75.23 vmlinux
SYM 19094 75.22 default_idle

MOD 6284 24.76 /space/piperf/bin/WatchedPot
SYM 3154 12.43 ThirtyTwo
SYM 1615 6.36 Sixteen
SYM 808 3.18 Eight
SYM 404 1.59 Four
SYM 202 0.80 Two
SYM 101 0.40 One


Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
IBM is a trademark of International Business Machines Corporation in the United States, other countries, or both
Other company, product or service names may be trademarks or service marks of others.

Tools Home   ]