EclipseSWT Memory Monitor Plugin


Copyright © 2002-2005, KyrSoft

Contents


Overview

The Memory Monitor Plugin is an add-on module for the Eclipse Workbench, which offers:

This Eclipse Memory Monitor offers an Eclipse View based show up representation and the Memory Monitor. It's settings can be customized via the Window|Preferences... Memory Monitor preferences page.

Using the Memory Monitor View

There are actually three ways available to start the Memory Monitor:

  1. You can press the icon button from the Eclipse toolbar:



  2. instead you can also select the Window| Memory Monitor menu entry to start the memory monitor:



  3. you can also use the usual Window| Show View| Other... panel and select the Memory Monitor from there



All of the above shown invocation methods should start the following default Memory Monitor View:

 

This Memory Monitor has some support for customizing it's settings via an Eclipse Preferences page entry. Thus you can customize the Memory Monitor's settings as you like. In order to customize the Memory Monitor's settings, open the main Eclipse Prefernces window and select the Memory Monitor entry inside the treeview, as shown below.

In order to reset the Memory Monitor to his preset default settings, just press the Reset Defaults button and afterwards the Apply or OK button.

Using the Memory Monitor's automatic GC option

The automatic GC setting is as a default disabled. To setup and activate this feature, fill in the appropriate automatic garbage collection activation size in bytes (the default shown value is nearly ~64 MB = 67108864 bytes) into the shown text field or use the beneath slider and activate the check box:

The value entered into the text field must be a multiple of 1024 bytes and should be slightly smaller than the inside Eclipse used or setup JVM -Xmxn value.

Further you might want to change the default Auto GC delay setting (the default delay time is setup to 5 minutes) to some other interval time. The Auto GC delay time is the time interval in minutes after which garbage collection runs will be repeatedly performed, as far as the setup memory size has been reached or exceeded. NOTE: that the Auto GC delay time value is needed to give the user and also the Eclipse IDE a chance to be able to execute other tasks or events during the elapsing time interval. Otherwise the Eclipse Workbench would possibly always again and again be executing an automatic GC immediately and so may be blocking other actual Eclipse IDE tasks.

After doing so, enable the Activate automatic GC... check box to finally allow automatic GC to take place at all.

If the memory warning option has been activated or enabled, the used Memory Monitor view will indicate this by showing the automatic GC setup size as an default orange value in Mbytes, which is followed by the word aGC. Otherwise, if this option is disabled, this orange string will not be shown. You can generally see from this indicator too, if the auto GC option is enabled or disabled.

PLEASE NOTE: that for thread reusing and optimization reasons, the auto GC option additionally only works on an active/opened memory view!

From this point on, you have to use any of the Memory Monitor views in the normal usual way, but now just in case the setup auto GC memory size has been reached or exceeded inside Eclipse, a horizontal dotted orange colored line will always been shown in the memory monitor drawing area, which indicates when a garbage collection has been performed:

These dotted lines inform you that the automatic GC memory size has been reached or exceeded and that an automatic GC has been executed.

NOTE: that if the memory monitor view might be actually in a freezed/halted state you won't see any drawing or GC taking place. You first have to re-enable (sort of temporary activate again...) this temporary disabled flag, by clicking on the memory monitor drawing area with the mouse, to freeze/release the actual used Memory Monitor view:

this will then again activate temporary the automatic GC feature. Please see also the below NOTE about: Freezing/Releasing the Memory Monitor's drawing area, which is important here!

Using the Memory Monitor's memory warn option

The memory warning setting is as a default disabled. To setup and activate this warning feature, fill in the appropriate critical size in bytes (the default shown value is nearly ~64 MB = 67108864 bytes) into the shown text field or use the beneath slider and activate the check box:

The value entered into the text field must be a multiple of 1024 bytes and should be slightly smaller than the inside Eclipse used or setup JVM -Xmxn value. After doing so, enable the Activate warning... check box to finally allow memory warnings to take place at all.

If the memory warning option has been activated or enabled, any used Memory Monitor view will indicate this by showing the critical setup size as a default red value in Mbytes which is followed by the word warn. Otherwise, if this option is disabled, this red string will not be shown. You can generally see from this indicator too, if the warn option is enabled or disabled.

PLEASE NOTE: that for thread reusing and optimization reasons, the warn option additionally only works on active/opened memory views. This means in this case, that the Memory Monitor view must be the active view!

From this point on, you have to use any of the Memory Monitor views in the normal usual way, but now just in case the setup critical memory size has been reached or exceeded inside Eclipse, the graph view indicates this by drawing warning colored solid lines above the related memory graph areas:

 

Additionally also a memory monitor warning status line appears:

This status line warning indication informs you that the critical memory size has been reached or exceeded. The status line warning indication disappears automatically, when the actual used Workbench memory shrinks under the previously setup warn option value.

In case the critical memory size has been reached or exceeded you can try to press the garbage collection button in order to free up some used memory:

After doing so, the Memory Monitor view continues to show the allocated and used memory, but the status line warning indication might now have disappeared, in case the actual used heap memory size is now lower than the setup warn option memory size.

Please see also the NOTE about: Freezing/Releasing the Memory Monitor's drawing area, which is important here!

Freezing/Releasing the Memory Monitor's drawing area

By clicking with any mouse button on the Memory Monitor's drawing area, you can freeze in the momentary shown drawing area and thus you can get a sort of momentary heap memory snapshot. Clicking again with any of the mouse buttons onto the drawing area releases the drawing areas freezing and updates the area accordingly to the actual memory state. This sort of heap snapshot feature can be useful in order to get a better overview or comparison between different Eclipse memory usage states!

A freezed in Memory Monitor's drawing area will be indicated by a single "*" character at the bottom of the drawing area right beneath the shown used memory usage. This snowflake symbol is now always used to give the user some sort of visual freezing indicator for possibly freezed in Memory Monitor's drawing areas. This way it should be easier for users to quickly determine if a Memory Monitor's drawing area is freezed or not.

Uninstall

To uninstall the Memory Monitor just delete it's plugin directory from your Eclipse plugins installation directory. Then restart Eclipse.

Compatibility

The Memory Monitor Plugin has been tested with versions of Eclipse R3.1.1 and the JDK 1.5 running under Windows 2000 SP4. This version might not work with earlier Eclipse versions.

Contacts

If you have problems with the installation of the Memory Monitor or support questions, you are welcome to contact

via email: info@kyrsoft.com.

For any other questions regarding the operation of Eclipse, or any general Java questions you are encouraged to visit the appropriate newsgroups on the Eclipse news server. There you will find many good people who are willing to help others with technical problems.

Information on the Eclipse newsgroups is available at:

http://www.eclipse.org/.


Copyright © 2002-2005, KyrSoft