/* $Id: Readme.1st,v 1.3 2002-04-19 07:09:44 bird Exp $ */ V A C 4 P r o f i l i n g ---------------------------------- While working on VAC3 fixes I made a little discovery: http://www.mainframeforum.com/t115794/s.html So, now the focus is VAC4.0 Profiling. Introduction ------------- Initially this started out as a fixkit for the VAC308 preformance analyser (icsperf). Fixing the WS4eB / FP13+ issues. The VAC3 fixes still applies, but are not usable with Odin32. Also icsperf doesn't work reliablly enought under WS4eB. (It works on one of two test machines here.) We should using VAC40 tech preview features to do preformance tuning of Odin32. Unforunately it's not working 100% (yet) but the major problem, the fs selector, is worked around. A patch for some register corruption 'features' in cpppan40.dll is also included. How to patch cpppan40.dll --------------------------- Fixes a problem with some register screwup. 1. Make a backup copy of it. 1b.If you've allready applied a diff to it then restore the original cpppan40.dll before going to step 2. 2. Apply the diff: ApplyDiff.cmd cpppan40.diff :\dll\cpppan40.dll 3. If step 2 failes contact me please. (bird@anduin.net) How to trace your VAC308 and VAC365 programs --------------------------------------------- 1. Compile with -Gh+ so that profile hooks are generated. 2. Link with cpppan40.obj from $(ODIN32_LIB). 3. Run your program in the profiler, patrace.exe: patrace.exe [options] Note. Remember to have the cpppan40.sys driver installed elsewise patrace will exit with no explanation. Note. Having the IDE running may actually interfere with patrace.exe. 4. Start the VAC4 IDE in tech preview mode. From the commandline this means: vacide.exe -TECHPREVIEW [more args] - Open any project. - Go the 'Project' tab. There you'll find a 'Performance...' button. - Then use the 'Browse...' button to open the trace file you generated a little while ago. 5. Now a 'PA' Tab will show up. From that you have access two tree graphs. Sorrily the really really nice graphical presentation isn't there. but this is lot's better than nothing! Usually the 'Statistics Details' should give you most of the info you need. For Project Odin ----------------- 1. Copy cpppan40.obj to \lib\profile and \lib\profile.vac36. 2. Unset DEBUG Set DEBUG= 3. Set PROFILE Set PROFILE=1 4. Build the entire odin sources or the part you like to profile. 5. goto step 3 if previous section. Known problems --------------- - At some point during VPC startup (right after the logo pops up) patrace.exe usually traps due to a bat ebx pointer at location 0001:0001b0ab (eip=0002b0ab) in patrace.exe. ebx and ecx is usually pointing badly like crazy. When EXTRA_CPLUS isn't set in the environment this will most likely be a '23232E: Trace file, blah.trc, has been truncated.' - '23232E: Trace file, blah.trc, has been truncated.' This is some mysterious message. It's probably a nice way to say the-trace-file-isn't-what-is-should-be-and-may-trap/hand-your-the- vacide-if-you-try-to-open-it. Happens only with Odin. And often when EXTRA_CPLUS isn't set. - Doesn't work very well on SMP boxes. For example the times may be screwed up. Like you get negative execution time for a call. A workaround is to disable all but one CPU, or to issue a DosSetThreadAffinity during program startup. Tip! try redirect stdout and stderr. patrace sometimes writes error messages or debug stuff to those files. Environment vars which affects patrace.exe -------------------------------------------- (My notes.) "EXTRA_CPLUS" It does something else/more if this is set. Value is not tested. "IDBCSTABLE" "PA LOGTO" "ICLUI MSGFILE" "ICLUI TRACE" "ICLUI_TRACE" "ICLUI TRACETO" "ICLUI_TRACETO" "ICLUI CHECKSTACK" "ICLUI_CHECKSTACK" - knut st. osmundsen (2002-04-17)