From VisualWorks®, 7.6 of February 8, 2008 on March 3, 2008 at 9:44:08 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <class> <name>ProcessMonitorService</name> <environment>CraftedSmalltalk</environment> <super>UI.Model</super> <private>false</private> none processes <imports></imports> <category>CrafProcessMonitor</category> <attributes> <package>Debugger-Process Monitor</package> </attributes> </class> <class> <name>ProcessMonitorRecord</name> <environment>CraftedSmalltalk</environment> <super>Core.Object</super> <private>false</private> none index state hash priority topContext type name underDebug windowLabel <imports></imports> <category>CrafProcessMonitor</category> <attributes> <package>Debugger-Process Monitor</package> </attributes> </class> <class> <name>ProcessMonitorClient</name> <environment>CraftedSmalltalk</environment> <super>UI.ApplicationModel</super> <private>false</private> none service intervalHolder samplerProcess isSampling processRecords displayList numProcHolder memSizeHolder sortBlock tabs processListWidget filterSelection record defaultFilter <imports></imports> <category>Debugger-Process Monitor</category> <attributes> <package>Debugger-Process Monitor</package> </attributes> </class> <methods> CraftedSmalltalk.ProcessMonitorService <category>actions</category>
changeProcess: anInteger priorityTo: newPriority ^self do: [:p | p priority: newPriority] forProcess: anInteger
debugProcess: anInteger ^self do: [:p | p debug] forProcess: anInteger
dumpProcess: anInteger into: aString self do: [:pr | pr dumpStackToFileNamed: aString] forProcess: anInteger
inspectProcess: anInteger ^self do: [:each | [each inspect] forkAt: Processor userSchedulingPriority] forProcess: anInteger
proceedProcess: anInteger ^self do: [:p | p proceed] forProcess: anInteger
proceedUserProcesses Processor proceedUserProcesses
stackStringOf: anInteger self do: [:p | ^p stackString] forProcess: anInteger. ^''
terminateProcess: anInteger ^self do: [:pr | pr terminate. pr terminate. "needed twice if it was waiting on a semaphore"] forProcess: anInteger
viewProcess: anInteger self do: [:pr | | strm name meth | strm := WriteStream on: (String new: 2000). strm nextPutAll: (#Process << #dialogs >> 'Process') asString; space. meth := pr processCreationMethod. meth notNil ifTrue: [meth printNameOn: strm inClass: nil. name := strm contents. strm nextPut: Character cr. strm nextPut: Character cr. self printProcessStack: pr on: strm] ifFalse: [strm nextPutAll: 'nil'. name := 'nil']. ComposedTextView open: strm contents asValue label: name.] forProcess: anInteger
</methods> <methods> CraftedSmalltalk.ProcessMonitorService <category>accessing</category>
dynamicallyAllocatedFootprint ^ObjectMemory current dynamicallyAllocatedFootprint
processList | strm | processes := Process allGeneralInstances reject: [:p | p isTerminated]. processes := WeakArray withAll: processes. strm := WriteStream on: (Array new: processes size). processes do: [:p | p ~= processes tombstone ifTrue: [strm nextPut: (ProcessMonitorRecord on: p)]]. ^strm contents
windowProcessList | strm | strm := WriteStream on: (Array new: 100). processes := OrderedCollection new. Window allGeneralInstancesDo: [:win | | p | (win isOpen and: [win windowManager isKindOf: WindowManager]) ifTrue: [p := win windowProcess. (p notNil and: [p isTerminated not]) ifTrue: [processes add: p. strm nextPut: (ProcessMonitorRecord onWindow: win)]]]. processes := WeakArray withAll: processes. ^strm contents
</methods> <methods> CraftedSmalltalk.ProcessMonitorService <category>private</category>
do: aBlock forProcess: anInteger ^aBlock value: (processes detect: [:p | p ~= 0 and: [p identityHash = anInteger]] ifNone: [^nil])
</methods> <methods> CraftedSmalltalk.ProcessMonitorService class <category>instance creation</category>
open ^ProcessMonitorClient openOn: self new
</methods> <methods> CraftedSmalltalk.ProcessMonitorRecord <category>accessing</category>
index ^index
name ^name
printOn: aStream aStream nextPutAll: (#NameC << #pdp >> 'Name: ') asString; nextPutAll: name; space; space; nextPutAll: (#PriorityC << #pdp >> 'Priority: ') asString; print: priority.
priority ^priority
processHash ^hash
state ^state
topContext ^topContext
type ^type ifTrue: [(#system << #pdp >> 'system') asString] ifFalse: [(#user << #pdp >> 'user') asString]
windowLabel ^windowLabel
</methods> <methods> CraftedSmalltalk.ProcessMonitorRecord <category>initialize-release</category>
basicOn: aProcess self initializeNameForProcess: aProcess. priority := aProcess priority. state := (underDebug := aProcess isUnderDebug) ifTrue: ['d ' ] ifFalse: [' ']. state := state , aProcess processState asString. topContext := aProcess suspendedContext. (topContext notNil and: [topContext method == (Semaphore compiledMethodAt: #wait)]) ifTrue: [topContext := topContext sender]. topContext := topContext printString. type := aProcess isSystemProcess. type isNil ifTrue: [type := false]. hash := aProcess identityHash.
initializeNameForProcess: aProcess name := aProcess name. name notNil ifTrue: [^self]. name := aProcess processCreationMethod. name := name notNil ifTrue: [name nameString] ifFalse: ['nil']. aProcess name: name.
on: aProcess aProcess priority > Processor activeProcess priority ifTrue: [[self basicOn: aProcess] valueUnpreemptively] ifFalse: [self basicOn: aProcess]
onWindow: aWindow windowLabel := aWindow label. windowLabel := windowLabel isNil ifTrue: [aWindow printString] ifFalse: [windowLabel asString]. self basicOn: aWindow windowProcess.
</methods> <methods> CraftedSmalltalk.ProcessMonitorRecord <category>testing</category>
isSystemProcess ^type
isUnderDebug ^underDebug
</methods> <methods> CraftedSmalltalk.ProcessMonitorRecord <category>comparing</category>
= aRecord ^hash = aRecord processHash and: [name = aRecord name]
hash ^hash
</methods> <methods> CraftedSmalltalk.ProcessMonitorRecord class <category>instance creation</category>
on: aProcess ^self new on: aProcess
onWindow: aWindow ^self new onWindow: aWindow
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>updating</category>
displayProcessRecords | selectedRecords nLines scrollPosition | nLines := displayList list size. scrollPosition := processListWidget scrollOffsetHolder value. selectedRecords := displayList selections. displayList list: (SortedCollection withAll: (self filter: processRecords) sortBlock: sortBlock) asList. displayList selections: selectedRecords. displayList list size >= nLines ifTrue: [processListWidget scrollTo: scrollPosition].
setProcessListPage (self widgetAt: #tabControl) client: self spec: (#(#processSpec #windowProcessSpec) at: tabs selectionIndex)
tabsChanged self createSortBlockFor: #name. self updateList. self setProcessListPage
updateList processRecords := tabs selectionIndex = 1 ifTrue: [service processList] ifFalse: [service windowProcessList]. self displayProcessRecords. self updateStatusBar. self spawnNextSampler.
updateStatusBar numProcHolder value: ((#SystemC1sUserC2s << #pdp >> 'System: <1s> User: <2s>') expandMacrosWith: self numOfSystemProcesses with: self numOfUserProcesses). memSizeHolder value: ((#MemoryC1s << #pdp >> 'Memory: <1p> MB') expandMacrosWith: service dynamicallyAllocatedFootprint // 1024 / 1024.0).
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>initialize-release</category>
initialize super initialize. self filterSelection onChangeSend: #displayProcessRecords to: self
noticeOfWindowClose: aWindow EventQueue allInstancesDo: [:each | each restoreReadSynchSignals]. service proceedUserProcesses. self release. super noticeOfWindowClose: aWindow
on: aProcMonServer service := aProcMonServer. intervalHolder := 2000 asValue. displayList := MultiSelectionInListSortAware new. record := nil asValue. numProcHolder := '' asValue. memSizeHolder := '' asValue. self createSortBlockFor: #name. tabs := SelectionInList new. tabs list: (List with: (#Processes << #pdp >> 'Processes') with: (#Windows << #pdp >> 'Windows')); selectionIndex: 1. isSampling := true.
release self stopSampling. super release.
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>actions</category>
changeProcessPriority | answer | self hasSelection ifFalse: [^self]. answer := Dialog request: (#EnterNewPriority << #pdp >> 'Enter new priority') initialAnswer: self selectedProcessRecord priority printString. answer isEmpty ifTrue: [^self]. answer := answer asNumber rounded. (answer < 1 or: [answer > (Processor highestPriority - 1)]) ifTrue: [^self]. displayList selections do: [:rec | service changeProcess: rec processHash priorityTo: answer]
debugProcess (displayList selections anySatisfy: [:rec | rec isSystemProcess]) ifTrue: [(Dialog confirm: (#DebuggingSystemProcessMayHarm << #pdp >> 'Debugging a system process may harm the system. Continue debug? ')) ifFalse: [^self]]. displayList selections do: [:rec | service debugProcess: rec processHash]
dumpProcess | aString strm | aString := Dialog requestFileName: (#SaveStackDump << #pdp >> 'Save stack dump into file named:') default: 'stackdump.txt'. (aString isNil or: [aString isEmpty]) ifTrue: [^self]. strm := aString asFilename writeStream. [displayList selections do: [:rec | rec printOn: strm. strm cr. strm nextPutAll: (service stackStringOf: rec processHash). strm cr.]. ] ensure: [strm close]
inspectProcess displayList selections do: [:rec | service inspectProcess: rec processHash]
proceedAllAndExit service proceedUserProcesses. self exit
proceedAllProcesses service proceedUserProcesses
proceedProcess displayList selections do: [:rec | service proceedProcess: rec processHash]
terminateProcess | message | message := displayList selections size = 1 ifTrue: [#TerminateSelectedProcessQ << #pdp >> 'Terminate "<1s>"?' expandMacrosWith: displayList selections first name] ifFalse: [#TerminateSelected1pProcessesQ << #pdp >> 'Terminate the <1p> selected processes?' expandMacrosWith: displayList selections size]. (Dialog confirm: message) ifFalse: [^self]. displayList selections do: [:rec | service terminateProcess: rec processHash]
toggleSampling isSampling := isSampling not. self spawnNextSampler. (builder componentAt: #sampleCntrl) widget labelString: self sampleCntrlLabel
viewProcess displayList selections do: [:rec | | holder | holder := ('<1p><n><2s>' expandMacrosWith: rec with: (service stackStringOf: rec processHash)) asValue. [ComposedTextView edit: holder label: (#ProcessViewOf1s << #pdp >> 'Process view of <1s>' expandMacrosWith: rec name) icon: (Icon constantNamed: #workspace) extent: 500@350] forkAt: Processor userSchedulingPriority]
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>accessing</category>
enableProceed ^self hasSelection and: [(displayList selections anySatisfy: [:rec | rec state ~= ' paused']) not]
intervalHolder ^intervalHolder
labelFor: aSymbol ^self perform: aSymbol
memSizeHolder ^memSizeHolder
numProcHolder ^numProcHolder
processList ^displayList
record ^record
sampleCntrlLabel ^isSampling ifTrue: [(#Stop << #pdp >> 'Stop')] ifFalse: [(#Start << #pdp >> 'Start')]
tabs ^tabs
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>interface opening</category>
postBuildWith: aBuilder super postBuildWith: aBuilder. builder == aBuilder ifTrue: [builder window damageRepairPolicy: DoubleBufferingWindowDisplayPolicy new] ifFalse: [processListWidget := (aBuilder componentAt: #processList) widget].
postOpenWith: aBuilder super postOpenWith: aBuilder. self setProcessListPage. self updateList.
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>private</category>
enableDebug ^self menuCommandEnablement and: [(displayList selections anySatisfy: [:rec | rec isUnderDebug]) not]
filter: aCollection ^aCollection select: self processFilterBlock
hasSelection ^displayList selectionIndexes notEmpty
menuCommandEnablement ^self hasSelection
numOfSystemProcesses ^(processRecords inject: 0 into: [:s :p | s + (p isSystemProcess ifTrue: [1] ifFalse: [0])]) printString
numOfUserProcesses ^(processRecords inject: 0 into: [:s :p | s + (p isSystemProcess ifTrue: [0] ifFalse: [1])]) printString
processFilterBlock ^self class perform: (self filterSelection value)
selectedProcessRecord ^displayList selections first
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>actions - sorting</category>
createSortBlockFor: field | ascSortBlock dscSortBlock | ascSortBlock := [:x :y | (x perform: field) <= (y perform: field)]. dscSortBlock := [:x :y | (x perform: field) >= (y perform: field)]. sortBlock := self processList sortAspect == field ifTrue: [self processList sortDirection == #asc ifTrue: [self processList sortDirection: #dsc. ascSortBlock] ifFalse: [self processList sortDirection: #asc. dscSortBlock]] ifFalse: [self processList sortAspect: field. self processList sortDirection: #dsc. ascSortBlock].
recordNameLabelPressed self sortField: #name
recordPriorityLabelPressed self sortField: #priority
recordProcessHashLabelPressed self sortField: #processHash
recordStateLabelPressed self sortField: #state
recordTopContextLabelPressed self sortField: #topContext
recordTypeLabelPressed self sortField: #type
recordWindowLabelLabelPressed self sortField: #windowLabel
sortField: field self createSortBlockFor: field. self displayProcessRecords.
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>controlling</category>
spawnNextSampler samplerProcess notNil ifTrue: [samplerProcess terminate]. isSampling ifFalse: [^self]. samplerProcess := [ (Delay forMilliseconds: intervalHolder value) wait. self mainWindow send: #updateList to: self. ] newProcess. samplerProcess name: 'ProcessMonitorSampler'. samplerProcess isSystemProcess: true. samplerProcess resume.
stopSampling samplerProcess isNil ifTrue: [^self]. samplerProcess terminate. samplerProcess := nil
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>aspects</category>
filterSelection "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^filterSelection isNil ifTrue: [filterSelection := self class defaultProcessFilter asValue] ifFalse: [filterSelection]
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient <category>menus</category>
exit self closeRequest
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient class <category>instance creation</category>
openOn: aService ^(self new on: aService) open
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient class <category>filters</category>
allProcessesFilter ^[:p | true].
defaultProcessFilter ^defaultFilter
defaultToAllProcesses defaultFilter := self allProcessesFilter.
defaultToSystemProcesses defaultFilter := self systemProcessesFilter.
defaultToUserProcesses defaultFilter := self userProcessesFilter.
systemProcessesFilter ^[:p | p isSystemProcess].
userProcessesFilter ^[:p | p isSystemProcess not].
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient class <category>class initialization</category>
initialize defaultFilter := #userProcessesFilter
</methods> <methods> Kernel.Process <category>accessing</category>
processCreationMethod | ctx stack | stack := OrderedCollection new. ctx := Processor activeProcess == self ifTrue: [thisContext] ifFalse: [suspendedContext]. ctx isNil ifTrue: [^nil]. stack add: ctx. [(ctx := stack last sender) isNil ifTrue: [^stack first method homeMethod]. stack size >= 3 ifTrue: [stack removeFirst]. stack addLast: ctx] repeat
processState Processor activeProcess == self ifTrue: [^#active]. suspendedContext isNil ifTrue: [^#terminated]. myList isNil ifTrue: [^(Processor isPaused: self) ifTrue: [#paused] "paused is really suspended" ifFalse: [#suspend]]. ^(Processor isRunable: self) ifTrue: [#runable] ifFalse: [#blocked]
</methods> <methods> Kernel.Process <category>printing</category>
stackString | strm | strm := (String new: 1000) writeStream. self printStackOn: strm. ^strm contents
</methods> <methods> Kernel.CompiledCode <category>printing</category>
nameString | aStream | aStream := (String new: 256) writeStream. self printNameOn: aStream inClass: nil. ^aStream contents
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient class <category>interface specs</category>
processSpec "Tools.UIPainter new openOnClass: self andSelector: #processSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: #(#{Kernel.UserMessage} #key: #ProcessMonitor #defaultString: 'Process Monitor' #catalogID: #pdp ) #bounds: #(#{Graphics.Rectangle} 700 525 1298 932 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.SubCanvasSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 30 0 ) #name: #Subcanvas1 #flags: 0 #minorKey: #showProcessSpec ) #(#{UI.DataSetSpec} #properties: #(#{UI.PropertyListDictionary} #showVerticalLines false #allowColumnReordering true #rowSize 30 #allowColumnResizing true #allowSorting true #showHorizontalLines false ) #layout: #(#{Graphics.LayoutFrame} 0 0 30 0 0 1 0 1 ) #name: #processList #model: #processList #callbacksSpec: #(#{UI.UIEventCallbackSubSpec} #doubleClickSelector: #debugProcess ) #menu: #processMenu #columns: #( #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record name' #label: #(#{Kernel.UserMessage} #key: #NameOrCreator #defaultString: 'Name or Creator' #catalogID: #pdp ) #labelIsImage: false #width: 240 #rendererType: #Text #editorType: #None #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record priority' #label: #(#{Kernel.UserMessage} #key: #Priority #defaultString: 'Priority' #catalogID: #pdp ) #labelIsImage: false #width: 60 #rendererType: #Text #editorType: #None #type: #number #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record processHash' #label: #(#{Kernel.UserMessage} #key: #Hash #defaultString: 'Hash' #catalogID: #pdp ) #labelIsImage: false #width: 50 #rendererType: #Text #editorType: #None #type: #number #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record state' #label: #(#{Kernel.UserMessage} #key: #State #defaultString: 'State' #catalogID: #pdp ) #labelIsImage: false #width: 65 #rendererType: #Text #editorType: #None #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record type' #label: #(#{Kernel.UserMessage} #key: #Type #defaultString: 'Type' #catalogID: #pdp ) #labelIsImage: false #width: 50 #rendererType: #Text #editorType: #None #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record topContext' #label: #(#{Kernel.UserMessage} #key: #WaitingContext #defaultString: 'Waiting Context' #catalogID: #pdp ) #labelIsImage: false #width: 300 #rendererType: #Text #editorType: #None #noScroll: false ) ) #multipleSelections: true #labelsAsButtons: true ) ) ) )
showProcessSpec "Tools.UIPainter new openOnClass: self andSelector: #showProcessSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'Unlabeled Canvas' #bounds: #(#{Graphics.Rectangle} 720 450 1170 529 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.RadioButtonSpec} #properties: #(#{UI.PropertyListDictionary} #labelFromApplication false ) #layout: #(#{Core.Point} 10 5 ) #name: #ShowAllRadioButton #model: #filterSelection #label: #(#{Kernel.UserMessage} #key: #ShowAll #defaultString: 'Show all' #catalogID: #pdp ) #select: #allProcessesFilter ) #(#{UI.RadioButtonSpec} #layout: #(#{Core.Point} 110 5 ) #name: #ShowUserRadioButton #model: #filterSelection #label: #(#{Kernel.UserMessage} #key: #UserOnly #defaultString: 'User only' #catalogID: #pdp ) #select: #userProcessesFilter ) #(#{UI.RadioButtonSpec} #layout: #(#{Core.Point} 210 5 ) #name: #ShowSystemRadioButton #model: #filterSelection #label: #(#{Kernel.UserMessage} #key: #SystemOnly #defaultString: 'System only' #catalogID: #pdp ) #select: #systemProcessesFilter ) ) ) )
windowProcessSpec "Tools.UIPainter new openOnClass: self andSelector: #windowProcessSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: #(#{Kernel.UserMessage} #key: #ProcessMonitor #defaultString: 'Process Monitor' #catalogID: #pdp) #bounds: #(#{Graphics.Rectangle} 640 512 1238 919 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.DataSetSpec} #properties: #(#{UI.PropertyListDictionary} #showVerticalLines false #allowColumnReordering true #rowSize 30 #allowColumnResizing true #allowSorting true #showHorizontalLines false ) #layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 0 1 ) #name: #processList #model: #processList #callbacksSpec: #(#{UI.UIEventCallbackSubSpec} #doubleClickSelector: #debugProcess ) #menu: #processMenu #columns: #( #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true #labelFromApplication false ) #model: #'record windowLabel' #label: #(#{Kernel.UserMessage} #key: #Window #defaultString: 'Window' #catalogID: #pdp) #labelIsImage: false #width: 140 #rendererType: #Text #editorType: #None #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true #labelFromApplication false ) #model: #'record name' #label: #(#{Kernel.UserMessage} #key: #ProcessNameOrCreator #defaultString: 'Process name or creator' #catalogID: #pdp) #labelIsImage: false #width: 180 #rendererType: #Text #editorType: #None #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record priority' #label: #(#{Kernel.UserMessage} #key: #Priority #defaultString: 'Priority' #catalogID: #pdp) #labelIsImage: false #width: 60 #rendererType: #Text #editorType: #None #type: #number #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record processHash' #label: #(#{Kernel.UserMessage} #key: #Hash #defaultString: 'Hash' #catalogID: #pdp) #labelIsImage: false #width: 50 #rendererType: #Text #editorType: #None #type: #number #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record state' #label: #(#{Kernel.UserMessage} #key: #State #defaultString: 'State' #catalogID: #pdp) #labelIsImage: false #width: 65 #rendererType: #Text #editorType: #None #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record type' #label: #(#{Kernel.UserMessage} #key: #Type #defaultString: 'Type' #catalogID: #pdp) #labelIsImage: false #width: 50 #rendererType: #Text #editorType: #None #noScroll: false ) #(#{UI.DataSetColumnSpec} #properties: #(#{UI.PropertyListDictionary} #allowSorting true ) #model: #'record topContext' #label: #(#{Kernel.UserMessage} #key: #WaitingContext #defaultString: 'Waiting Context' #catalogID: #pdp) #labelIsImage: false #width: 300 #rendererType: #Text #editorType: #None #noScroll: false ) ) #multipleSelections: true #labelsAsButtons: true ) ) ) )
windowSpec "Tools.UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: #(#{Kernel.UserMessage} #key: #ProcessMonitor #defaultString: 'Process Monitor' #catalogID: #pdp ) #bounds: #(#{Graphics.Rectangle} 426 361 1024 768 ) #flags: 4 #menu: #menu ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.SliderSpec} #layout: #(#{Graphics.LayoutFrame} 90 0 20 0 -110 1 49 0 ) #name: #Slider1 #model: #intervalHolder #helpText: #(#{Kernel.UserMessage} #key: #SetSamplingInterval #defaultString: 'Set sampling interval' #catalogID: #pdp ) #orientation: #horizontal #start: 250 #stop: 5000 #step: 50 ) #(#{UI.InputFieldSpec} #layout: #(#{Graphics.LayoutFrame} -100 1 19 0 -35 1 44 0 ) #name: #InputField1 #model: #intervalHolder #helpText: #(#{Kernel.UserMessage} #key: #SetSamplingInterval #defaultString: 'Set sampling interval' #catalogID: #pdp ) #type: #number ) #(#{UI.LabelSpec} #layout: #(#{Graphics.LayoutOrigin} -30 1 21 0 ) #name: #Label1 #label: #(#{Kernel.UserMessage} #key: #ms #defaultString: 'ms' #catalogID: #pdp ) ) #(#{UI.GroupBoxSpec} #layout: #(#{Graphics.LayoutFrame} 2 0 0 0 -2 1 55 0 ) #name: #GroupBox1 #label: #(#{Kernel.UserMessage} #key: #Sample #defaultString: 'Sample' #catalogID: #pdp ) ) #(#{UI.ActionButtonSpec} #layout: #(#{Graphics.Rectangle} 13 20 77 45 ) #name: #sampleCntrl #model: #toggleSampling #helpText: #(#{Kernel.UserMessage} #key: #ControlSamplingProcess #defaultString: 'Control sampling process' #catalogID: #pdp ) #label: #sampleCntrlLabel #defaultable: true ) #(#{UI.TextEditorSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 -28 1 0 0.5 0 1 ) #name: #numProcsLbl #flags: 12 #model: #numProcHolder #helpText: #(#{Kernel.UserMessage} #key: #NumberOfProcesses #defaultString: 'Number of processes' #catalogID: #pdp ) #isReadOnly: true #tabRequiresControl: true #isWrapped: false ) #(#{UI.TextEditorSpec} #layout: #(#{Graphics.LayoutFrame} 1 0.5 -28 1 0 1 0 1 ) #name: #TextEditor1 #flags: 12 #model: #memSizeHolder #helpText: #(#{Kernel.UserMessage} #key: #AmountOfAllocatedMemory #defaultString: 'Amount of allocated memory' #catalogID: #pdp ) #isReadOnly: true #tabRequiresControl: true #isWrapped: false ) #(#{UI.TabControlSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 60 0 0 1 -30 1 ) #name: #tabControl #model: #tabs #callbacksSpec: #(#{UI.UIEventCallbackSubSpec} #valueChangeSelector: #tabsChanged ) #tabable: false #labels: #() ) ) ) )
</methods> <methods> CraftedSmalltalk.ProcessMonitorClient class <category>resources</category>
menu "Tools.MenuEditor new openOnClass: self andSelector: #menu" <resource: #menu> ^#(#{UI.Menu} #( #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Monitor #defaultString: '&Monitor' #catalogID: #pdp ) #submenu: #(#{UI.Menu} #( #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_ProceedAllPaused #defaultString: '&Proceed All Paused' #catalogID: #pdp ) #value: #proceedAllProcesses ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #Proceed_AllAndClose #defaultString: 'Proceed &All and Close' #catalogID: #pdp ) #value: #proceedAllAndExit ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Close #defaultString: '&Close' #catalogID: #pdp ) #value: #exit ) ) #(2 1 ) nil ) ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #Process #defaultString: '&Process' #catalogID: #pdp ) #submenu: #(#{UI.Menu} #( #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Inspect #defaultString: '&Inspect' #catalogID: #pdp ) #value: #inspectProcess #enablementSelector: #menuCommandEnablement #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #inspect ) ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_ViewStack #defaultString: '&View Stack' #catalogID: #pdp ) #value: #viewProcess #enablementSelector: #menuCommandEnablement ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #Dump_StackDots #defaultString: 'Dump &Stack...' #catalogID: #pdp ) #value: #dumpProcess #enablementSelector: #menuCommandEnablement #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #fileSave ) ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Debug #defaultString: '&Debug' #catalogID: #pdp ) #value: #debugProcess #enablementSelector: #enableDebug ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_ChangePriorityDots #defaultString: '&Change Priority...' #catalogID: #pdp ) #value: #changeProcessPriority #enablementSelector: #menuCommandEnablement ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Proceed #defaultString: '&Proceed' #catalogID: #pdp ) #value: #proceedProcess #enablementSelector: #enableProceed #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #debugRun ) ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_TerminateDots #defaultString: '&Terminate...' #catalogID: #pdp ) #value: #terminateProcess #enablementSelector: #menuCommandEnablement #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #delete ) ) ) #(3 3 1 ) nil ) ) ) #(2 ) nil ) decodeAsLiteralArray
processMenu "Tools.MenuEditor new openOnClass: self andSelector: #processMenu" <resource: #menu> ^#(#{UI.Menu} #( #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Inspect #defaultString: '&Inspect' #catalogID: #pdp ) #value: #inspectProcess #enablementSelector: #menuCommandEnablement #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #inspect ) ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_ViewStack #defaultString: '&View Stack' #catalogID: #pdp ) #value: #viewProcess #enablementSelector: #menuCommandEnablement ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #Dump_StackDots #defaultString: 'Dump &Stack...' #catalogID: #pdp ) #value: #dumpProcess #enablementSelector: #menuCommandEnablement #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #fileSave ) ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Debug #defaultString: '&Debug' #catalogID: #pdp ) #value: #debugProcess #enablementSelector: #enableDebug ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_ChangePriorityDots #defaultString: '&Change Priority...' #catalogID: #pdp ) #value: #changeProcessPriority #enablementSelector: #menuCommandEnablement ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_Proceed #defaultString: '&Proceed' #catalogID: #pdp ) #value: #proceedProcess #enablementSelector: #enableProceed #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #debugRun ) ) #(#{UI.MenuItem} #rawLabel: #(#{Kernel.UserMessage} #key: #_TerminateDots #defaultString: '&Terminate...' #catalogID: #pdp ) #value: #terminateProcess #enablementSelector: #menuCommandEnablement #labelImage: #(#{UI.ResourceRetriever} #{ToolbarIconLibrary} #delete ) ) ) #(3 3 1 ) nil ) decodeAsLiteralArray
</methods> <methods> Tools.VisualLauncher <category>actions</category>
openProcessMonitor <menuItem: #(#OpenProcess_Monitor #pdp 'Open Process &Monitor') icon: nil nameKey: nil menu: #(#menuBar #probes) position: 100> ProcessMonitorService open
</methods> <initialize> CraftedSmalltalk.ProcessMonitorClient </initialize> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>Object</name> <environment>Core</environment> <super></super> <private>false</private> none <imports></imports> <category>Kernel-Objects</category> <attributes> <package>Kernel-Objects</package> </attributes> </class> <class> <name>Model</name> <environment>UI</environment> <super>Core.Object</super> <private>false</private> none dependents <imports></imports> <category>Kernel-Objects</category> <attributes> <package>Kernel-Objects</package> </attributes> </class> <class> <name>ApplicationModel</name> <environment>UI</environment> <super>UI.Model</super> <private>false</private> none builder uiSession eventHandlers savedWindowInformation <imports></imports> <category>UIBuilder-Framework</category> <attributes> <package>UIBuilder-Framework</package> </attributes> </class> <class> <name>CompiledCode</name> <environment>Kernel</environment> <super>Core.Object</super> <private>false</private> objects bytes <imports> private Kernel.OpcodePool.* </imports> <category>Kernel-Methods</category> <attributes> <package>Kernel-Methods</package> </attributes> </class> <class> <name>VisualLauncher</name> <environment>Tools</environment> <super>UI.ApplicationModel</super> <private>false</private> none menuBar toolBar textCollector toolDock <imports></imports> <category>Tools-Misc</category> <attributes> <package>Tools-Misc</package> </attributes> </class> <class> <name>Process</name> <environment>Kernel</environment> <super>Core.Link</super> <private>false</private> none suspendedContext priority myList depth hostThreadKey interruptProtect environment isSystem name debugger locale <imports></imports> <category>Kernel-Processes</category> <attributes> <package>Kernel-Processes</package> </attributes> </class>