<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Also allow the ProcessBrowser to suspend the UI propcess, spawning a new one if it does so.</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Yes! Thanks :-)</span></span></div><div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Best,</span></span></div><div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Marcel</span></span></div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
<p style='color: #AAAAAA; margin-top: 10px;'>Am 14.11.2020 06:11:49 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style='font-family:Arial,Helvetica,sans-serif'>Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>http://source.squeak.org/trunk/Tools-eem.1016.mcz<br><br>==================== Summary ====================<br><br>Name: Tools-eem.1016<br>Author: eem<br>Time: 13 November 2020, 9:11:29.559774 pm<br>UUID: 2bb4d3c0-32cd-49c7-b9c5-f04bed33c416<br>Ancestors: Tools-mt.1015<br><br>Have the ProcessBrowser maintain a stackDepth variable and allow moreStack to grow it by a factor of two (we can add lessStack too). fullStack can be dangerous for very deep stacks.<br><br>Also allow the ProcessBrowser to suspend the UI propcess, spawning a new one if it does so. being able to suspend the UI process is a very useful facility I need right now in debugging the multi-threaded VM.<br><br>=============== Diff against Tools-mt.1015 ===============<br><br>Item was changed:<br> Model subclass: #ProcessBrowser<br>+ instanceVariableNames: 'selectedProcess selectedContext methodText processList processListIndex stackList stackListIndex stackDepth sourceMap selectedClass selectedSelector searchString autoUpdateProcess lastUpdate startedCPUWatcher'<br>- instanceVariableNames: 'selectedProcess selectedContext methodText processList processListIndex stackList stackListIndex sourceMap selectedClass selectedSelector searchString autoUpdateProcess lastUpdate startedCPUWatcher'<br> classVariableNames: 'Browsers SuspendedProcesses WellKnownProcesses'<br> poolDictionaries: ''<br> category: 'Tools-Process Browser'!<br> <br> !ProcessBrowser commentStamp: '<historical>' prior: 0!<br> Change Set: ProcessBrowser<br> Date: 14 March 2000<br> Author: Ned Konz<br> <br> email: ned@bike-nomad.com<br> <br> This is distributed under the Squeak License.<br> <br> Added 14 March:<br> CPUWatcher integration<br> automatically start and stop CPUWatcher<br> added CPUWatcher to process list menu<br> <br> Added 29 October:<br> MVC version<br> 2.8, 2.7 compatibility<br> rearranged menus<br> added pointer inspection and chasing<br> added suspend/resume<br> recognized more well-known processes<br> misc. bug fixes<br> <br> Added 26 October: highlight pc in source code<br> Added 27 October: added 'signal semaphore'<br> added 'inspect receiver', 'explore receiver', 'message tally' to stack list menu<br> added 'find context', 'next context' to process list menu<br> added 'change priority' and 'debug' choices to process list menu<br> <br> 27 October mods by Bob Arning:<br> <br> alters process display in Ned's ProcessBrowser to <br> - show process priority<br> - drop 'a Process in' that appears on each line<br> - show in priority order<br> - prettier names for known processes<br> - fix to Utilities to forget update downloading process when it ends (1 less dead<br> process)<br> - correct stack dump for the active process<br> !<br><br>Item was changed:<br> ----- Method: ProcessBrowser class>>registerWellKnownProcesses (in category 'class initialization') -----<br> registerWellKnownProcesses<br> "Associate each well-known process with a nickname and two flags: allow-stop, and allow-debug.<br> Additional processes may be added to this list as required"<br> <br> WellKnownProcesses := OrderedCollection new.<br> self registerWellKnownProcess: []<br> label: 'no process'<br> allowStop: false<br> allowDebug: false.<br> self registerWellKnownProcess: [Smalltalk lowSpaceWatcherProcess]<br> label: 'the low space watcher'<br> allowStop: false<br> allowDebug: false.<br> self registerWellKnownProcess: [WeakArray runningFinalizationProcess]<br> label: 'the WeakArray finalization process'<br> allowStop: false<br> allowDebug: false.<br> self registerWellKnownProcess: [Processor activeProcess]<br> label: 'the UI process'<br>+ allowStop: true<br>- allowStop: false<br> allowDebug: true.<br> self registerWellKnownProcess: [Processor backgroundProcess]<br> label: 'the idle process'<br> allowStop: false<br> allowDebug: false.<br> self registerWellKnownProcess: [Sensor interruptWatcherProcess]<br> label: 'the user interrupt watcher'<br> allowStop: false<br> allowDebug: false.<br> self registerWellKnownProcess: [Sensor eventTicklerProcess]<br> label: 'the event tickler'<br> allowStop: false<br> allowDebug: false.<br> self registerWellKnownProcess: [Project uiProcess]<br> label: 'the inactive Morphic UI process'<br>+ allowStop: true<br>- allowStop: false<br> allowDebug: false.<br> " self registerWellKnownProcess:<br> [Smalltalk at: #SoundPlayer ifPresent: [:sp | sp playerProcess]]<br> label: 'the Sound Player'<br> allowStop: false<br> allowDebug: false."<br> self registerWellKnownProcess:<br> [ScheduledControllers ifNotNil: [ScheduledControllers activeControllerProcess]]<br> label: 'the inactive MVC controller process'<br> allowStop: false<br> allowDebug: true.<br> self registerWellKnownProcess:<br> [Smalltalk at: #CPUWatcher ifPresent: [:cw | cw currentWatcherProcess]]<br> label: 'the CPUWatcher'<br> allowStop: false<br> allowDebug: false<br> !<br><br>Item was added:<br>+ ----- Method: ProcessBrowser>>fullStack (in category 'stack list') -----<br>+ fullStack<br>+ stackDepth := SmallInteger maxVal.<br>+ self updateStackList!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>initialize (in category 'initialize-release') -----<br> initialize<br>+ methodText := ''..<br>+ stackDepth := 20.<br>- methodText := ''.<br> stackListIndex := 0.<br> searchString := ''.<br> lastUpdate := 0.<br> startedCPUWatcher := CPUWatcher cpuWatcherEnabled and: [ self startCPUWatcher ].<br> self updateProcessList; processListIndex: 1.<br> Browsers add: self!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>moreStack (in category 'stack list') -----<br> moreStack<br>+ stackDepth := stackDepth + stackDepth.<br>+ self updateStackList!<br>- self updateStackList: 2000!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>processListKey:from: (in category 'process list') -----<br> processListKey: aKey from: aView<br> <br> aKey<br> caseOf: {<br> [$f] -> [^ self findContext].<br> [$g] -> [^ self nextContext].<br> [$a] -> [^ self toggleAutoUpdate].<br> [$u] -> [^ self updateProcessList] }<br> otherwise: [].<br> selectedProcess ifNil: [^ self changed: #flash].<br> ^ aKey<br> caseOf: {<br> [$i] -> [self inspectProcess].<br> [$I] -> [self exploreProcess].<br> [$c] -> [self chasePointers].<br> [$P] -> [self inspectPointers].<br> [$t] -> [self terminateProcess].<br> [$r] -> [self resumeProcess].<br> [$s] -> [self suspendProcess].<br> [$d] -> [self debugProcess].<br> [$p] -> [self changePriority].<br> [$m] -> [self messageTally].<br> [$S] -> [self signalSemaphore].<br>+ [$k] -> [self fullStack]}<br>- [$k] -> [self moreStack]}<br> otherwise: [self arrowKey: aKey from: aView]!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>processListMenu: (in category 'process list') -----<br> processListMenu: menu<br> <br> selectedProcess ifNotNil:<br> [:process|<br> [:name :allowStop :allowDebug|<br> menu addList: #(('inspect (i)' inspectProcess) ('explore (I)' exploreProcess) ('inspect Pointers (P)' inspectPointers)).<br> (Smalltalk includesKey: #PointerFinder) ifTrue:<br> [menu add: 'chase pointers (c)' action: #chasePointers].<br> allowStop ifTrue:<br> [menu add: 'terminate (t)' action: #terminateProcess.<br> process isSuspended<br> ifTrue: [menu add: 'resume (r)' action: #resumeProcess]<br> ifFalse: [menu add: 'suspend (s)' action: #suspendProcess]].<br> allowDebug ifTrue:<br> [menu addList: #(('change priority (p)' changePriority) ('debug (d)' debugProcess))].<br> menu add: 'profile messages (m)' action: #messageTally.<br> (process suspendingList isKindOf: Semaphore) ifTrue:<br> [menu add: 'signal Semaphore (S)' action: #signalSemaphore].<br>+ menu addList: #(('full stack (k)' fullStack) ('copy stack to clipboard' copyProcessStackToClipboard)).<br>- menu addList: #(('full stack (k)' moreStack) ('copy stack to clipboard' copyProcessStackToClipboard)).<br> menu addLine] valueWithArguments: (self nameAndRulesFor: process)].<br> <br> menu<br> addList: #(#('find context... (f)' findContext) #('find again (g)' nextContext));<br> addLine;<br> add: (self isAutoUpdating<br> ifTrue: ['turn off auto-update (a)']<br> ifFalse: ['turn on auto-update (a)'])<br> action: #toggleAutoUpdate;<br> add: 'update list (u)' action: #updateProcessList.<br> <br> (Smalltalk at: #CPUWatcher ifAbsent: []) ifNotNil:<br> [:pw|<br> menu addLine.<br> pw isMonitoring<br> ifTrue: [menu add: 'stop CPUWatcher' action: #stopCPUWatcher]<br> ifFalse: [menu add: 'start CPUWatcher' action: #startCPUWatcher]].<br> <br> ^menu!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>stackListMenu: (in category 'stack list') -----<br> stackListMenu: aMenu <br>+ selectedContext ifNil: [^aMenu].<br>+ ^aMenu<br>- | menu |<br>- selectedContext<br>- ifNil: [^ aMenu].<br>- menu := aMenu<br> labels: 'inspect context (c)<br> explore context (C)<br> inspect receiver (i)<br> explore receiver (I)<br>+ browse (b)<br>+ more stack'<br>+ lines: #(2 4 5)<br>+ selections: #(#inspectContext #exploreContext #inspectReceiver #exploreReceiver #browseContext moreStack)!<br>- browse (b)'<br>- lines: #(2 4 )<br>- selections: #(#inspectContext #exploreContext #inspectReceiver #exploreReceiver #browseContext ).<br>- ^ menu!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>suspendProcess (in category 'process actions') -----<br> suspendProcess<br> | nameAndRules |<br>+ selectedProcess isSuspended ifTrue:<br>+ [^self].<br>- selectedProcess isSuspended<br>- ifTrue: [^ self].<br> nameAndRules := self nameAndRulesForSelectedProcess.<br>+ nameAndRules second ifFalse:<br>+ [self inform: 'Nope, won''t suspend ' , nameAndRules first.<br>+ ^self].<br>+ selectedProcess == Project current uiProcess ifTrue:<br>+ [Project current spawnNewProcessIfThisIsUI: selectedProcess.<br>+ WorldState addDeferredUIMessage: [self updateProcessList]].<br>- nameAndRules second<br>- ifFalse: [self inform: 'Nope, won''t suspend ' , nameAndRules first.<br>- ^ self].<br> self class suspendProcess: selectedProcess.<br> self updateProcessList!<br><br>Item was changed:<br> ----- Method: ProcessBrowser>>updateStackList (in category 'stack list') -----<br> updateStackList<br>+ self updateStackList: stackDepth!<br>- self updateStackList: 20!<br><br><br></historical></div></blockquote>
</div></body>