DIRECTORY AMModel USING [Section], IO USING [STREAM], PrincOps USING [PsbNull, PsbIndex], Rope USING [ROPE]; SpyClient: DEFINITIONS = BEGIN OPEN Rope; StackType: TYPE = MACHINE DEPENDENT { ready (0), pageFault (1), waitingML (2), waitingCV (3), preempted (4), waitingSV (5), unknown (6), pageFaultData (7), pageFaultCode (8), pageFaultXfer (9), allocSafe (10), allocPerm (11), allocUnsafe (12), userBreak (13)}; DataType: TYPE = MACHINE DEPENDENT { CPU (0), process, breakProcess, pagefaults, allocations, wordsAllocated, userDefined}; InitializeSpy: PROC [dataType: DataType _ CPU, process: PrincOps.PsbIndex _ PrincOps.PsbNull, spyOnSpyLog: BOOL _ FALSE, frequencyDivisor: NAT _ 1] RETURNS [errorMsg: ROPE]; StandardSpy: PROC = INLINE {IF InitializeSpy[].errorMsg # NIL THEN ERROR}; StartSpy: PROC; StopSpy: PROC; DisplayData: PROC [cutoff: CARDINAL _ 3, herald: ROPE _ NIL, stream: IO.STREAM _ NIL, spyOnSpyLog: BOOL _ FALSE]; SetStartBreak: PROC [section: AMModel.Section _ NIL, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; SetStopBreak: PROC [section: AMModel.Section _ NIL, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; ClearBreaks: PROC; SetUserBreak: PROC [section: AMModel.Section _ NIL, type: StackType _ ready, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; SetTrace: PROC [section: AMModel.Section _ NIL, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; ClearUserBreaks: PROC; END. . LSpyClient.mesa Copyright Σ 1985, 1987 by Xerox Corporation. All rights reserved. Maxwell November 29, 1983 11:27 am see SpyDoc.tioga for instructions on how to use this interface Russ Atkinson (RRA) February 16, 1987 12:16:40 pm PST Mike Spreitzer September 24, 1986 12:38:30 pm PDT common procedures process is only used if dataType = process spyOnSpyLog is used by DisplayData errorMsg = NIL indicates success When dataType is one of {CPU, process, breakProcess, allocations, wordsAllocated}, we ignore all but one of every frequencyDivisor wakeups. the spy records data whenever # starts exceeds # stops you must StartSpy to enable breaks ... displays data (automatically stops Spy); cutoff gives cutoff of printing (in percentage points); herald is the client supplied herald (follows Cedar Spy of xxx); a typescript is opened if stream = NIL break procedures ... sets a breakpoint that will start Spying whenever the breakpoint is encountered. procedure is of form "ModuleIMPL.Proc" & is only used if section = NIL; if sourceIndex # 0, then treat `procedure' as a filename. ... sets a breakpoint that will stop Spying whenever the breakpoint is encountered. procedure is of form "ModuleIMPL.Proc" & is only used if section = NIL (breakpoint is set at the RETURN); if sourceIndex # 0, then treat `procedure' as a filename. clears all stop and start breaks log a count whenever this break is encountered; type allows the user to distinguish breaks; procedure is of form "ModuleImpl.Proc"; only used if section = NIL; if sourceIndex # 0, then treat `procedure' as a filename sets a break such that Spy writes a trace on the spy log whenever this break is encountered; procedure is of form "ModuleImpl.Proc"; only used if section = NIL; if sourceIndex # 0, then treat `procedure' as a filename clears all stop and start breaks; clears the traces, too. Κ2˜codešœ™KšœB™BKšœ#™#Kšœ>™>K™5K™1—˜šΟk ˜ Kšœœ ˜Kšœœœ˜Kšœ œ˜#Kšœœœ˜K˜——KšΟn œ œœœ˜)K˜šœ œœ œ˜%K˜ K˜K˜K˜K˜K˜K˜ K˜K˜K˜K˜K˜Kšœ˜Kšœ˜—šœ œœ œ˜$KšœS˜V—K˜šœ™K˜šž œœœ>œœœœ œ˜­Kšœ*™*KšœΟc™"Kšœ ™ Kšœœo™‹K™—šž œœœœœœœ˜JK˜—šžœœ˜Kšœ8™8K˜—šžœœ˜Kšœ#™#K˜—šž œœ œœœ œœœœœ˜qKšœΙ™Μ—K˜—šœ™K˜šž œœœœœœœœœ˜‚Kšœ™œ;™ΧK˜—šž œœœ œœœœœœ˜Kšœ˜œœ<™ψK˜—šž œœ˜Kšœ ™ —K˜šž œœœ&œœœœœœ˜˜KšœŽΟi Πikœ:™ΨK˜—šžœœœ œœœœœœ˜{KšœjŸ$Πci ’Ÿ8™ΩK™—šžœœ˜Kšœ9™9—K˜—šœ˜K˜——…—όz