|
|
1.1 root 1: {\rtf1\ansi \deff0\deflang1024{\fonttbl{\f0\froman Tms Rmn;}{\f1\froman Symbol;}{\f2\fswiss Helv;}{\f3\froman Times New Roman;}{\f4\fswiss Arial;}{\f5\froman Times;}{\f6\fswiss Helvetica;}{\f7\fmodern pica;}
2: {\f8\froman century;}{\f9\fmodern elite;}{\f10\fmodern prestige;}{\f11\fmodern lettergothic;}{\f12\fmodern gothicPS;}{\f13\fmodern cubicPS;}{\f14\fmodern lineprinter;}{\f15\fswiss AvantGarde;}{\f16\fmodern spartan;}{\f17\fmodern metro;}
3: {\f18\fmodern presentation;}{\f19\fmodern APL;}{\f20\fmodern OCRA;}{\f21\fmodern OCRB;}{\f22\froman boldPS;}{\f23\froman emperorPS;}{\f24\froman madaleine;}{\f25\froman zapf humanist;}{\f26\froman classic;}{\f27\froman roman f;}{\f28\froman roman g;}
4: {\f29\froman roman h;}{\f30\froman timesroman;}{\f31\fmodern Courier;}{\f32\froman Palatino;}{\f33\froman souvenir;}{\f34\froman garamond;}{\f35\froman caledonia;}{\f36\froman bodini;}{\f37\froman university;}{\f38\fscript Script;}{\f39\fscript scriptPS;}
5: {\f40\fscript script c;}{\f41\fscript script d;}{\f42\fscript commercial script;}{\f43\fscript park avenue;}{\f44\fscript coronet;}{\f45\fscript script h;}{\f46\fscript greek;}{\f47\fscript kana;}{\f48\fscript hebrew;}{\f49\fscript roman s;}
6: {\f50\fscript russian;}{\f51\fscript roman u;}{\f52\fscript roman v;}{\f53\fscript roman w;}{\f54\fdecor narrator;}{\f55\fdecor emphasis;}{\f56\fdecor zapf chancery;}{\f57\fdecor decor d;}{\f58\fdecor old english;}{\f59\fdecor decor f;}
7: {\f60\fdecor decor g;}{\f61\fdecor cooper black;}{\f62\fnil linedraw;}{\f63\fnil math7;}{\f64\fnil math8;}{\f65\fnil bar3of9;}{\f66\fnil EAN;}{\f67\fnil pcline;}{\f68\fnil tech h;}{\f69\fnil MS LineDraw;}{\f70\fnil Wingdings;}}
8: {\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue127;\red0\green127\blue127;\red0\green127\blue0;
9: \red127\green0\blue127;\red127\green0\blue0;\red127\green127\blue0;\red127\green127\blue127;\red192\green192\blue192;}{\stylesheet{\s244 \f5\fs16\up6\lang1033 \sbasedon0\snext0 footnote reference;}{\s245 \f5\fs20\lang1033
10: \sbasedon0\snext245 footnote text;}{\f5\fs20\lang1033 \snext0 Normal;}}{\info{\author Jim Schaad}{\operator Jim Schaad}{\creatim\yr1993\mo6\dy10\hr23\min10}{\revtim\yr1993\mo6\dy10\hr23\min14}{\version4}{\edmins1735}{\nofpages0}{\nofwords65536}
11: {\nofchars65536}{\vern16433}}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\gutter0 \widowctrl\ftnbj \sectd \linex0 \pard\plain
12: \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f3\up12\lang1033 #{\footnote \pard\plain
13: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 main_contents}}}{\f3 }{\plain \f3\up12\lang1033 ${\footnote \pard\plain
14: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 $}{\f30 Table Of Contents}}}{\plain \f3\up12\lang1033 K{\footnote \pard\plain
15: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 K}{\f30 Table Of Contents}}}{\f3 }{\b\f3\fs28 T A B L E O F C O N T E N T S}{\b\f3\fs28
16: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b\f3
17: \par }{\f3\uldb Overview}{\v\f3\uldb GenOverview}{\f3
18: \par }{\f3
19: \par }{\b\f3 How To ...}{\f3
20: \par }{\f3\uldb Compile for Call Profiling}{\v\f3 CapCompile}{\f3
21: \par }{\f3\uldb Set up CAP.INI}{\v\f3 CapIniSetup}{\f3
22: \par }{\f3\uldb Control Profiling}{\v\f3 CapControl}{\f3
23: \par }{\f3\uldb Use CapView}{\v\f3 CapViewOverview}{\f3
24: \par }{\f3
25: \par }{\b\f3 Procedures}{\f3
26: \par }{\f3\uldb Finding Most Expensive Function}{\f3
27: \par }{\f3\uldb Finding Critical Path}{\f3
28: \par }{\f3
29: \par }{\b\f3 CapView Windows}{\f3
30: \par }{\f3\uldb Tree Window}{\v\f3 TreeWindow}{\f3
31: \par }{\f3\uldb List Window}{\v\f3 ListWindow}{\f3
32: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3 \page }{\plain \f3\up12\lang1033 #{\footnote \pard\plain
33: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 GenOverview}}}{\f3 }{\plain \f3\up12\lang1033 ${\footnote \pard\plain
34: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 $}{\f30 General Overview}}}{\f3 }{\plain \f3\up12\lang1033 K{\footnote \pard\plain
35: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 K}{\f30 General Overview}}}{\f3 }{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {
36: \fs16\up6 K} Overview, General}}{\f3 }{\b\f3\fs28 General Overview}{\f3
37: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 The }{\b\f3 Microsoft Windows NT}{\f3 }{\f3 Call Attributed P}{\f3 rofiler }{\f3 (CAP) }{\f3
38: is an analytic tool that helps you optimize the performance of applications. The profiler lets you determine the amount of time the }{\b\f3 Microsoft Windows NT}{\f3 operating system spends executing sections of code.}{\f3
39: \par }{\f3
40: \par }{\f3
41: There are two basic types of profiles, sampling profiles and execution profilers. A sampling profile interrupts the current process at a fixed interval, samples the program counter and uses the set of samples to determine where the program spends most of
42: }{\f3 its tim}{\f3
43: e. The accuracy of this method is highest for single threaded systems (where nothing else is using time in the system -- including the system) and small sampling intervals. This was the most common type of profiler found in the DOS world.}{\f3
44: \par }{\f3
45: \par }{\f3
46: Execution profiles on the other hand "debug" the program. This is to say that they cause interrupts (usually from breakpoints) to occur at fixed points in the program and measure the time take between the points. The two most common points to measure (o
47: }{\f3 r granularity}{\f3
48: ) are functions (setting breakpoints at the entry and exit points of functions) and lines (setting breakpoints on every source line). This type of debugging is very intrusive and often requires cooperation from the compiler to be successful.}{\f3
49: \par }{\f3
50: \par }{\f3
51: CAP is an execution profiler that uses two different granularities. Functions as defined by the compiler (this requires assistance from the compiler) and DLL entry points. The first level of granularity will yield an approximation, on a function by func
52: }{\f3 tion basis,}{\f3
53: of the time spent executing each function. Programs must be compiled with special switches to get this level of information. The second level of granularity is much grosser and basically measures the amount of time spent in a DLL apportioned to each of
54: }{\f3 the different entry points. Note that if call backs are used, these are not profiled as they are not executed via the normal DLL entry point mechanism.}{\f3
55: \par }{\f3
56: \par }{\f3 The following measurement methods are supported:}{\f3
57: \par }{\f3
58: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 a) Measuring calls from within an EXE.}{\f3
59: \par }{\f3 b) Mea}{\f3 suring calls from within a DLL.}{\f3
60: \par }{\f3 c) Measuring calls from an EXE to all of it's DLLs.}{\f3
61: \par }{\f3 d) Measuring calls from one DLL to all of its DLLs.}{\f3
62: \par }{\f3 e) Measuring all the calls to specified DLL's, from any EXE or DLL.}{\f3
63: \par }{\f3 f) Any arbitrary combination of a) through e).}{\f3
64: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
65: \par }{\f3 Profiling consists of the following steps:}{\f3
66: \par }{\f3
67: \par }\pard \fi-216\li648\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3\uldb 1. Setup Profilee}{\f3\uldb :}{\f3\uldb }{\v\f3 CapCompile}{\f3
68: Set the program up for profiling: If you want to do a call level profile then you will need to recompile the program to insert code for procedure entry and exit profiling.}{\f3
69: \par }{\f3\uldb 2. Setup CAP.INI:}{\v\f3 CapIniSetup}{\f3 Set up the CAP.INI file to list the DLLs and exes to be profiled.}{\f3
70: \par }{\f3\uldb 3. Run Profilee:}{\v\f3 CapControl}{\f3 Execute the program to create the profile output.}{\f3
71: \par }{\f3\uldb 4. Analysis Output: }{\v\f3 CapViewOverview}{\f3 Use CapView to determine the desired profiling information.}{\f3
72: \par }\pard \li576\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
73: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b\f3 Caveats:}{\f3
74: \par }{\f3
75: \par }{\f3 \tab }{\f3 The CAP profiler currently only works on ix86 machines. MIPS profiling is }{\b\f3 NOT}{\f3 supported in Product 1.0.}{\f3
76: \par }{\f3 \tab }{\f3 If coff symbol information is not available in an EXE/DLL that is being profiled, "???" is displayed for all function names.}{\f3
77: \par }{\f3 \tab }{\f3 Non}{\f3 \_}{\f3
78: local GOTOs (i.e. setjmp/longjump calls) are supported only if you use the CRTDLL version of the runtime libraries. They are not supported if you use the libc.lib version of the libraries. In this case, profiling an application containing non}{\f3 \_}{
79: \f3 local GOTOs will result in unexpected results.}{\f3
80: \par }{\f3 \tab }{\f3 Execution of exception clauses will cause the profile to become confused unless every}{\f3 function between the exception cause and the excepting instruction is wrapped in a try/finally.}{\f3
81: \par }{\f3 \tab }{\f3 Profiling data is *NOT* collected for functions in assembler language programs without user programming support.}{\f3
82: \par }\pard \qc \page {\plain \f5\up12\lang1033 #{\footnote \pard\plain \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 TreeWindow}}} {\plain
83: \f5\up12\lang1033 ${\footnote \pard\plain \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 $}{\f30 Tree Window Overview}}} {\plain
84: \f5\up12\lang1033 K{\footnote \pard\plain \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 K}{\f30 Tree Window Overview}}}{\b\fs28
85: CapView: Tree Window}
86: \par \pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
87: \par }{\b\f3 Purpose:}{\b\f3
88: \par }{\b\f3
89: \par }{\f3 The tree window presents a hierarchical view of the Call Profiler data. The data is presented using the same dynamic call tree that the program actually used}{\f3
90: . The data however is presented in a more readable format than that emitted directly by the cap profiler.}{\f3
91: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
92: \par }{\f3
93: Each instance of a thread in the data file causes creation of a tree window. Each thread has a "program" node at the root of the thread. DLL initialization routines and the starting routine of the thread are displayed as children of the root node in the
94: }{\f3 tree. (Additional routines may also be specified if the base routine or the DLL initialization routines are not being profiled but they call rout}{\f3 ines that are being profiled.)}{\f3
95: \par }{\f3
96: \par }{\plain \b\f3\lang1033 Layout:}{\f3
97: \par }{\f3 The format of each node in the tree is as follows:}{\f3
98: \par }{\f3
99: \par }{\f3 \{}{\f3 bmc b1.bmp}{\f3 \}}{\f3
100: \par }{\f3
101: \par }{\f3 The fields displayed:}{\f3
102: \par }\pard \fi-720\li1440\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
103: 1. The name of the DLL or EXE module containing the symbol. This will be displayed as ??? if the name of the module cannot be found. This should only occur for DLLs that do not contain an export table.}{\f3
104: \par }{\f3 2. The name of the routine (public symbol) or ??? (static symbol) which was profiled. If the name was generated by the C++ compiler, the name will be undecorated and di}{\f3 splayed in a human readable form.}{\f3
105: \par }{\f3 3. The number of times the routine was entered from its parent. If you are looking for the total number of times a routine was called, use the list window.}{\f3
106: \par }{\f3 4. The percentage of time spent in this routine relative to the total amount of time spent in this routine plus all of its children. (Item 6 divided by item 9.)}{\f3
107: \par }{\f3 5. The percentage of time spend in this routine relative to the total amount of time spent executing the entire program.}{\f3
108: \par }{\f3 6. The total amount of time in}{\f3 milliseconds assigned to this routine. If a 'K' is displayed at the end of this value, the time is in seconds.}{\f3
109: \par }{\f3 7. The percentage of time spend in this routine and its children relative to the total time spend in time routines parent and its parent's children.}{\f3
110: \par }{\f3 8. The percentage of time spend in this routine and its children relative to the total time spend in the program.}{\f3
111: \par }{\f3 9. The total amount of time in milli}{\f3 seconds assigned to this routine and its children. If a 'K' is displayed at the end of this value, the time is in seconds.}{\f3
112: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
113: \par }The boxes have two colors displayed, the primary (or box color) plus the outline color. This coloration is based on the percentages displayed, the current selection of coloration ranges and the {\i Parent Relative} and {\i Total}
114: menu items. Below is a chart describing the different combinations. The upper line in each pair is the frame color and the lower line is the box color. The colors are found by taking the correct percentage and looking it up in the range table.
115: \par
116: \par \trowd \trgaph108\trleft837 \cellx2622\cellx5502\cellx8382\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \cell }{\f3 Parent Relative - Off}{\f3 \cell }{\f3
117: Parent Relative -- Checked}{\f3 \cell }\pard \intbl {\f3 \row }\trowd \trgaph108\trleft837 \cellx2622\cellx5502\cellx8382\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
118: Total -- Off}{\f3 \cell }{\f3 TotalTime/ParentTotal (7)}{\f3 \cell }{\f3 TotalTime/Parent (7)}{\f3 \cell }\pard \intbl {\f3 \row }\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {
119: \f3 \cell }{\f3 TotalTime/ParentTotal (7)}{\f3 \cell }{\f3 TimeThisFunc/Parent (4)}{\f3 \cell }\pard \intbl {\f3 \row }\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
120: Total -- Checked}{\f3 \cell }{\f3 TotalTime/ProgTime (8)}{\f3 \cell }{\f3 TotalTime/ProgTime (8)}{\f3 \cell }\pard \intbl {\f3 \row }\trowd \trgaph108\trleft837 \cellx2622\cellx5502\cellx8382\pard
121: \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 }{\f3 \cell }{\f3 TotalTim}{\f3 e/ProgTime (8)}{\f3 \cell }{\f3 TimeThisFunc/ProgTime (5)}{\f3 \cell }\pard \intbl {\f3 \row
122: }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
123: \par }{\b\f3 Procedures:}
124: \par
125: \par This view of the data is generally used for two purposes: location of {\uldb critical paths} and detection of abnormal calling patterns.
126: \par
127: \par {\plain \b\f5\lang1033 Menu Items:}{\b
128: \par }{\b
129: \par }\pard \fi-720\li720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b Font:}
130: This menu item is used to change the font for the current tree view window. It brings up the common font selection dialog box. Changes will affect only the current window, if one wishes to change the default font for new windows use the Default Font
131: menu item.{\b
132: \par }{\b Zoom:}
133: This menu item toggles between the zoomed and un-zoomed displays of the tree view window. In the zoom display (the default), all of the above listed information is displayed. In the zoomed display no information is listed, rather a small box of the
134: appropriate color is displayed. This provides the ability to get a larger overview of the call tree and look for critical paths.{\b
135: \par }{\b Parent Relative:} This menu item controls coloration of the boxes displayed.{\b
136: \par }{\b Total:} This menu item controls coloration of the boxes displayed.{\b
137: \par }{\b Set Ranges:} This menu item brings up the {\uldb range selection dialog box.}{\v IDD_RANGE_DLG}{\b
138: \par }{\b
139: \par }{\plain \b\f5\lang1033 Other Operations:}{\b
140: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
141: \par }\pard \fi-720\li720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b Double Click:}
142: If you double click on a box in this view, the box is ether expanded or contracted depending on its current state. This allows one to eliminate those paths or nodes that are either not of interest or at least no longer of interest from the call tree d
143: isplay. This pruning is often combined with elimination of the bottom range display to remove un-interesting data.
144: Range based pruning will override the double click pruning, thus one cannot display pruned nodes even if one expands a node containing range pruned items.
145: \par \pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
146: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3 \page }{\plain \f3\up12\lang1033 #{\footnote \pard\plain
147: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 IDD_RANGE_DLG}}}{\plain \f3\up12\lang1033 ${\footnote \pard\plain
148: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 $}{\f30 Range Dialog}}}{\plain \f3\up12\lang1033 K{\footnote \pard\plain
149: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 K}{\f30 CapView: Range Dialog; Range Dialog, CapView}}}{\b\fs28 Range Dialog Box}{\f3 }{\f3
150:
151: \par }\pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
152: \par }{\f3 Colors are used to help set focu}{\f3 s on the }{\f3 information}{\f3
153: most in need of examination. The color assigned to a block or line is based on one of the percentage values and the definition of the ranges. The default set of ranges uses 5 range blocks:
154: \par }{\f3 \tab RED\tab }{\f3 \tab }{\f3 20% - 100%
155: \par }{\f3 \tab }{\f3 YELLOW\tab 5% -- 20%}{\f3
156: \par }{\f3 \tab CYAN\tab \tab 2% -- 5%
157: \par }{\f3 \tab GREEN\tab \tab 1% -- 2%
158: \par }{\f3 \tab BLUE\tab \tab Less than 1%
159: \par }{\f3
160: \par }{\f3 Note that the ranges ar}{\f3 e set up in a }{\f3 logarithmi}{\f3 c}{\f3 fashion. This is due to the fact that as you wa}{\f3 lk down the call tree times tend to drop in a }{\f3 logarithmi}{\f3 c}{\f3
161: order. Additionally, this represents the best areas to focus on for optimizations. }{\f3 Reducin}{\f3 g}{\f3 a routine }{\f3 that}{\f3 takes less than one percent of the total time of a program by 100% only redu}{\f3 ce}{\f3
162: s the total program time by 1}{\f3 %. However reducing a routine }{\f3 that}{\f3 takes 20% of the time by 10}{\f3 % will reduce the total program by}{\f3 }{\f3 2 percent. Much less effort yields the same amount of total time reduction.
163: \par }{\f3
164: \par }{\plain \b\f3\lang1033 Operations:}
165: \par
166: \par \pard \fi-720\li720\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\b Color:} This button invokes the common color dialog box to change the color of the currently selected range.
167: \par {\b Add:} This button is used to create a new range. One of the above or below values should be changed. This will then create a new range splitting the currently selected range on the changed value. After a range is added one sho
168: uld change the color for it.
169: \par {\b Delete:} This button is used to remove a range. The selected range is combined with the range below it.
170: \par {\b Help:} This button brings up this help item.
171: \par {\b Change:} This button is used to accept the set of changes edited it. Until this button is pressed changing the color, or text color is not actually completed.
172: \par {\b Text Color:} This button allows the user to select either black or white text on the background color. This choice should be made to make the text most readable.
173: \par {\b Above:} This edit field contains the top of the range. The top of the range may be changed by editing in a new button and pressing the change button.
174: \par {\b Below:} This edit field contains the bottom of the range. The bottom of the range may be changed by editing in a new value and pressing the change button.
175: \par {\b Prune Out Ran}{\b ge:} This check box is only valid for the tree window. If it is checked and the function plus child as a percentage of the total program time falls in the first range,
176: the box will not be displayed in the tree window. This check box has no effect in the list window.
177: \par \pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
178: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3 \page }{\plain \f3\up12\lang1033 #{\footnote \pard\plain
179: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 CapIniSetup}}}{\f3 }{\plain \f3\up12\lang1033 ${\footnote \pard\plain
180: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 $}{\f30 Cap Ini Setup}}}{\f3 }{\plain \f3\up12\lang1033 K{\footnote \pard\plain
181: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 K}{\f30 Cap.ini Setup}}}{\b\f3\fs28 Setting up the CAP.INI File}{\b\f3
182: \par }\pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
183: \par }{\f3 In order to profile you must setup a CAP.INI file. This file must reside on the root of the C: drive. The ini file controls the set of items profiled. The format of the ini file is as follows:}{\f3
184: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
185: \par }\pard \fi-288\li720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
186: \par }{\f3
187: A list of applications to be profiled. Each application must be on its own line. When CAP.DLL runs its initializer, it checks the current executable name against this list and will start profiling if the name is on the list. If the name is not on the l
188: }{\f3 ist, profiling is not done.}{\f3
189: \par }{\f3
190: \par }{\f3 [PATCH IMPORTS]}{\f3
191: \par }{\f3 L}{\f3 ist of DLLs/Exes to be profiled for all of their imported entries. Each name should be on a new line. A DLL or EXE should not appear in this field if the EXE/DLL (or a DLL imported by the EXE/DLL) was compiled for call profiling.}{\f3
192: \par }{\f3
193: \par }{\f3 [PATCH CALLERS]}{\f3
194: \par }{\f3 List of DLLs to be profiled for their exported entries if called from the applications (listed in the [EXE] section) or any of their DLLs. Each name should be on a new line.}{\f3
195: \par }{\f3
196: \par }{\f3 [NAME LENGTH]}{\f3
197: \par }{\f3 The maximum length of a symbol. This number must be in the range fro}{\f3
198: m 20 to 2048. It is recommended that for C++ program this value be set to at least 128 due to the name mangling that is preformed by the linker. If a symbol is longer that this value, it is truncated. If the field is not specified or is 0 then the va
199: }{\f3 lue defaults to 40. This field is optional.}{\f3
200: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
201: \par }{\f3 All sections must be present in the CAP.INI file, but the contents of any field may be left blank.}{\f3
202: \par }{\f3
203: \par }{\f3\uldb Example of a CAP.INI file}{\v\f3 CapIniExamples}{\f3
204: \par }\pard \qc\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \page }{\f3\fs16\up6 ${\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $} Example of a CAP.INI files}}{\v\f3 }{
205: \f3\fs16\up6 #{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 #} CapIniExamples}}{\v\f3 }{\b\f3\fs28 Example of a CAP.INI File}{\f3
206: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
207: \par }{\f3 The following CAP.INI file does the following: }{\f3
208: \par }\pard \fi-720\li1440\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 It will profile the executables WINDBG.EXE, CAPVIEW.EXE and SYMEDIT.EXE.}{\f3
209: \par }{\f3 For the above executables, it will profile all calls into the DLLs' USER32.DLL, KERNEL32.DLL, GDI32.DLL, ADVAPI32.DLL and CRTDLL.DLL.}{\f3
210: \par }{\f3 It will allow 128 characters for symbol names rather than the standard 40.}{\f3
211: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
212: \par }{\f3
213: \par }\pard {\f3 [EXES]}{\f3
214: \par }{\f3 WINDBG.EXE}{\f3
215: \par }{\f3 CAPVIEW.EXE}{\f3
216: \par }{\f3 SYMEDIT.EXE}{\f3
217: \par }{\f3
218: \par }{\f3 [PATCH IMPORTS]}{\f3
219: \par }{\f3
220: \par }{\f3 [PATCH CALLERS]}{\f3
221: \par }{\f3 USER32.DLL}{\f3
222: \par }{\f3 KERNEL32.DLL}{\f3
223: \par }{\f3 GDI32.DLL}{\f3
224: \par }{\f3 ADVAPI32.DLL}{\f3
225: \par }{\f3 CRTDLL.DLL}{\f3
226: \par }{\f3
227: \par }{\f3 [NAME LENGTH]}{\f3
228: \par }{\f3 128}{\f3
229: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3 \page }{\plain \f3\up12\lang1033 #{\footnote \pard\plain
230: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 CapControl}}}{\f3 }{\plain \f3\up12\lang1033 ${\footnote \pard\plain
231: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 $}{\f30 CAP Control}}}{\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K}
232: Controlling Profiling}}{\f3 }{\b\f3\fs28 Controlling Profiling}{\f3
233: \par }\pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
234: \par }{\f3
235: While generally one wants to profile the entire execution of a program, there are times where it is desirable to only profile a small portion of a program. The CAP system currently has three methods to control the extent of profiling done. These method
236: }{\f3 s are:}{\f3
237: \par }{\f3
238: \par }{\f3 1. The }{\v\f3\uldb }{\f3\uldb CAP.DLL exported functions}{\v\f3 CAPexports}{\f3 : These functions }{\f3
239: can be used to programmically control profiling under the control of the program being profiled. Functions are provided to start profiling, stop profiling and dump the current profile data set.}{\f3
240: \par }{\f3
241: \par }{\f3 2. }{\f3\uldb CAPDUMP.EXE}{\v\f3 CAPDUMP}{\f3
242: : This program is used to externally control the starting and ending points for profiling a program. The program may be used to start profiling of a program, stop profiling and dump the profile data to disk.}{\f3
243: \par }{\f3
244: \par }{\f3 3. }{\f3\uldb CAPSETUP.EXE}{\v\f3 CAPSETUP}{\f3 : }{\f3 Attaches CAP to all 32-bit Windows programs.}{\f3
245: \par }{\f3
246: \par }{\f3 Profiling information is dumped when the program exits.
247: \par }{\f3
248: \par }{\f3 Output from the profiler will be appended to th}{\f3 e file BASE.END where BASE is the base name of the program being profiled. This permits multiple runs to be accumulated in a single location and analysis in one step.}{\f3
249: \par }{\f3
250: \par }{\f3 If all that is desired is to get a full run of a program then the methods of controlling profiling listed above may be ignored. Running the program to be profiled yields a full program of the program from start to finish.}{\f3
251: \par }{\f3
252: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3 \page }{\f3\fs16\up6 #{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 #} CAPexports}}{\f3 }{\f3\fs16\up6 ${\footnote
253: \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $} CAPexports}}{\f3 }{\f3\fs16\up6 k{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 k} StartCAP}}{\f3 }{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} StopCAP}}{\f3 }{
254: \f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} DumpCAP}}{\f3 }{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} CAP.DLL exported functions}}{\fs16\up6 k{\footnote \pard\plain \s245 \f5\fs20\lang1033 {
255: \fs16\up6 k} Controlling Profiling, Internally}}{\f3 }{\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} Controlling Profiling, Programmically}}{\f3 }{\b\f3\fs28 CAP.DLL Exported Functions}{\b\f3\fs28
256: \par }\pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
257: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
258: The exported entry points listed below can be used to control profiling certain sections of code. Note that profiling will not occur if the EXE is not listed in the CAP.INI file.}{\f3
259: \par }{\f3
260: \par }{\f3 The functions exported from CAP.DLL for the purposes of controlling the extent of profiling are:}{\f3
261: \par }{\f3
262: \par }\pard \fi-1440\li1440\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b\f3 StartCAP()}{\f3 : This func}{\f3
263: tion is used to start a profiling run. The function will clear out any data currently in the profiling buffers and initiate profiling from the current point on. This function will start profiling on all threads in a multi-threaded application at their c
264: }{\f3 urrent program counters. When the program starts, profiling is always started. Calling StartCAP() will eliminate all data previously collected and start from scratch.}{\f3
265: \par }{\b\f3 StopCAP() }{\f3 :This function is used to stop a profiling run. This function will stop pro}{\f3 filing on all threads in application.}{\f3
266: \par }{\b\f3 DumpCAP()}{\f3 : This function is used to dump the current set of collected data into the output file. The data will be appended to the end of the output file so that multiple calls will not overw}{\f3 rite each other. This function}{\f3
267: cause}{\f3 s}{\f3 profiling to be suspended and if called multiple times will do multiple dumps.}{\f3
268: \par }{\f3
269: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
270: There is no support for pausing and resuming profiling. The only way to have multiple runs combined together is to have CapView perform a merge.}{\f3
271: \par }{\f3
272: \par }{\b\f3 Ex}{\b\f3 ample:}{\b\f3
273: \par }{\f3
274: \par }{\f3 \tab }{\f3 StartCAP(); }{\f3 \tab }{\f3 // Clear existing profiling data and restart profiling.}{\f3
275: \par }{\f3 \tab }{\f3 ..}{\f3
276: \par }{\f3 \tab }{\f3 ..}{\f3 \tab }{\f3 \tab \tab }{\f3 // application's code}{\f3
277: \par }{\f3 \tab }{\f3 ..}{\f3
278: \par }{\f3
279: \par }{\f3 \tab }{\f3 StopCAP();}{\f3 \tab }{\f3 \tab }{\f3 // Stop profiling without dumping data.}{\f3
280: \par }{\f3 \tab }{\f3 DumpCAP();}{\f3 \tab }{\f3 \tab }{\f3 // Dump profiling data to FOO.CAP file.}{\f3
281: \par }{\f3
282: \par }\pard \qc\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \page }{\f3\fs16\up6 #{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 #} CAPDUMP}}{\f3 }{\f3\fs16\up6 ${\footnote
283: \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $} Using CapDump}}{\f3 }{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} CapDump}}{\f3 }{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K}
284: Controling Profiling, CAPDUMP}}{\f3 }{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} Controling Profilng, External}}{\f3 }{\b\f3\fs28 Using CapDump}{\f3
285: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
286: \par }{\f3 CapDump is a program that is used to externally control the extent of profiling being done for an application. CAPDUMP.EXE can start profiling, stop profiling and dump profiling data for all the applications being profiled, at any time.}{\f3
287:
288: \par }{\f3
289: \par }{\f3 The following options are available via CAPDUMP.EXE:}{\f3
290: \par }{\f3
291: \par }{\f3 }{\f3 \_}{\f3 Stop: Stops profiling (applications continue to run).}{\f3
292: \par }{\f3
293: \par }{\f3 }{\f3 \_}{\f3 Clear and Restart: Clears any existing profiling data and restarts profiling.}{\f3
294: \par }{\f3
295: \par }{\f3 }{\f3 \_}{\f3 Dump and Stop: Dumps any existing profiling data and stops profiling (applications continue to run).}{\f3
296: \par }{\f3
297: \par }{\f3 Data is dumped to a text file using the profiling applications name with .CAP extension. All fields are tab separated. Data is appended to data files with each dump.}{\f3
298: \par }{\f3
299: \par }{\f3 If calls are being profiled when data clearing is requested, the time of clearing is used as the starting time for those calls.}{\f3
300: \par }{\f3
301: \par }\pard \qc\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b\f3 \page }{\f3\fs16\up6 ${\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $} CAPSETUP}}{\b\f3 }{\f3\fs16\up6 #{\footnote
302: \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 #} CAPSETUP}}{\b\f3 }{\b\f3\fs28 Using CapSetup}{\f3
303: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
304: \par }{\f3 CapSetup is used as a short hand way of listing every DLL }{\f3
305: in the system in the PATCH CALLERS section of the CAP.INI file. When you attach CAP.DLL to all of the DLLs in the system they will be automatically profiled (if listed in the Exes section of the CAP.INI file) whenever started and for all DLLs in the sys
306: }{\f3 tem.}{\f3
307: \par }{\f3
308: \par }{\f3 Usage: CapSetup }{\f3 \_}{\f3 A | }{\f3 \_}{\f3 D}{\f3
309: \par }{\f3
310: \par }{\f3 \tab }{\f3 A Attaches CAP.dll to all Windows applications}{\f3
311: \par }{\f3 \tab }{\f3 D Detaches CAP.dll from all Windows applications}{\f3
312: \par }{\f3
313: \par }{\f3 Notes:}{\f3
314: \par }{\f3 1) Administrative privileges are required in order to run CapSetup.}{\f3
315: \par }{\f3 2) System needs to be rebooted in}{\f3 order for the change to take effect.}{\f3
316: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3 \page }{\plain \f3\up12\lang1033 #{\footnote \pard\plain
317: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 CapCompile}}}{\f3\fs16\up6 ${\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $}
318: Compiling For Profiling}}{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} Compiling For Profiling}}{\b\f3\fs28 Compiling for Profiling}{\f3
319: \par }\pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
320: \par }{\f3
321: If you want to do call level profiling, you need to do some special compiling to have a special profiling function called at the start and end of each function. If all you are interested in is profiling the exported functions of a DLL then this step shou
322: }{\f3 ld be omitted.}{\f3
323: \par }{\f3
324: \par }{\f3 For EXPORTED function profiling only:}{\f3
325: \par }{\f3
326: \par }{\f3 \tab }{\f3 Link the debuggee with coff symbol infomration (-debugtype:coff or -debugtype:both).}{\f3
327: \par }{\f3
328: \par }{\f3 For }{\f3\uldb call level profiling:}{\v\f3 pu_call_level_profiling}{\f3
329: \par }{\f3
330: \par }{\f3 \tab }{\f3 1. Add the option -Gh to the compiler line for the }{\b\f3 Microsoft C}{\f3 compilers.}{\f3
331: \par }{\f3
332: \par }{\f3 \tab }{\f3 2. Add the }{\b\f3 cap.lib}{\f3 library to the link32 command line.}{\f3
333: \par }{\f3
334: \par }{\f3 \tab 3. Link the debuggee with coff symbol information (-debugtype:coff or -debugtype:both).}{\f3
335: \par }{\f3
336: \par }{\b\f3 NOTE: Currently profiling is only supported for the ix86 family of processors.}{\f3
337: \par }{\f3
338: \par }{\f3
339: \par }{\f3 See Also }{\f3\uldb Profiling Assembly}{\v\f3 AsmChanges}{\f3\uldb
340: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\plain \f3\up12\lang1033 \page }{\b\f3\fs28 }{\b\f3\fs28\up12 #{\footnote \pard\plain
341: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 CapViewOverview}}}{\b\f3\fs28\up6 ${\footnote \pard\plain \s245 \f5\fs20\lang1033 {
342: \fs16\up6 $} CapViewOverview}}{\b\f3\fs28 Overview of CapView}{\f3\fs28
343: \par }\pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\f3
344: CapView is a sample program provided with the Win32 SDK that can be used to provide a visual method of looking at the output from the CAP profiler.}{\f3
345: \par }{\f3
346: \par }{\f3
347: The output from cap is a large table (a normal profile of CapView is over 8000 lines long), the amount of information requires tools to deal with presenting the information in a better manner. CapView was written to address this problem. CapView re-inte
348: }{\f3 rprets the data and presents it in two different views:}{\f3
349: \par }{\f3
350: \par }{\b\f3 Views:}{\b\f3
351: \par }{\f3
352: \par }{\f3\uldb Call Tree View:}{\v\f3\uldb TreeWindow}
353: The call tree view is designed to present the profile data based on the dynamic call tree. This view allows the user to search out critical paths and locating unexpected calls to functions. This is accomplished by allow uses to expand and contract nod
354: es in the tree view. Nodes in the tree are also colored according to criteria selected by the user to provide an immediate feedback on critical paths.
355: \par
356: \par {\uldb Function List View:}{\v ListWindow} The list view is designed to allow for examining the profile data on a
357: function by function basis. This view presents information from all occurrences of a function independent of where it was called. All occurrences of a function will be lumped together into a single entry in the list window.
358: \par
359: \par {\f3
360: CapView creates two windows for every thread in the profile data file. Since the profiler appends data to the end of existing files a thread may occur multiple times. A new pair of windows will be created for each occurrence of a thread. (Future versio
361: }{\f3 ns should permit combining o}{\f3 f threads into a single view.)}{\f3
362: \par }{\f3
363: \par }{\b\f3 Command Line:}
364: \par \pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 CapView <file name>
365: \par \pard \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080
366: \par A single file name may be specified on the command line. This file will be read in on startup. There are currently no options to CapView.
367: \par {\f3
368: \par }{\b\f3 Public Name Decoration:}
369: \par
370: \par The form of function names listed is the public name for C code and an undecorated form for C++ method. There is
371: currently no way from the user interface to control the amount of information about a C++ method which is reconstructed from the public name and displayed. No undecoration is done for C functions since the mapping cannot necessarily be undone and is gen
372: erally obvious. Static C functions are generally displayed as "???" since the function name is missing from the debug information.{\f3
373: \par }{\f3
374: \par }{\b\f3 See also:}{\f3 }{\f3\uldb Finding Critical Paths}, {\uldb Finding High Use Procedures}, {\uldb Finding Unexpected Calls}, {\uldb List View}{\v\uldb ListWindow}, {\uldb Tree View}{\v\uldb Tre}{\v\uldb eWindow}.{\f3
375: \par }\pard \qc\sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 {\plain \f3\up12\lang1033 \page }{\f3 }{\plain \f3\up12\lang1033 #{\footnote \pard\plain
376: \sl-240\tx0\tx672\tx1440\tx2112\tx2880\tx3552\tx4320\tx4992\tx5760\tx6432\tx7200\tx7872\tx8640\tx9312\tx10080 \f5\fs20\lang1033 {\plain \f31\up12\lang1033 #}{\f30 ListWindow}}}{\f3 }{\b\f3\fs28 CapView: List Window}{\f3
377: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b\f3
378: \par }{\plain \b\f3\lang1033 Purpose:}{\plain \b\f3\lang1033
379: \par }
380: \par The list window presents a view of the profile data that is based on individual functions. All of the data about one function is gathered together and placed on a single line. This view permits the user to locate functions displaying unexpected calling
381: patterns. Functions that are taking far to much time on a per call basis or functions that are called far to many times.
382: \par
383: \par Every instance of a thread in the profile data file causes a list window to be created. Future versions of CapView will have the provision to combine multiple instances of threads into a single view.
384: \par {\b\f3
385: \par }{\plain \b\f3\lang1033 Layout:}{\b\f3
386: \par }{\f3
387: \par }{\f3
388: The list window is laid out one line per function. All information about a single function is combined into this single entry in the table. Not all of the information placed in the output file is carried into this table. Specifically the program does no
389: }{\f3 t remember the maximum and minimum times f}{\f3 or a routine.}{\f3
390: \par }{\f3
391: \par }{\f3 The information displayed for each function:}{\f3
392: \par }{\f3
393: \par }\pard \fi-1440\li1440\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b\f3 Name}{\b :}
394: The name of the DLL/EXE containing the function plus the name of the function. The name displayed will be converted from the public name to a human readable for C++ publics.
395: \par {\b Num Calls:} The total number of all calls into the function.
396: \par {\b Function Only -- Function:} The total number of milli-seconds attributed to this function plus the percent of the total time attributed to this function as a percentage of the total program time.{\b
397: \par }{\b Fu}{\b nction Only -- Per Call:} The total number of millisections attributed to this function divided by the number of calls to this function. Plus this value expressed as a percentage of the total program time.{\b
398: \par }{\b Function + Children -- Function:}
399: The total number of milliseconds attributed to this function plus all of its children. In addition this value expressed as a percentage of the total program time. This value may actually be greater than the total program time. If a function is recur
400: sive, a function's contribution is added multiple times, both for the function itself and as a part of the calling tree from the root function.{\b
401: \par }{\b Function + Children -- PerCall: }The total number of milli-seconds attributed to this function plus all of its children divided by the number of calls to the function. In addition this value expressed as a percentage of the total program time.
402:
403: \par \pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
404: \par }{\f3 The table may be sorted according to each of the columns in the table. The current sort may be determined by examining the Options menu}{\f3 .}{\f3
405: \par }{\f3
406: \par }{\f3 Coloration is always done based on the function's percentage of the total time of the program. Coloration is changed using the Options Set Ranges dialog box.}{\f3
407: \par }{\f3
408: \par }{\plain \b\f3\lang1033 Procedures:}
409: \par
410: \par This view is used to detect unexpected number of calls to any particular routine and to check for routines that are taking too long. If a routine takes less than 5 percent of the total program time it may not be worth while optimizing the routine unless
411: the number of calls to it can be reduced.
412: \par {\b\f3
413: \par }{\plain \b\f3\lang1033 Menu Items:}{\plain \b\f3\lang1033
414: \par }{\b\f3
415: \par }\pard \fi-1440\li1440\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\b\f3 Sort By Time:} If this menu item is checked, the table is sorted by the total time attributed to each function.{
416: \b\f3
417: \par }{\b\f3 Sort By Alpha:} If this menu item is checked, the table is sorted by the name of each function.{\b\f3
418: \par }{\b\f3 Sort By Calls:} If this menu item is checked, the table is sorted by the total number of calls into each function.{\b\f3
419: \par }{\b\f3 Sort By Per Call:} If this menu item is checked, the table is sorted by the per call time attributed to each function.{\b\f3
420: \par }{\b\f3 Include Children:} If this menu item is checked, the time and per call sorts use the function plus children values rather than the function only values.{\b\f3
421: \par }{\b\f3 Font:} This menu item causes the common font dialog box to be opened. Font changes will affect only this instance of the list window.{\b\f3
422: \par }{\b\f3\uldb Set Ranges:}{\b\v\f3\uldb IDD_RANGE_DLG} This menu item causes the set range dialog box to be opened. It can be used to affect the coloration. Coloration is always based on the function's percentage of the total program.{\b\f3
423: \par }\pard \qc\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \page }{\f3\fs16\up6 #{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 #} AsmChanges}}{\f3 }{\f3\fs16\up6 ${\footnote
424: \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $} AsmChanges}}{\f3\fs16\up6 K{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 K} Compiling Assembler Files}}{\f3\fs16\up6 }{\b\f3\fs28 Profiling Assembly Files}{\b\f3\fs28 }{\b\f3\fs28
425: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
426: Assembly files may also be profiled. However this requires intervention on the part of the writer of the assembly file. In order to profile an assembly file, }{\b\f3 _penter} must be called on entry all functions.{\f3
427: \par }{\f3
428: \par }{\f3 For ix86 assembly code:}{\f3
429: \par }{\f3
430: \par }{\f3 1. _penter must be called before any prolog code is executed.}{\f3
431: \par }{\f3
432: \par }{\f3 2. The function takes no arguments and will destroy the contents of the }{\b\f3 eax}{\f3 register.}{\f3
433: \par }{\f3
434: \par }{\f3 3. The function assumes that the first item on the stack is the}{\f3 return address of the current procedure. The routine will modify this to return to someplace else first.}{\f3
435: \par }{\f3
436: \par }{\f3
437: \par }{\f3 For MIPS assembly code:}{\f3
438: \par }{\f3
439: \par }{\f3 Profiling of assembly code is not currently supported.}{\f3
440: \par }{\f3 \page }{\f3\fs16\up6 ${\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $} UsageExamples}}{\f3
441: \par }{\f3 Suppose we have Windows .EXE's called ZOOMAN and HUNTED, and .DLLs called ELEPHANT, MONKEY, SNAKE, WATER, and FOOD. Let's assume the following intercall dependencies exist:}{\f3
442: \par }{\f3
443: \par }{\f3
444: \par }\trowd \trgaph108\trleft927 \cellx3480\cellx7278\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 DLL/EXE name}{\f3 \cell }{\f3 DLLs which are imported}{\f3 \cell }\pard \intbl
445: {\f3 \row }\trowd \trgaph108\trleft927 \cellx3480\cellx7278\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 zooman.exe calls:}{\f3 \cell }{\f3 water.dll, food.dll}{\f3 \cell
446: }\pard \intbl {\f3 \row }\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 hunted.exe calls:}{\f3 \cell }{\f3 elephant.dll,}{\f3 monkey.dll, snake.dll}{\f3 \cell }\pard \intbl {
447: \f3 \row }\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 water.dll calls}{\f3 \cell }{\f3 none}{\f3 \cell }\pard \intbl {\f3 \row }\pard
448: \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 food.dll calls}{\f3 \cell }{\f3 none}{\f3 \cell }\pard \intbl {\f3 \row }\pard
449: \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 elephant.dll calls}{\f3 \cell }{\f3 water.dll, food.dll}{\f3 \cell }\pard \intbl {\f3 \row }\pard
450: \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 monkey.dll calls}{\f3 \cell }{\f3 water.dll, food.dll}{\f3 \cell }\pard \intbl {\f3 \row }\trowd \trgaph108\trleft927 \cellx3480
451: \cellx7278\pard \sl-240\intbl\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 snake.dll calls}{\f3 \cell }{\f3 none}{\f3 \cell }\pard \intbl {\f3 \row }\pard
452: \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
453: \par }{\f3
454: \par }{\f3 Suppose we have Windows .EXE's called ZOOMAN and HUNTED, and .DLLs called ELEPHANT, MONKEY, SNAKE, WATER, and FOOD. Let's assume the following intercall dependencies exist:}{\f3
455: \par }{\f3
456: \par }{\f3 zooman.exe calls:}{\f3
457: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \_}{\f3 water.dll}{\f3
458: \par }{\f3 \_}{\f3 food.dll}{\f3
459: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
460: \par }{\f3 hunted.exe}{\f3
461: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \_}{\f3 elephant.dll}{\f3
462: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \tab }{\f3 \_}{\f3 \_}{\f3 water.dll}{\f3
463: \par }{\f3 \tab }{\f3 \_}{\f3 \_}{\f3 food.dll}{\f3
464: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \_}{\f3 monkey.dll}{\f3
465: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \tab }{\f3 \_}{\f3 \_}{\f3 water.dll}{\f3
466: \par }{\f3 \tab }{\f3 \_}{\f3 \_}{\f3 food.dll}{\f3
467: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 \_}{\f3 snake.dll}{\f3
468: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
469: \par }{\f3 a) Measuring calls from within ZOOMAN.EXE:}{\f3
470: \par }{\f3
471: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Recompile ZOOMAN and link it with CAP.LIB. (See }{\f3\uldb Compiling for CAP}{\f3\ul }{\v\f3 CapCompile}{\f3 .)}{\f3
472:
473: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
474: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
475: \par }{\f3 zooman.exe}{\f3
476: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
477: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
478: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
479: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
480: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
481: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 All the C functions in ZOOMAN.EXE will be profiled by CAP.}{\f3
482: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
483: \par }{\f3
484: \par }{\f3 b) Measuring calls from within WATER.DLL:}{\f3
485: \par }{\f3
486: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Recompile WATER and link it with CAP.LIB.}{\f3
487: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
488: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
489: \par }{\f3 zooman.exe}{\f3
490: \par }{\f3 hunted.exe}{\f3
491: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
492: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
493: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
494: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
495: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
496: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 Both ZOOMAN.EXE and HUNTED.EXE will be profiled for all the C functions within WATER.DLL.}{\f3
497: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
498: \par }{\f3
499: \par }{\f3 c) Measuring calls from HUNTED.EXE to it's DLLs:}{\f3
500: \par }{\f3
501: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Run CapSetup.exe to attach CAP.DLL to all Windows Applications, and reboot the system. (See }{\f3\uldb Control Profiling}{
502: \v\f3\uldb CapControl}{\f3 .)}{\f3
503: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
504: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
505: \par }{\f3 hunted.exe}{\f3
506: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
507: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
508: \par }{\f3 hunted.exe}{\f3
509: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
510: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
511: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
512: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
513: All the calls from HUNTED.EXE to ELEPHANT.DLL, MONKEY.DLL, and SNAKE.DLL will be profiled. These are all the C functions exported by EL}{\f3 EPHANT, MONKEY, and SNAKE DLLs which are used by HUNTED.exe.}{\f3
514: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
515: \par }{\f3
516: \par }{\f3 d) Measuring calls from ELEPHANT.DLL and MONKEY.DLL to their DLLs:}{\f3
517: \par }{\f3
518: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Run CapSetup.exe to attach CAP.DLL to all Windows Applications, }{\f3
519: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 and reboot the system.}{\f3
520: \par }{\f3
521: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 2. Setup CAP.INI as follows:}{\f3
522: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
523: \par }{\f3 hunted.exe}{\f3
524: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
525: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
526: \par }{\f3 elephant.dll}{\f3
527: \par }{\f3 monkey.dll}{\f3
528: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
529: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
530: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
531: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
532: All calls from ELEPHANT.DLL and MONKEY.DLL to WATER.DLL and FOOD.DLL will be measured. These are all the C functions exported by WATER and FOOD DLLs which are used by either ELEPHANT.DLL or MONKEY.DLL. }{\f3
533: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
534: \par }{\f3
535: \par }{\f3 e) Measuring all the calls to FOOD.DLL:}{\f3
536: \par }{\f3
537: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Run CapSetup.exe to attach CAP.DLL to all Windows Applications, and reboot the system.}{\f3
538: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
539: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
540: \par }{\f3 zooman.exe}{\f3
541: \par }{\f3 hunted.exe}{\f3
542: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
543: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
544: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
545: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
546: \par }{\f3 food.dll}{\f3
547: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
548: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 Both ZOOMAN.EXE and HUNTED.exe will be profiled separatel}{\f3
549: y for all the calls to FOOD.DLL. For ZOOMAN.EXE, these are all the C functions exported by FOOD.DLL which are used by ZOOMAN.EXE. And for HUNTED.EXE these are all the C functions exported by FOOD.DLL which are used by either ELEPAHNT.DLL or MONKEY.DLL.}{
550: \f3
551: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
552: \par }{\f3
553: \par }{\f3 a+c) Measuring calls from within ZOOMAN.EXE and calls to it's DLLs:}{\f3
554: \par }{\f3
555: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Recompile ZOOMAN and link it with CAP.LIB as described in section 3.}{\f3
556: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
557: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
558: \par }{\f3 zooman.exe}{\f3
559: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
560: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
561: \par }{\f3 zooman.exe}{\f3
562: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
563: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
564: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
565: \par }{\f3 c+d) Measuring calls from HUNTED.EXE to it's DLLs and calls from ELEPHANT and MONKEY DLLs to their DLLs: }{\f3
566: \par }{\f3
567: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Run CapSetup.exe to attach CAP.DLL to all Windows Applications, and reboot the system. }{\f3
568: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
569: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
570: \par }{\f3 hunted.exe}{\f3
571: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
572: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
573: \par }{\f3 hunted.exe}{\f3
574: \par }{\f3 elephant.dll}{\f3
575: \par }{\f3 monkey.dll}{\f3
576: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
577: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
578: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
579: \par }{\f3
580: \par }{\f3 a+c+d) Measuring calls from within HUNTED.EXE and calls to its DLLs plus calls from ELEPHANT and MONKEY DLLs to their DLLs: }{\f3
581: \par }{\f3
582: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Recompile HUNTED and link it with CAP.LIB.}{\f3
583: \par }{\f3 2. S}{\f3 etup CAP.INI as follows:}{\f3
584: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
585: \par }{\f3 hunted.exe}{\f3
586: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
587: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
588: \par }{\f3 hunted.exe}{\f3
589: \par }{\f3 elephant.dll}{\f3
590: \par }{\f3 monkey.dll}{\f3
591: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
592: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
593: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
594: \par }{\f3
595: \par }{\f3 b+d) Measuring calls from within ELEPHANT.DLL and calls to its DLLs:}{\f3
596: \par }{\f3
597: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Recompile ELEPHANT and link it with CAP.LIB.}{\f3
598: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
599: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
600: \par }{\f3 hunted.exe}{\f3
601: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
602: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
603: \par }{\f3 elephant.dll}{\f3
604: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
605: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
606: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
607: \par }{\f3
608: \par }{\b\f3 Examples of Illegal CAP.INI files:}{\f3
609: \par }{\f3
610: \par }{\f3 Do NOT measure calls within a DLL if the DLL's exported functions are being measured from another EXE/DLL. The following example shows this incorrect combination which should be avoided:}{\f3
611: \par }{\f3
612: \par }{\f3 x) Measuring calls from ZOOMAN.EXE to its DLLs and calls within WATER.DLL: }{\f3
613: \par }{\f3
614: \par }\pard \fi480\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 1. Recompile WATER and link it with CAP.LIB as described in section 3.}{\f3
615: \par }{\f3 2. Setup CAP.INI as follows:}{\f3
616: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [EXES]}{\f3
617: \par }{\f3 zooman.exe}{\f3
618: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
619: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH IMPORTS]}{\f3
620: \par }{\f3 zooman.exe}{\f3
621: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
622: \par }\pard \fi720\sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3 [PATCH CALLERS]}{\f3
623: \par }\pard \sl-240\tx0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080 {\f3
624: \par }{\f3
625: Note that in addition to measuring all C functions (including the exported routines) within WATER.DLL, all the C functions exported by WATER.DLL which are used by ZOOMAN.EXE are measured. This means that the same function within WATER.DLL will be measure
626: }{\f3 d twice. These types of scenarios are not supported and will result in unexpected behavior. }{\f3
627: \par }{\f3 \page }{\f3\fs16\up6 ${\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 $} pu_call_level_profiling}}{\f3\fs16\up6 #{\footnote \pard\plain \s245 \f5\fs20\lang1033 {\fs16\up6 #} pu_call_level_profiling}}{\f3
628: Call level profiling is used to profile based on the function as the smallest profiled item.
629: \par }}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.