eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'MemoryMonitorView':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: MemoryMonitorView


Inheritance:

   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

Description:


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...
    

copyright

COPYRIGHT (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.

Instance protocol:

drawing
o  displayKilo: aNumber name: nm y: y

o  initializeDrawAction
extracted into a separate block to avoid memory allocation in updateDisplay

o  redraw
redraw all

o  redrawX: x y: y width: w height: h
redraw data

o  updateDisplay
update picture; trigger next update

o  updateLineX: x total: total old: oldSpaceSize new: newSpaceUsed free: freeMem

o  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
o  keyPress: key x: x y: y
reset max

o  sizeChanged: how from: oldExtentOrNil
my view has changed the size (not the contents)

initialization & release
o  destroy
(comment from inherited method)
unmap & destroy - make me invisible, destroy subviews then
make me unknown to the device

o  initialize
yellow.

o  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

o  reinitStyle
ignore style changes

menu functions
o  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

o  backgroundCollectWithDynamicPrio
setup the background collector to run at dynamic priority.
This is a new experimental feature.

o  backgroundCollectWithFixPrio
setup the background collector to run at a fix priority.
This is the default.

o  cleanupMemory
let all classes release unneeded, cached
data ...

o  cleanupMethodHistory
release the oldMethod history

o  collectGarbage
perform a blocking (non compressing) garbage collect

o  collectGarbageAndCompress
perform a blocking compressing garbage collect.

o  collectGarbageAndSymbols
perform a blocking (non compressing) garbage collect
and reclaim unreferenced symbols.

o  compressOldSpace
perform a blocking compress (only useful if freeList is not empty, after M&S)

o  compressSources

o  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.

o  memoryMenu

o  rescale
reset max, to force a rescaling

o  resetStatisticValues

o  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

o  restartBackgroundFinalizer
(re)start a background (non disturbing) incremental finalizer process.

o  scavenge
perform a blocking newspace garbage collect.
(this is for debugging only - the system does this automatically)

o  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)

o  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)

o  unloadAllAutoloadedClasses
unload all classes which were autoloaded and have no instances

o  updateFaster
faster

o  updateSlower
slower

private
o  updateProcess



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 01:27:15 GMT