source: trunk/tools/profilerfix/Readme.1st@ 10366

Last change on this file since 10366 was 8287, checked in by bird, 23 years ago

Patch explanation.

File size: 3.9 KB
Line 
1/* $Id: Readme.1st,v 1.3 2002-04-19 07:09:44 bird Exp $ */
2
3
4V A C 4 P r o f i l i n g
5----------------------------------
6
7
8While working on VAC3 fixes I made a little discovery:
9 http://www.mainframeforum.com/t115794/s.html
10So, now the focus is VAC4.0 Profiling.
11
12
13
14Introduction
15-------------
16
17Initially this started out as a fixkit for the VAC308 preformance
18analyser (icsperf). Fixing the WS4eB / FP13+ issues. The VAC3 fixes
19still applies, but are not usable with Odin32. Also icsperf doesn't
20work reliablly enought under WS4eB. (It works on one of two test
21machines here.)
22
23We should using VAC40 tech preview features to do preformance
24tuning of Odin32. Unforunately it's not working 100% (yet) but
25the major problem, the fs selector, is worked around. A patch for
26some register corruption 'features' in cpppan40.dll is also
27included.
28
29
30
31How to patch cpppan40.dll
32---------------------------
33
34Fixes a problem with some register screwup.
35
361. Make a backup copy of it.
371b.If you've allready applied a diff to it then restore the original
38 cpppan40.dll before going to step 2.
392. Apply the diff:
40 ApplyDiff.cmd cpppan40.diff <drive>:<vac40path>\dll\cpppan40.dll
413. If step 2 failes contact me please. (bird@anduin.net)
42
43
44
45How to trace your VAC308 and VAC365 programs
46---------------------------------------------
47
481. Compile with -Gh+ so that profile hooks are generated.
492. Link with cpppan40.obj from $(ODIN32_LIB).
503. Run your program in the profiler, patrace.exe:
51 patrace.exe <tracefile> <programname> [options]
52 Note. Remember to have the cpppan40.sys driver installed
53 elsewise patrace will exit with no explanation.
54 Note. Having the IDE running may actually interfere with patrace.exe.
554. Start the VAC4 IDE in tech preview mode. From the commandline this means:
56 vacide.exe -TECHPREVIEW [more args]
57 - Open any project.
58 - Go the 'Project' tab. There you'll find a 'Performance...' button.
59 - Then use the 'Browse...' button to open the trace file you
60 generated a little while ago.
615. Now a 'PA'<tracefilename> Tab will show up. From that you have access two
62 tree graphs. Sorrily the really really nice graphical presentation isn't
63 there. but this is lot's better than nothing! Usually the
64 'Statistics Details' should give you most of the info you need.
65
66
67
68For Project Odin
69-----------------
70
711. Copy cpppan40.obj to <odinroot>\lib\profile and <odinroot>\lib\profile.vac36.
722. Unset DEBUG
73 Set DEBUG=
743. Set PROFILE
75 Set PROFILE=1
764. Build the entire odin sources or the part you like to profile.
775. goto step 3 if previous section.
78
79
80
81Known problems
82---------------
83
84- At some point during VPC startup (right after the logo pops up)
85patrace.exe usually traps due to a bat ebx pointer at location
860001:0001b0ab (eip=0002b0ab) in patrace.exe. ebx and ecx is
87usually pointing badly like crazy.
88When EXTRA_CPLUS isn't set in the environment this will most likely
89be a '23232E: Trace file, blah.trc, has been truncated.'
90
91- '23232E: Trace file, blah.trc, has been truncated.'
92This is some mysterious message. It's probably a nice way to say
93the-trace-file-isn't-what-is-should-be-and-may-trap/hand-your-the-
94vacide-if-you-try-to-open-it.
95Happens only with Odin. And often when EXTRA_CPLUS isn't set.
96
97- Doesn't work very well on SMP boxes. For example the times may be
98screwed up. Like you get negative execution time for a call. A workaround
99is to disable all but one CPU, or to issue a DosSetThreadAffinity during
100program startup.
101
102
103Tip! try redirect stdout and stderr. patrace sometimes writes error
104messages or debug stuff to those files.
105
106
107
108Environment vars which affects patrace.exe
109--------------------------------------------
110
111(My notes.)
112
113"EXTRA_CPLUS"
114 It does something else/more if this is set. Value is not tested.
115
116"IDBCSTABLE"
117
118"PA LOGTO"
119
120"ICLUI MSGFILE"
121"ICLUI TRACE"
122"ICLUI_TRACE"
123"ICLUI TRACETO"
124"ICLUI_TRACETO"
125"ICLUI CHECKSTACK"
126"ICLUI_CHECKSTACK"
127
128
129- knut st. osmundsen
130 (2002-04-17)
131
Note: See TracBrowser for help on using the repository browser.