1 | /* $Id: Readme.1st,v 1.3 2002-04-19 07:09:44 bird Exp $ */
|
---|
2 |
|
---|
3 |
|
---|
4 | V A C 4 P r o f i l i n g
|
---|
5 | ----------------------------------
|
---|
6 |
|
---|
7 |
|
---|
8 | While working on VAC3 fixes I made a little discovery:
|
---|
9 | http://www.mainframeforum.com/t115794/s.html
|
---|
10 | So, now the focus is VAC4.0 Profiling.
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 | Introduction
|
---|
15 | -------------
|
---|
16 |
|
---|
17 | Initially this started out as a fixkit for the VAC308 preformance
|
---|
18 | analyser (icsperf). Fixing the WS4eB / FP13+ issues. The VAC3 fixes
|
---|
19 | still applies, but are not usable with Odin32. Also icsperf doesn't
|
---|
20 | work reliablly enought under WS4eB. (It works on one of two test
|
---|
21 | machines here.)
|
---|
22 |
|
---|
23 | We should using VAC40 tech preview features to do preformance
|
---|
24 | tuning of Odin32. Unforunately it's not working 100% (yet) but
|
---|
25 | the major problem, the fs selector, is worked around. A patch for
|
---|
26 | some register corruption 'features' in cpppan40.dll is also
|
---|
27 | included.
|
---|
28 |
|
---|
29 |
|
---|
30 |
|
---|
31 | How to patch cpppan40.dll
|
---|
32 | ---------------------------
|
---|
33 |
|
---|
34 | Fixes a problem with some register screwup.
|
---|
35 |
|
---|
36 | 1. Make a backup copy of it.
|
---|
37 | 1b.If you've allready applied a diff to it then restore the original
|
---|
38 | cpppan40.dll before going to step 2.
|
---|
39 | 2. Apply the diff:
|
---|
40 | ApplyDiff.cmd cpppan40.diff <drive>:<vac40path>\dll\cpppan40.dll
|
---|
41 | 3. If step 2 failes contact me please. (bird@anduin.net)
|
---|
42 |
|
---|
43 |
|
---|
44 |
|
---|
45 | How to trace your VAC308 and VAC365 programs
|
---|
46 | ---------------------------------------------
|
---|
47 |
|
---|
48 | 1. Compile with -Gh+ so that profile hooks are generated.
|
---|
49 | 2. Link with cpppan40.obj from $(ODIN32_LIB).
|
---|
50 | 3. 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.
|
---|
55 | 4. 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.
|
---|
61 | 5. 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 |
|
---|
68 | For Project Odin
|
---|
69 | -----------------
|
---|
70 |
|
---|
71 | 1. Copy cpppan40.obj to <odinroot>\lib\profile and <odinroot>\lib\profile.vac36.
|
---|
72 | 2. Unset DEBUG
|
---|
73 | Set DEBUG=
|
---|
74 | 3. Set PROFILE
|
---|
75 | Set PROFILE=1
|
---|
76 | 4. Build the entire odin sources or the part you like to profile.
|
---|
77 | 5. goto step 3 if previous section.
|
---|
78 |
|
---|
79 |
|
---|
80 |
|
---|
81 | Known problems
|
---|
82 | ---------------
|
---|
83 |
|
---|
84 | - At some point during VPC startup (right after the logo pops up)
|
---|
85 | patrace.exe usually traps due to a bat ebx pointer at location
|
---|
86 | 0001:0001b0ab (eip=0002b0ab) in patrace.exe. ebx and ecx is
|
---|
87 | usually pointing badly like crazy.
|
---|
88 | When EXTRA_CPLUS isn't set in the environment this will most likely
|
---|
89 | be a '23232E: Trace file, blah.trc, has been truncated.'
|
---|
90 |
|
---|
91 | - '23232E: Trace file, blah.trc, has been truncated.'
|
---|
92 | This is some mysterious message. It's probably a nice way to say
|
---|
93 | the-trace-file-isn't-what-is-should-be-and-may-trap/hand-your-the-
|
---|
94 | vacide-if-you-try-to-open-it.
|
---|
95 | Happens 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
|
---|
98 | screwed up. Like you get negative execution time for a call. A workaround
|
---|
99 | is to disable all but one CPU, or to issue a DosSetThreadAffinity during
|
---|
100 | program startup.
|
---|
101 |
|
---|
102 |
|
---|
103 | Tip! try redirect stdout and stderr. patrace sometimes writes error
|
---|
104 | messages or debug stuff to those files.
|
---|
105 |
|
---|
106 |
|
---|
107 |
|
---|
108 | Environment 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 |
|
---|