Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!decwrl!ucbvax!info-vax From: info-vax@ucbvax.UUCP Newsgroups: mod.computers.vax Subject: (none) Message-ID: <8511250258.AA03794@edison.UUCP> Date: Sun, 24-Nov-85 21:58:11 EST Article-I.D.: edison.8511250258.AA03794 Posted: Sun Nov 24 21:58:11 1985 Date-Received: Wed, 27-Nov-85 00:16:23 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 42 Approved: info-vax@sri-kl.arpa Subject: Program Counter Profiling on VMS [Forgive me, I missed the orignal posting - our news feeds were down for about a week - ta2 ] I have a program counter sampler for VMS. You link it into the program to be tested as a user written debugger. (LINK/DEBUG=PCSAM ....) By default, sampling is not enabled. If you set the logical name $PCSAM$ to anything less than 5 characters, sampling will be enabled on a 50ms timer AST. If the equiv name for $PCSAM$ is longer than 5 characters, the sampler will use it as a delta time string and sample at that rate. PC's are collected into a file whose name is derived from the image name; ie IMAGE.EXE --> IMAGE.PCS. If a PC occurs twice in a row, and the instruction at that PC is a CHMK or CHME, the redundant PC will be discarded. This eliminates the data getting swamped by long waits at system service calls (like terminal i/o). After the PC's are collected, the .PCS file and the .EXE file are fed into the report generator. The report generator reads the traceback information from the .EXE to determine the start and end points for all routines. It then assigns each PC from the .PCS to each routine producing a histogram when done. The report generator allows setting of a display threshold. All routines that accumulate less percent PC's than the threshold will not be displayed in the histogram. I ran some quick tests under VMS 4.2, it seems to still work! If anybody would like this package, contact me through mail or on the Bellophone. I'll mail the sources out to those requesting them. The sampler is written in assembler, the report generator in Pascal. Tom ............... tom allebrandi 2, general electric automation controls operation UUCP: ...ucbvax!decvax!mcnc!ncsu!uvacs!edison!ta2 or ...seismo!cbosgd!uvacs!edison!ta2 box 8106, charlottesville, va, 22906 (804) 978-5566 ...............