|
Class: MemoryMonitorView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--MemoryMonitorView
- Package:
- stx:libtool
- Category:
- Interface-Tools-Monitors
- Version:
- rev:
1.42
date: 2023/07/06 15:13:14
- user: cg
- file: MemoryMonitorView.st directory: libtool
- module: stx stc-classLibrary: libtool
Shows memory usage (oldspace + newspace). Simple, but useful.
The numbers shown are:
tot total memory usage (i.e. allocated oldSpace + allocated newSpace)
(does not include the second semispace and other help-areas,
such as the remembered set etc.)
all current oldSpace in use + newSpace in use
new current newSpace in use
frl free space in (fragmented) free lists
fre compact free area above the used oldSpace
old current oldSpace in use
mal memory used by malloc (netto)
mto total memory that has been reserved by the malloc subsystem
(may contained mem that has been freed or not yet allocated)
cod dynamic compiled code space size (just in time compiler)
max, extreme values of 'tot' since the monitor started
min (can be reset by typing 'r' in the view)
t tenure threshold (1 .. 30)
I incremental GC state (2 = idle)
weak number of weak objects
rem size of rememberedSet
minsc: percent of newspace remaining after scavenge (worst case)
(i.e. the minimum %% of scavenged objects)
count number of scavenges since system started
% percentage of live objects in newSpace after last scavenge
(i.e. this is the garbage vs. living objects ratio of
newSpace objects after the last scavenge)
the graphic shows:
orange newSpace used
green free memory in freeLists
white oldSpace used
the popupMenu offers GC functions; keyboard options are:
'f' -> faster; 's' -> slower; 'r' -> reset min/max
Disclaimer:
this was one of the first tools written for ST/X (around 1989/90);
today, it would probably be written differently...
copyrightCOPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
drawing
-
displayKilo: aNumber name: nm y: y
-
-
initializeDrawAction
-
extracted into a separate block to avoid memory allocation in updateDisplay
-
redraw
-
redraw all
-
redrawX: x y: y width: w height: h
-
redraw data
-
updateDisplay
-
update picture; trigger next update
-
updateLineX: x total: total old: oldSpaceSize new: newSpaceUsed free: freeMem
-
-
updateNumbers
-
redraw numbers.
The values shown are:
max: maximum memory used since monitor started
min: minimum memory used since monitor started
tot: total memory used (overall oldSpace + overall newSpace)
all: current memory in use (oldSpace + newSpace)
new: current newSpace in use
fre: current size of freelist in oldSpace
old: current oldSpace in use
mal: net allocated by malloc
mto: brutto memory reserved by malloc
code: current just-in-time compiled code cache size
t: current tenure age
I: IGC state
weak: number of weak arrays in the system
rem remembered set size
lrem lifo remembered set size
minsc: percent of newspace remaining after scavenge (worst case)
irq: max. interrupt delay
count of scavenges / last scavenge survivor rate
events
-
keyPress: key x: x y: y
-
reset max
-
sizeChanged: how from: oldExtentOrNil
-
my view has changed the size (not the contents)
initialization & release
-
destroy
-
(comment from inherited method)
unmap & destroy - make me invisible, destroy subviews then
make me unknown to the device
-
initialize
-
yellow.
-
realize
-
(comment from inherited method)
realize - make visible;
realizing is done very late (after layout is fixed) to avoid
visible rearranging of windows on the screen
-
reinitStyle
-
ignore style changes
menu functions
-
backgroundCollect
-
start a background (non disturbing) incremental GC.
Since the GC is performed at a low priority, it may not make progress if higher
prio processes are running
-
backgroundCollectWithDynamicPrio
-
setup the background collector to run at dynamic priority.
This is a new experimental feature.
-
backgroundCollectWithFixPrio
-
setup the background collector to run at a fix priority.
This is the default.
-
cleanupMemory
-
let all classes release unneeded, cached
data ...
-
cleanupMethodHistory
-
release the oldMethod history
-
collectGarbage
-
perform a blocking (non compressing) garbage collect
-
collectGarbageAndCompress
-
perform a blocking compressing garbage collect.
-
collectGarbageAndSymbols
-
perform a blocking (non compressing) garbage collect
and reclaim unreferenced symbols.
-
compressOldSpace
-
perform a blocking compress (only useful if freeList is not empty, after M&S)
-
compressSources
-
-
incrementalCollect
-
start an incremental GC which does not disturb too much, but is guaranteed to
make progress.
This is done by doing the IGC at a very high priority, but giving up the CPU after
every step. Due to the long delays, this may take a while to finish.
Notice, that this is different from doing a background collect: that one
may not make any progress if higher prio processes are runnable.
-
memoryMenu
-
-
rescale
-
reset max, to force a rescaling
-
resetStatisticValues
-
-
restartBackgroundCollector
-
(re)start a background (non disturbing) incremental GC.
Since the GC is performed at a low priority, it may not make progress if higher
prio processes are running
-
restartBackgroundFinalizer
-
(re)start a background (non disturbing) incremental finalizer process.
-
scavenge
-
perform a blocking newspace garbage collect.
(this is for debugging only - the system does this automatically)
-
stopBackgroundCollector
-
stop the background (non disturbing) incremental GC.
We do not recommend this - but maybe useful for debugging and
evaluating the programs behavior in heavy-load situations
(background collector cannot keep up with the allocation rate)
-
tenure
-
empty the newSpace, by aging all new objects immediately and transfering them
into oldSpace.
(this is for debugging only - the system does this automatically)
-
unloadAllAutoloadedClasses
-
unload all classes which were autoloaded and have no instances
-
updateFaster
-
faster
-
updateSlower
-
slower
private
-
updateProcess
-
|