To display the data Profiler gathers, run the SHOWHITS.EXE application from the MS-DOS command line. This reporting utility reads CSIPS.DAT, SEGENTRY.DAT, and .SYM files and then organizes and displays the data. The CSIPS.DAT and SEGENTRY.DAT files are located where the sampling utility placed them—that is, in the directory that was your current directory when you started Windows. To ensure that SHOWHITS.EXE can locate these files, either run SHOWHITS.EXE from the same directory or specify full paths for the CSIPS.DAT and SEGENTRY.DAT files. If the .SYM files are not in the current directory, use the /ipath option on the showhits command line to specify the directory or directories containing them.
SHOWHITS.EXE reads .SYM files to match instruction pointer samples with global symbols in the application. When you run SHOWHITS.EXE, the utility searches for .SYM files that contain symbolic names identical to the names of modules that Profiler sampled. Each match is called a hit. If the sampled program is written in the C language, the symbolic names are typically function names. If the sampled program is written in assembly language, the symbolic names can be either procedure names or PUBLIC symbols within procedures.
SHOWHITS.EXE reports the number of times sampling occurred between adjacent symbols.
The syntax for the showhits command line is as follows:
showhits [/ipath [/ipath [ . . . ]]] [cs_file] [seg_file]
Following are the command-line options and parameters:
/ipath
Specifies one or more directories to search for .SYM files. SHOWHITS.EXE loads all .SYM files from the specified directories, regardless of their relevance to the application you are profiling. The default value is the current directory.
cs_file
Specifies the full path of the CSIPS.DAT file. If no path is specified, SHOWHITS.EXE looks for the file in the current directory.
seg_file
Specifies the full path of the SEGENTRY.DAT file. If no path is specified, SHOWHITS.EXE looks for the file in the current directory.
SHOWHITS.EXE displays information about hits, which are instruction pointer samples, in the following four categories:
Category | Description |
Unrecognized segments | A list of instruction pointer values that occur within segments for which there are no symbols of module names. Unrecognized segments are typically code for device drivers, terminate-and-stay-resident (TSR) programs, and other code that Windows does not use. |
Known segments | The number of hits that occur within known modules. Hits on known segments typically include counts for the application and counts for such Windows modules as KERNEL, GDI, and DISPLAY. Profiler also counts hits in MS-DOS and the read-only memory (ROM) basic input-and-output system (BIOS). In addition to displaying hits, SHOWHITS.EXE lists the total number of hits and the segment's percentage of total hits. |
Breakdown | A detailed breakdown of the hits between labels of the modules for which SHOWHITS.EXE finds .SYM files. SHOWHITS.EXE also displays the total number of hits and the percentage of the total number. |
Summary | A list of the top hits. |
The following example illustrates a profiling-report display:
Here are the Hits for Unrecognized Segments
Here are the Hits for Known Segments
0.3% 3 Hits on SYSTEM!
0.5% 5 Hits on HELLO!
76.5% 786 Hits on DISPLAY!
11.3% 116 Hits on GDI!
11.5% 118 Hits on KERNEL!
1028 TOTAL HITS
HELLO!_TEXT
0.4% 4 Hits between labels _HelloPaint and _HelloInit
0.1% 1 Hits between labels __cintDIV and __fptrap
Profiler Summary (Top 10 Hits):
0.4% 4 HELLO! _TEXT! _HelloPaint - _HelloInit
0.1% 1 HELLO! _TEXT! __cintDIV - __fptrap