DIRECTORY Basics, Loader, PrincOps, PrincOpsUtils, Process, Terminal; ProcessWatch: CEDAR DEFINITIONS = { PsbIndex: TYPE = PrincOps.PsbIndex; nUsefulPsbs: CARDINAL = 256; UsefulPsbIndex: TYPE = PsbIndex[0 .. nUsefulPsbs); PsbHandle: TYPE = PrincOps.PsbHandle; PsbLink: TYPE = PrincOps.PsbLink; ProcessStateBlock: TYPE = PrincOps.ProcessStateBlock; PDA: PrincOps.PDABase = PrincOps.PDA; FrameHandle: TYPE = PrincOps.FrameHandle; ReadyVector: TYPE = PACKED ARRAY UsefulPsbIndex OF BOOL; readyVector: ReadyVector; Consumer: TYPE = RECORD [ Consume: PROC [data: REF ANY], data: REF ANY _ NIL]; AddConsumer: PROC [c: Consumer]; TooManyConsumers: ERROR; RemoveConsumer: PROC [c: Consumer]; NotFound: ERROR; Stack: TYPE = RECORD [ end: FrameIndex _ 0, wrapped: BOOL _ FALSE, frames: ARRAY FrameIndex OF Frame _ ALL[] ]; FrameIndex: TYPE = NAT [0 .. maxFrames); maxFrames: NAT = coolFrames + warmFrames; coolFrames: NAT = 8; warmFrames: NAT = 8; Frame: TYPE = RECORD [ repeat: RepeatCount _ 0, gf: PrincOps.GlobalFrameHandle _ NIL, pc: PrincOps.BytePC _ [0]]; RepeatCount: TYPE = [0 .. 64); ProcessHistories: TYPE = REF ProcessHistoryArray; ProcessHistoryArray: TYPE = ARRAY UsefulPsbIndex OF ProcessHistory; ProcessHistory: TYPE = RECORD [ lastPriority: Process.Priority _ 0, lastStack: Stack _ [] ]; GetHistory: PROC [pi: UsefulPsbIndex] RETURNS [ph: ProcessHistory]; }. ,ProcessWatch.Mesa Spreitzer, March 31, 1986 11:32:43 pm PST The first warmFrames frames are from the warm end of the stack. The last coolFrames frames are a circular buffer of the coolest frames, starting at (IF wrapped THEN end ELSE warmFrames). IF NOT wrapped, this captures an entire stack. Κl– "cedar" style˜code™K™)—K˜KšΟk œ<˜EK˜KšΠbx œœ ˜K˜Kšœ˜K˜Kšœ œ˜#Kšœ œ˜Kšœœ˜2Kšœ œ˜%Kšœ œ˜!Kšœœ˜5Kšœœ˜%Kšœ œ˜)K˜Kš œ œœœœœ˜8Kšœ˜K˜šœ œœ˜KšΟnœœœœ˜Kšœœœœ˜—K˜šŸ œœ˜ KšŸœœ˜—K˜šŸœœ˜#KšŸœœ˜—K˜šœœœ˜K˜Kšœ œœ˜šœœ œ œ˜)Kšœ?™?Kšœz™zK™.—Kšœ˜—K˜Kšœ œœ˜(Kšœ œ˜)Kšœ œ˜Kšœ œ˜K˜šœœœ˜Kšœ˜Kšœ!œ˜%K˜—K˜Kšœ œ ˜K˜Kšœœœ˜1Kšœœœœ˜Cšœœœ˜K˜#K˜K˜—K˜KšŸ œœœ˜CK˜K˜—…—fώ