Examples of the curt command

Preparing the curt command input is a three-stage process.

Trace and name files are generated using the following process:

  1. Build the raw trace. On a 4-way machine, this will create files as listed in the example code below. One raw trace file per CPU is produced. The files are named trace.raw-0, trace.raw-1, and so forth for each CPU. An additional file named trace.raw is also generated. This is a master file that has information that ties together the other CPU-specific traces.
    Note: If you want pthread information in the curt report, you must add the instrumented libpthreads directory to the library path, LIBPATH, when you build the trace. Otherwise, the export LIBPATH statement in the example below is unnecessary.
  2. Merge the trace files. To merge the individual CPU raw trace files to form one trace file, run the trcrpt command. If you are tracing a uniprocessor machine, this step is not necessary.
  3. Create the supporting gensymsfile and trcnmfile files by running the gensyms and trcnm commands. Neither the gensymsfile nor the trcnmfile file are necessary for the curt command to run. However, if you provide one or both of these files, or if you use the trace command with the -n option, the curt command outputs names for system calls and interrupt handlers instead of just addresses. The gensyms command output includes more information than the trcnm command output, and so, while the trcnmfile file will contain most of the important address to name mapping data, a gensymsfile file will enable the curt command to output more names, and is the preferred address to name mapping data collection command.
The following is an example of how to generate input files for the curt command:
# HOOKS="100,101,102,103,104,106,10C,119,134,135,139,200,210,215,38F,419,465,47F,488,489,48A,
         48D,492,605,609" 
# SIZE="1000000" 
# export HOOKS SIZE 
# trace -n -C all -d -j $HOOKS -L $SIZE -T $SIZE -afo trace.raw
# export LIBPATH=/usr/ccs/lib/perf:$LIBPATH
# trcon ; pthread.app ; trcstop
# unset HOOKS SIZE 
# ls trace.raw* 
trace.raw   trace.raw-0  trace.raw-1  trace.raw-2  trace.raw-3 
# trcrpt -C all -r trace.raw > trace.r 
# rm trace.raw* 
# ls trace* 
trace.r 
# gensyms > gensyms.out 
# trcnm > trace.nm