Squeak Class Documentation category index | class index  
 
ProcessBrowser
  category: Tools-Process Browser
  superclass: Model
  subclasses:

Change Set: ProcessBrowser
Date: 14 March 2000
Author: Ned Konz

email: ned@bike-nomad.com

This is distributed under the Squeak License.

Added 14 March:
CPUWatcher integration
automatically start and stop CPUWatcher
added CPUWatcher to process list menu

Added 29 October:
MVC version
2.8, 2.7 compatibility
rearranged menus
added pointer inspection and chasing
added suspend/resume
recognized more well-known processes
misc. bug fixes

Added 26 October: highlight pc in source code
Added 27 October: added 'signal semaphore'
added 'inspect receiver', 'explore receiver', 'message tally' to stack list menu
added 'find context', 'next context' to process list menu
added 'change priority' and 'debug' choices to process list menu

27 October mods by Bob Arning:

alters process display in Ned's ProcessBrowser to
- show process priority
- drop 'a Process in' that appears on each line
- show in priority order
- prettier names for known processes
- fix to Utilities to forget update downloading process when it ends (1 less dead
process)
- correct stack dump for the active process

instance methods
  accessing
  processList
processListIndex
processListIndex:
selectedMethod
selectedSelector
stackList
stackListIndex
stackListIndex:
text

  initialize-release
  initialize
startCPUWatcher
stopCPUWatcher
windowIsClosing

  menus
  selectedClass

  message handling
  perform:orSendTo:

  process actions
  changePriority
chasePointers
debugProcess
inspectPointers
nameAndRulesFor:
nameAndRulesForSelectedProcess
resumeProcess
signalSemaphore
suspendProcess
terminateProcess
wasProcessSuspendedByProcessBrowser:

  process list
  exploreProcess
findContext
inspectProcess
nextContext
notify:at:in:
prettyNameForProcess:
processListKey:from:
processListMenu:
processNameList
updateProcessList

  stack list
  browseContext
changeStackListTo:
exploreContext
exploreReceiver
inspectContext
inspectReceiver
messageTally
moreStack
pcRange
stackListMenu:
stackNameList
updateStackList
updateStackList:

  updating
  isAutoUpdating
setUpdateCallbackAfter:
startAutoUpdate
stopAutoUpdate
toggleAutoUpdate

  views
  asPrototypeInWindow
hasView
openAsMVC
openAsMorph
stackListKey:from:

class methods
  CPU utilization
  dumpTallyOnTranscript:
tallyCPUUsageFor:
tallyCPUUsageFor:every:

  instance creation
  new
open
prototypicalToolWindow

  process control
  debugProcess:
isUIProcess:
nameAndRulesFor:
resumeProcess:
setProcess:toPriority:
suspendProcess:
suspendedProcesses
terminateProcess:
wasProcessSuspendedByProcessBrowser:

instance methods
  accessing top  
 

processList


 

processListIndex


 

processListIndex:


 

selectedMethod


 

selectedSelector

Answer the class in which the currently selected context's method was
found.


 

stackList


 

stackListIndex


 

stackListIndex:


 

text


  initialize-release top  
 

initialize


 

startCPUWatcher

Answers whether I started the CPUWatcher


 

stopCPUWatcher


 

windowIsClosing

This message is used to inform a models that its window is closing. Most models do nothing, but some, such as the Debugger, must do some cleanup. Note that this mechanism must be used with care by models that support multiple views, since one view may be closed while others left open.


  menus top  
 

selectedClass

Answer the class in which the currently selected context's method was
found.


  message handling top  
 

perform:orSendTo:

Selector was just chosen from a menu by a user. If can respond, then
perform it on myself. If not, send it to otherTarget, presumably the
editPane from which the menu was invoked.


  process actions top  
 

changePriority


 

chasePointers


 

debugProcess


 

inspectPointers


 

nameAndRulesFor:

Answer a nickname and two flags: allow-stop, and allow-debug


 

nameAndRulesForSelectedProcess

Answer a nickname and two flags: allow-stop, and allow-debug


 

resumeProcess


 

signalSemaphore


 

suspendProcess


 

terminateProcess


 

wasProcessSuspendedByProcessBrowser:


  process list top  
 

exploreProcess


 

findContext


 

inspectProcess


 

nextContext


 

notify:at:in:

A syntax error happened when I was trying to highlight my pc.
Raise a signal so that it can be ignored.


 

prettyNameForProcess:


 

processListKey:from:


 

processListMenu:


 

processNameList

since processList is a WeakArray, we have to strengthen the result


 

updateProcessList


  stack list top  
 

browseContext


 

changeStackListTo:


 

exploreContext


 

exploreReceiver


 

inspectContext


 

inspectReceiver


 

messageTally


 

moreStack


 

pcRange

Answer the indices in the source code for the method corresponding to
the selected context's program counter value.


 

stackListMenu:


 

stackNameList


 

updateStackList


 

updateStackList:


  updating top  
 

isAutoUpdating


 

setUpdateCallbackAfter:


 

startAutoUpdate


 

stopAutoUpdate


 

toggleAutoUpdate


  views top  
 

asPrototypeInWindow

Create a pluggable version of me, answer a window


 

hasView


 

openAsMVC

Create a pluggable version of me, answer a window


 

openAsMorph

Create a pluggable version of me, answer a window


 

stackListKey:from:


class methods
  CPU utilization top  
 

dumpTallyOnTranscript:

tally is from ProcessorScheduler>>tallyCPUUsageFor:
Dumps lines with percentage of time, hash of process, and a friendly name


 

tallyCPUUsageFor:

Compute CPU usage using a 10-msec sample for the given number of seconds,
then dump the usage statistics on the Transcript. The UI is free to continue, meanwhile


 

tallyCPUUsageFor:every:

Compute CPU usage using a msec millisecond sample for the given number of seconds,
then dump the usage statistics on the Transcript. The UI is free to continue, meanwhile


  instance creation top  
 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


 

open

ProcessBrowser open


 

prototypicalToolWindow

Answer a window representing a prototypical instance of the receiver


  process control top  
 

debugProcess:


 

isUIProcess:


 

nameAndRulesFor:

Answer a nickname and two flags: allow-stop, and allow-debug


 

resumeProcess:


 

setProcess:toPriority:


 

suspendProcess:


 

suspendedProcesses

Answer a collection of processes that my instances have suspended.
This is so that they don't get garbage collected.


 

terminateProcess:


 

wasProcessSuspendedByProcessBrowser: