DIRECTORY BasicTime USING [Pulses], FastBreak USING [FastBreakProc], IO USING [STREAM], PrincOps USING [BytePC, FrameHandle, GlobalFrameHandle, PsbIndex], Process USING [GetCurrent, Priority], Rope USING [ROPE], SpyClient USING [DataType, StackType]; SpyOps: DEFINITIONS IMPORTS Process = BEGIN ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; StartCounting: FastBreak.FastBreakProc; StopCounting: FastBreak.FastBreakProc; Record: PROC [ psbi: PrincOps.PsbIndex _ LOOPHOLE[Process.GetCurrent[]], frame: PrincOps.FrameHandle _ NIL, type: StackType _ 0, count: CARDINAL _ 1]; UserBreak: FastBreak.FastBreakProc; -- calls Record AllocationBreak: FastBreak.FastBreakProc; -- calls Record spyState: READONLY SpyState; watching: READONLY DataType; justMe: READONLY PrincOps.PsbIndex; runningTime: BasicTime.Pulses; active, starts, stops: INTEGER; pageFaults: LONG CARDINAL; wordsAllocated: LONG CARDINAL; wordsReclaimed: LONG CARDINAL; wakeups, notScheduled, skips: Count; levelData: LevelData; DataType: TYPE = SpyClient.DataType; SpyState: TYPE = {off, on, disabled}; Stack: TYPE = MACHINE DEPENDENT RECORD [ process: PrincOps.PsbIndex, level: Process.Priority, type: StackType, count: CARDINAL, frame: ARRAY [0..stackLength) OF Frame]; stackLength: CARDINAL = 200; stackHeader: CARDINAL = Stack.SIZE - stackLength*Frame.SIZE; StackType: TYPE = SpyClient.StackType; Frame: TYPE = RECORD [ gfh: PrincOps.GlobalFrameHandle, pc: PrincOps.BytePC]; Count: TYPE = INT; LevelData: TYPE = ARRAY Process.Priority OF Count; PrintBreaks: PROC [typescript: STREAM]; SetAllocationBreak: PROC RETURNS[msg: ROPE]; ClearAllocationBreak: PROC; ZeroLog: PROC; DestroyLog: PROC; ReadLog: PROC [typescript: STREAM, datatype: DataType, spyOnSpyLog: BOOL _ FALSE]; PrintCount: PROC [stream: STREAM, c, sonC: Count, total: Count]; PerCent: PROC [stream: STREAM, x, y: Count]; -- prints x/y as "(dd.d%)" processes: LIST OF ProcessRef; modules: LIST OF Procedure; ProcessRef: TYPE = REF ProcessRec; ProcessRec: TYPE = RECORD [ psb: PrincOps.PsbIndex _ 0, level: PACKED ARRAY [0..4] OF Process.Priority _ ALL[0], calls: Count _ 0, sons: LIST OF Call _ NIL]; Procedure: TYPE = REF ProcRec; ProcRec: TYPE = RECORD [ unused: BOOL _ FALSE, marked: BOOL _ FALSE, -- bit for procedures that walk the stack named: BOOL _ FALSE, -- have we appended the name of the procedure? symbols: BOOL _ TRUE, -- are the symbols available? gfh: PrincOps.GlobalFrameHandle _ NIL, -- gfh for this procedure name: ROPE _ NIL, -- the name of the procedure entryPC: CARDINAL _ 0, exitPC: CARDINAL _ LAST[CARDINAL], refs: CARDINAL _ 0, -- number of procedures that call this one count: Count _ 0, -- counts in this procedure calls: Count _ 0, -- counts in procedures called by this one container: Procedure _ NIL, -- the procedure that contains all calls to this one parents: LIST OF Procedure _ NIL, -- procedures that call this one sons: LIST OF Call _ NIL]; -- procedures called from here Call: TYPE = RECORD [ pc: CARDINAL _ 0, calls: Count _ 0, proc: Procedure _ NIL]; END . . |SpyOps.mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reserved. Maxwell September 19, 1983 9:21 am Russ Atkinson (RRA) March 31, 1986 1:55:19 pm PST Pier, December 12, 1985 10:37:38 am PST McCreight, April 11, 1986 2:16:04 pm PST SpyKernel procedures and data structures current parameters statistics data types SpyBreaks procedures SpyLogReader procedures Κε˜codešœ ™ Kšœ Οmœ7™BKšœ#™#K™1K™'K™(—˜šΟk ˜ Kšœ žœ ˜Kšœ žœ˜ Kšžœžœžœ˜Kšœ žœ4˜BKšœžœ˜%Kšœžœžœ˜Kšœ žœ˜&K˜——šΟnœž œžœ ž˜+K˜Kšžœžœžœ˜Kšžœžœžœžœ˜K˜—šœ)™)K˜KšŸ œ˜'KšŸ œ˜&K˜šŸœžœ˜Kšœžœ˜:Kšœžœ˜#K˜Kšœžœ˜—KšΠbn œΟc˜3Kš œ‘˜9K˜šœ™Kšœ žœ ˜Kšœ žœ ˜Kšœžœ˜#K˜—šœ ™ K˜Kšœžœ˜Kšœ žœžœ˜Kšœžœžœ˜Kšœžœžœ˜K˜$K˜—K˜šœ ™ Kšœ žœ˜$Kšœ žœ˜%š œžœžœž œžœ˜(Kšœ˜K˜K˜Kšœžœ˜Kšœžœžœ˜(—Kšœ žœ˜Kšœ žœ žœžœ˜Kšœ‘˜-Kšœ‘*˜