author | Claus Gittinger <cg@exept.de> |
Tue, 05 Sep 2006 18:45:14 +0200 | |
changeset 7087 | c46a141cfe46 |
parent 6825 | ac5b9d134326 |
child 7860 | e160fb58f797 |
permissions | -rw-r--r-- |
45 | 1 |
" |
2 |
COPYRIGHT (c) 1992 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 |
||
2651 | 13 |
"{ Package: 'stx:libtool' }" |
14 |
||
19 | 15 |
StandardSystemView subclass:#MemoryUsageView |
1348 | 16 |
instanceVariableNames:'rawInfo info list sortBlock titleLabel' |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
17 |
classVariableNames:'' |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
18 |
poolDictionaries:'' |
1053 | 19 |
category:'Monitors-ST/X' |
19 | 20 |
! |
21 |
||
769 | 22 |
!MemoryUsageView class methodsFor:'documentation'! |
19 | 23 |
|
45 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 1992 by Claus Gittinger |
|
27 |
All Rights Reserved |
|
19 | 28 |
|
45 | 29 |
This software is furnished under a license and may be used |
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
19 | 37 |
|
45 | 38 |
documentation |
39 |
" |
|
40 |
this view shows an overview over the memory usage of the system. |
|
41 |
usage: |
|
42 |
MemoryUsageView new open |
|
19 | 43 |
|
45 | 44 |
Since scanning all memory takes some time, this is not done |
45 |
automatically, but upon request. See the middlebuttonmenu-'update' |
|
46 |
function. |
|
47 |
" |
|
19 | 48 |
! ! |
49 |
||
1823 | 50 |
!MemoryUsageView class methodsFor:'startup'! |
51 |
||
52 |
isVisualStartable |
|
53 |
^ true |
|
54 |
||
55 |
"Created: / 10.8.1998 / 16:02:59 / cg" |
|
56 |
! ! |
|
57 |
||
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
58 |
!MemoryUsageView methodsFor:'initialization'! |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
59 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
60 |
initialize |
1348 | 61 |
|helpView headLine| |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
62 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
63 |
super initialize. |
4253 | 64 |
self label:'Memory Usage'. |
19 | 65 |
|
6501 | 66 |
headLine := ' Class' paddedTo:50 with:Character space. |
67 |
headLine := headLine , '# of Insts Avg sz Max sz Bytes %Mem %Accum.'. |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
68 |
|
1348 | 69 |
titleLabel := Label in:self. |
70 |
titleLabel origin:(0.0 @ 0.0) corner:(1.0 @ titleLabel height). |
|
71 |
titleLabel borderWidth:0. |
|
72 |
titleLabel label:headLine. |
|
73 |
titleLabel adjust:#left. |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
74 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
75 |
self extent:((font widthOf:headLine) + (device horizontalPixelPerMillimeter * 15) rounded) @ self height. |
19 | 76 |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
77 |
helpView := ScrollableView for:SelectionInListView in:self. |
1348 | 78 |
helpView origin:(0.0 @ titleLabel height) corner:1.0 @ 1.0. |
92 | 79 |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
80 |
list := helpView scrolledView. |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
81 |
|
1348 | 82 |
titleLabel origin:(list originRelativeTo:self) x @ 0.0. |
92 | 83 |
|
1273
3a8a91e6c5fa
give my listView a fixed font.
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
84 |
list font:(EditTextView defaultFont). |
1348 | 85 |
titleLabel font:(EditTextView defaultFont). |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
86 |
list menuHolder:self; menuPerformer:self; menuMessage:#usageMenu. |
92 | 87 |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
88 |
" |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
89 |
MemoryUsageView open |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
90 |
" |
1273
3a8a91e6c5fa
give my listView a fixed font.
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
91 |
|
1348 | 92 |
"Modified: 14.10.1997 / 21:30:23 / cg" |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
93 |
! ! |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
94 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
95 |
!MemoryUsageView methodsFor:'menu actions'! |
19 | 96 |
|
1348 | 97 |
collectGarbageAndUpdate |
98 |
self withWaitCursorDo:[ |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
99 |
ObjectMemory tenure. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
100 |
ObjectMemory compressingGarbageCollect. |
1348 | 101 |
]. |
102 |
self update. |
|
103 |
||
104 |
"Created: 14.10.1997 / 21:36:38 / cg" |
|
105 |
"Modified: 14.10.1997 / 21:41:11 / cg" |
|
106 |
! |
|
107 |
||
1450 | 108 |
displayGlobalRefChainsToInsts |
109 |
|class| |
|
110 |
||
111 |
list selection notNil ifTrue:[ |
|
112 |
class := (info at:(list selection)) at:1. |
|
113 |
self withCursor:(Cursor questionMark) do:[ |
|
114 |
|insts| |
|
115 |
||
116 |
" |
|
117 |
special kludge |
|
118 |
" |
|
119 |
class isSymbol ifTrue:[ |
|
2653 | 120 |
class == #NameSpace ifFalse:[ |
1450 | 121 |
self information:'classes are directly refered to by Smalltalk'. |
122 |
^ self. |
|
123 |
]. |
|
124 |
class := (Smalltalk at:class) class. |
|
125 |
insts := class allSubInstances. |
|
126 |
insts remove:class soleInstance ifAbsent:nil |
|
127 |
] ifFalse:[ |
|
128 |
insts := class allInstances. |
|
129 |
]. |
|
130 |
insts size > 500 ifTrue:[ |
|
131 |
(self confirm:'there are ' , insts size printString , ' instances.\\Do you really want to see them all ?' withCRs) |
|
2855 | 132 |
ifFalse:[ |
133 |
(self confirm:'Show ref-path to some instances only ?' withCRs) |
|
134 |
ifFalse:[ |
|
135 |
^ self |
|
136 |
]. |
|
137 |
insts := (insts asArray copyTo:100) |
|
138 |
] |
|
1450 | 139 |
]. |
140 |
insts := insts asArray. |
|
141 |
ObjectMemory displayRefChainToAny:insts |
|
142 |
] |
|
143 |
] |
|
144 |
||
145 |
"Modified: / 15.10.1996 / 22:09:29 / cg" |
|
146 |
"Created: / 3.2.1998 / 00:03:22 / cg" |
|
147 |
! |
|
148 |
||
45 | 149 |
inspectInstances |
57 | 150 |
|class| |
45 | 151 |
|
57 | 152 |
list selection notNil ifTrue:[ |
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
153 |
class := (info at:(list selection)) at:1. |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
154 |
self withCursor:(Cursor questionMark) do:[ |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
155 |
|insts| |
52 | 156 |
|
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
157 |
" |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
158 |
special kludge |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
159 |
" |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
160 |
class isSymbol ifTrue:[ |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
161 |
class == #NameSpace ifFalse:[ |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
162 |
^ UserPreferences current systemBrowserClass open |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
163 |
]. |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
164 |
class := (Smalltalk at:class) class. |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
165 |
insts := class allSubInstances. |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
166 |
insts remove:class soleInstance ifAbsent:nil |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
167 |
] ifFalse:[ |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
168 |
insts := class allInstances. |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
169 |
]. |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
170 |
insts size > 500 ifTrue:[ |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
171 |
(self confirm:'there are ' , insts size printString , ' instances.\\Do you really want to see them all ?' withCRs) |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
172 |
ifFalse:[^ self] |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
173 |
]. |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
174 |
insts inspect |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
175 |
] |
52 | 176 |
] |
770 | 177 |
|
178 |
"Modified: 15.10.1996 / 22:09:29 / cg" |
|
52 | 179 |
! |
180 |
||
1738 | 181 |
inspectInstancesWithSearch |
182 |
|filter filterBlock class| |
|
183 |
||
184 |
filter := '[:inst | "<some condition for inst>" ]'. |
|
185 |
[filterBlock isNil] whileTrue:[ |
|
186 |
filter := Dialog request:'filter block:' initialAnswer:filter. |
|
187 |
filter size == 0 ifTrue:[^ self]. |
|
188 |
||
189 |
filterBlock := Compiler evaluate:filter. |
|
190 |
filterBlock isBlock ifFalse:[ |
|
191 |
self information:'bad syntax in block'. |
|
192 |
filterBlock := nil. |
|
193 |
]. |
|
194 |
]. |
|
195 |
||
196 |
list selection notNil ifTrue:[ |
|
197 |
class := (info at:(list selection)) at:1. |
|
198 |
self withCursor:(Cursor questionMark) do:[ |
|
199 |
|insts| |
|
200 |
||
201 |
" |
|
202 |
special kludge |
|
203 |
" |
|
204 |
class isSymbol ifTrue:[ |
|
2653 | 205 |
class == #NameSpace ifFalse:[ |
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2653
diff
changeset
|
206 |
^ UserPreferences current systemBrowserClass open |
1738 | 207 |
]. |
208 |
class := (Smalltalk at:class) class. |
|
209 |
insts := class allSubInstances. |
|
210 |
insts remove:class soleInstance ifAbsent:nil |
|
211 |
] ifFalse:[ |
|
212 |
insts := class allInstances. |
|
213 |
]. |
|
214 |
insts := insts select:filterBlock. |
|
215 |
insts size > 500 ifTrue:[ |
|
216 |
(self confirm:'there are ' , insts size printString , ' instances.\\Do you really want to see them all ?' withCRs) |
|
217 |
ifFalse:[^ self] |
|
218 |
]. |
|
219 |
insts inspect |
|
220 |
] |
|
221 |
] |
|
222 |
||
223 |
"Modified: 15.10.1996 / 22:09:29 / cg" |
|
224 |
! |
|
225 |
||
52 | 226 |
inspectOwners |
69 | 227 |
|class inspector| |
52 | 228 |
|
57 | 229 |
list selection notNil ifTrue:[ |
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
230 |
class := (info at:(list selection)) at:1. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
231 |
" |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
232 |
special kludge |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
233 |
" |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
234 |
class isSymbol ifTrue:[^self]. |
770 | 235 |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
236 |
self withCursor:(Cursor questionMark) do:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
237 |
|owners dict| |
52 | 238 |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
239 |
owners := (ObjectMemory whoReferencesInstancesOf:class). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
240 |
owners isNil ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
241 |
self information:'no owners found - next GC should remove it'. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
242 |
^ self |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
243 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
244 |
owners := owners asOrderedCollection. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
245 |
owners size > 500 ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
246 |
(self confirm:'there are ' , owners size printString , ' owners.\\Do you really want to see them all ?' withCRs) |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
247 |
ifFalse:[^ self] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
248 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
249 |
dict := IdentityDictionary new. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
250 |
owners do:[:owner | |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
251 |
|set names oClass s| |
52 | 252 |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
253 |
" |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
254 |
skip weakArrays ... (they dont count) |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
255 |
" |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
256 |
(owner isMemberOf:WeakArray) ifFalse:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
257 |
set := Set new. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
258 |
owner == Smalltalk ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
259 |
owner keysAndValuesDo:[:key :val | |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
260 |
(val isMemberOf:class) ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
261 |
set add:key |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
262 |
] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
263 |
] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
264 |
] ifFalse:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
265 |
names := owner class allInstVarNames. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
266 |
oClass := owner class. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
267 |
1 to:oClass instSize do:[:i | |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
268 |
((owner instVarAt:i) isMemberOf:class) ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
269 |
set add:(names at:i). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
270 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
271 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
272 |
oClass isVariable ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
273 |
oClass isPointers ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
274 |
1 to:owner basicSize do:[:i | |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
275 |
((owner basicAt:i) isMemberOf:class) ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
276 |
set add:i |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
277 |
] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
278 |
] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
279 |
] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
280 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
281 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
282 |
" |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
283 |
put a describing string into the dictionary |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
284 |
" |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
285 |
s := 'references in: '. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
286 |
set do:[:name | |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
287 |
name isString ifTrue:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
288 |
s := s , name , ' ' |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
289 |
] ifFalse:[ |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
290 |
s := s , '[' , name printString , '] ' |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
291 |
] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
292 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
293 |
dict at:owner put:s. |
57 | 294 |
"/ dict at:owner put:set |
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
295 |
] |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
296 |
]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
297 |
inspector := DictionaryInspectorView openOn:dict. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
298 |
inspector listView doubleClickAction:[:lineNr | inspector doInspectKey]. |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
299 |
] |
45 | 300 |
] |
770 | 301 |
|
302 |
"Modified: 15.10.1996 / 22:09:38 / cg" |
|
45 | 303 |
! |
304 |
||
2858 | 305 |
nilInstances |
306 |
|class| |
|
307 |
||
308 |
list selection notNil ifTrue:[ |
|
309 |
class := (info at:(list selection)) at:1. |
|
310 |
self withCursor:(Cursor questionMark) do:[ |
|
311 |
|insts| |
|
312 |
||
313 |
insts := class allInstances. |
|
314 |
insts notEmpty ifTrue:[ |
|
315 |
(self confirm:'there are ' , insts size printString , ' instances.\\Do you really want to nil them all ?' withCRs) |
|
316 |
ifTrue:[ |
|
317 |
insts do:[:each | |
|
318 |
each becomeNil |
|
319 |
] |
|
320 |
] |
|
321 |
]. |
|
322 |
] |
|
323 |
] |
|
324 |
||
325 |
"Modified: 15.10.1996 / 22:09:29 / cg" |
|
326 |
! |
|
327 |
||
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
328 |
sortByAverageSize |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
329 |
self label:'Memory usage; by average size'. |
924 | 330 |
"/ sortBlock := [:a :b | ((a at:3)/(a at:2)) > ((b at:3)/(b at:2))]. |
331 |
sortBlock := [:a :b | |n1 n2 m1 m2| |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
332 |
n1 := ((a at:3)/(a at:2)). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
333 |
n2 := ((b at:3)/(b at:2)). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
334 |
n1 > n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
335 |
or:[n1 == n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
336 |
and:[(a at:1) displayString < (b at:1) displayString]]]. |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
337 |
self updateDisplay |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
338 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
339 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
340 |
! |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
341 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
342 |
sortByClass |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
343 |
self label:'Memory usage; by class'. |
2757 | 344 |
sortBlock := [:a :b | |c1 c2 s1 s2| |
345 |
||
346 |
c1 := (a at:1). |
|
347 |
c2 := (b at:1). |
|
348 |
||
349 |
s1 := c1 isBehavior ifTrue:[ c1 name] ifFalse:[ c1 displayString ]. |
|
350 |
s2 := c2 isBehavior ifTrue:[ c2 name ] ifFalse:[ c2 displayString ]. |
|
351 |
s1 < s2]. |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
352 |
self updateDisplay |
643 | 353 |
|
354 |
"Modified: 28.6.1996 / 14:32:38 / cg" |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
355 |
! |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
356 |
|
2757 | 357 |
sortByClassNameWithoutPrefix |
358 |
self label:'Memory usage; by className without prefix'. |
|
359 |
sortBlock := [:a :b | |c1 c2 s1 s2| |
|
360 |
||
361 |
c1 := (a at:1). |
|
362 |
c2 := (b at:1). |
|
363 |
||
364 |
s1 := c1 isBehavior ifTrue:[ c1 nameWithoutPrefix ] ifFalse:[ c1 displayString ]. |
|
365 |
s2 := c2 isBehavior ifTrue:[ c2 nameWithoutPrefix ] ifFalse:[ c2 displayString ]. |
|
366 |
s1 < s2]. |
|
367 |
self updateDisplay |
|
368 |
||
369 |
||
370 |
||
371 |
||
372 |
||
373 |
||
374 |
||
375 |
! |
|
376 |
||
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
377 |
sortByInstCount |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
378 |
self label:'Memory usage; by instance count'. |
924 | 379 |
"/ sortBlock := [:a :b | (a at:2) > (b at:2) ]. |
380 |
sortBlock := [:a :b | |n1 n2| |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
381 |
n1 := (a at:2). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
382 |
n2 := (b at:2). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
383 |
n1 > n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
384 |
or:[n1 == n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
385 |
and:[(a at:1) displayString < (b at:1) displayString]]]. |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
386 |
self updateDisplay |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
387 |
! |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
388 |
|
924 | 389 |
sortByMaxSize |
390 |
self label:'Memory usage; by maximum size'. |
|
391 |
"/ sortBlock := [:a :b | (a at:4) > (b at:4)]. |
|
392 |
sortBlock := [:a :b | |n1 n2 m1 m2| |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
393 |
n1 := (a at:4). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
394 |
n2 := (b at:4). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
395 |
n1 > n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
396 |
or:[n1 == n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
397 |
and:[(a at:1) displayString < (b at:1) displayString]]]. |
924 | 398 |
self updateDisplay |
399 |
||
400 |
||
401 |
! |
|
402 |
||
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
403 |
sortByMemoryUsage |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
404 |
self label:'Memory usage; by memory usage'. |
924 | 405 |
"/ sortBlock := [:a :b | (a at:3) > (b at:3)]. |
406 |
sortBlock := [:a :b | |n1 n2| |
|
1387
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
407 |
n1 := (a at:3). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
408 |
n2 := (b at:3). |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
409 |
n1 > n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
410 |
or:[n1 == n2 |
355fc1057e11
better print of java objects
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
411 |
and:[(a at:1) displayString < (b at:1) displayString]]]. |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
412 |
self updateDisplay |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
413 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
414 |
|
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
415 |
! |
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
416 |
|
19 | 417 |
update |
418 |
self updateInfo. |
|
419 |
self updateDisplay |
|
92 | 420 |
! |
45 | 421 |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
422 |
usageMenu |
1619
6e4b1930841a
use new itemList message from PopUpMenu
Claus Gittinger <cg@exept.de>
parents:
1617
diff
changeset
|
423 |
<resource: #programMenu> |
6e4b1930841a
use new itemList message from PopUpMenu
Claus Gittinger <cg@exept.de>
parents:
1617
diff
changeset
|
424 |
|
1348 | 425 |
|m| |
426 |
||
427 |
m := PopUpMenu |
|
1617
2403cee7dc5a
use new itemList message from PopUpMenu
Claus Gittinger <cg@exept.de>
parents:
1513
diff
changeset
|
428 |
itemList:#( |
4253 | 429 |
('Sort by Class Name' sortByClass ) |
430 |
('Sort by Classes Basename' sortByClassNameWithoutPrefix ) |
|
431 |
('Sort by Inst Count' sortByInstCount ) |
|
432 |
('Sort by Memory Usage' sortByMemoryUsage ) |
|
433 |
('Sort by Average Size' sortByAverageSize ) |
|
434 |
('Sort by Maximum Size' sortByMaxSize ) |
|
1617
2403cee7dc5a
use new itemList message from PopUpMenu
Claus Gittinger <cg@exept.de>
parents:
1513
diff
changeset
|
435 |
('-') |
4253 | 436 |
('Inspect Instances' inspectInstances ) |
437 |
('Inspect with Search' inspectInstancesWithSearch ) |
|
438 |
('Inspect Owners' inspectOwners ) |
|
439 |
('Ref Chains' displayGlobalRefChainsToInsts ) |
|
440 |
('Clear (nil) Instances' nilInstances ) |
|
1617
2403cee7dc5a
use new itemList message from PopUpMenu
Claus Gittinger <cg@exept.de>
parents:
1513
diff
changeset
|
441 |
('-') |
4253 | 442 |
('Update' update ) |
443 |
('Collect Garbage & Update' collectGarbageAndUpdate ) |
|
1617
2403cee7dc5a
use new itemList message from PopUpMenu
Claus Gittinger <cg@exept.de>
parents:
1513
diff
changeset
|
444 |
) |
2403cee7dc5a
use new itemList message from PopUpMenu
Claus Gittinger <cg@exept.de>
parents:
1513
diff
changeset
|
445 |
resources:resources. |
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
446 |
|
1348 | 447 |
list hasSelection ifFalse:[ |
1741 | 448 |
m disableAll:#(inspectInstances inspectInstancesWithSearch |
449 |
inspectOwners |
|
450 |
displayGlobalRefChainsToInsts). |
|
1348 | 451 |
]. |
452 |
^ m |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
453 |
|
1450 | 454 |
"Modified: / 3.2.1998 / 00:04:16 / cg" |
45 | 455 |
! ! |
456 |
||
19 | 457 |
!MemoryUsageView methodsFor:'private'! |
458 |
||
45 | 459 |
updateDisplay |
460 |
"update the displayed list" |
|
19 | 461 |
|
49 | 462 |
windowGroup withCursor:Cursor wait do:[ |
1513 | 463 |
|classNames counts sumSizes maxSizes percents avgSizes |
464 |
l line allMemory |
|
465 |
overAllCount overAllAvgSize overAllMaxSize |
|
466 |
lastP sumPercent| |
|
49 | 467 |
|
1513 | 468 |
info := rawInfo asSortedCollection:sortBlock. |
19 | 469 |
|
1513 | 470 |
classNames := info collect:[:infoArray | |
471 |
|cls| |
|
19 | 472 |
|
1513 | 473 |
cls := infoArray at:1. |
474 |
cls == #Class ifTrue:[ |
|
475 |
'<all classes>' |
|
476 |
] ifFalse:[ |
|
477 |
cls == #Metaclass ifTrue:[ |
|
478 |
'<all metaclasses>' |
|
479 |
] ifFalse:[ |
|
480 |
cls == #PrivateMetaclass ifTrue:[ |
|
481 |
'<all private meta classes>' |
|
482 |
] ifFalse:[ |
|
483 |
cls == #PrivateClass ifTrue:[ |
|
484 |
'<all private classes>' |
|
485 |
] ifFalse:[ |
|
486 |
cls == #ObsoleteClass ifTrue:[ |
|
487 |
'<all obsolete classes>' |
|
488 |
] ifFalse:[ |
|
2653 | 489 |
cls == #NameSpace ifTrue:[ |
1513 | 490 |
'<all namespaces>' |
491 |
] ifFalse:[ |
|
492 |
cls isJavaClass ifTrue:[ |
|
1728 | 493 |
cls fullName asString copyReplaceAll:$/ with:$. |
1513 | 494 |
] ifFalse:[ |
6391 | 495 |
cls isObsolete ifTrue:[ |
496 |
cls name,' (obsolete)' |
|
497 |
] ifFalse:[ |
|
498 |
cls "displayString" name |
|
499 |
] |
|
1513 | 500 |
] |
501 |
] |
|
502 |
] |
|
503 |
] |
|
504 |
] |
|
505 |
] |
|
506 |
] |
|
507 |
]. |
|
19 | 508 |
|
1513 | 509 |
counts := info collect:[:infoArray | (infoArray at:2) ]. |
510 |
sumSizes := info collect:[:infoArray | (infoArray at:3) ]. |
|
511 |
maxSizes := info collect:[:infoArray | (infoArray at:4) ]. |
|
512 |
allMemory := sumSizes inject:0 into:[:sum :this | sum + this]. |
|
513 |
"/ allMemory := ObjectMemory bytesUsed. |
|
514 |
percents := sumSizes collect:[:sz | (sz asFloat / allMemory * 100)]. |
|
515 |
avgSizes := (1 to:sumSizes size) collect:[:i | (((sumSizes at:i) / (counts at:i)) * 10) rounded / 10.0]. |
|
516 |
sumPercent := 0. |
|
52 | 517 |
|
1513 | 518 |
l := OrderedCollection new. |
519 |
1 to:classNames size do:[:i | |
|
520 |
|line avgSz maxSz percent| |
|
19 | 521 |
|
1513 | 522 |
avgSz := avgSizes at:i. |
523 |
maxSz := maxSizes at:i. |
|
524 |
avgSz = maxSz ifTrue:[ |
|
525 |
avgSz := avgSz asInteger printString , ' '. |
|
526 |
]. |
|
6391 | 527 |
line := (classNames at:i) printStringPaddedTo:50 with:Character space. |
528 |
line := line contractTo:50. |
|
1513 | 529 |
line := line , ((counts at:i) printStringLeftPaddedTo:7). |
530 |
line := line , (avgSz printStringLeftPaddedTo:10). |
|
531 |
line := line , (maxSz printStringLeftPaddedTo:8). |
|
532 |
line := line , ((sumSizes at:i) printStringLeftPaddedTo:10). |
|
533 |
percent := (percents at:i). |
|
1348 | 534 |
"/ percent < 0.0 ifTrue:[self halt]. |
1513 | 535 |
line := line , ((percent asFixedPoint:1) printStringLeftPaddedTo:7). |
536 |
lastP := sumPercent := ((sumPercent + percent) min:100.0). |
|
537 |
line := line , ((sumPercent asFixedPoint:1) printStringLeftPaddedTo:7). |
|
538 |
l add:line |
|
539 |
]. |
|
1348 | 540 |
"/ (((lastP asFixedPoint:1) printStringLeftPaddedTo:7) startsWith:'99.') ifTrue:[self halt]. |
1513 | 541 |
"add summary line" |
542 |
overAllCount := counts inject:0 into:[:sum :this | sum + this]. |
|
543 |
overAllAvgSize := ((allMemory / overAllCount) * 10) rounded / 10.0. |
|
544 |
overAllMaxSize := maxSizes max. |
|
19 | 545 |
|
1513 | 546 |
l add:''. |
547 |
line := 'all objects' printStringPaddedTo:33 with:Character space. |
|
548 |
line := line , (overAllCount printStringLeftPaddedTo:7). |
|
549 |
line := line , (overAllAvgSize printStringLeftPaddedTo:10). |
|
550 |
line := line , (overAllMaxSize printStringLeftPaddedTo:8). |
|
551 |
line := line , (allMemory printStringLeftPaddedTo:10). |
|
552 |
line := line , (100.0 printStringLeftPaddedTo:7). |
|
553 |
l add:line. |
|
92 | 554 |
|
1513 | 555 |
list list:l. |
49 | 556 |
] |
142 | 557 |
|
1513 | 558 |
"Created: / 19.9.1995 / 15:30:47 / claus" |
1728 | 559 |
"Modified: / 19.7.1998 / 00:47:08 / cg" |
45 | 560 |
! |
19 | 561 |
|
45 | 562 |
updateInfo |
563 |
"scan all memory and collect the information" |
|
564 |
||
49 | 565 |
windowGroup withCursor:Cursor questionMark do:[ |
2651 | 566 |
|myProcess myPriority| |
45 | 567 |
|
2651 | 568 |
"find all objects, collect stuff in info" |
45 | 569 |
|
2651 | 570 |
" |
571 |
this is a time consuming operation; therefore lower my priority ... |
|
572 |
" |
|
573 |
myProcess := Processor activeProcess. |
|
574 |
myPriority := myProcess priority. |
|
575 |
myProcess priority:(Processor userBackgroundPriority). |
|
45 | 576 |
|
2651 | 577 |
rawInfo := IdentityDictionary new:600. |
52 | 578 |
|
2651 | 579 |
[ |behaviorFlag| |
142 | 580 |
|
2651 | 581 |
behaviorFlag := Behavior flagBehavior. |
142 | 582 |
|
2651 | 583 |
ObjectMemory allObjectsDo:[:o | |
584 |
|infoArray class bytes| |
|
45 | 585 |
|
142 | 586 |
"/ o isBehavior ifTrue:[ |
2651 | 587 |
class := o class. |
2987 | 588 |
(class flags notNil and:[(class flags bitAnd:behaviorFlag) ~~ 0]) ifTrue:[ |
6825 | 589 |
Error |
590 |
handle:[:ex |] |
|
591 |
do:[ |
|
592 |
o isObsolete ifTrue:[ |
|
593 |
class := #ObsoleteClass |
|
2651 | 594 |
] ifFalse:[ |
6825 | 595 |
o isMeta ifTrue:[ |
596 |
o isPrivate ifTrue:[ |
|
597 |
class := #PrivateMetaclass |
|
598 |
] ifFalse:[ |
|
599 |
class := #Metaclass |
|
600 |
] |
|
601 |
] ifFalse:[ |
|
602 |
o isPrivate ifTrue:[ |
|
603 |
class := #PrivateClass |
|
604 |
] ifFalse:[ |
|
605 |
(o isNameSpace |
|
606 |
and:[o ~~ NameSpace |
|
607 |
and:[o ~~ Smalltalk]]) |
|
608 |
ifTrue:[ |
|
609 |
class := #NameSpace |
|
610 |
] ifFalse:[ |
|
611 |
class := #Class |
|
612 |
] |
|
613 |
] |
|
614 |
] |
|
2651 | 615 |
] |
616 |
] |
|
617 |
]. |
|
769 | 618 |
|
2651 | 619 |
bytes := ObjectMemory sizeOf:o. |
620 |
infoArray := rawInfo at:class ifAbsent:[]. |
|
621 |
infoArray isNil ifTrue:[ |
|
622 |
infoArray := Array |
|
623 |
with:class |
|
624 |
with:1 |
|
625 |
with:bytes |
|
626 |
with:bytes. |
|
627 |
rawInfo at:class put:infoArray. |
|
628 |
] ifFalse:[ |
|
629 |
infoArray at:2 put:((infoArray at:2) + 1). |
|
630 |
infoArray at:3 put:((infoArray at:3) + bytes). |
|
631 |
infoArray at:4 put:((infoArray at:4) max: bytes). |
|
632 |
] |
|
633 |
]. |
|
634 |
] valueNowOrOnUnwindDo:[ |
|
635 |
myProcess priority:myPriority. |
|
636 |
]. |
|
45 | 637 |
] |
142 | 638 |
|
6825 | 639 |
"Modified: / 19-09-1995 / 15:29:10 / claus" |
640 |
"Modified: / 16-07-2006 / 10:45:32 / cg" |
|
19 | 641 |
! ! |
45 | 642 |
|
92 | 643 |
!MemoryUsageView methodsFor:'realization'! |
644 |
||
645 |
realize |
|
646 |
super realize. |
|
1348 | 647 |
titleLabel origin:(list originRelativeTo:self) x @ 0.0. |
92 | 648 |
self updateInfo. |
649 |
self sortByClass. |
|
1348 | 650 |
|
651 |
"Modified: 14.10.1997 / 21:03:52 / cg" |
|
92 | 652 |
! ! |
653 |
||
769 | 654 |
!MemoryUsageView class methodsFor:'documentation'! |
45 | 655 |
|
437
9526cb043cbc
list obsolete & removed classes separately
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
656 |
version |
6825 | 657 |
^ '$Header: /cvs/stx/stx/libtool/MemoryUsageView.st,v 1.47 2006-07-17 11:33:54 cg Exp $' |
45 | 658 |
! ! |