author | Claus Gittinger <cg@exept.de> |
Tue, 13 Feb 2001 16:01:20 +0100 | |
changeset 2981 | 39df54f7d6b2 |
parent 2768 | 539b96324cdf |
child 3000 | e794a357d7cb |
permissions | -rw-r--r-- |
52 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
2768 | 13 |
"{ Package: 'stx:libtool' }" |
14 |
||
982 | 15 |
SystemStatusMonitor subclass:#ProcessMonitor |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
16 |
instanceVariableNames:'processes hideDead runColor suspendedColor waitColor cpuUsages |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
17 |
showDetail' |
315
8a86faf847d1
create a new updateProcess when restarted
Claus Gittinger <cg@exept.de>
parents:
314
diff
changeset
|
18 |
classVariableNames:'' |
8a86faf847d1
create a new updateProcess when restarted
Claus Gittinger <cg@exept.de>
parents:
314
diff
changeset
|
19 |
poolDictionaries:'' |
1053 | 20 |
category:'Monitors-ST/X' |
19 | 21 |
! |
22 |
||
771
5cd10b4845f3
oops - catching the terminateSignal is no good idea
Claus Gittinger <cg@exept.de>
parents:
682
diff
changeset
|
23 |
!ProcessMonitor class methodsFor:'documentation'! |
52 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
This view shows smalltalks (light-weight) processes, and also offers |
|
42 |
a popup menu for various useful operations on them. |
|
43 |
Especially 'debug' is useful, to see what a process is currently |
|
44 |
doing. |
|
85 | 45 |
|
52 | 46 |
The information shown is: |
1896 | 47 |
id - the numeric id of the process |
48 |
name - the name (if any) of the process |
|
49 |
(the name has no semantic meaning; it exists for the processMonitor only) |
|
50 |
state - what is it doing; |
|
51 |
wait - waiting on a semaphore |
|
52 |
eventWait - waiting on a view-event semaphore |
|
53 |
ioWait - waiting on an io-semaphore |
|
54 |
timeWait - waiting for a time-semaphore |
|
55 |
run - run, but currently not scheduled |
|
56 |
active - really running (this info is useless, since at |
|
57 |
update time, its always the update process which is |
|
58 |
running) |
|
59 |
suspended - suspended; not waiting on a semaphore |
|
60 |
light - not yet started (i.e. has no stack yet) |
|
52 | 61 |
|
1896 | 62 |
prio - the processes priority (1..30) |
63 |
usedStack - the current stack use |
|
64 |
totalStack - the stack currently allocated (i.e. the maximum ever needed) |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
65 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
66 |
[see also:] |
1896 | 67 |
Process ProcessorScheduler |
68 |
WindowGroup |
|
69 |
SemaphoreMonitor |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
70 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
71 |
[author:] |
1896 | 72 |
Claus Gittinger |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
73 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
74 |
[start with:] |
1896 | 75 |
ProcessMonitor open |
52 | 76 |
" |
77 |
! ! |
|
78 |
||
771
5cd10b4845f3
oops - catching the terminateSignal is no good idea
Claus Gittinger <cg@exept.de>
parents:
682
diff
changeset
|
79 |
!ProcessMonitor class methodsFor:'defaults'! |
19 | 80 |
|
56 | 81 |
defaultIcon |
82 |
|i| |
|
19 | 83 |
|
93 | 84 |
i := Image fromFile:'ProcMon.xbm'. |
56 | 85 |
i notNil ifTrue:[^ i]. |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
86 |
^ super defaultIcon |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
87 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
88 |
"Modified: 23.1.1997 / 02:52:31 / cg" |
208 | 89 |
! |
90 |
||
91 |
defaultLabel |
|
92 |
^ 'Process Monitor' |
|
1300 | 93 |
! |
94 |
||
95 |
nameLengthInList |
|
96 |
^ 30 |
|
97 |
||
98 |
"Created: 21.8.1997 / 15:42:05 / cg" |
|
85 | 99 |
! ! |
100 |
||
101 |
!ProcessMonitor methodsFor:'drawing'! |
|
102 |
||
103 |
titleLine |
|
109 | 104 |
showDetail ifTrue:[ |
1896 | 105 |
Processor supportDynamicPriorities ifTrue:[ |
1792 | 106 |
^ 'id group name state prio usedStack totalStack current-segment switch where'. |
1896 | 107 |
]. |
1792 | 108 |
^ 'id group name state prio usedStack totalStack current-segment switch where'. |
109 | 109 |
]. |
1791 | 110 |
^ 'id group name state prio where '. |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
111 |
|
1504 | 112 |
"Modified: / 3.7.1996 / 13:57:38 / stefan" |
1792 | 113 |
"Modified: / 3.8.1998 / 23:20:24 / cg" |
85 | 114 |
! |
115 |
||
116 |
updateList |
|
117 |
"update list of processes" |
|
118 |
||
119 |
|newList| |
|
120 |
||
121 |
shown ifTrue:[ |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
122 |
newList := self getProcessList. |
85 | 123 |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
124 |
"sort by id - take care of nil ids of dead processes" |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
125 |
newList sort:[:p1 :p2 | |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
126 |
|id1 id2| |
85 | 127 |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
128 |
(p1 isNil or:[(id1 := p1 id) isNil]) |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
129 |
ifTrue:[true] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
130 |
ifFalse:[ |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
131 |
(p2 isNil or:[(id2 := p2 id) isNil]) |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
132 |
ifTrue:[false] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
133 |
ifFalse:[id1 < id2] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
134 |
] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
135 |
]. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
136 |
newList ~= processes ifTrue:[ |
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
137 |
self updateStatus:newList |
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
138 |
]. |
85 | 139 |
]. |
140 |
updateBlock notNil ifTrue:[ |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
141 |
Processor removeTimedBlock:listUpdateBlock. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
142 |
Processor addTimedBlock:listUpdateBlock afterSeconds:listUpdateDelay |
85 | 143 |
]. |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
144 |
|
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
145 |
"Modified: / 3.7.1996 / 13:37:29 / stefan" |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
146 |
"Modified: / 14.12.1999 / 20:50:14 / cg" |
85 | 147 |
! |
148 |
||
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
149 |
updateStatus:newProcessList |
85 | 150 |
"update status display of processes" |
151 |
||
1009 | 152 |
|oldList list line dIndex interrupted contextCount |
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
153 |
aProcess nm st n found running sel space oldSelection |
1301 | 154 |
newSelection numHeaderLines nameLength index |
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
155 |
con c totalStack sender id gId r skipping| |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
156 |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
157 |
numHeaderLines := 2. |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
158 |
space := Character space. |
1300 | 159 |
nameLength := self class nameLengthInList. |
85 | 160 |
|
161 |
shown ifTrue:[ |
|
2176 | 162 |
oldList := listView list. |
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
163 |
|
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
164 |
oldSelection := listView selection. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
165 |
oldSelection notNil ifTrue:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
166 |
oldSelection := oldSelection collect:[:idx | |pI| |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
167 |
pI := idx-numHeaderLines. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
168 |
(pI > processes size or:[pI < 1]) ifTrue:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
169 |
nil |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
170 |
] ifFalse:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
171 |
processes at:pI |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
172 |
] |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
173 |
]. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
174 |
newSelection := OrderedCollection new. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
175 |
]. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
176 |
|
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
177 |
newProcessList notNil ifTrue:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
178 |
processes := WeakArray withAll:newProcessList. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
179 |
]. |
2176 | 180 |
processes notNil ifTrue:[ |
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
181 |
|
2176 | 182 |
list := OrderedCollection new:(processes size + numHeaderLines). |
183 |
list add:self titleLine. |
|
184 |
list add:(String new:self titleLine size withAll:$-). |
|
85 | 185 |
|
2176 | 186 |
interrupted := Processor interruptedProcess. |
85 | 187 |
|
2176 | 188 |
dIndex := 1. |
189 |
index := 1. |
|
1301 | 190 |
|
2176 | 191 |
"/ use while-loop; |
192 |
"/ processList may change size .... |
|
85 | 193 |
|
2176 | 194 |
[index <= processes size] whileTrue:[ |
195 |
aProcess := processes at:index. |
|
196 |
index := index + 1. |
|
1301 | 197 |
|
2176 | 198 |
(aProcess notNil |
199 |
and:[aProcess ~~ 0]) ifTrue:[ |
|
200 |
((id := aProcess id) notNil or:[hideDead not]) ifTrue:[ |
|
201 |
line := WriteStream on:(String new:200). |
|
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
202 |
|
2176 | 203 |
id printOn:line paddedTo:6. |
204 |
gId := aProcess processGroupId. |
|
2473 | 205 |
((gId == id) or:[gId isNil]) ifTrue:[ |
2176 | 206 |
"/ a group leader |
207 |
'- ' printOn:line. |
|
208 |
] ifFalse:[ |
|
209 |
gId printOn:line paddedTo:6. |
|
210 |
]. |
|
663
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
211 |
|
2176 | 212 |
(nm := aProcess name) isNil ifFalse:[ |
213 |
nm := nm printStringPaddedTo:(nameLength-1). |
|
214 |
nm size >= nameLength ifTrue:[ |
|
215 |
nm := (nm contractTo:(nameLength-1)). |
|
216 |
]. |
|
217 |
line nextPutAll:nm; nextPut:space. |
|
218 |
] ifTrue:[ |
|
219 |
line next:(nameLength) put:space. |
|
220 |
]. |
|
680 | 221 |
"/ n := cpuUsages at:(id) ifAbsent:[0]. |
85 | 222 |
"/ n ~~ 0 ifTrue:[ |
223 |
"/ line := line , ((n * 4) printStringLeftPaddedTo:3) |
|
224 |
"/ ] ifFalse:[ |
|
225 |
"/ line := line , ' ' |
|
226 |
"/ ]. |
|
2176 | 227 |
st := aProcess state. |
228 |
(st == #run |
|
229 |
and:[aProcess == interrupted]) ifTrue:[ |
|
230 |
c := ' *'. |
|
231 |
running := true. |
|
232 |
] ifFalse:[ |
|
233 |
[ |
|
234 |
(Processor scheduledProcesses includes:aProcess) ifTrue:[ |
|
235 |
c := ' +' |
|
236 |
] ifFalse:[ |
|
237 |
c := ' '. |
|
238 |
]. |
|
239 |
] valueUninterruptably. |
|
240 |
running := false. |
|
241 |
]. |
|
242 |
line nextPutAll:c; nextPutAll:(st printStringPaddedTo:9). |
|
243 |
line nextPutAll:(aProcess priority printStringLeftPaddedTo:3). |
|
143 | 244 |
|
2176 | 245 |
(showDetail |
246 |
and:[Processor supportDynamicPriorities]) ifTrue:[ |
|
247 |
(r := aProcess priorityRange) isNil ifTrue:[ |
|
248 |
line nextPutAll:' '. |
|
249 |
] ifFalse:[ |
|
250 |
line nextPutAll:(( |
|
251 |
' [' |
|
252 |
, (r start printString) |
|
253 |
, '..' |
|
254 |
, (r stop printString) |
|
255 |
, ']') paddedTo:7). |
|
256 |
]. |
|
257 |
]. |
|
1896 | 258 |
|
2176 | 259 |
con := aProcess suspendedContext. |
260 |
con isNil ifTrue:[ |
|
261 |
aProcess == Processor activeProcess ifTrue:[ |
|
262 |
con := thisContext |
|
263 |
] |
|
264 |
]. |
|
1896 | 265 |
|
2176 | 266 |
showDetail ifTrue:[ |
267 |
line nextPutAll:(aProcess usedStackSize printStringLeftPaddedTo:11). |
|
1791 | 268 |
|
2176 | 269 |
id == 0 ifTrue:[ |
270 |
line nextPutAll:('unlimited' leftPaddedTo:14). |
|
271 |
] ifFalse:[ |
|
272 |
n := aProcess numberOfStackSegments. |
|
273 |
line nextPutAll:(aProcess totalStackSize printStringLeftPaddedTo:10). |
|
274 |
line nextPutAll:(('(' , n printString , ')') paddedTo:4). |
|
275 |
]. |
|
276 |
con notNil ifTrue:[ |
|
277 |
line nextPutAll:' '. |
|
278 |
line nextPutAll:(((ObjectMemory addressOf:con) printStringRadix:16) leftPaddedTo:8 with:$0). |
|
279 |
line nextPutAll:' .. '. |
|
280 |
||
281 |
contextCount := 1. |
|
282 |
c := con. |
|
283 |
[(sender := c sender) notNil] whileTrue:[ |
|
284 |
c := sender. |
|
285 |
contextCount := contextCount + 1. |
|
286 |
]. |
|
287 |
line nextPutAll:(((ObjectMemory addressOf:c) printStringRadix:16) leftPaddedTo:8 with:$0). |
|
288 |
] ifFalse:[ |
|
289 |
line next:20 put:space. |
|
290 |
]. |
|
291 |
line nextPut:space. |
|
292 |
line nextPutAll:(aProcess numberOfStackBoundaryHits printStringLeftPaddedTo:6). |
|
293 |
]. |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
294 |
|
2176 | 295 |
con notNil ifTrue:[ |
296 |
c := con. |
|
297 |
found := false. |
|
298 |
running ifFalse:[ |
|
299 |
"/ search for a semaphore-wait in the top 10 contexts |
|
1009 | 300 |
|
2176 | 301 |
1 to:10 do:[:n | |
302 |
found ifFalse:[ |
|
303 |
c notNil ifTrue:[ |
|
304 |
(c receiver class == Semaphore) ifTrue:[ |
|
305 |
c selector == #wait ifTrue:[ |
|
306 |
found := true. |
|
307 |
] |
|
308 |
]. |
|
309 |
c := c sender. |
|
310 |
] |
|
311 |
] |
|
312 |
]. |
|
313 |
]. |
|
314 |
found ifFalse:[ |
|
315 |
"/ search for a non-processor, non-process |
|
316 |
"/ receiver in the top 10 contexts |
|
143 | 317 |
|
2176 | 318 |
c := con. |
319 |
1 to:10 do:[:n | |
|
320 |
|r| |
|
322
e3ccd5e431df
fixed context display (dont search for suspending context in running processes)
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
321 |
|
2176 | 322 |
found ifFalse:[ |
323 |
c notNil ifTrue:[ |
|
324 |
((r := c receiver) ~~ Processor |
|
325 |
and:[r class ~~ Process]) ifTrue:[ |
|
326 |
found := true. |
|
327 |
] ifFalse:[ |
|
328 |
c := c sender. |
|
329 |
] |
|
330 |
] |
|
331 |
] |
|
332 |
] |
|
333 |
]. |
|
334 |
found ifFalse:[ |
|
335 |
c := con |
|
336 |
]. |
|
413
715a6a18f825
better display of running processes context
Claus Gittinger <cg@exept.de>
parents:
409
diff
changeset
|
337 |
|
2176 | 338 |
"/ skip, until an interesting context is |
339 |
"/ found. |
|
340 |
"/ this skips intermediate contexts, which lead |
|
341 |
"/ to the sema-wait (for example, unwind blocks, |
|
342 |
"/ delay-stuff etc.) |
|
428
1c7406f57591
skip Process contexts in display
Claus Gittinger <cg@exept.de>
parents:
423
diff
changeset
|
343 |
|
2176 | 344 |
skipping := true. |
345 |
[skipping] whileTrue:[ |
|
346 |
skipping := false. |
|
347 |
(c notNil |
|
348 |
and:[c receiver == Delay |
|
349 |
or:[c receiver class == Delay]]) ifTrue:[ |
|
350 |
c := c sender. |
|
351 |
skipping := true. |
|
352 |
]. |
|
322
e3ccd5e431df
fixed context display (dont search for suspending context in running processes)
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
353 |
|
2176 | 354 |
[c notNil |
355 |
and:[c receiver isBlock |
|
356 |
and:[c selector startsWith:'value']]] whileTrue:[ |
|
357 |
c := c sender. |
|
358 |
skipping := true. |
|
359 |
]. |
|
1896 | 360 |
|
2176 | 361 |
[c notNil |
362 |
and:[c receiver == OperatingSystem |
|
363 |
and:[c selector == #unblockInterrupts]]] whileTrue:[ |
|
364 |
c := c sender. |
|
365 |
skipping := true. |
|
366 |
]. |
|
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
367 |
|
2176 | 368 |
[c notNil and:[c isBlockContext]] whileTrue:[ |
369 |
c := c home. |
|
370 |
skipping := true. |
|
371 |
]. |
|
372 |
]. |
|
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
373 |
|
2176 | 374 |
c notNil ifTrue:[ |
375 |
sel := c selector. |
|
376 |
sel isNil ifTrue:[ |
|
377 |
sel := '* unknown *' |
|
378 |
]. |
|
379 |
line nextPutAll:' '. |
|
380 |
line nextPutAll:c receiver class name. |
|
381 |
line nextPutAll:'>>'; nextPutAll:sel. |
|
382 |
] |
|
383 |
]. |
|
384 |
list add:line contents. |
|
385 |
processes at:dIndex put:aProcess. |
|
386 |
(oldSelection notNil and:[oldSelection includesIdentical:aProcess]) ifTrue:[ |
|
387 |
newSelection add:dIndex+numHeaderLines. |
|
388 |
]. |
|
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
389 |
|
2176 | 390 |
dIndex := dIndex + 1 |
391 |
] |
|
392 |
]. |
|
393 |
]. |
|
394 |
dIndex to:processes size do:[:index | |
|
395 |
processes at:index put:nil |
|
396 |
] |
|
397 |
]. |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
398 |
|
2176 | 399 |
"avoid flicker" |
400 |
(oldList notNil and:[oldList size == list size]) ifTrue:[ |
|
401 |
list keysAndValuesDo:[:idx :entry | |
|
402 |
(oldList at:idx) ~= entry ifTrue:[ |
|
403 |
listView at:idx put:entry |
|
404 |
] |
|
405 |
] |
|
406 |
] ifFalse:[ |
|
407 |
listView setList:list. |
|
408 |
"the first two entries cannot be selected" |
|
409 |
listView attributeAt:1 put:#disabled. |
|
410 |
listView attributeAt:2 put:#disabled. |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
411 |
|
2176 | 412 |
oldSelection notNil ifTrue:[ |
413 |
listView selection:newSelection. |
|
414 |
] |
|
415 |
]. |
|
2473 | 416 |
"/ cg: must flush here - drawing is done by a background process; |
417 |
"/ without the flush, the output may look ugly (delayed) |
|
418 |
listView flush |
|
85 | 419 |
]. |
420 |
updateBlock notNil ifTrue:[ |
|
2176 | 421 |
Processor removeTimedBlock:updateBlock. |
422 |
Processor addTimedBlock:updateBlock afterSeconds:updateDelay |
|
85 | 423 |
] |
322
e3ccd5e431df
fixed context display (dont search for suspending context in running processes)
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
424 |
|
1504 | 425 |
"Modified: / 3.7.1996 / 13:56:01 / stefan" |
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
426 |
"Created: / 14.12.1999 / 20:47:12 / cg" |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
427 |
"Modified: / 14.12.1999 / 20:50:59 / cg" |
143 | 428 |
! ! |
429 |
||
19 | 430 |
!ProcessMonitor methodsFor:'initialization'! |
431 |
||
432 |
initialize |
|
433 |
super initialize. |
|
434 |
||
45 | 435 |
hideDead := true. |
109 | 436 |
showDetail := Smalltalk at:#SystemDebugging ifAbsent:false. |
45 | 437 |
|
19 | 438 |
device hasColors ifTrue:[ |
1896 | 439 |
runColor := Color green. |
440 |
suspendedColor := Color yellow. |
|
441 |
waitColor := Color red. |
|
19 | 442 |
] ifFalse:[ |
1896 | 443 |
runColor := suspendedColor := waitColor := Color black |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
444 |
]. |
19 | 445 |
|
45 | 446 |
" |
447 |
ProcessMonitor open |
|
448 |
" |
|
315
8a86faf847d1
create a new updateProcess when restarted
Claus Gittinger <cg@exept.de>
parents:
314
diff
changeset
|
449 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
450 |
"Modified: 23.1.1997 / 02:51:38 / cg" |
85 | 451 |
! |
452 |
||
208 | 453 |
realize |
454 |
waitColor := waitColor on:device. |
|
455 |
runColor := runColor on:device. |
|
456 |
suspendedColor := suspendedColor on:device. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
457 |
super realize. |
56 | 458 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
459 |
"Modified: 23.1.1997 / 02:30:37 / cg" |
19 | 460 |
! ! |
461 |
||
462 |
!ProcessMonitor methodsFor:'menu actions'! |
|
463 |
||
208 | 464 |
abortProcess |
465 |
"abort (raise AbortSignal in) the selected process" |
|
466 |
||
467 |
self selectedProcessesDo:[:p | |
|
2768 | 468 |
p abort |
208 | 469 |
] |
470 |
! |
|
471 |
||
472 |
debugProcess |
|
473 |
"open a debugger on the selected process" |
|
474 |
||
475 |
self selectedProcessesDo:[:p | |
|
476 |
Debugger openOn:p |
|
477 |
] |
|
478 |
! |
|
479 |
||
1932 | 480 |
debugProcessWhenResumed |
481 |
self selectedProcessesDo:[:p | |
|
482 |
p onResumeDo:[:con | Debugger enter:con] |
|
483 |
] |
|
484 |
||
485 |
"Created: / 14.10.1998 / 15:50:07 / cg" |
|
486 |
"Modified: / 14.10.1998 / 16:06:08 / cg" |
|
487 |
! |
|
488 |
||
489 |
debugWhenResumed |
|
490 |
self selectedProcessesDo:[:p | |
|
491 |
p addInterruptAction:[Debugger enter] |
|
492 |
] |
|
493 |
||
494 |
"Created: / 14.10.1998 / 15:48:04 / cg" |
|
495 |
"Modified: / 14.10.1998 / 15:48:40 / cg" |
|
496 |
! |
|
497 |
||
1301 | 498 |
hardTerminateProcess |
499 |
"hard terminate the selected process" |
|
500 |
||
501 |
self selectedProcessesSend:#terminateNoSignal |
|
502 |
||
503 |
"Created: 22.8.1997 / 02:06:51 / cg" |
|
504 |
! |
|
505 |
||
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
506 |
hideDead:aBoolean |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
507 |
"turn on/off hiding of dead (already terminated) processes" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
508 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
509 |
hideDead := aBoolean |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
510 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
511 |
"Modified: 23.1.1997 / 02:34:01 / cg" |
208 | 512 |
! |
513 |
||
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
514 |
inspectSelection |
208 | 515 |
"open an inspector on the selected process" |
516 |
||
517 |
self selectedProcessesSend:#inspect |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
518 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
519 |
"Created: 23.1.1997 / 02:27:33 / cg" |
208 | 520 |
! |
521 |
||
522 |
lowerPrio |
|
523 |
"lower the selected processes priority" |
|
524 |
||
525 |
self selectedProcessesDo:[:p | |
|
526 |
p priority:(p priority - 1) |
|
527 |
] |
|
528 |
! |
|
529 |
||
530 |
raisePrio |
|
531 |
"raise the selected processes priority" |
|
143 | 532 |
|
533 |
self selectedProcessesDo:[:p | |
|
208 | 534 |
p priority:(p priority + 1) |
143 | 535 |
] |
536 |
! |
|
537 |
||
817 | 538 |
restartProcess |
539 |
"abort (raise AbortSignal in) the selected process" |
|
540 |
||
541 |
self selectedProcessesDo:[:p | |
|
1896 | 542 |
p restart. |
817 | 543 |
] |
544 |
! |
|
545 |
||
143 | 546 |
resumeProcess |
547 |
"resume the selected process (i.e. let it run) " |
|
548 |
||
549 |
self selectedProcessesSend:#resume |
|
550 |
! |
|
551 |
||
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
552 |
statusMenu |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
553 |
"return a popUpMenu" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
554 |
|
1620 | 555 |
<resource: #programMenu> |
556 |
||
1932 | 557 |
|items labels selectors m sel allRestartable| |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
558 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
559 |
device ctrlDown ifTrue:[ |
1932 | 560 |
items := #( |
561 |
('\c detail' toggleDetail) |
|
2981 | 562 |
('-') |
563 |
('hard terminate' hardTerminateProcess) |
|
1932 | 564 |
). |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
565 |
] ifFalse:[ |
1932 | 566 |
items := #( |
567 |
('inspect' inspectSelection) |
|
568 |
('debug' debugProcess) |
|
569 |
"/ ('debug when resumed' debugProcessWhenResumed) |
|
570 |
('-') |
|
571 |
('resume' resumeProcess) |
|
572 |
('suspend' suspendProcess) |
|
573 |
('stop' stopProcess) |
|
574 |
('-') |
|
575 |
('abort' abortProcess) |
|
576 |
('terminate' terminateProcess) |
|
577 |
('terminate group' terminateProcessGroup) |
|
578 |
('restart' restartProcess) |
|
579 |
('-') |
|
580 |
('raise prio' raisePrio) |
|
581 |
('lower prio' lowerPrio) |
|
582 |
). |
|
583 |
||
584 |
updateProcess isNil ifTrue:[ |
|
585 |
items := #( |
|
586 |
('update' updateView) |
|
587 |
('-') |
|
588 |
) , items. |
|
589 |
]. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
590 |
]. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
591 |
|
1932 | 592 |
m := PopUpMenu |
593 |
itemList:items |
|
594 |
resources:resources |
|
595 |
performer:self. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
596 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
597 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
598 |
listView hasSelection ifFalse:[ |
1932 | 599 |
m disableAll:#( |
600 |
inspectSelection |
|
601 |
debugProcess |
|
602 |
debugProcessWhenResumed |
|
603 |
resumeProcess |
|
604 |
suspendProcess |
|
605 |
stopProcess |
|
606 |
restartProcess |
|
607 |
abortProcess |
|
608 |
terminateProcess |
|
609 |
terminateProcessGroup |
|
610 |
raisePrio |
|
611 |
lowerPrio |
|
612 |
) |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
613 |
] ifTrue:[ |
1932 | 614 |
allRestartable := true. |
615 |
self selectedProcessesDo:[:p | |
|
616 |
p isRestartable ifFalse:[ |
|
617 |
allRestartable := false |
|
618 |
]. |
|
619 |
]. |
|
620 |
allRestartable ifFalse:[ |
|
621 |
m disable:#restartProcess |
|
622 |
]. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
623 |
]. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
624 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
625 |
m checkToggleAt:#toggleDetail put:showDetail. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
626 |
^ m |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
627 |
|
1932 | 628 |
"Created: / 23.1.1997 / 03:05:54 / cg" |
629 |
"Modified: / 14.10.1998 / 17:15:43 / cg" |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
630 |
! |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
631 |
|
92 | 632 |
stopProcess |
633 |
"stop the selected process - not even interrupts will wake it up" |
|
634 |
||
635 |
self selectedProcessesSend:#stop |
|
636 |
! |
|
637 |
||
19 | 638 |
suspendProcess |
92 | 639 |
"suspend the selected process - interrupts will let it run again" |
640 |
||
58 | 641 |
self selectedProcessesSend:#suspend |
85 | 642 |
! |
45 | 643 |
|
208 | 644 |
terminateProcess |
645 |
"terminate the selected process" |
|
92 | 646 |
|
208 | 647 |
self selectedProcessesSend:#terminate |
663
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
648 |
! |
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
649 |
|
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
650 |
terminateProcessGroup |
817 | 651 |
"terminate the selected process with all of its subprocesses" |
663
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
652 |
|
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
653 |
self selectedProcessesSend:#terminateGroup |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
654 |
! |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
655 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
656 |
toggleDetail |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
657 |
"toggle detail" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
658 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
659 |
showDetail := showDetail not. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
660 |
self updateView |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
661 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
662 |
"Modified: 23.1.1997 / 02:33:03 / cg" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
663 |
"Created: 23.1.1997 / 02:33:30 / cg" |
19 | 664 |
! ! |
665 |
||
143 | 666 |
!ProcessMonitor methodsFor:'private'! |
667 |
||
668 |
selectedProcessesDo:aBlock |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
669 |
"evaluate aBlock on all selected processes" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
670 |
|
143 | 671 |
|p nr sel| |
85 | 672 |
|
143 | 673 |
sel := listView selection. |
674 |
sel isNil ifTrue:[^ self]. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
675 |
|
143 | 676 |
(sel isKindOf:Collection) ifTrue:[ |
1896 | 677 |
sel do:[:n | |
678 |
nr := n - 2. "for headlines" |
|
679 |
nr notNil ifTrue:[ |
|
680 |
nr > 0 ifTrue:[ |
|
681 |
p := processes at:nr. |
|
682 |
(p notNil and:[p ~~ 0]) ifTrue:[ |
|
683 |
aBlock value:p |
|
684 |
] |
|
685 |
] |
|
686 |
] |
|
687 |
] |
|
85 | 688 |
] ifFalse:[ |
1896 | 689 |
nr := sel - 2. "for headlines" |
690 |
nr notNil ifTrue:[ |
|
691 |
nr > 0 ifTrue:[ |
|
692 |
p := processes at:nr. |
|
693 |
(p notNil and:[p ~~ 0]) ifTrue:[ |
|
694 |
aBlock value:p |
|
695 |
] |
|
696 |
] |
|
697 |
] |
|
85 | 698 |
]. |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
699 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
700 |
"Modified: 23.1.1997 / 03:10:53 / cg" |
143 | 701 |
! |
702 |
||
703 |
selectedProcessesSend:aSelector |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
704 |
"send a message to all selected processes" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
705 |
|
143 | 706 |
self selectedProcessesDo:[:p | |
1896 | 707 |
p perform:aSelector |
143 | 708 |
]. |
709 |
self updateView. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
710 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
711 |
"Modified: 23.1.1997 / 02:34:49 / cg" |
85 | 712 |
! ! |
713 |
||
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
714 |
!ProcessMonitor methodsFor:'process selection'! |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
715 |
|
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
716 |
getProcessList |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
717 |
"select processes to display. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
718 |
Subclasses may redefine this" |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
719 |
|
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
720 |
|coll| |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
721 |
|
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
722 |
showDetail ifTrue:[ |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
723 |
coll := Process allSubInstances asOrderedCollection. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
724 |
] ifFalse:[ |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
725 |
coll := ProcessorScheduler knownProcesses asOrderedCollection. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
726 |
]. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
727 |
^ coll |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
728 |
! ! |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
729 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
730 |
!ProcessMonitor methodsFor:'user actions'! |
85 | 731 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
732 |
doubleClicked |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
733 |
"open a debugger on the selected process" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
734 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
735 |
self debugProcess |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
736 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
737 |
"Created: 23.1.1997 / 03:21:30 / cg" |
85 | 738 |
! ! |
208 | 739 |
|
771
5cd10b4845f3
oops - catching the terminateSignal is no good idea
Claus Gittinger <cg@exept.de>
parents:
682
diff
changeset
|
740 |
!ProcessMonitor class methodsFor:'documentation'! |
208 | 741 |
|
742 |
version |
|
2981 | 743 |
^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.74 2001-02-13 15:01:20 cg Exp $' |
1053 | 744 |
! ! |