DIRECTORY BBObjectLocation USING [Location], IO USING [STREAM], PSB USING [PsbNull, PsbIndex], Rope USING [ROPE]; SpyClient: DEFINITIONS = BEGIN OPEN Rope; DataType: TYPE = {CPU, process, breakProcess, pagefaults, allocations, wordsAllocated, spaces, userDefined}; -- common procedures -- InitializeSpy: PROC[ dataType: DataType _ CPU, process: PSB.PsbIndex _ PSB.PsbNull] -- only used if dataType = process RETURNS[errorMsg: ROPE]; -- errorMsg = NIL indicates success StandardSpy: PROC = INLINE {IF InitializeSpy[].errorMsg # NIL THEN ERROR}; StartSpy: PROC; -- the spy records data whenever # starts exceeds # stops StopSpy: PROC; -- you must StartSpy to enable breaks DisplayData: PROC[ -- automatically stops Spy cutoff: CARDINAL _ 3, -- cutoff of printing (in percentage points) herald: ROPE _ NIL, -- client supplied herald (follows Cedar Spy of xxx) stream: IO.STREAM _ NIL]; -- a typescript is opened by default -- break procedures -- SetStartBreak: PROC[-- spy will be started whenever this break is encountered procedure: ROPE _ NIL, -- of form "ModuleIMPL.Proc"; only used if loc = NIL loc: BBObjectLocation.Location _ NIL] RETURNS[ok: BOOLEAN, msg: ROPE]; SetStopBreak: PROC[ -- spy will be stopped whenever this break is encountered procedure: ROPE _ NIL, -- sets a break at the EXIT of the procedure loc: BBObjectLocation.Location _ NIL] RETURNS[ok: BOOLEAN, msg: ROPE]; ClearBreaks: PROC; SetUserBreak: PROC[ -- log a count whenever this break is encountered procedure: ROPE _ NIL, -- of form "ModuleImpl.Proc"; only used if loc = NIL loc: BBObjectLocation.Location _ NIL] RETURNS[ok: BOOLEAN, msg: ROPE]; ClearUserBreaks: PROC; END. . |SpyClient.mesa edited by: Maxwell March 21, 1983 10:25 am see spy.doc for instructions on how to use this interface Êe˜J˜Jšœ™Jšœ,™,Jšœ9™9J˜šÏk ˜ Jšœœ ˜"Jšœœœ˜Jšœœ˜Jšœœœ˜J˜—šœ œ˜J˜—Jšœ˜ J˜Jšœ œœW˜lJ˜JšÏc˜J˜šÏn œœ˜Jšœœ˜Jšœ œ œ ž"˜GJšœ œž#˜<—JšŸ œœœœœœœ˜JJ˜JšŸœœž;˜KJšŸœœž&˜5J˜šŸ œœž˜-Jšœœž,˜BJšœœœž4˜HJšœœœœž%˜?—J˜Jšž˜J˜šŸ œœž9˜MJšœ œœž4˜KJšœ!œ˜&Jšœœœ˜!—šŸ œœž9˜MJšœ œœž-˜DJšœ!œ˜%Jšœœœ˜ —JšŸ œœ˜J˜šŸ œœž1˜EJšœ œœž4˜KJšœ!œ˜%Jšœœœ˜ —JšŸœœ˜J˜šœ˜J˜——…—Š k